Browse Source

Add convex hull point accessor (#287)

Nikita Leonidov 2 years ago
parent
commit
a35cd201e6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Jolt/Physics/Collision/Shape/ConvexHullShape.h

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

@@ -109,6 +109,12 @@ public:
 	/// Get the planes of this convex hull
 	const Array<Plane> &	GetPlanes() const													{ return mPlanes; }
 
+	/// Get the number of vertices in this convex hull
+	inline uint				GetNumPoints() const												{ return (uint)mPoints.size(); }
+
+	/// Get a vertex of this convex hull relative to the center of mass
+	inline Vec3				GetPoint(uint inIndex) const										{ return mPoints[inIndex].mPosition; }
+
 	// Register shape functions with the registry
 	static void				sRegister();