Matrix4?
Ok, what I was looking to do was this. I have a mesh, loaded into a Node. Now the node is transformed and rotated, for viewing purposes. In another part of my code, I am attempting to creaate a collision model from the vertices of the mesh. There fore, I read the mesh vertices into memory, and then I need to transform and rotate THOSE values into 'real' space. I was just wondering, If there was a way to pass a S3DVertex value to the Matrix4 of the Node, and have it spit out the transformed value of the point??
I'm not sure that it's what you need but still...
There is S3DVertex::Normal vector. And there is transformVect method in matrix4. So you can do the following:
Do you need this or I missed something?
There is S3DVertex::Normal vector. And there is transformVect method in matrix4. So you can do the following:
Code: Select all
S3DVertex vertex; // your vertex
ISceneNode* node; // your node
core::matrix4 mat = node->getAbsoluteTransformation(); // your matrix
// apply the same transformation to your vertex
mat.transformVect(vertex.Normal);
there is another guest...
Ok, I think that is what I wanted, but now how would I reverse what I did? So I can get the original point back?? Would I do this?
core::matrix4 InvertMat;
bool Inverted = mat.getInverse(InvertMat);
mat.transformVect(Point);
Or is that NOT what I want to do?? I guess I confussed why the getInverse is a bool value, how could you NOT get a matrix back??
core::matrix4 InvertMat;
bool Inverted = mat.getInverse(InvertMat);
mat.transformVect(Point);
Or is that NOT what I want to do?? I guess I confussed why the getInverse is a bool value, how could you NOT get a matrix back??