| Class | ODE::BallJoint |
| In: |
ext/body.c
(CVS)
|
| Parent: | ODE::Joint |
ODE::BallJoint#initialize() — Create and return a new ODE::BallJoint.
/*
* ODE::BallJoint#initialize()
* --
* Create and return a new ODE::BallJoint.
*/
static VALUE
ode_ballJoint_init( argc, argv, self )
int argc;
VALUE *argv, self;
{
return ode_joint_construct( argc, argv, self, dJointCreateBall, 0 );
}
ODE::BallJoint#anchor — Return the joint anchor point as an ODE::Position.
/*
* ODE::BallJoint#anchor
* --
* Return the joint anchor point as an ODE::Position.
*/
static VALUE
ode_ballJoint_anchor( self )
VALUE self;
{
ode_JOINT *ptr = get_joint( self );
return ode_get_joint_param3( ptr->id, dJointGetBallAnchor, ode_cOdePosition );
}
ODE::BallJoint#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::BallJoint#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_ballJoint_anchor_eq( self, position )
VALUE self, position;
{
ode_JOINT *ptr = get_joint( self );
return ode_set_joint_param3( ptr->id, position, "anchor",
dJointSetBallAnchor, ode_cOdePosition );
}