# Class ImpulseJoint

#### Hierarchy (view full)

- ImpulseJoint
  - UnitImpulseJoint
  - FixedImpulseJoint
  - RopeImpulseJoint
  - SpringImpulseJoint
  - GenericImpulseJoint
  - SphericalImpulseJoint

- Defined in dynamics/impulse_joint.d.ts:56

#####
Index

### Constructors

constructor

### Properties

bodySet
handle
rawSet

### Methods

anchor1
anchor2
body1
body2
contactsEnabled
finalizeDeserialization
frameX1
frameX2
isValid
setAnchor1
setAnchor2
setContactsEnabled
type
newTyped

## Constructors

### constructor

- new ImpulseJoint(rawSet, bodySet, handle): ImpulseJoint

- #### Parameters

  - rawSet: RawImpulseJointSet
  - bodySet: RigidBodySet
  - handle: number

  #### Returns ImpulseJoint

  - Defined in dynamics/impulse_joint.d.ts:60

## Properties

### `Protected` bodySet

bodySet: RigidBodySet

- Defined in dynamics/impulse_joint.d.ts:58

### handle

handle: number

- Defined in dynamics/impulse_joint.d.ts:59

### `Protected` rawSet

rawSet: RawImpulseJointSet

- Defined in dynamics/impulse_joint.d.ts:57

## Methods

### anchor1

- anchor1(): Vector

- The position of the first anchor of this joint.

  The first anchor gives the position of the application point on the local frame of the first rigid-body it is attached to.

  #### Returns Vector

  - Defined in dynamics/impulse_joint.d.ts:95

### anchor2

- anchor2(): Vector

- The position of the second anchor of this joint.

  The second anchor gives the position of the application point on the local frame of the second rigid-body it is attached to.

  #### Returns Vector

  - Defined in dynamics/impulse_joint.d.ts:102

### body1

- body1(): RigidBody

- The first rigid-body this joint it attached to.

  #### Returns RigidBody

  - Defined in dynamics/impulse_joint.d.ts:72

### body2

- body2(): RigidBody

- The second rigid-body this joint is attached to.

  #### Returns RigidBody

  - Defined in dynamics/impulse_joint.d.ts:76

### contactsEnabled

- contactsEnabled(): boolean

- Indicates if contacts are enabled between colliders attached to the rigid-bodies linked by this joint.

  #### Returns boolean

  - Defined in dynamics/impulse_joint.d.ts:126

### finalizeDeserialization

- finalizeDeserialization(bodySet): void
- `Internal`

  #### Parameters

  - bodySet: RigidBodySet

  #### Returns void

  - Defined in dynamics/impulse_joint.d.ts:63

### frameX1

- frameX1(): Rotation

- The rotation quaternion that aligns this joint's first local axis to the `x` axis.

  #### Returns Rotation

  - Defined in dynamics/impulse_joint.d.ts:84

### frameX2

- frameX2(): Rotation

- The rotation matrix that aligns this joint's second local axis to the `x` axis.

  #### Returns Rotation

  - Defined in dynamics/impulse_joint.d.ts:88

### isValid

- isValid(): boolean

- Checks if this joint is still valid (i.e. that it has not been deleted from the joint set yet).

  #### Returns boolean

  - Defined in dynamics/impulse_joint.d.ts:68

### setAnchor1

- setAnchor1(newPos): void

- Sets the position of the first anchor of this joint.

  The first anchor gives the position of the application point on the local frame of the first rigid-body it is attached to.

  #### Parameters

  - newPos: Vector

  #### Returns void

  - Defined in dynamics/impulse_joint.d.ts:109

### setAnchor2

- setAnchor2(newPos): void

- Sets the position of the second anchor of this joint.

  The second anchor gives the position of the application point on the local frame of the second rigid-body it is attached to.

  #### Parameters

  - newPos: Vector

  #### Returns void

  - Defined in dynamics/impulse_joint.d.ts:116

### setContactsEnabled

- setContactsEnabled(enabled): void

- Controls whether contacts are computed between colliders attached to the rigid-bodies linked by this joint.

  #### Parameters

  - enabled: boolean

  #### Returns void

  - Defined in dynamics/impulse_joint.d.ts:121

### type

- type(): JointType

- The type of this joint given as a string.

  #### Returns JointType

  - Defined in dynamics/impulse_joint.d.ts:80

### `Static` newTyped

- newTyped(rawSet, bodySet, handle): ImpulseJoint

- #### Parameters

  - rawSet: RawImpulseJointSet
  - bodySet: RigidBodySet
  - handle: number

  #### Returns ImpulseJoint

  - Defined in dynamics/impulse_joint.d.ts:61