Sorry my english.
I´m converting a DirectX program to irrlicht.
Directx has a function to projects a vector from object space into screen space: D3DXVec3Project.
How to implement D3DXVec3Project into irrlicht?
D3DXVec3Project Function in irrlicht
What do you need it for?
You could do it by creating a transformation matrix. You can get the current transformations with Driver->getTransform().
Here's an example
TheVector should in the end hold a transformed screen space vector.
You could do it by creating a transformation matrix. You can get the current transformations with Driver->getTransform().
Here's an example
Code: Select all
matrix4 Mat;
Mat=Driver->getTransform(ETS_WORLD)*Driver->getTransform(ETS_VIEW)*Driver->getTransform(ETS_PROJECTION);
vector3df TheVector(1,1,1);
Mat.transformVect(TheVector);
Last edited by Luben on Tue Apr 24, 2007 3:32 pm, edited 1 time in total.
If you don't have anything nice to say, don't say anything at all.