45 #ifndef CGELSkeletonNodeH 46 #define CGELSkeletonNodeH 108 m_externalForce = a_force;
114 m_externalTorque = a_torque;
143 if (normAngVel < 0.000001)
179 m_externalForce.
zero();
180 m_externalTorque.
zero();
190 glMultMatrixd( (
const double *)mat.
getData() );
207 glColor4fv( (
const float *)&
m_color);
210 glVertex3dv( (
const double *)&
m_pos);
211 glVertex3dv( (
const double *)&v);
chai3d::cVector3d m_angAcc
Instant angular acceleration at node.
Definition: CGELSkeletonNode.h:248
void setMass(double a_mass)
This method sets the mass of the node.
Definition: CGELSkeletonNode.cpp:114
void computeNextPose(double a_timeInterval)
This method update the position of the node over a time interval.
Definition: CGELSkeletonNode.h:118
double m_mass
Mass property.
Definition: CGELSkeletonNode.h:236
chai3d::cVector3d m_nextPos
Next position computed.
Definition: CGELSkeletonNode.h:288
double m_kDampingRot
Angular damping.
Definition: CGELSkeletonNode.h:260
void clearForces()
This method clears the current forces and torques.
Definition: CGELSkeletonNode.h:162
void setExternalTorque(chai3d::cVector3d &a_torque)
This method sets an external torque to the node.
Definition: CGELSkeletonNode.h:112
chai3d::cVector3d m_gravity
Gravity field.
Definition: CGELSkeletonNode.h:272
static chai3d::cColorf s_default_color
Default color used to render the node.
Definition: CGELSkeletonNode.h:335
cVector3d cAdd(const cVector3d &a_vector1, const cVector3d &a_vector2)
static bool s_default_showFrame
Default value - Is the node reference frame displayed?
Definition: CGELSkeletonNode.h:332
void applyNextPose()
This method updates the position and orientation of this node with the latest computed values...
Definition: CGELSkeletonNode.h:155
void cDrawSphere(const double &a_radius, const unsigned int a_numSlices=10, const unsigned int a_numStacks=10)
chai3d::cVector3d m_force
Current force applied on node.
Definition: CGELSkeletonNode.h:239
double m_inertia
Inertia (to be completed).
Definition: CGELSkeletonNode.h:263
static bool s_default_useGravity
Default value - Is gravity field enabled?
Definition: CGELSkeletonNode.h:326
void mulr(const double &a_scalar, cVector3d &a_result) const
void setExternalForce(chai3d::cVector3d &a_force)
This method sets an external force to the node.
Definition: CGELSkeletonNode.h:106
This class implements a mass node with mass and inertia properties.
Definition: CGELSkeletonNode.h:69
bool m_fixed
If true, then mass is fixed in space and can not move.
Definition: CGELSkeletonNode.h:266
~cGELSkeletonNode()
Destructor of cGELSkeletonNode.
Definition: CGELSkeletonNode.cpp:101
void addForce(chai3d::cVector3d &a_force)
This method adds a force to the node.
Definition: CGELSkeletonNode.h:94
chai3d::cMatrix3d m_nextRot
Next rotation computed.
Definition: CGELSkeletonNode.h:291
cGELSkeletonNode()
Constructor of cGELSkeletonNode.
Definition: CGELSkeletonNode.cpp:74
cVector3d cDiv(const double &a_value, const cVector3d &a_vector)
double m_radius
Radius of mass node.
Definition: CGELSkeletonNode.h:233
chai3d::cVector3d m_vel
Instant velocity at node.
Definition: CGELSkeletonNode.h:251
chai3d::cVector3d m_torque
Current torque applies on node.
Definition: CGELSkeletonNode.h:242
cVector3d cMul(const double &a_value, const cVector3d &a_vector)
chai3d::cColorf m_color
Color used to display nodes.
Definition: CGELSkeletonNode.h:223
void cDrawFrame(const double &a_scale=1.0)
double m_kDampingPos
Linear damping.
Definition: CGELSkeletonNode.h:257
void clearExternalForces()
This method clears the external forces and torques.
Definition: CGELSkeletonNode.h:177
chai3d::cVector3d m_angVel
Instant angular velocity at node.
Definition: CGELSkeletonNode.h:254
chai3d::cVector3d m_pos
Position computed.
Definition: CGELSkeletonNode.h:282
bool rotateAboutGlobalAxisRad(const cVector3d &a_axis, const double &a_angleRad)
bool m_useGravity
If true, then gravity is enabled.
Definition: CGELSkeletonNode.h:269
static double s_default_mass
Default value for node mass.
Definition: CGELSkeletonNode.h:323
chai3d::cMatrix3d m_rot
Rotation computed.
Definition: CGELSkeletonNode.h:285
static double s_default_kDampingRot
Default value for revolute damping.
Definition: CGELSkeletonNode.h:320
void mul(const double &a_scalar)
void add(const cVector3d &a_vector)
static double s_default_radius
Default value for node radius.
Definition: CGELSkeletonNode.h:314
void addTorque(chai3d::cVector3d &a_torque)
This method adds a torque to the node.
Definition: CGELSkeletonNode.h:100
void render()
This method renders this node in OpenGL.
Definition: CGELSkeletonNode.h:184
chai3d::cVector3d m_acc
Instant acceleration at node.
Definition: CGELSkeletonNode.h:245
static double s_default_kDampingPos
Default value for linear damping.
Definition: CGELSkeletonNode.h:317
static chai3d::cVector3d s_default_gravity
Default value - Gravity field magnitude and direction.
Definition: CGELSkeletonNode.h:329