JPL Spatial
Sound spatialization and propagation library
Loading...
Searching...
No Matches
JPL::ConvexHullBuilder< Vec3Type >::Face Class Referencefinal

Class that holds the information of one face. More...

#include <JPLSpatial/Geometry/ConvexHullBuilder.h>

Public Member Functions

 Face ()=default
 
 ~Face ()
 
void Initialize (int inIdx0, int inIdx1, int inIdx2, std::span< const Vec3 > inPositions)
 Initialize a face with three indices.
 
void CalculateNormalAndCentroid (std::span< const Vec3 > inPositions)
 Calculates the centroid and normal for this face.
 
template<class Vec3i >
bool Triangulate (std::span< const Vec3 > inPositions, Array< Vec3i > &outTris) const
 
bool IsFacing (const Vec3 &inPosition) const
 Check if face inFace is facing inPosition.
 

Public Attributes

Vec3 mNormal
 Normal of this face, length is 2 times area of face.
 
Vec3 mCentroid
 Center of the face.
 
ConflictList mConflictList
 Positions associated with this edge (that are closest to this edge). The last position in the list is the point that is furthest away from the face.
 
EdgemFirstEdge = nullptr
 First edge of this face.
 
float mFurthestPointDistanceSq = 0.0f
 Squared distance of furthest point from the conflict list to the face.
 
bool mRemoved = false
 Flag that indicates that face has been removed (face will be freed later)
 

Detailed Description

template<CVec3 Vec3Type>
class JPL::ConvexHullBuilder< Vec3Type >::Face

Class that holds the information of one face.

Constructor & Destructor Documentation

◆ Face()

template<CVec3 Vec3Type>
JPL::ConvexHullBuilder< Vec3Type >::Face::Face ( )
default

◆ ~Face()

template<CVec3 Vec3Type>
JPL::ConvexHullBuilder< Vec3Type >::Face::~Face ( )
inline

Member Function Documentation

◆ CalculateNormalAndCentroid()

template<CVec3 Vec3Type>
void JPL::ConvexHullBuilder< Vec3Type >::Face::CalculateNormalAndCentroid ( std::span< const Vec3 >  inPositions)
inline

Calculates the centroid and normal for this face.

◆ Initialize()

template<CVec3 Vec3Type>
void JPL::ConvexHullBuilder< Vec3Type >::Face::Initialize ( int  inIdx0,
int  inIdx1,
int  inIdx2,
std::span< const Vec3 >  inPositions 
)
inline

Initialize a face with three indices.

◆ IsFacing()

template<CVec3 Vec3Type>
bool JPL::ConvexHullBuilder< Vec3Type >::Face::IsFacing ( const Vec3 &  inPosition) const
inline

Check if face inFace is facing inPosition.

◆ Triangulate()

template<CVec3 Vec3Type>
template<class Vec3i >
bool JPL::ConvexHullBuilder< Vec3Type >::Face::Triangulate ( std::span< const Vec3 >  inPositions,
Array< Vec3i > &  outTris 
) const
inline

Member Data Documentation

◆ mCentroid

template<CVec3 Vec3Type>
Vec3 JPL::ConvexHullBuilder< Vec3Type >::Face::mCentroid

Center of the face.

◆ mConflictList

template<CVec3 Vec3Type>
ConflictList JPL::ConvexHullBuilder< Vec3Type >::Face::mConflictList

Positions associated with this edge (that are closest to this edge). The last position in the list is the point that is furthest away from the face.

◆ mFirstEdge

template<CVec3 Vec3Type>
Edge* JPL::ConvexHullBuilder< Vec3Type >::Face::mFirstEdge = nullptr

First edge of this face.

◆ mFurthestPointDistanceSq

template<CVec3 Vec3Type>
float JPL::ConvexHullBuilder< Vec3Type >::Face::mFurthestPointDistanceSq = 0.0f

Squared distance of furthest point from the conflict list to the face.

◆ mNormal

template<CVec3 Vec3Type>
Vec3 JPL::ConvexHullBuilder< Vec3Type >::Face::mNormal

Normal of this face, length is 2 times area of face.

◆ mRemoved

template<CVec3 Vec3Type>
bool JPL::ConvexHullBuilder< Vec3Type >::Face::mRemoved = false

Flag that indicates that face has been removed (face will be freed later)


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