## Libraries.Game.Collision.Narrowphase.ConvexConvexSimplexSolver Documentation

This action finds the closest point on a object to the origi

*Inherits from: *Libraries.Language.Object

## Summary

### Actions Summary Table

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

AddVertex(Libraries.Compute.Vector3 w, Libraries.Compute.Vector3 p, Libraries.Compute.Vector3 q) | This action updates the simple |

BackupClosest(Libraries.Compute.Vector3 v) | This action saves the closest vertex to the origin inside the "Vector3 v |

Closest(Libraries.Compute.Vector3 v) | This action temporarily stores a vertex on the current simplex that is closest to the origi |

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

ComputePoints(Libraries.Compute.Vector3 p1, Libraries.Compute.Vector3 p2) | This action calls the action UpdateClosestVectorAndPoints and stores two different points temporarily to be used later. |

EmptySimplex() | This action returns whether you have a simplex currently or no |

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

FullSimplex() | This action returns whether you have a tetrahedron as your current simple |

GetCachedPointA() | This action returns whether you have a simplex currently or no |

GetCachedPointB() | This action tests whether a vertex is inside the current simple |

GetCachedVector() | This action returns the maximum distance from the origin to a vertex in the simple |

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

GetLastW() | This action updates the simple |

GetNumberOfVertices() | This action returns the number of vertices there is in a simple |

GetSimplexPointsP() | This action returns the number of vertices there is in a simple |

GetSimplexPointsQ() | This action calls the action UpdateClosestVectorAndPoints and stores two different points temporarily to be used later. |

GetSimplexVectorW() | This action sets the number of vertices there is in a simple |

InSimplex(Libraries.Compute.Vector3 w) | This action tests whether a vertex is inside the current simple |

IsCachedValidClosest() | if they are on opposite sides of the pla |

MaxVertex() | This action returns the maximum distance from the origin to a vertex in the simple |

NeedsUpdate() | This action updates the vertex on the current simplex that is closest to the origin and also updates the closest point from the current simplex to the origi |

ReduceVertices(Libraries.Game.Collision.Narrowphase.ConvexConvexSubSimplexClosestResult usedVerts) | This action ignores the vertices that are unused inside a ConvexConvesSubSimplexClosestResult class, which can hold up to 4 vertice |

RemoveVertex(integer index) | This action removes a vertex from a simplex (which is the umbrella term for a point, a line, a triangle, or a tetrahedron |

Reset() | This action resets the ConvexConvexSimplexSolve |

SetCachedPointA(Libraries.Compute.Vector3 point) | This action saves the closest vertex to the origin inside the "Vector3 v |

SetCachedPointB(Libraries.Compute.Vector3 point) | This action returns whether you have a tetrahedron as your current simple |

SetCachedValidClosest(boolean flag) | if they are both on the pla |

SetCachedVector(Libraries.Compute.Vector3 vector) | This action temporarily stores a vertex on the current simplex that is closest to the origi |

SetLastW(Libraries.Compute.Vector3 vector) | This action resets the ConvexConvexSimplexSolve |

SetNeedsUpdate(boolean flag) | This action ignores the vertices that are unused inside a ConvexConvesSubSimplexClosestResult class, which can hold up to 4 vertice |

SetNumberOfVertices(integer numberOfVertices) | This action sets the number of vertices there is in a simple |

UpdateClosestVectorAndPoints() | This action updates the vertex on the current simplex that is closest to the origin and also updates the closest point from the current simplex to the origi |

## Actions Documentation

### AddVertex(Libraries.Compute.Vector3 w, Libraries.Compute.Vector3 p, Libraries.Compute.Vector3 q)

This action updates the simple

#### Parameters

### BackupClosest(Libraries.Compute.Vector3 v)

This action saves the closest vertex to the origin inside the "Vector3 v

#### Parameters

### Closest(Libraries.Compute.Vector3 v)

This action temporarily stores a vertex on the current simplex that is closest to the origi

#### Parameters

#### Return

boolean:

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

### ComputePoints(Libraries.Compute.Vector3 p1, Libraries.Compute.Vector3 p2)

This action calls the action UpdateClosestVectorAndPoints and stores two different points temporarily to be used later. These two points can be anything that you know you will need late

#### Parameters

### EmptySimplex()

This action returns whether you have a simplex currently 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.

### FullSimplex()

This action returns whether you have a tetrahedron as your current simple

#### Return

boolean:

### GetCachedPointA()

This action returns whether you have a simplex currently or no

#### Return

### GetCachedPointB()

This action tests whether a vertex is inside the current simple

#### Return

### GetCachedVector()

This action returns the maximum distance from the origin to a vertex in the simple

#### Return

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

### GetLastW()

This action updates the simple

#### Return

### GetNumberOfVertices()

This action returns the number of vertices there is in a simple

#### Return

number:

### GetSimplexPointsP()

This action returns the number of vertices there is in a simple

#### Return

### GetSimplexPointsQ()

This action calls the action UpdateClosestVectorAndPoints and stores two different points temporarily to be used later. These two points can be anything that you know you will need late

#### Return

### GetSimplexVectorW()

This action sets the number of vertices there is in a simple

#### Return

### InSimplex(Libraries.Compute.Vector3 w)

This action tests whether a vertex is inside the current simple

#### Parameters

#### Return

boolean:

### IsCachedValidClosest()

if they are on opposite sides of the pla

#### Return

boolean:

### MaxVertex()

This action returns the maximum distance from the origin to a vertex in the simple

#### Return

number:

### NeedsUpdate()

This action updates the vertex on the current simplex that is closest to the origin and also updates the closest point from the current simplex to the origi

#### Return

boolean:

### ReduceVertices(Libraries.Game.Collision.Narrowphase.ConvexConvexSubSimplexClosestResult usedVerts)

This action ignores the vertices that are unused inside a ConvexConvesSubSimplexClosestResult class, which can hold up to 4 vertice

#### Parameters

### RemoveVertex(integer index)

This action removes a vertex from a simplex (which is the umbrella term for a point, a line, a triangle, or a tetrahedron

#### Parameters

### Reset()

This action resets the ConvexConvexSimplexSolve

### SetCachedPointA(Libraries.Compute.Vector3 point)

This action saves the closest vertex to the origin inside the "Vector3 v

#### Parameters

### SetCachedPointB(Libraries.Compute.Vector3 point)

This action returns whether you have a tetrahedron as your current simple

#### Parameters

### SetCachedValidClosest(boolean flag)

if they are both on the pla

#### Parameters

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

This action temporarily stores a vertex on the current simplex that is closest to the origi

#### Parameters

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

This action resets the ConvexConvexSimplexSolve

#### Parameters

### SetNeedsUpdate(boolean flag)

#### Parameters

### SetNumberOfVertices(integer numberOfVertices)

This action sets the number of vertices there is in a simple

#### Parameters

### UpdateClosestVectorAndPoints()

#### Return

boolean: