These pages are auto-generated from self-documenting comments embedded in class files.
For more information on breve and steve, refer to the breve homepage.

## Joint : UniversalJoint

This class is included as part of the file Joint.tz.
To use this class in a simulation, include the line "@use Joint."

### Class description:

> This subclass of Joint is used to link two Link objects together using a universal joint.

> A universal joint has two degrees of freedom. It can rotate "up-and-down" and "side-to-side", but cannot "twist". Your wrist is basically a universal joint--your hand cannot rotate without the rest of your arm.

### Class methods:

> - get-joint-angles
> - link
> - set-joint-limits
> - set-joint-velocity

`get-joint-angles`

> Returns a vector indicating how the angle of this joint is from its natural position (which corresponds to a values of 0 on both axes). Only the X- and Y- components of the vector are valid for UniversalJoints.

`link with-normal normal (vector) with-parent-point parentPoint (vector) with-child-point childPoint (vector) to-child childLink (object) parent parentLink = 0 (object) use-current-relative-rotation currentRotation = 0 (int)`

> Creates a universal (rotation on two axes) joint between parentLink and childLink. The joint will be lcoated at parentPoint on the parent's body, and at childPoint on the child's body.

> Universal joints have two rotation axes, both of which are perpendicular to the parentPoint. Think about the forearm linking to the hand at the wrist--the axes of rotation of the wrist are both perpendicular to the line from the center of the forearm (which represents the parentPoint). The normalVector specifies one of the rotation axes, while the other is calculated automatically (perpendicular to both parentPoint and normalVector).

> If parentLink is the value 0, then the joint will be attached to a fixed point in the world, specified with parentPoint.

`set-joint-limits a1-min min1 (double) a1-max max1 (double) a2-min min2 (double) a2-max max2 (double)`

> Sets the minimum and maximum allowed rotations (in radians) for this joint on both of the joint's axes.

`set-joint-velocity axis-1 a1velocity (double) axis-2 a2velocity (double)`

> Sets the desired joint velocity on axis-1 to a1velocity and on axis-2 to a2velocity.

Documentation created Thu Jul 3 18:18:12 2008