Jump to content
  • Advertisement
Sign in to follow this  
giugio

extrusion and rotation matrixes

This topic is 2528 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello.
I'm creating an ifc importer(the specific are at : http://buildingsmart.../html/index.htm).
I have this problem:
I must extrude a beam, and i have the start point , the extrude direction and two rotation matrix ,
one for the beam position and one for the extrude position.
these are the matrixes:

position matrix:
0,0,1
0,1,0
1,0,0

extrude position
1,0,0
0,-1,0
0,0,1

I concatenated the two rotation matrixes and...


C3DMatrixIfc* pmx = m_pPositionAndAxis->GetRotationMatix();
C3DMatrixIfc* pmxExtrude = m_pExtrudePositionsAndAxis->GetRotationMatix();

*pmx = (*pmx) * (*pmxExtrude);
*m_vDirExtrusion = (*pmx) * *m_vDirExtrusion;
C3DVectorIfc start = StartPoint ;
EndPoint = start *m_vDirExtrusion * m_dDepth ;


this gives correct results , but i not understand ,why if i multiply for the rotation matrix only
the direction extrusion i get correct results(the beam is extruded correctly)
why if i multiply the EndPoint and StartPoint and mantaining the extrusion direction
after the extrusion i get wrong results?

is possible that when i multiply the extrusion direction
*pmx = (*pmx) * (*pmxExtrude);
*m_vDirExtrusion = (*pmx) * *m_vDirExtrusion;
*m_vDirExtrusion = (*pmx) * *m_vDirExtrusion;
is like multiply all for the matrix(*pmx) , because if i substitute the formula is

EndPoint = start *m_vDirExtrusion * m_dDepth ;

EndPoint = start *m_vDirExtrusion * (*pmx) * m_dDepth ;

I not understand!

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!