#

API Docs for: 0.6.1
Show: Inherited Protected Private Deprecated

# FrictionEquation Class

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

Constrains the slipping in a contact along a tangent

## Constructor

### `FrictionEquation`

(

- `bodyA`
- `bodyB`
- `slipForce`

)

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

#### Parameters:

- `bodyA` Body
- `bodyB` Body
- `slipForce` Number

  should be +-F_friction = +-mu F_normal = +-mu m * g

- Index
- Methods
- Properties

## Item Index

### Methods

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

### Properties

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

## Methods

### `addToWlambda`

(

- `deltalambda`

)

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

Add constraint velocity to the bodies.

#### Parameters:

- `deltalambda` Number

### `computeB`

() Number

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

Computes the RHS of the SPOOK equation

#### Returns:

Number:

### `computeGiMf`

() Number

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

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:191`

Computes Ginv(M)G'

#### Returns:

Number:

### `computeGq`

() Number

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

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

#### Returns:

Number:

### `computeGW`

() Number

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

Computes G*W, where W are the body velocities

#### Returns:

Number:

### `computeGWlambda`

() Number

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

Computes G*Wlambda, where W are the body velocities

#### Returns:

Number:

### `computeInvC`

(

- `eps`

)
Number

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

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:82`

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`

### `enabled`

Boolean

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

Default: true

### `eps`

Number

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

SPOOK parameter

### `jacobianElementA`

JacobianElement

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

### `jacobianElementB`

JacobianElement

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

### `maxForce`

Number

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

### `minForce`

Number

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