public GetTriangle ( TriangleMeshConvexContactManifold &indices, |
||
indices | TriangleMeshConvexContactManifold | Indices of the triangle. |
transform | Transform to apply to the triangle vertices. | |
a | Vector3 | First vertex of the triangle. |
b | Vector3 | Second vertex of the triangle. |
c | Vector3 | Third vertex of the triangle. |
return | void |
public void GetTriangle(ref TriangleMeshConvexContactManifold.TriangleIndices indices, ref AffineTransform transform, out Vector3 a, out Vector3 b, out Vector3 c)
{
//Reverse the encoded index:
//index = i + width * j
int width = heights.GetLength(0);
int columnA = indices.A / width;
int rowA = indices.A - columnA * width;
int columnB = indices.B / width;
int rowB = indices.B - columnB * width;
int columnC = indices.C / width;
int rowC = indices.C - columnC * width;
GetPosition(rowA, columnA, ref transform, out a);
GetPosition(rowB, columnB, ref transform, out b);
GetPosition(rowC, columnC, ref transform, out c);
}
TerrainShape::GetTriangle ( int index, AffineTransform &transform, Vector3 &a, Vector3 &b, Vector3 &c ) : void |