10#ifdef JPH_CONVEX_BUILDER_DEBUG
45 Edge * mNextEdge =
nullptr;
46 Edge * mNeighbourEdge =
nullptr;
71 return mNormal.Dot(
inPosition - mCentroid) > 0.0f;
77 Edge * mFirstEdge =
nullptr;
78 float mFurthestPointDistanceSq = 0.0f;
79 bool mRemoved =
false;
80#ifdef JPH_CONVEX_BUILDER_DEBUG
114 int GetNumVerticesUsed()
const;
134 static constexpr float cMinTriangleAreaSq = 1.0e-12f;
136#ifdef JPH_CONVEX_BUILDER_DEBUG
145 Edge * mNeighbourEdge;
154 float DetermineCoplanarDistance()
const;
180 void GarbageCollectFaces();
189 void FreeFace(Face *
inFace);
198 static void sUnlinkFace(Face *
inFace);
205 void MergeFaces(Edge *
inEdge);
228#ifdef JPH_ENABLE_ASSERTS
242#ifdef JPH_CONVEX_BUILDER_DEBUG
253#ifdef JPH_CONVEX_BUILDER_DUMP_SHAPE
257 const Positions & mPositions;
267 CoplanarList mCoplanarList;
269#ifdef JPH_CONVEX_BUILDER_DEBUG
271 mutable RVec3 mOffset;
#define JPH_EXPORT
Definition Core.h:227
#define JPH_NAMESPACE_END
Definition Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
AllocateFunction Allocate
Definition Memory.cpp:59
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:29
float Real
Definition Real.h:27
std::vector< T, STLAllocator< T > > Array
Definition STLAllocator.h:81
Class that holds an RGBA color with 8-bits per component.
Definition Color.h:16
Class that holds the information of an edge.
Definition ConvexHullBuilder.h:28
JPH_OVERRIDE_NEW_DELETE Edge(Face *inFace, int inStartIdx)
Constructor.
Definition ConvexHullBuilder.h:33
Edge * mNextEdge
Next edge of this face.
Definition ConvexHullBuilder.h:45
int mStartIdx
Vertex index in mPositions that indicates the start vertex of this edge.
Definition ConvexHullBuilder.h:47
Face * mFace
Face that this edge belongs to.
Definition ConvexHullBuilder.h:44
Edge * GetPreviousEdge()
Get the previous edge.
Definition ConvexHullBuilder.h:36
Class that holds the information of one face.
Definition ConvexHullBuilder.h:54
Vec3 mCentroid
Center of the face.
Definition ConvexHullBuilder.h:75
bool IsFacing(Vec3Arg inPosition) const
Check if face inFace is facing inPosition.
Definition ConvexHullBuilder.h:68
Vec3 mNormal
Normal of this face, length is 2 times area of face.
Definition ConvexHullBuilder.h:74
ConflictList mConflictList
Positions associated with this edge (that are closest to this edge). The last position in the list is...
Definition ConvexHullBuilder.h:76
A convex hull builder that tries to create hulls as accurately as possible. Used for offline processi...
Definition ConvexHullBuilder.h:21
const Faces & GetFaces() const
Access to the created faces. Memory is owned by the convex hull builder.
Definition ConvexHullBuilder.h:130
~ConvexHullBuilder()
Destructor.
Definition ConvexHullBuilder.h:93
EResult
Result enum that indicates how the hull got created.
Definition ConvexHullBuilder.h:97
Array< int > ConflictList
Definition ConvexHullBuilder.h:50
Array< Vec3 > Positions
Definition ConvexHullBuilder.h:86
Array< Face * > Faces
Definition ConvexHullBuilder.h:87
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition NonCopyable.h:11