Browse Source

Explicitly marking some classes as internal to avoid confusion

See e.g. #1759
Jorrit Rouwe 1 week ago
parent
commit
b1e5153f78

+ 6 - 2
Jolt/Physics/Body/BodyManager.cpp

@@ -47,7 +47,8 @@ JPH_NAMESPACE_BEGIN
 	}
 #endif
 
-// Helper class that combines a body and its motion properties
+/// @cond INTERNAL
+/// Helper class that combines a body and its motion properties
 class BodyWithMotionProperties : public Body
 {
 public:
@@ -55,8 +56,10 @@ public:
 
 	MotionProperties			mMotionProperties;
 };
+/// @endcond
 
-// Helper class that combines a soft body its motion properties and shape
+/// @cond INTERNAL
+/// Helper class that combines a soft body its motion properties and shape
 class SoftBodyWithMotionPropertiesAndShape : public Body
 {
 public:
@@ -68,6 +71,7 @@ public:
 	SoftBodyMotionProperties	mMotionProperties;
 	SoftBodyShape				mShape;
 };
+/// @endcond
 
 inline void BodyManager::sDeleteBody(Body *inBody)
 {

+ 3 - 0
Jolt/Physics/Body/BodyManager.h

@@ -40,6 +40,9 @@ using BodyVector = Array<Body *>;
 using BodyIDVector = Array<BodyID>;
 
 /// Class that contains all bodies
+///
+/// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library.
+/// Its functionality is exposed through PhysicsSystem, BodyInterface, BodyLockRead and BodyLockWrite.
 class JPH_EXPORT BodyManager : public NonCopyable
 {
 public:

+ 5 - 1
Jolt/Physics/Constraints/CalculateSolverSteps.h

@@ -8,7 +8,8 @@
 
 JPH_NAMESPACE_BEGIN
 
-/// Class used to calculate the total number of velocity and position steps
+/// @cond INTERNAL
+/// Internal class used to calculate the total number of velocity and position steps
 class CalculateSolverSteps
 {
 public:
@@ -51,7 +52,9 @@ private:
 	bool						mApplyDefaultVelocity = false;
 	bool						mApplyDefaultPosition = false;
 };
+/// @endcond
 
+/// @cond INTERNAL
 /// Dummy class to replace the steps calculator when we don't need the result
 class DummyCalculateSolverSteps
 {
@@ -62,5 +65,6 @@ public:
 		/* Nothing to do */
 	}
 };
+/// @endcond
 
 JPH_NAMESPACE_END

+ 3 - 0
Jolt/Physics/Constraints/ConstraintManager.h

@@ -21,6 +21,9 @@ class DebugRenderer;
 using Constraints = Array<Ref<Constraint>>;
 
 /// A constraint manager manages all constraints of the same type
+///
+/// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library.
+/// Its functionality is exposed through PhysicsSystem and BodyInterface.
 class JPH_EXPORT ConstraintManager : public NonCopyable
 {
 public:

+ 3 - 0
Jolt/Physics/Constraints/ContactConstraintManager.h

@@ -24,6 +24,9 @@ JPH_NAMESPACE_BEGIN
 struct PhysicsSettings;
 class PhysicsUpdateContext;
 
+/// A contact constraint manager manages all contacts between two bodies
+///
+/// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library.
 class JPH_EXPORT ContactConstraintManager : public NonCopyable
 {
 public:

+ 2 - 0
Jolt/Physics/IslandBuilder.h

@@ -15,6 +15,8 @@ class TempAllocator;
 //#define JPH_VALIDATE_ISLAND_BUILDER
 
 /// Keeps track of connected bodies and builds islands for multithreaded velocity/position update
+///
+/// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library.
 class IslandBuilder : public NonCopyable
 {
 public:

+ 2 - 0
Jolt/Physics/LargeIslandSplitter.h

@@ -21,6 +21,8 @@ class CalculateSolverSteps;
 ///
 /// This basically implements what is described in: High-Performance Physical Simulations on Next-Generation Architecture with Many Cores by Chen et al.
 /// See: http://web.eecs.umich.edu/~msmelyan/papers/physsim_onmanycore_itj.pdf section "PARALLELIZATION METHODOLOGY"
+///
+/// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library.
 class LargeIslandSplitter : public NonCopyable
 {
 private:

+ 2 - 0
Jolt/Physics/PhysicsUpdateContext.cpp

@@ -8,6 +8,7 @@
 
 JPH_NAMESPACE_BEGIN
 
+/// @cond INTERNAL
 PhysicsUpdateContext::PhysicsUpdateContext(TempAllocator &inTempAllocator) :
 	mTempAllocator(&inTempAllocator),
 	mSteps(inTempAllocator)
@@ -19,5 +20,6 @@ PhysicsUpdateContext::~PhysicsUpdateContext()
 	JPH_ASSERT(mBodyPairs == nullptr);
 	JPH_ASSERT(mActiveConstraints == nullptr);
 }
+/// @endcond
 
 JPH_NAMESPACE_END

+ 5 - 1
Jolt/Physics/PhysicsUpdateContext.h

@@ -19,7 +19,10 @@ class Constraint;
 class TempAllocator;
 class SoftBodyUpdateContext;
 
-/// Information used during the Update call
+/// @cond INTERNAL
+/// Internal information used during the PhysicsSystem::Update call
+///
+/// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library.
 class PhysicsUpdateContext : public NonCopyable
 {
 public:
@@ -168,5 +171,6 @@ public:
 	SoftBodyUpdateContext *	mSoftBodyUpdateContexts = nullptr;						///< Contexts for updating soft bodies
 	atomic<uint>			mSoftBodyToCollide { 0 };								///< Next soft body to take when running SoftBodyCollide jobs
 };
+/// @endcond
 
 JPH_NAMESPACE_END

+ 4 - 0
Jolt/Physics/SoftBody/SoftBodyUpdateContext.h

@@ -14,7 +14,10 @@ class SoftBodyMotionProperties;
 class SoftBodyContactListener;
 class SimShapeFilter;
 
+/// @cond INTERNAL
 /// Temporary data used by the update of a soft body
+///
+/// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library.
 class SoftBodyUpdateContext : public NonCopyable
 {
 public:
@@ -55,5 +58,6 @@ public:
 	Vec3								mDeltaPosition;								///< Delta position of the body in the current time step, should be applied after the update
 	ECanSleep							mCanSleep;									///< Can the body sleep? Should be applied after the update
 };
+/// @endcond
 
 JPH_NAMESPACE_END