Hi. denisT method is nicer and works perfectly. It returns OK because that’s what qsort function returns when everything is OK. Once you have called …
Hi. I’ve come up with this. Don’t know if it’s the most optimized way to do it, but it’s simple: fn compareFn el1 el2 sortTypeAsc: = ( case of ( …
Hi. You can try my C++ extensions. It contains two functions, one to get the UDeflector collision node and another to set it. <collision_node>…
This is a snip of code from my Doom3’s MD5 format exporter: fn getSkinBones theNode = ( — Bones list local boneList = #() — Set modify mode m…
Hi. Take a look at the skinOps interface. Anyway, should be something like this: numBones = skinOps.getNumberBones skinMod for b = 1 to numBones d…
This may help. It’s C++ code but the math is the same…
Hi. If what you want is the projection matrix only, you don’t need the view matrix. Also, keep in mind that a projection transform needs a 4×4 matrix…
Hi. This is the process I follow: Build a list of vertices (that could be a struct with all attributes you want for your vertex. e.g. vertex coord…
You have to transform the vertex position by the inverse of the object transform matrix. Something like this: fn getUntransformedVertices obj = ( l…
Hi. I’ve seen some implementations for Perlin’s DNoise function and what it does is compute the gradient (partial derivatives) for the noise function…
Seems like RayMeshGridIntersect works internally with a tri-mesh so the indices to hit faces are refering to the tri-mesh and not the editable poly ob…
You can access to particle properties through the particleObjectExt interface. So for example, if you want to get the TM for all active particles in …
There we go!. int GetNumChildren(INode *node) { int numChildren = 0; for (int i = 0; i < node->NumberOfChildren(); i++, numChildren++) num…
What notification method are you using? (filePostOpen, filePostOpenProcess…)
So you want to print the matrix in a message box?. void PrintMatrix(Matrix3 &mat) { TCHAR buffer[512]; memset(buffer, 0, 512); sprintf(buffer,…