45#ifndef CGELSkeletonLinkH
46#define CGELSkeletonLinkH
103 glColor4fv( (
const float *)&
m_color);
134 if (
m_length < 0.000001) {
return; }
161 if (torqueMag0 > 0.0001)
171 if (torqueMag1 > 0.0001)
Implementation of a skeleton mass node.
This class models an elastic link between two skeleton nodes.
Definition CGELSkeletonLink.h:72
chai3d::cVector3d m_wzLink01
Initial link vector between node 0 and node 1 in world coordinates.
Definition CGELSkeletonLink.h:272
cGELSkeletonNode * m_node0
Node 0 of current link.
Definition CGELSkeletonLink.h:218
chai3d::cVector3d m_A1
Reference vector frame A on sphere 1 (local coordinates).
Definition CGELSkeletonLink.h:302
double m_kSpringTorsion
Torsional spring constant.
Definition CGELSkeletonLink.h:247
static double s_default_kSpringFlexion
Default property - angular stiffness.
Definition CGELSkeletonLink.h:324
static double s_default_kSpringTorsion
Default property - torsional stiffness.
Definition CGELSkeletonLink.h:327
chai3d::cVector3d m_nzLink01
Linear damping constant.
Definition CGELSkeletonLink.h:269
void render()
This method graphically renders this skeleton link using OpenGL.
Definition CGELSkeletonLink.h:98
chai3d::cVector3d m_nzLink10
Initial link vector between node 1 and node 0 in node1 reference frame.
Definition CGELSkeletonLink.h:275
chai3d::cVector3d m_wB0
Reference vector frame B on sphere 0 (world coordinates).
Definition CGELSkeletonLink.h:299
static double s_default_kSpringElongation
Default property - linear stiffness.
Definition CGELSkeletonLink.h:321
double m_length0
Initial length of link.
Definition CGELSkeletonLink.h:308
bool m_enabled
Is link enabled.
Definition CGELSkeletonLink.h:250
double m_kSpringElongation
Elongation spring constant.
Definition CGELSkeletonLink.h:241
chai3d::cVector3d m_wLink01
Current link between node 0 and node 1 in world coordinates.
Definition CGELSkeletonLink.h:281
chai3d::cVector3d m_B0
Reference vector frame B on sphere 0 (local coordinates).
Definition CGELSkeletonLink.h:296
cGELSkeletonNode * m_node1
Node 1 of current link.
Definition CGELSkeletonLink.h:221
~cGELSkeletonLink()
Destructor of cGELSkeletonLink.
Definition CGELSkeletonLink.cpp:129
chai3d::cVector3d m_wLink10
Current link between node 1 and node 0 in world coordinates.
Definition CGELSkeletonLink.h:284
chai3d::cVector3d m_wA0
Reference vector frame A on sphere 0 (world coordinates).
Definition CGELSkeletonLink.h:293
chai3d::cVector3d m_wzLink10
Initial link vector between node 1 and node 0 in world coordinates.
Definition CGELSkeletonLink.h:278
double m_kSpringFlexion
Angular spring constant.
Definition CGELSkeletonLink.h:244
chai3d::cVector3d m_torsionAxisAngle
Torsional angle.
Definition CGELSkeletonLink.h:287
static chai3d::cColorf s_default_color
Default property - color property.
Definition CGELSkeletonLink.h:330
chai3d::cColorf m_color
Color used to display this link.
Definition CGELSkeletonLink.h:231
chai3d::cVector3d m_A0
Reference vector frame A on sphere 0 (local coordinates).
Definition CGELSkeletonLink.h:290
void computeForces()
This method computes the forces applied on the two mass nodes that this link connects.
Definition CGELSkeletonLink.h:120
double m_length
Current length of link.
Definition CGELSkeletonLink.h:311
chai3d::cVector3d m_wA1
Reference vector frame A on sphere 1 (world coordinates).
Definition CGELSkeletonLink.h:305
This class implements a mass node with mass and inertia properties.
Definition CGELSkeletonNode.h:70
void addTorque(chai3d::cVector3d &a_torque)
This method adds a torque to the node.
Definition CGELSkeletonNode.h:100
chai3d::cMatrix3d m_rot
Rotation computed.
Definition CGELSkeletonNode.h:289
chai3d::cVector3d m_pos
Position computed.
Definition CGELSkeletonNode.h:286
void addForce(chai3d::cVector3d &a_force)
This method adds a force to the node.
Definition CGELSkeletonNode.h:94
void mulr(const double &a_scalar, cMatrix3d &a_result) const
void mulr(const double &a_scalar, cVector3d &a_result) const
void crossr(const cVector3d &a_vector, cVector3d &a_result) const