Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / SDK / Problem with 3DXI Export mesh
  RSS 2.0 ATOM  

Problem with 3DXI Export mesh
Rate this thread
 
35387
 
Permlink of this thread   Subscribe to this thread
avatar
  • marzoner
  • Posted: 09 October 2009 02:49 AM
  • Total Posts: 8
  • Joined: 11 September 2009 07:30 PM

I use this code to get the offset Matrix:

Matrix3 MaxOffTM(1)
Point3 OffPos 
ipgamenode->GetMaxNode()->GetObjOffsetPos()
Quat Rot 
ipgamenode->GetMaxNode()->GetObjOffsetRot()
ScaleValue scl 
ipgamenode->GetMaxNode()->GetObjOffsetScale()
MaxOffTM
.SetTrans(OffPos)
PreRotateMatrix(MaxOffTM
,Rot)
ApplyScaling(MaxOffTM
,scl)

And then, get mesh with IGameMesh:

IGameObject obj ipgamenode->GetIGameObject()

IGameMesh 
gM (IGameMesh*)obj;

if 
(gM->InitializeData())
{
    int numV 
gM->GetNumberOfVerts()
    for(i 
0;i<numV;i++)
   
{
     gM
->GetVertex(i,v)
     
//gM->GetVertex(i,v,true)//I have tried this yet;
   
}
}

when I export an model which have a node’s ‘PIVOT’ has Transformed in max[Affect pivot only],,I get a wrong model.
example:Rotate the node named node01’s ‘PIVOT’ x:90 y:0 z:0,then in result,I get node01 with wrong Transformation.But other node in the model is right.

what should i do?Thanks for your attention.



Replies: 0




   
  Settings Choose Theme color: