[ODE] TRIMESH_LAST_TRANSFORMATION implemented?

Jeffrey Smith jeffreys at Softimage.com
Mon Nov 15 11:02:59 MST 2004


Derek Arndt [mailto:deekpyro at charter.net] wrote:
> When looking at the moving trimesh example though I came across this
> commented code:
> 
> 
> /* 
> // NOT IMPLEMENTED YET 
> dTriMeshDataID TriMeshData = geomGetData(obj[i].geom[j]); 
> const double *DoubleArrayPtr = Bodies[BodyIndex].TransformationMatrix->GetArray(); 
> dGeomTriMeshDataSet( TriMeshData, 
>                      TRIMESH_LAST_TRANSFORMATION, 
>                      (void *) DoubleArrayPtr ); 
> */ 
>
> Does this mean it's not implemented yet? 

This is essentially pseudocode; i.e. the method by which you get the
homogeonous transform matrix will be dependent on your implementation.
The important part is:

> const double *DoubleArrayPtr = Bodies[BodyIndex].TransformationMatrix->GetArray(); 

Which means "put a flattened version of the transformation matrix into
a const double array.

> To get the transformation do they just mean calling
> dGeomGetRotation()?

No; that would only get you the rotation. You need the complete
transformation matrix, which includes the position as well. 

Jeff



More information about the ODE mailing list