#

API Docs for: 0.6.0
Show: Inherited Protected Private Deprecated

# RotationalEquation Class

Extends Equation
Defined in: `src/equations/RotationalEquation.js:7`

Rotational constraint. Works to keep the local vectors orthogonal to each other.

## Constructor

### `RotationalEquation`

(

- `bj`
- `localVectorInBodyA`
- `bi`
- `localVectorInBodyB`

)

Defined in `src/equations/RotationalEquation.js:7`

#### Parameters:

- `bj` RigidBody
- `localVectorInBodyA` Vec3
- `bi` RigidBody
- `localVectorInBodyB` Vec3

- Index
- Methods
- Properties

## Item Index

### Methods

- addToWlambda
- computeB
- computeGiMf
- computeGiMGt
- computeGq
- computeGW
- computeGWlambda
- computeInvC
- setSpookParams

### Properties

- a
- b
- bi
- bj
- eps
- jacobianElementA
- maxForce
- minForce

## Methods

### `addToWlambda`

(

- `deltalambda`

)

Inherited from Equation: `src/equations/Equation.js:222`

Add constraint velocity to the bodies.

#### Parameters:

- `deltalambda` Number

### `computeB`

() Number

Inherited from Equation: `src/equations/Equation.js:89`

Computes the RHS of the SPOOK equation

#### Returns:

Number:

### `computeGiMf`

() Number

Inherited from Equation: `src/equations/Equation.js:153`

Computes Ginv(M)f, where M is the mass matrix with diagonal blocks for each body, and f are the forces on the bodies.

#### Returns:

Number:

### `computeGiMGt`

() Number

Inherited from Equation: `src/equations/Equation.js:185`

Computes Ginv(M)G'

#### Returns:

Number:

### `computeGq`

() Number

Inherited from Equation: `src/equations/Equation.js:101`

Computes G*q, where q are the generalized body coordinates

#### Returns:

Number:

### `computeGW`

() Number

Inherited from Equation: `src/equations/Equation.js:118`

Computes G*W, where W are the body velocities

#### Returns:

Number:

### `computeGWlambda`

() Number

Inherited from Equation: `src/equations/Equation.js:136`

Computes G*Wlambda, where W are the body velocities

#### Returns:

Number:

### `computeInvC`

(

- `eps`

)
Number

Inherited from Equation: `src/equations/Equation.js:256`

Compute the denominator part of the SPOOK equation: C = Ginv(M)G' + eps

#### Parameters:

- `eps` Number

#### Returns:

Number:

### `setSpookParams`

()

Inherited from Equation: `src/equations/Equation.js:76`

Recalculates a,b,eps.

## Properties

### `a`

Number

Inherited from Equation: `src/equations/Equation.js:41`

SPOOK parameter

### `b`

Number

Inherited from Equation: `src/equations/Equation.js:47`

SPOOK parameter

### `bi`

Body

Inherited from Equation: `src/equations/Equation.js:29`

### `bj`

Body

Inherited from Equation: `src/equations/Equation.js:35`

### `eps`

Number

Inherited from Equation: `src/equations/Equation.js:53`

SPOOK parameter

### `jacobianElementA`

JacobianElement

Inherited from Equation but overwritten in `src/equations/Equation.js:59`

### `maxForce`

Number

Inherited from Equation: `src/equations/Equation.js:24`

### `minForce`

Number

Inherited from Equation: `src/equations/Equation.js:19`