## Libraries.Game.Physics.SolverItem3D Documentation

This class is a temporary storage location for the properties of a 3D item so that the actions inside CollisionSolver3D can run a little quicke

*Inherits from: *Libraries.Language.Object

## Summary

### Actions Summary Table

Actions | Description |
---|---|

Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |

Equals(Libraries.Language.Object object) | This action determines if two objects are equal based on their hash code values. |

GetAngularFactor() | This action returns the angular factor. |

GetAngularVelocity() | This action returns the angular velocity stored inside this SolverItem3D class. |

GetCenterOfMassPosition() | This action returns where the center of the 3D object is. |

GetFriction() | This action returns the friction stored inside this SolverItem3D class. |

GetHashCode() | This action gets the hash code for an object. |

GetInverseMass() | This action returns the 1/mass value stored inside this SolverItem3D class. |

GetLinearVelocity() | This action returns the linear velocity stored inside this SolverItem3D class. |

GetOriginalItem() | This action returns which 3D object is attached to this SolverItem3D. |

GetPushVelocity() | This action returns the push velocity. |

GetTurnVelocity() | This action returns the turn velocity. |

GetVelocityInLocalPoint(Libraries.Compute.Vector3 relativePosition, Libraries.Compute.Vector3 velocity) | This action lets you know the linear velocity of a point "Vector3 relativePosition" on this 3D object. |

InternalApplyImpulse(Libraries.Compute.Vector3 linearComponent, Libraries.Compute.Vector3 angularComponent, number impulseMagnitude) | This action allows you to add linear velocity, "Vector3 linearComponent," and add angular velocity, "Vector3 angularComponent," both scaled by "number impulseMagnitude" to the current linear velocity and angular velocity of this 3D object. |

InternalApplyPushImpulse(Libraries.Compute.Vector3 linearComponent, Libraries.Compute.Vector3 angularComponent, number impulseMagnitude) | This action allows you to add linear velocity, "Vector3 linearComponent," and add angular velocity, "Vector3 angularComponent," both scaled by "number impulseMagnitude" to the current push linear velocity and push angular velocity of this 3D object. |

ReadVelocity() | This action stores the linear and angular velocities of the 3D item that is attached to this SolverItem3D inside this SolverItem3D so that if we need the same linear and angular velocities again, we don't have to as the Item3D class to give us these velocities, which will make our program quicke |

SetAngularFactor(number factor) | This action sets the angular factor. |

SetAngularVelocity(Libraries.Compute.Vector3 velocity) | This action sets the angular velocity stored inside this SolverItem3D class. |

SetCenterOfMassPosition(Libraries.Compute.Vector3 position) | This action sets where the center of the 3D object is. |

SetFriction(number friction) | This action sets the friction stored inside this SolverItem3D class. |

SetInverseMass(number inverseMass) | This action sets the 1/mass value stored inside this SolverItem3D class. |

SetLinearVelocity(Libraries.Compute.Vector3 velocity) | This action sets the linear velocity stored inside this SolverItem3D class. |

SetOriginalItem(Libraries.Interface.Item3D item) | This action sets which 3D object is attached to this SolverItem3D. |

SetPushVelocity(Libraries.Compute.Vector3 velocity) | This action sets the push velocity. |

SetTurnVelocity(Libraries.Compute.Vector3 velocity) | This action sets the turn velocity. |

WriteBackVelocity(number timeStep) | This action updates the angular and linear velocities in the 3D object that is attached to this SolverItem3D using a predicted angular and linear velocities. |

WriteBackVelocity() | This action updates the angular and linear velocities in the 3D object that is attached to this SolverItem3 |

## Actions Documentation

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

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

**Example Code**

```
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle
```

#### Parameters

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

#### Return

integer: 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(
```

#### Parameters

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

#### Return

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

### GetAngularFactor()

This action returns the angular factor.

#### Return

number: the angular facto

### GetAngularVelocity()

This action returns the angular velocity stored inside this SolverItem3D class.

#### Return

Libraries.Compute.Vector3: the angular velocity stored inside this SolverItem3D clas

### GetCenterOfMassPosition()

This action returns where the center of the 3D object is.

#### Return

Libraries.Compute.Vector3: the center of the 3D objec

### GetFriction()

This action returns the friction stored inside this SolverItem3D class.

#### Return

number: the coefficient of frictio

### 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.

### GetInverseMass()

This action returns the 1/mass value stored inside this SolverItem3D class.

#### Return

number: the 1/mass value stored inside this SolverItem3D clas

### GetLinearVelocity()

This action returns the linear velocity stored inside this SolverItem3D class.

#### Return

Libraries.Compute.Vector3: the linear velocity of the 3D objec

### GetOriginalItem()

This action returns which 3D object is attached to this SolverItem3D.

#### Return

Libraries.Interface.Item3D: the 3D object is attached to this SolverItem3

### GetPushVelocity()

This action returns the push velocity.

#### Return

Libraries.Compute.Vector3: the push velocit

### GetTurnVelocity()

This action returns the turn velocity.

#### Return

Libraries.Compute.Vector3: the turn velocit

### GetVelocityInLocalPoint(Libraries.Compute.Vector3 relativePosition, Libraries.Compute.Vector3 velocity)

This action lets you know the linear velocity of a point "Vector3 relativePosition" on this 3D object.

#### Parameters

- Libraries.Compute.Vector3: A point on the 3D object.
- Libraries.Compute.Vector3: Where velocity will be store

### InternalApplyImpulse(Libraries.Compute.Vector3 linearComponent, Libraries.Compute.Vector3 angularComponent, number impulseMagnitude)

This action allows you to add linear velocity, "Vector3 linearComponent," and add angular velocity, "Vector3 angularComponent," both scaled by "number impulseMagnitude" to the current linear velocity and angular velocity of this 3D object.

#### Parameters

- Libraries.Compute.Vector3: Linear impulse.
- Libraries.Compute.Vector3: Angular impulse.
- number impulseMagnitude: Magnitude of the impuls

### InternalApplyPushImpulse(Libraries.Compute.Vector3 linearComponent, Libraries.Compute.Vector3 angularComponent, number impulseMagnitude)

This action allows you to add linear velocity, "Vector3 linearComponent," and add angular velocity, "Vector3 angularComponent," both scaled by "number impulseMagnitude" to the current push linear velocity and push angular velocity of this 3D object.

#### Parameters

- Libraries.Compute.Vector3: Linear push impulse.
- Libraries.Compute.Vector3: Angular turn impulse.
- number impulseMagnitude: Magnitude of the impuls

### ReadVelocity()

This action stores the linear and angular velocities of the 3D item that is attached to this SolverItem3D inside this SolverItem3D so that if we need the same linear and angular velocities again, we don't have to as the Item3D class to give us these velocities, which will make our program quicke

### SetAngularFactor(number factor)

This action sets the angular factor.

#### Parameters

### SetAngularVelocity(Libraries.Compute.Vector3 velocity)

This action sets the angular velocity stored inside this SolverItem3D class.

#### Parameters

- Libraries.Compute.Vector3: the angular velocity stored inside this SolverItem3D clas

### SetCenterOfMassPosition(Libraries.Compute.Vector3 position)

This action sets where the center of the 3D object is.

#### Parameters

- Libraries.Compute.Vector3: The center of the 3D objec

### SetFriction(number friction)

This action sets the friction stored inside this SolverItem3D class.

#### Parameters

- number friction: The coefficient of frictio

### SetInverseMass(number inverseMass)

This action sets the 1/mass value stored inside this SolverItem3D class.

#### Parameters

### SetLinearVelocity(Libraries.Compute.Vector3 velocity)

This action sets the linear velocity stored inside this SolverItem3D class.

#### Parameters

- Libraries.Compute.Vector3: the linear velocity of the 3D objec

### SetOriginalItem(Libraries.Interface.Item3D item)

This action sets which 3D object is attached to this SolverItem3D.

#### Parameters

- Libraries.Interface.Item3D: The 3D object to be attached to this SolverItem3

### SetPushVelocity(Libraries.Compute.Vector3 velocity)

This action sets the push velocity.

#### Parameters

- Libraries.Compute.Vector3: The push velocit

### SetTurnVelocity(Libraries.Compute.Vector3 velocity)

This action sets the turn velocity.

#### Parameters

- Libraries.Compute.Vector3: the turn velocit

### WriteBackVelocity(number timeStep)

This action updates the angular and linear velocities in the 3D object that is attached to this SolverItem3D using a predicted angular and linear velocities. This also updates that 3D object's position with a predicted position.

#### Parameters

- number timeStep: The time of simulatio

### WriteBackVelocity()

This action updates the angular and linear velocities in the 3D object that is attached to this SolverItem3