1
//! General cylinder class.
5
* Describes general properties of a cylinder.
11
#include <srCore/body/cylinder.h>
23
//! sets the collision parameter of the cylinder.
24
void Cylinder::setCollisionCylinder(float radius, float length)
26
this->collisionLength = length;
27
this->collisionRadius = radius;
29
this->SetCollisionCylinder(radius, length);
33
//! sets the mass with a equal mass distribution within the parameters defined in setCollisionCylinder.
34
void Cylinder::setMass(float mass)
38
float bodyLength, bodyRadius;
40
bodyLength = this->collisionLength;// * this->scaleX;
41
bodyRadius = this->collisionRadius;// * this->scaleY;
43
dMassSetCylinderTotal(&myMass, mass, 1, bodyRadius, bodyLength);
48
//! sets the mass with a equal mass distribution in a cylinder with the given parameters
49
void Cylinder::setMass(float mass, float radius, float length)
52
dMassSetCylinderTotal(&myMass, mass, 1, radius, length);