RavEngine
Loading...
Searching...
No Matches
physx::Gu::AdjTriangle Class Reference

A triangle class used to compute the adjacency structures. More...

#include <GuAdjacencies.h>

Inheritance diagram for physx::Gu::AdjTriangle:
[legend]
Collaboration diagram for physx::Gu::AdjTriangle:
[legend]

Public Member Functions

PX_INLINE AdjTriangle ()
 Constructor.
 
PX_INLINE ~AdjTriangle ()
 Destructor.
 
PxU32 ComputeNbBoundaryEdges () const
 
PxU32 ComputeNbNeighbors () const
 
bool HasNeighbor (PxU32 tref, PxU32 *index=NULL) const
 
void Flip ()
 
PX_INLINE PxU32 GetLink (SharedEdgeIndex edge_index) const
 
PX_INLINE PxU32 GetAdjTri (SharedEdgeIndex edge_index) const
 
PX_INLINE PxU32 GetAdjEdge (SharedEdgeIndex edge_index) const
 
PX_INLINE PxIntBool IsBoundaryEdge (SharedEdgeIndex edge_index) const
 
PX_INLINE PxIntBool HasActiveEdge01 () const
 
PX_INLINE PxIntBool HasActiveEdge20 () const
 
PX_INLINE PxIntBool HasActiveEdge12 () const
 
PX_INLINE PxIntBool HasActiveEdge (PxU32 i) const
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Public Attributes

PxU32 mATri [3]
 

Detailed Description

A triangle class used to compute the adjacency structures.

Member Function Documentation

◆ ComputeNbBoundaryEdges()

PxU32 AdjTriangle::ComputeNbBoundaryEdges ( ) const

Computes the number of boundary edges in a triangle.

Returns
the number of boundary edges. (0 => 3)

◆ ComputeNbNeighbors()

PxU32 AdjTriangle::ComputeNbNeighbors ( ) const

Computes the number of valid neighbors.

Returns
the number of neighbors. (0 => 3)

◆ Flip()

PX_IMPLEMENT_OUTPUT_ERROR void AdjTriangle::Flip ( )

Flips the winding.

◆ HasNeighbor()

bool AdjTriangle::HasNeighbor ( PxU32  tref,
PxU32 *  index = NULL 
) const

Checks whether the triangle has a particular neighbor or not.

Parameters
tref[in] the triangle reference to look for
index[out] the corresponding index in the triangle (NULL if not needed)
Returns
true if the triangle has the given neighbor

Member Data Documentation

◆ mATri

PxU32 physx::Gu::AdjTriangle::mATri[3]

Links/References of adjacent triangles. The 2 most significant bits contains the counterpart edge in the adjacent triangle. mATri[0] refers to edge 0-1 mATri[1] refers to edge 0-2 mATri[2] refers to edge 1-2


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