Class | ODE::HingeJoint |
In: |
ext/body.c
(CVS)
|
Parent: | ODE::ParameterizedJoint |
ODE::HingeJoint#initialize( world, jointGroup ) — Create and return a new ODE::HingeJoint.
/* * ODE::HingeJoint#initialize( world, jointGroup ) * -- * Create and return a new ODE::HingeJoint. */ static VALUE ode_hingeJoint_init( argc, argv, self ) int argc; VALUE *argv, self; { return ode_joint_construct( argc, argv, self, dJointCreateHinge, 0 ); }
ODE::HingeJoint#anchor() — Get the hinge’s anchor point as an ODE::Position object.
/* * ODE::HingeJoint#anchor() * -- * Get the hinge's anchor point as an ODE::Position object. */ static VALUE ode_hingeJoint_anchor( self ) VALUE self; { ode_JOINT *ptr = get_joint( self ); return ode_get_joint_param3( ptr->id, dJointGetHingeAnchor, ode_cOdePosition ); }
ODE::HingeJoint#anchor=( position ) — Set the joint’s anchor point, which can be any object which returns an array with 3 numeric values when to_ary is called on it, such as an ODE::Position object, a ODE::Vector, or an Array with 3 numeric values.
/* * ODE::HingeJoint#anchor=( position ) * -- * Set the joint's anchor point, which can be any object which returns an array * with 3 numeric values when <tt>to_ary</tt> is called on it, such as an * ODE::Position object, a ODE::Vector, or an Array with 3 numeric values. */ static VALUE ode_hingeJoint_anchor_eq( self, position ) VALUE self, position; { ode_JOINT *ptr = get_joint( self ); return ode_set_joint_param3( ptr->id, position, "anchor", dJointSetHingeAnchor, ode_cOdePosition ); }
/* * ODE::HingeJoint#angle() * -- * */ static VALUE ode_hingeJoint_angle( self ) VALUE self; { ode_JOINT *ptr = get_joint( self ); return rb_float_new( (dReal)dJointGetHingeAngle(ptr->id) ); }
/* * ODE::HingeJoint#angleRate() * -- * */ static VALUE ode_hingeJoint_angle_rate( self ) VALUE self; { ode_JOINT *ptr = get_joint( self ); return rb_float_new( (dReal)dJointGetHingeAngleRate(ptr->id) ); }
/* * ODE::HingeJoint#axis() * -- * */ static VALUE ode_hingeJoint_axis( self ) VALUE self; { ode_JOINT *ptr = get_joint( self ); return ode_get_joint_param3( ptr->id, dJointGetHingeAxis, ode_cOdeVector ); }
ODE::HingeJoint#axis=( vector ) — Set the first axis of the joint, which must be parallel to the second axis. The vector argument can be any object which returns an array of three numeric values when to_ary is called on it, such as a ODE::Vector, an ODE::Vector, or an Array with three numeric elements.
/* * ODE::HingeJoint#axis=( vector ) * -- * Set the first axis of the joint, which must be parallel to the second * axis. The <tt>vector</tt> argument can be any object which returns an array * of three numeric values when <tt>to_ary</tt> is called on it, such as a * ODE::Vector, an ODE::Vector, or an Array with three numeric elements. */ static VALUE ode_hingeJoint_axis_eq( self, axis ) VALUE self, axis; { ode_JOINT *ptr = get_joint( self ); return ode_set_joint_param3( ptr->id, axis, "axis", dJointSetHingeAxis, ode_cOdeVector ); }