VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Properties
VisiMath.Geometry.TriangleShape Class Reference

Triangle convex shape using accelerated collision triangle. More...

Inheritance diagram for VisiMath.Geometry.TriangleShape:

List of all members.

## Public Member Functions
| TriangleShape (ref ColTriangle tri)
| Constructor from finished collision triangle.
| TriangleShape (Vector3[] tris)
| Constructor from list of positions.
| TriangleShape (Vector3 pos1, Vector3 pos2, Vector3 pos3)
| Constructor from three corners.
| TriangleShape (ref Vector3 pos1, ref Vector3 pos2, ref Vector3 pos3)
| Constructor from three corners.
void | GetLocalSupportingVertex (ref Vector3 direction, out Vector3 vertex)
| Gets supporting vertex in local coordinates.
void | GetVertex (int index, out Vector3 vertex)
| Returns vertex with specified index, valid for explicit object types.
bool | ContainsPosition (Vector3 vec)
| Returns true if convex object contains position.
## Public Attributes
ColTriangle | Triangle
| Collision triangle.
## Properties
ConvexObjectType | BaseType`[get]`
| Returns implicit (math expression) or explicit (vertex based) type of convex object.
int | VertexCount`[get]`
| Returns number of vertices, valid for explicit object types.

## Detailed Description

Triangle convex shape using accelerated collision triangle.

## Constructor & Destructor Documentation

VisiMath.Geometry.TriangleShape.TriangleShape | ( | ref ColTriangle | tri | ) |

Constructor from finished collision triangle.

Parameters:

  tri | Collision triangle

VisiMath.Geometry.TriangleShape.TriangleShape | ( | Vector3[] | tris | ) |

Constructor from list of positions.

Parameters:

  tris | triangle vertices

VisiMath.Geometry.TriangleShape.TriangleShape | ( | Vector3 | pos1,
|  | Vector3 | pos2,
|  | Vector3 | pos3
| ) |  |

Constructor from three corners.

Parameters:

  pos1 | Triangle corner
  pos2 | Triangle corner
  pos3 | Triangle corner

VisiMath.Geometry.TriangleShape.TriangleShape | ( | ref Vector3 | pos1,
|  | ref Vector3 | pos2,
|  | ref Vector3 | pos3
| ) |  |

Constructor from three corners.

Parameters:

  pos1 | Triangle corner
  pos2 | Triangle corner
  pos3 | Triangle corner

## Member Function Documentation

bool VisiMath.Geometry.TriangleShape.ContainsPosition | ( | Vector3 | vec | ) |

Returns true if convex object contains position.

Parameters:

  vec | Position to check

Returns:
  True if inside

Implements VisiMath.Geometry.IConvexObject.

void VisiMath.Geometry.TriangleShape.GetLocalSupportingVertex | ( | ref Vector3 | direction,
|  | out Vector3 | vertex
| ) |  |

Gets supporting vertex in local coordinates.

Parameters:

  vertex | Save vertex
  direction | Direction vector

Implements VisiMath.Geometry.IConvexObject.

void VisiMath.Geometry.TriangleShape.GetVertex | ( | int | index,
|  | out Vector3 | vertex
| ) |  |

Returns vertex with specified index, valid for explicit object types.

Parameters:

  index | index of vertex
  vertex | Vector to save vertex

Implements VisiMath.Geometry.IConvexObject.

## Member Data Documentation

ColTriangle VisiMath.Geometry.TriangleShape.Triangle

Collision triangle.

## Property Documentation

ConvexObjectType VisiMath.Geometry.TriangleShape.BaseType`[get]`

Returns implicit (math expression) or explicit (vertex based) type of convex object.

Implements VisiMath.Geometry.IConvexObject.

int VisiMath.Geometry.TriangleShape.VertexCount`[get]`

Returns number of vertices, valid for explicit object types.

Implements VisiMath.Geometry.IConvexObject.

The documentation for this class was generated from the following file:

- ColTriangle.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events