Browse Source

Moved 'max points' constant from cpp to h and documented it.

Jorrit Rouwe 3 years ago
parent
commit
a8a692d971

+ 0 - 2
Jolt/Physics/Collision/Shape/ConvexHullShape.cpp

@@ -30,8 +30,6 @@ JPH_IMPLEMENT_SERIALIZABLE_VIRTUAL(ConvexHullShapeSettings)
 	JPH_ADD_ATTRIBUTE(ConvexHullShapeSettings, mHullTolerance)
 }
 
-static constexpr int cMaxPointsInHull = 256;
-
 ShapeSettings::ShapeResult ConvexHullShapeSettings::Create() const
 { 
 	if (mCachedResult.IsEmpty())

+ 4 - 0
Jolt/Physics/Collision/Shape/ConvexHullShape.h

@@ -39,6 +39,10 @@ public:
 class ConvexHullShape final : public ConvexShape
 {
 public:
+	/// Maximum amount of points supported in a convex hull. Note that while constructing a hull, interior points are discarded so you can provide more points.
+	/// The ConvexHullShapeSettings::Create function will return an error when too many points are provided.
+	static constexpr int	cMaxPointsInHull = 256;
+
 	/// Constructor
 							ConvexHullShape() : ConvexShape(EShapeSubType::ConvexHull) { }
 							ConvexHullShape(const ConvexHullShapeSettings &inSettings, ShapeResult &outResult);