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

Methods

anchor   anchor=   angle1   angle1Rate   angle2Rate   axis1   axis1=   axis2   axis2=   new  

Public Class methods

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

[Source]

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

Public Instance methods

ODE::Hinge2Joint#anchor() —

[Source]

/*
 * ODE::Hinge2Joint#anchor()
 * --
 * 
 */
static VALUE
ode_hinge2Joint_anchor( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return ode_get_joint_param3( ptr->id, dJointGetHinge2Anchor, ode_cOdePosition );
}

ODE::Hinge2Joint#anchor=( position ) —

[Source]

/*
 * ODE::Hinge2Joint#anchor=( position )
 * --
 * 
 */
static VALUE
ode_hinge2Joint_anchor_eq( self, position )
	 VALUE	self, position;
{
	ode_JOINT	*ptr = get_joint( self );
	return ode_set_joint_param3( ptr->id, position, "anchor",
								 dJointSetHinge2Anchor, ode_cOdePosition );
}

ODE::Hinge2Joint#angle1() —

[Source]

/*
 * ODE::Hinge2Joint#angle1()
 * --
 * 
 */
static VALUE
ode_hinge2Joint_angle1( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return rb_float_new( (dReal)dJointGetHinge2Angle1(ptr->id) );
}

ODE::Hinge2Joint#angle1Rate() —

[Source]

/*
 * ODE::Hinge2Joint#angle1Rate()
 * --
 * 
 */
static VALUE
ode_hinge2Joint_angle1_rate( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return rb_float_new( (dReal)dJointGetHinge2Angle1Rate(ptr->id) );
}

ODE::Hinge2Joint#angle2Rate() —

[Source]

/*
 * ODE::Hinge2Joint#angle2Rate()
 * --
 * 
 */
static VALUE
ode_hinge2Joint_angle2_rate( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return rb_float_new( (dReal)dJointGetHinge2Angle2Rate(ptr->id) );
}

ODE::Hinge2Joint#axis1() —

[Source]

/*
 * ODE::Hinge2Joint#axis1()
 * --
 * 
 */
static VALUE
ode_hinge2Joint_axis1( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return ode_get_joint_param3( ptr->id, dJointGetHinge2Axis1, ode_cOdeVector );
}

ODE::Hinge2Joint#axis1=( 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.

[Source]

/*
 * ODE::Hinge2Joint#axis1=( 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_hinge2Joint_axis1_eq( self, axis )
	 VALUE	self, axis;
{
	ode_JOINT	*ptr = get_joint( self );
	return ode_set_joint_param3( ptr->id, axis, "axis",
								 dJointSetHinge2Axis1, ode_cOdeVector );
}

ODE::Hinge2Joint#axis2() —

[Source]

/*
 * ODE::Hinge2Joint#axis2()
 * --
 */
static VALUE
ode_hinge2Joint_axis2( self )
	 VALUE	self;
{
	ode_JOINT	*ptr = get_joint( self );
	return ode_get_joint_param3( ptr->id, dJointGetHinge2Axis2, ode_cOdeVector );
}

ODE::Hinge2Joint#axis2=( vector ) — Set the second axis of the joint, which must be parallel to the first 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.

[Source]

/*
 * ODE::Hinge2Joint#axis2=( vector )
 * --
 * Set the second axis of the joint, which must be parallel to the first
 * 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_hinge2Joint_axis2_eq( self, axis )
	 VALUE	self, axis;
{
	ode_JOINT	*ptr = get_joint( self );
	return ode_set_joint_param3( ptr->id, axis, "axis",
								 dJointSetHinge2Axis2, ode_cOdeVector );
}

[Validate]