Tao.Ode SDK Documentation

Ode.dMassSetCylinder Method 

Set the mass parameters to represent a flat-ended cylinder of the given parameters and density, with the center of mass at (0,0,0) relative to the body.

[Visual Basic]
Public Shared Sub dMassSetCylinder( _
   ByRef mass As dMass, _
   ByVal density As Single, _
   ByVal direction As Integer, _
   ByVal radius As Single, _
   ByVal length As Single _
)
[C#]
public static void dMassSetCylinder(
   ref dMass mass,
   float density,
   int direction,
   float radius,
   float length
);

Parameters

mass
the mass to set
density
the density of the cylinder
direction
the orientation of the cylinder
radius
The radius of the cylinder
length
The length of the cylinder

Remarks

The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z).

See Also

Ode Class | Tao.Ode Namespace