# extrusion and rotation matrixes

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

## 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.

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 16
• 11
• 24
• 43
• 75