36 if(!_joint)
return -1;
37 if(_joint->
t_given == _tg)
return 0;
97 if(!virtual_joint->
realname)
return -1;
100 AddJoint(virtual_joint, parent_joint);
168 brother->clear_data();
char * realname
name of the real joint (for closed chains)
virtual int init(SceneGraph *sg)
Initialize the parameters.
Joint * child
pointer to the child joint
int n_dof
degrees of freedom (0/1/3/6)
int t_given
torque or motion controlled
int n_thrust
DOF for motion controlled joints.
int in_create_chain
true if between BeginCreateChain() and EndCreateChain().
int RemoveJoint(Joint *j)
disconnect joint j from its parent
Joint * root
Chain information.
int Disconnect(Joint *j)
Disconnect the loop at the specified virtual joint.
double * j_value_dot[4]
for 4-th order Runge-Kutta
int n_thrust
total DOF of the joints with t_given = false
double ** all_value
Pointers to the integration variables.
void set_all_torque_given(Joint *cur, int _tg)
int SetTorqueGiven(Joint *_joint, int _tg)
Change torque/motion control property of a joint.
int do_connect
true after Connect() was called; application (or subclass) must reset the flag
int SetCharacterTorqueGiven(const char *charname, int _tg)
Change torque/motion control property of a character.
Joint * brother
pointer to the brother joint
int AddJoint(Joint *target, Joint *p)
Add a new joint target as a child of joint p.
Classes for defining open/closed kinematic chains.
int Connect(Joint *virtual_joint, Joint *parent_joint)
Connect two links by adding a new virtual joint.
int SetAllTorqueGiven(int _tg)
Change torque/motion control property of all joints.
virtual int clear_data()
Clear arrays only; don't delete joints.
The class for representing a joint.
Joint * FindCharacterRoot(const char *charname)
Find the root joint of the character with name charname.