# Struct nphysics3d::joint::RevoluteJoint[−][src]

`pub struct RevoluteJoint<N: Real> { /* fields omitted */ }`

A unit joint that allows only one relative rotational degree of freedom between two multibody links.

## Methods

### `impl<N: Real> RevoluteJoint<N>`[src]

#### `pub fn new(axis: Unit<AngularVector<N>>, angle: N) -> Self`[src]

Create a new revolute joint with an axis and an initial angle.

The axis along which the rotation can happen is expressed in the local coordinate system of the attached multibody links.

#### `pub fn axis(&self) -> Unit<AngularVector<N>>`[src]

The axis of the rotational degree of freedom.

#### `pub fn angle(&self) -> N`[src]

The angle of rotation.

#### `pub fn rotation(&self) -> &Rotation<N>`[src]

The rotation from an attached multibody link to its dependent.

#### `pub fn local_jacobian(&self) -> &Velocity<N>`[src]

The jacobian of this joint expressed in the local coordinate frame of the joint.

#### `pub fn local_jacobian_dot(&self) -> &Velocity<N>`[src]

The time-derivative of the jacobian of this joint expressed in the local coordinate frame of the joint.

#### `pub fn local_jacobian_dot_veldiff(&self) -> &Velocity<N>`[src]

The velocity-derivative of the time-derivative of the jacobian of this joint expressed in the local coordinate frame of the joint.

#### `pub fn min_angle(&self) -> Option<N>`[src]

The lower limit of the rotation angle.

#### `pub fn max_angle(&self) -> Option<N>`[src]

The upper limit of the rotation angle.

#### `pub fn disable_min_angle(&mut self)`[src]

Disable the lower limit of the rotation angle.

#### `pub fn disable_max_angle(&mut self)`[src]

Disable the upper limit of the rotation angle.

#### `pub fn enable_min_angle(&mut self, limit: N)`[src]

Enable and set the lower limit of the rotation angle.

#### `pub fn enable_max_angle(&mut self, limit: N)`[src]

Enable and set the upper limit of the rotation angle.

#### `pub fn is_angular_motor_enabled(&self) -> bool`[src]

Return `true` if the angular motor of this joint is enabled.

#### `pub fn enable_angular_motor(&mut self)`[src]

Enable the angular motor of this joint.

#### `pub fn disable_angular_motor(&mut self)`[src]

Disable the angular motor of this joint.

#### `pub fn desired_angular_motor_velocity(&self) -> N`[src]

The desired angular velocity of the joint motor.

#### `pub fn set_desired_angular_motor_velocity(&mut self, vel: N)`[src]

Set the desired angular velocity of the joint motor.

#### `pub fn max_angular_motor_torque(&self) -> N`[src]

The maximum torque that can be delivered by the joint motor.

#### `pub fn set_max_angular_motor_torque(&mut self, torque: N)`[src]

Set the maximum torque that can be delivered by the joint motor.

## Trait Implementations

### `impl<N: Clone + Real> Clone for RevoluteJoint<N>`[src]

#### `fn clone(&self) -> RevoluteJoint<N>`[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`1.0.0[src]

Performs copy-assignment from `source`. Read more

### `impl<N: Debug + Real> Debug for RevoluteJoint<N>`[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result`[src]

Formats the value using the given formatter. Read more

### `impl<N: Real> Joint<N> for RevoluteJoint<N>`[src]

#### `fn ndofs(&self) -> usize`[src]

The number of degrees of freedom allowed by the joint.

#### `fn body_to_parent(    &self,     parent_shift: &Vector<N>,     body_shift: &Vector<N>) -> Isometry<N>`[src]

The position of the multibody link containing this joint relative to its parent.

#### `fn update_jacobians(&mut self, body_shift: &Vector<N>, vels: &[N])`[src]

Update the jacobians of this joint.

#### `fn jacobian(&self, transform: &Isometry<N>, out: &mut JacobianSliceMut<N>)`[src]

Sets in `out` the non-zero entries of the joint jacobian transformed by `transform`.

#### `fn jacobian_dot(&self, transform: &Isometry<N>, out: &mut JacobianSliceMut<N>)`[src]

Sets in `out` the non-zero entries of the time-derivative of the joint jacobian transformed by `transform`.

#### `fn jacobian_dot_veldiff_mul_coordinates(    &self,     transform: &Isometry<N>,     acc: &[N],     out: &mut JacobianSliceMut<N>)`[src]

Sets in `out` the non-zero entries of the velocity-derivative of the time-derivative of the joint jacobian transformed by `transform`.

#### `fn integrate(&mut self, params: &IntegrationParameters<N>, vels: &[N])`[src]

Integrate the position of this joint.

#### `fn default_damping(&self, out: &mut DVectorSliceMut<N>)`[src]

Fill `out` with the non-zero entries of a damping that can be applied by default to ensure a good stability of the joint.

#### `fn apply_displacement(&mut self, disp: &[N])`[src]

Apply a displacement to the joint.

#### `fn jacobian_mul_coordinates(&self, acc: &[N]) -> Velocity<N>`[src]

Multiply the joint jacobian by generalized velocities to obtain the relative velocity of the multibody link containing this joint. Read more

#### `fn jacobian_dot_mul_coordinates(&self, acc: &[N]) -> Velocity<N>`[src]

Multiply the joint jacobian by generalized accelerations to obtain the relative acceleration of the multibody link containing this joint. Read more

#### `fn num_velocity_constraints(&self) -> usize`[src]

Maximum number of velocity constrains that can be generated by this joint.

#### `fn velocity_constraints(    &self,     params: &IntegrationParameters<N>,     link: &MultibodyLinkRef<N>,     assembly_id: usize,     dof_id: usize,     ext_vels: &[N],     ground_j_id: &mut usize,     jacobians: &mut [N],     constraints: &mut ConstraintSet<N>)`[src]

Initialize and generate velocity constraints to enforce, e.g., joint limits and motors.

#### `fn num_position_constraints(&self) -> usize`[src]

The maximum number of non-linear position constraints that can be generated by this joint.

#### `fn position_constraint(    &self,     _: usize,     link: &MultibodyLinkRef<N>,     dof_id: usize,     jacobians: &mut [N]) -> Option<GenericNonlinearConstraint<N>>`[src]

Initialize and generate the i-th position constraints to enforce, e.g., joint limits.

#### `fn nimpulses(&self) -> usize`[src]

The maximum number of impulses needed by this joints for its constraints. Read more

### `impl<N: Real> UnitJoint<N> for RevoluteJoint<N>`[src]

#### `fn position(&self) -> N`[src]

The generalized coordinate of the unit joint.

#### `fn motor(&self) -> &JointMotor<N, N>`[src]

The motor applied to the degree of freedom of the unit joitn.

#### `fn min_position(&self) -> Option<N>`[src]

The lower limit, if any, set to the generalized coordinate of this unit joint.

#### `fn max_position(&self) -> Option<N>`[src]

The upper limit, if any, set to the generalized coordinate of this unit joint.