[ODE] adding direction parameter to CCylinder geom?

Rodrigo Hernandez kwizatz at aeongames.com
Wed Dec 28 11:05:53 MST 2005


I dont quite understand whats the purpose of having a direction in the 
way you descrived, if that means the cylinder width begins lying on 
either the X Y or Z axe, you can get the exact same results by rotating 
the geom 90 degrees on either X,Y or Z before you start the simulation, 
no need wto write any code inside ODE.

Cheers!

Graham Fyffe wrote:

>Hi everyone!  I am playing with adding a specified direction to the
>CCylinder geom.  I started by changing the struct from this:
>
>struct dxCCylinder : public dxGeom {
>  dReal radius,lz;	// radius, length along z axis
>  dxCCylinder (dSpaceID space, dReal _radius, dReal _length);
>  void computeAABB();
>};
>
>to this:
>
>struct dxCCylinder : public dxGeom {
>  int direction;	// 1 = x, 2 = y, 3 = z
>  dReal radius,ld;	// radius, length along direction axis
>  dxCCylinder (dSpaceID space, int _direction, dReal _radius, dReal _length);
>  void computeAABB();
>};
>
>and then I made 36 more changes to collision_std.cpp and 5 changes to
>collision_trimesh_ccylinder.
>
>Anyhow, it doesn't quite work.  Even trying to roll a ccylinder along
>a simple plane geom looks all wonky if I use any axis other than Z.  I
>probably missed some changes in the zillions of hard coded matrix
>indeces inside collision_std.cpp.
>
>My question is, has anyone else ever made a patch like this?  I mean,
>one that works?  :)
>
>- Graham
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>
>  
>



More information about the ODE mailing list