Class ODE::BallJoint
In: ext/body.c  (CVS)
Parent: ODE::Joint

Methods

anchor   anchor=   new  

Public Class methods

ODE::BallJoint#initialize() — Create and return a new ODE::BallJoint.

[Source]

/*
 * 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 );
}

Public Instance methods

ODE::BallJoint#anchor — Return the joint anchor point as an ODE::Position.

[Source]

/*
 * 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.

[Source]

/*
 * 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 );
}

[Validate]