## Libraries.Game.Collision.Narrowphase.ConvexConvexDistanceSolver Documentation

This class solves for the distance between the two colliding object

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

EncloseOrigin() | This action returns whether the simplex that you built contains the origin or no |

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

Failed() | This action returns whether the distance solver has failed or no |

FetchSupport() | This action finds a support point in an arbituarily given directio |

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

GetIterations() | This action returns how many iterations the distance solver has gone throug |

GetOrder() | This action returns what type of simplex you are using currentl |

GetSimplex() | This action returns the simplex that you are using currently using an array of vertice |

Hash(Libraries.Compute.Vector3 vector) | This action returns a number that is an index to an array that contains randome vector |

Initialize(Libraries.Compute.Matrix3 wrot0, Libraries.Compute.Vector3 pos0, Libraries.Game.Collision.Shapes.CollisionShape3D shape0, Libraries.Compute.Matrix3 wrot1, Libraries.Compute.Vector3 pos1, Libraries.Game.Collision.Shapes.CollisionShape3D shape1, number pmargin) | This action initializes the variables in this ConvexConvexDistanceSolver with variables that you passed i |

LocalSupport(Libraries.Compute.Vector3 d, integer i) | This action returns a number that is an index to an array that contains randome vector |

SearchOrigin() | This action returns whether the two objects has collided or no |

SearchOrigin(Libraries.Compute.Vector3 initray) | This action returns whether the two objects has collided or no |

SetOrder(integer order) | This action sets what type of simplex you are using currentl |

SolveSimplex2(Libraries.Compute.Vector3 ao, Libraries.Compute.Vector3 ab) | This action finds a support point in an arbituarily given directio |

SolveSimplex3(Libraries.Compute.Vector3 ao, Libraries.Compute.Vector3 ab, Libraries.Compute.Vector3 ac) | This action finds and saves an vertex that could potentially be a part of a tetrahedron that will enclose the origi |

SolveSimplex3a(Libraries.Compute.Vector3 ao, Libraries.Compute.Vector3 ab, Libraries.Compute.Vector3 ac, Libraries.Compute.Vector3 cabc) | This action initializes the variables in this ConvexConvexDistanceSolver with variables that you passed i |

SolveSimplex4(Libraries.Compute.Vector3 ao, Libraries.Compute.Vector3 ab, Libraries.Compute.Vector3 ac, Libraries.Compute.Vector3 ad) | |

Support(Libraries.Compute.Vector3 d, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex v) | This action finds and saves an vertex that could potentially be a part of a tetrahedron that will enclose the origi |

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

### EncloseOrigin()

This action returns whether the simplex that you built contains the origin or no

#### Return

boolean:

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

### Failed()

This action returns whether the distance solver has failed or no

#### Return

boolean:

### FetchSupport()

This action finds a support point in an arbituarily given directio

#### Return

boolean:

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

### GetIterations()

This action returns how many iterations the distance solver has gone throug

#### Return

integer:

### GetOrder()

This action returns what type of simplex you are using currentl

#### Return

integer:

### GetSimplex()

This action returns the simplex that you are using currently using an array of vertice

#### Return

### Hash(Libraries.Compute.Vector3 vector)

This action returns a number that is an index to an array that contains randome vector

#### Parameters

#### Return

integer:

### Initialize(Libraries.Compute.Matrix3 wrot0, Libraries.Compute.Vector3 pos0, Libraries.Game.Collision.Shapes.CollisionShape3D shape0, Libraries.Compute.Matrix3 wrot1, Libraries.Compute.Vector3 pos1, Libraries.Game.Collision.Shapes.CollisionShape3D shape1, number pmargin)

This action initializes the variables in this ConvexConvexDistanceSolver with variables that you passed i

#### Parameters

- Libraries.Compute.Matrix3
- Libraries.Compute.Vector3
- Libraries.Game.Collision.Shapes.CollisionShape3D
- Libraries.Compute.Matrix3
- Libraries.Compute.Vector3
- Libraries.Game.Collision.Shapes.CollisionShape3D

### LocalSupport(Libraries.Compute.Vector3 d, integer i)

This action returns a number that is an index to an array that contains randome vector

#### Parameters

#### Return

### SearchOrigin()

This action returns whether the two objects has collided or no

#### Return

boolean:

### SearchOrigin(Libraries.Compute.Vector3 initray)

This action returns whether the two objects has collided or no

#### Parameters

#### Return

boolean:

### SetOrder(integer order)

This action sets what type of simplex you are using currentl

#### Parameters

### SolveSimplex2(Libraries.Compute.Vector3 ao, Libraries.Compute.Vector3 ab)

This action finds a support point in an arbituarily given directio

#### Parameters

#### Return

boolean:

### SolveSimplex3(Libraries.Compute.Vector3 ao, Libraries.Compute.Vector3 ab, Libraries.Compute.Vector3 ac)

This action finds and saves an vertex that could potentially be a part of a tetrahedron that will enclose the origi

#### Parameters

#### Return

boolean:

### SolveSimplex3a(Libraries.Compute.Vector3 ao, Libraries.Compute.Vector3 ab, Libraries.Compute.Vector3 ac, Libraries.Compute.Vector3 cabc)

#### Parameters

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

#### Return

boolean:

### SolveSimplex4(Libraries.Compute.Vector3 ao, Libraries.Compute.Vector3 ab, Libraries.Compute.Vector3 ac, Libraries.Compute.Vector3 ad)

#### Parameters

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

#### Return

boolean