Original Post
I have a bunch of questions here that i'll clump into one post. I appreciate any useful response I get. :D I recently changed physics engines to physX, and thus had to change math libraries and ran into something I didn't have to worry about before when I bound the math classes. Here are some problems I have: Overloaded constructors, How do I bind these? NX_INLINE NxVec3(); explicit NX_INLINE NxVec3(NxReal a); NX_INLINE NxVec3(NxReal nx, NxReal ny, NxReal nz); NX_INLINE NxVec3(const NxVec3& v); Operators in your SDK vector example use friend Vector3 operator+(const Vector3 &a, const Vector3 &b); but this vector class uses NxVec3 operator +(const NxVec3 & v) const; Aside from modifying the NxVec3 class myself (I dont want to make changes to it), How can I bind this? EDIT: Globally defining NxVec3 operator-(const NxVec3& A,const NxVec3& B) return A.operator -(B); seems like an ugly but workable solution. I have several functions that simply will not bind. I have studied some and simply cannot see the error if there is infact one. Here are some examples: g_ascript_engine->RegisterObjectMethod("NxMat33", "void getRow(int,NxVec3 &out) const", asMETHODPR(NxMat33, getRow,(int,NxVec3&),void), asCALL_THISCALL); Declared as "NX_INLINE void NxMat33::getRow(int row, NxVec3 &) const;" g_ascript_engine->RegisterObjectMethod("NxMat33", "void getColumn(int,NxVec3 &out) const", asMETHODPR(NxMat33, getColumn,(int,NxVec3&),void), asCALL_THISCALL); Declared as "NX_INLINE void NxMat33::getColumn(int col, NxVec3 &) const;" g_ascript_engine->RegisterObjectMethod("NxMat33", "NxVec3 getRow(int) const", asMETHODPR(NxMat33, getRow,(int),NxVec3), asCALL_THISCALL); Declared as "NX_INLINE NxVec3 NxMat33::getRow(int row) const;" g_ascript_engine->RegisterObjectMethod("NxMat33", "NxVec3 getColumn(int) const", asMETHODPR(NxMat33, getColumn,(int),NxVec3), asCALL_THISCALL); Declared as "NX_INLINE NxVec3 NxMat33::getColumn(int col) const;" I get compiler error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'NxVec3 (__thiscall NxMat33::* )(int)' None of the functions with this name in scope match the target type Also, Does Ascript support inline functions? What kind of optimizations does the script compiler support? Thanks for reading, Keep up the great work Andreas. [Edited by - IndependentHat on April 3, 2009 12:56:33 AM]