Class ODE::SliderJoint
In: ext/body.c  (CVS)
Parent: ODE::ParameterizedJoint

Methods

axis   axis=   new   position   positionRate  

Public Class methods

ODE::SliderJoint#initialize( world, jointGroup ) — Create and return a new ODE::SliderJoint.

[Source]

/*
 * ODE::SliderJoint#initialize( world, jointGroup )
 * --
 * Create and return a new ODE::SliderJoint.
 */
static VALUE
ode_sliderJoint_init( argc, argv, self )
	 int	argc;
	 VALUE	*argv, self;
{
	return ode_joint_construct( argc, argv, self, dJointCreateSlider, 0 );
}

Public Instance methods

ODE::SliderJoint#axis() —

[Source]

/*
 * ODE::SliderJoint#axis()
 * --
 * 
 */
static VALUE
ode_sliderJoint_axis( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return ode_get_joint_param3( ptr->id, dJointGetSliderAxis, ode_cOdeVector );
}

ODE::SliderJoint#axis=( vector ) — Set the axis of the joint. 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.

[Source]

/*
 * ODE::SliderJoint#axis=( vector )
 * --
 * Set the axis of the joint. 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_sliderJoint_axis_eq( self, axis )
	 VALUE	self, axis;
{
	ode_JOINT	*ptr = get_joint( self );
	return ode_set_joint_param3( ptr->id, axis, "axis",
								 dJointSetSliderAxis, ode_cOdeVector );
}

ODE::SliderJoint#position() —

[Source]

/*
 * ODE::SliderJoint#position()
 * --
 * 
 */
static VALUE
ode_sliderJoint_position( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return rb_float_new( (dReal)dJointGetSliderPosition(ptr->id) );
}

ODE::SliderJoint#positionRate() —

[Source]

/*
 * ODE::SliderJoint#positionRate()
 * --
 * 
 */
static VALUE
ode_sliderJoint_position_rate( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return rb_float_new( (dReal)dJointGetSliderPositionRate(ptr->id) );
}

[Validate]