Photon Quantum 3.0.0

Classes | Public Member Functions | Properties | List of all members
Quantum.TriangleMesh Class Reference

The data representation of all static triangles in the scene. More...

Classes

struct  CellBounds
 The bounds of a cell. More...
 

Public Member Functions

delegate void CellVisitor (int x, int y, int z, int *triangles, int count)
 The delegate used to visit cells in the triangle mesh. More...
 
FPVector3 GetNodeCenter (int x, int y, int z)
 Retrieve the center of a node at a given cell position. More...
 
TriangleCCW * GetTriangle (int triIndex)
 Get the triangle at the specified index. More...
 
void Remove (FrameBase frame, TriangleReference triangle)
 Obsolete method. Renamed to RemoveTriangle, use it instead. More...
 
void Remove (TriangleReference triangle)
 Remove(FrameBase, Quantum.TriangleReference) This method is Obsolete. Use the overload that receives a FrameBase instance instead. More...
 
void RemoveMany (FrameBase frame, TriangleReference meshTriReference)
 Obsolete method. Renamed to RemoveMeshCollider, use it instead.

See also
RemoveMeshCollider
More...
 
void RemoveMany (TriangleReference triangle)
 This method is Obsolete. Use the overload that receives a FrameBase instance instead.

See also
RemoveMany(FrameBase, Quantum.TriangleReference)
More...
 
void RemoveMeshCollider (FrameBase frame, TriangleReference meshTriReference)
 Remove many triangles from the triangle mesh. More...
 
void RemoveTriangle (FrameBase frame, TriangleReference triangle)
 Remove a singular triangle from the triangle mesh. More...
 
void ToCell (FPVector3 pos, out int x, out int y, out int z)
 Convert a position to a cell. More...
 
bool TryGetTriangles (int x, int y, int z, out int *triangles, out int count)
 Get all triangles at a given cell position. More...
 
void VisitCells (CellVisitor visitor)
 Visits all cells in the triangle mesh using the supplied cell visitor. More...
 

Properties

CellBounds Bounds [get]
 The bounds of the cells. More...
 
FP CellBroadRadius [get]
 The broad radius of the cells in the triangle mesh. More...
 
int CellCapacity [get]
 The capacity of the cells in the triangle mesh. More...
 
int CellCount [get]
 Get the number of cells in the triangle mesh. More...
 
FP CellExtent [get]
 The extent of the cells in the triangle mesh. More...
 
FP CellSize [get]
 The size of the cells in the triangle mesh. More...
 
int FreeCellCount [get]
 The number of free cells in the triangle mesh. More...
 
int FreeCellHead [get]
 The first free cell in the triangle mesh. More...
 
int FreeTriangleCount [get]
 The number of free triangles in the triangle mesh. More...
 
int FreeTriangleHead [get]
 The first free triangle in the triangle mesh. More...
 
int ImmutableTriangleCount [get]
 How many triangles are immutable (ie: not toggleable) in the triangle mesh. More...
 
int TriangleCapacity [get]
 The capacity of the triangles in the triangle mesh. More...
 
int TriangleCount [get]
 The number of triangles in the triangle mesh. More...
 

Detailed Description

The data representation of all static triangles in the scene.

Member Function Documentation

◆ CellVisitor()

delegate void Quantum.TriangleMesh.CellVisitor ( int  x,
int  y,
int  z,
int *  triangles,
int  count 
)

The delegate used to visit cells in the triangle mesh.

◆ VisitCells()

void Quantum.TriangleMesh.VisitCells ( CellVisitor  visitor)
inline

Visits all cells in the triangle mesh using the supplied cell visitor.

Parameters
visitorThe visitor delegate to use.

◆ GetNodeCenter()

FPVector3 Quantum.TriangleMesh.GetNodeCenter ( int  x,
int  y,
int  z 
)
inline

Retrieve the center of a node at a given cell position.

Parameters
x
y
z
Returns
The center of the node.

◆ GetTriangle()

TriangleCCW* Quantum.TriangleMesh.GetTriangle ( int  triIndex)
inline

Get the triangle at the specified index.

Parameters
triIndex
Returns
A pointer to the triangle at the specified index.

◆ ToCell()

void Quantum.TriangleMesh.ToCell ( FPVector3  pos,
out int  x,
out int  y,
out int  z 
)
inline

Convert a position to a cell.

Parameters
pos
x
y
z

◆ TryGetTriangles()

bool Quantum.TriangleMesh.TryGetTriangles ( int  x,
int  y,
int  z,
out int *  triangles,
out int  count 
)
inline

Get all triangles at a given cell position.

Parameters
x
y
z
triangles
count
Returns
false if no triangles exist, true if triangles are found

◆ RemoveMany() [1/2]

void Quantum.TriangleMesh.RemoveMany ( TriangleReference  triangle)
inline

This method is Obsolete. Use the overload that receives a FrameBase instance instead.

See also
RemoveMany(FrameBase, Quantum.TriangleReference)

Parameters
triangleThe triangle reference to remove.

◆ RemoveMany() [2/2]

void Quantum.TriangleMesh.RemoveMany ( FrameBase  frame,
TriangleReference  meshTriReference 
)
inline

Obsolete method. Renamed to RemoveMeshCollider, use it instead.

See also
RemoveMeshCollider

Parameters
frameThe frame.
meshTriReferenceThe triangle reference to remove.

◆ RemoveMeshCollider()

void Quantum.TriangleMesh.RemoveMeshCollider ( FrameBase  frame,
TriangleReference  meshTriReference 
)
inline

Remove many triangles from the triangle mesh.

Parameters
frameThe frame.
meshTriReferenceThe triangle reference to remove.

◆ Remove() [1/2]

void Quantum.TriangleMesh.Remove ( TriangleReference  triangle)
inline

Remove(FrameBase, Quantum.TriangleReference) This method is Obsolete. Use the overload that receives a FrameBase instance instead.

Parameters
triangleThe triangle reference to remove.

◆ Remove() [2/2]

void Quantum.TriangleMesh.Remove ( FrameBase  frame,
TriangleReference  triangle 
)
inline

Obsolete method. Renamed to RemoveTriangle, use it instead.

Parameters
frameThe frame.
triangleThe triangle reference to remove.

◆ RemoveTriangle()

void Quantum.TriangleMesh.RemoveTriangle ( FrameBase  frame,
TriangleReference  triangle 
)
inline

Remove a singular triangle from the triangle mesh.

Parameters
frameThe frame.
triangleThe triangle reference to remove.

Property Documentation

◆ CellCount

int Quantum.TriangleMesh.CellCount
get

Get the number of cells in the triangle mesh.

◆ CellCapacity

int Quantum.TriangleMesh.CellCapacity
get

The capacity of the cells in the triangle mesh.

◆ FreeCellCount

int Quantum.TriangleMesh.FreeCellCount
get

The number of free cells in the triangle mesh.

◆ FreeCellHead

int Quantum.TriangleMesh.FreeCellHead
get

The first free cell in the triangle mesh.

◆ CellSize

FP Quantum.TriangleMesh.CellSize
get

The size of the cells in the triangle mesh.

◆ CellExtent

FP Quantum.TriangleMesh.CellExtent
get

The extent of the cells in the triangle mesh.

◆ CellBroadRadius

FP Quantum.TriangleMesh.CellBroadRadius
get

The broad radius of the cells in the triangle mesh.

◆ Bounds

CellBounds Quantum.TriangleMesh.Bounds
get

The bounds of the cells.

◆ TriangleCount

int Quantum.TriangleMesh.TriangleCount
get

The number of triangles in the triangle mesh.

◆ TriangleCapacity

int Quantum.TriangleMesh.TriangleCapacity
get

The capacity of the triangles in the triangle mesh.

◆ FreeTriangleCount

int Quantum.TriangleMesh.FreeTriangleCount
get

The number of free triangles in the triangle mesh.

◆ FreeTriangleHead

int Quantum.TriangleMesh.FreeTriangleHead
get

The first free triangle in the triangle mesh.

◆ ImmutableTriangleCount

int Quantum.TriangleMesh.ImmutableTriangleCount
get

How many triangles are immutable (ie: not toggleable) in the triangle mesh.