physlider.cpp
27 #warning THIS SHOULD BE COMPLETED (ESPECIALLY THE CONTROL PART, THIS CAN ONLY BE CONTROLLED BY FORCE) AND THE COMMENTS IMPROVED
82 priv->joint = NewtonConstraintCreateUserJoint( worldpriv->world, 6, PhyJointPrivate::userBilateralHandler, 0, priv->child, priv->parent );
112 // if it is, we use Newton functions to get the angular velocities (for a better result), otherwise
115 //--- the velocity is calculated projecting the angular velocity of objects on the main axis (z_ax)
157 NewtonUserJointAddLinearRow( priv->joint, &childPos[0], &globalMatrixParent.w_pos[0], &globalMatrixParent.x_ax[0] );
159 NewtonUserJointAddLinearRow( priv->joint, &childPos[0], &globalMatrixParent.w_pos[0], &globalMatrixParent.y_ax[0] );
161 // NewtonUserJointAddLinearRow( priv->joint, &childPos[0], &globalMatrixParent.w_pos[0], &globalMatrixParent.z_ax[0] );
173 NewtonUserJointAddLinearRow( priv->joint, &qChild[0], &qParent[0], &globalMatrixParent.x_ax[0] );
175 NewtonUserJointAddLinearRow( priv->joint, &qChild[0], &qParent[0], &globalMatrixParent.y_ax[0] );
186 NewtonUserJointAddLinearRow( priv->joint, &qChild[0], &qParent[0], &globalMatrixParent.y_ax[0] );
199 NewtonUserJointAddLinearRow( priv->joint, &childPos[0], &limitPos[0], &globalMatrixChild.z_ax[0] );
207 NewtonUserJointAddLinearRow( priv->joint, &childPos[0], &limitPos[0], &globalMatrixChild.z_ax[0] );
230 NewtonUserJointAddLinearRow( priv->joint, &globalMatrixChild.w_pos[0], &globalMatrixParent.w_pos[0], &globalMatrixChild.z_ax[0] );
234 // printf("--------- JOINT accel: %f, force: %f, mass: %f, maxForce: %f\n", accel, force, mass, dof->maxForce());
static wMatrix grammSchmidt(const wVector &dir)
calculate an orthonormal matrix with the Z vector pointing on the dir direction, and the Y and Z are ...
Definition: wmatrix.h:474
real velocity() const
return the actual relative velocity of bodies along the axis of rotation/translation ...
Definition: phyjoint.h:145
real position() const
return the actual position of bodies For rotational DOF is the angle of rotation For linear DOF is t...
Definition: phyjoint.h:135
virtual wVector centre() const
Return the centre of this joint in world coordinate.
Definition: physlider.cpp:67
const wMatrix & matrix() const
return a reference to the transformation matrix
Definition: wobject.cpp:47
virtual void updateJointInfo()
Update the Joint informations (each PhyDOF will be updated)
Definition: physlider.cpp:87
wMatrix localMatrixParent
Local frame of the joint respect to the parent matrix.
Definition: physlider.h:67
virtual wVector getForceOnJoint() const
Returns the force applied to this joint.
Definition: physlider.cpp:75
wMatrix localMatrixChild
Local frame of the joint respect to the child matrix.
Definition: physlider.h:69
real appliedForce() const
Return the Force/Torque applied using applyForce.
Definition: phyjoint.h:98
virtual PhyObject * parent()
Return the parent object; (NULL means an object attached to static world; see Netwon Documentation) ...
Definition: phyjoint.h:379
wVectorT< false > scale(real s) const
return a new wVectorT with element scaled by s
Definition: wvector.h:305
float real
virtual PhyObject * child()
Return the child object attached to this joint (see Newton Documentation)
Definition: phyjoint.h:371
PhySlider(const wVector &axis, PhyObject *parent, PhyObject *child, bool cp=true)
Constructor.
Definition: physlider.cpp:32