Hi (again)
I have a question regarding the read of the transformation matrix of a specific view.
I import a existing U3D in Acrobat 3D, and print out the matrix.
Then i import the U3D into my program and receive a wrong matrix.
Right matrix (Acrobat 3D)
(-0.2514, -0.944258, 0.212544, 0), (-0.924883, 0.299095, 0.234806, 0), (-0.285289, -0.137548, -0.94852, 0), (828.097, 497.922, 3457.03, 1)
Wrong matrix (my application)
(0.251422, 0.944254, -0.212537, 0), (-0.924887, 0.299109, 0.234773, 0), (0.285257, 0.137545, 0.948530, 0), (0.828097, 0.497922, 3.457028, 1)
As you can see, some prefixes (- and +) are wrong, also the values in the last line.
I receive the matrix with that piece of code:
for ( unsigned int i = 0; i < m_pViewIndeces.size(); i++ ) {
U32 viewId = m_pViewIndeces[i]; IFXDECLARELOCAL( IFXView, pView );
result = m_pNodePalette->GetResourcePtr( viewId, IID_IFXView, (void**) &pView );
U32 index; IFXCHECKX(m_pNodePalette->FindByResourcePtr(pView, &index));
IFXMatrix4x4& viewMatrix = (IFXMatrix4x4&)pView->GetMatrix(0);
}
There are no detected errors, the program runs clean trough, but the matrix are wrong ...
Can someone give me please a hint what I'm doing wrong?
Or have someone example code how to receive the right matrix from a view?
Thanks in advance,
Patrick
Log in to post a comment.
Hi (again)
I have a question regarding the read of the transformation matrix of a specific view.
I import a existing U3D in Acrobat 3D, and print out the matrix.
Then i import the U3D into my program and receive a wrong matrix.
Right matrix (Acrobat 3D)
(-0.2514, -0.944258, 0.212544, 0),
(-0.924883, 0.299095, 0.234806, 0),
(-0.285289, -0.137548, -0.94852, 0),
(828.097, 497.922, 3457.03, 1)
Wrong matrix (my application)
(0.251422, 0.944254, -0.212537, 0),
(-0.924887, 0.299109, 0.234773, 0),
(0.285257, 0.137545, 0.948530, 0),
(0.828097, 0.497922, 3.457028, 1)
As you can see, some prefixes (- and +) are wrong, also the values in the last line.
I receive the matrix with that piece of code:
for ( unsigned int i = 0; i < m_pViewIndeces.size(); i++ )
{
U32 viewId = m_pViewIndeces[i];
IFXDECLARELOCAL( IFXView, pView );
result = m_pNodePalette->GetResourcePtr( viewId, IID_IFXView, (void**) &pView );
U32 index;
IFXCHECKX(m_pNodePalette->FindByResourcePtr(pView, &index));
IFXMatrix4x4& viewMatrix = (IFXMatrix4x4&)pView->GetMatrix(0);
}
There are no detected errors, the program runs clean trough, but the matrix are wrong ...
Can someone give me please a hint what I'm doing wrong?
Or have someone example code how to receive the right matrix from a view?
Thanks in advance,
Patrick