## Libraries.Game.Physics.ConstraintDescription3D Documentation

This class stores different constraint values between two rigid bodies or even for one body, which all depends on which action you used to initialize/change the values stored inside this ConstraintDescription3D.

*Inherits from: *Libraries.Language.Object

## Summary

### Actions Summary Table

## Actions Documentation

### Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

**Example Code**

```
use Libraries.Language.Support.CompareResult
Object o
Object t
CompareResult result = o:Compare(t)
```

#### Parameters

- Libraries.Language.Object: The object to compare to.

#### Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

### Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

**Example Code**

```
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
```

#### Parameters

- Libraries.Language.Object: The to be compared.

#### Return

boolean: True if the hash codes are equal and false if they are not equal.

### GetDiagonal()

This action returns a number whose reciprocal will be used to scale the impulse change applied to linear velocity.

#### Return

number:

### GetHashCode()

This action gets the hash code for an object.

**Example Code**

```
Object o
integer hash = o:GetHashCode()
```

#### Return

integer: The integer hash code of the object.

### GetNonDiagonal(Libraries.Game.Physics.ConstraintDescription3D descriptionB, number massInverseA, number massInverseB)

This action returns a number whose reciprocal will be used to scale the impulse change applied to angular velocity if this ConstraintDescription3D describes 2 constraints shared by two different rigid bodies.

#### Parameters

#### Return

number:

### GetNonDiagonal(Libraries.Game.Physics.ConstraintDescription3D descriptionB, number massInverseA)

This action returns a number whose reciprocal will be used to scale the impulse change applied to angular velocity if this ConstraintDescription3D describes 2 constraints on the same rigid body.

#### Parameters

#### Return

number:

### GetRelativeVelocity(Libraries.Compute.Vector3 linearVelocityA, Libraries.Compute.Vector3 angularVelocityA, Libraries.Compute.Vector3 linearVelocityB, Libraries.Compute.Vector3 angularVelocityB)

This action returns the relative velocities between two 3D objects whose constraints are stored inside this ConstraintDescription3D.

#### Parameters

- Libraries.Compute.Vector3
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3

#### Return

number:

### Initialize(Libraries.Compute.Vector3 jointAxis, Libraries.Compute.Matrix3 world2A, Libraries.Compute.Matrix3 world2B, Libraries.Compute.Vector3 inertiaInverseA, Libraries.Compute.Vector3 inertiaInverseB)

This action initializes this ConstraintDescription3D such that this class is used to store the angular constraint between two rigid bodies.

#### Parameters

- Libraries.Compute.Vector3
- Libraries.Compute.Matrix3
- Libraries.Compute.Matrix3
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3

### Initialize(Libraries.Compute.Vector3 axisInA, Libraries.Compute.Vector3 axisInB, Libraries.Compute.Vector3 inertiaInverseA, Libraries.Compute.Vector3 inertiaInverseB)

This action initializes this ConstraintDescription3D such that this class is used to store the angular constraint between two rigid bodies.

#### Parameters

- Libraries.Compute.Vector3
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3

### Initialize(Libraries.Compute.Matrix3 world2A, Libraries.Compute.Vector3 relativePosition1, Libraries.Compute.Vector3 relativePosition2, Libraries.Compute.Vector3 jointAxis, Libraries.Compute.Vector3 inertiaInverseA, number massInverseA)

This action initializes this ConstraintDescription3D such that this class is used to store one constraitn on one rigid body.

#### Parameters

- Libraries.Compute.Matrix3
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3

### Initialize(Libraries.Compute.Matrix3 world2A, Libraries.Compute.Matrix3 world2B, Libraries.Compute.Vector3 relativePosition1, Libraries.Compute.Vector3 relativePosition2, Libraries.Compute.Vector3 jointAxis, Libraries.Compute.Vector3 inertiaInverseA, number massInverseA, Libraries.Compute.Vector3 inertiaInverseB, number massInverseB)

This action intializeds the description such that this ConstraintDescription3D is used for the constraint between two different rigid bodies.