Selaa lähdekoodia

Added #ifdef to conditionally compile documentation. This fixes a compilation issue in MSVC Clang in Distribution mode.

Jorrit Rouwe 2 vuotta sitten
vanhempi
commit
c2f97c1aaf

+ 4 - 0
Jolt/Physics/Collision/ManifoldBetweenTwoFaces.h

@@ -13,7 +13,9 @@ JPH_NAMESPACE_BEGIN
 /// @param ioContactPointsOn1 The contact points on shape 1 relative to inCenterOfMass
 /// @param ioContactPointsOn1 The contact points on shape 1 relative to inCenterOfMass
 /// @param ioContactPointsOn2 The contact points on shape 2 relative to inCenterOfMass
 /// @param ioContactPointsOn2 The contact points on shape 2 relative to inCenterOfMass
 /// On output ioContactPointsOn1/2 are reduced to 4 or less points
 /// On output ioContactPointsOn1/2 are reduced to 4 or less points
+#ifdef JPH_DEBUG_RENDERER
 /// @param inCenterOfMass Center of mass position of body 1
 /// @param inCenterOfMass Center of mass position of body 1
+#endif
 void PruneContactPoints(Vec3Arg inPenetrationAxis, ContactPoints &ioContactPointsOn1, ContactPoints &ioContactPointsOn2
 void PruneContactPoints(Vec3Arg inPenetrationAxis, ContactPoints &ioContactPointsOn1, ContactPoints &ioContactPointsOn2
 #ifdef JPH_DEBUG_RENDERER
 #ifdef JPH_DEBUG_RENDERER
 	, RVec3Arg inCenterOfMass
 	, RVec3Arg inCenterOfMass
@@ -29,7 +31,9 @@ void PruneContactPoints(Vec3Arg inPenetrationAxis, ContactPoints &ioContactPoint
 /// @param inShape2Face The supporting faces on shape 2 relative to inCenterOfMass
 /// @param inShape2Face The supporting faces on shape 2 relative to inCenterOfMass
 /// @param outContactPoints1 Returns the contact points between the two shapes for shape 1 relative to inCenterOfMass (any existing points in the output array are left as is)
 /// @param outContactPoints1 Returns the contact points between the two shapes for shape 1 relative to inCenterOfMass (any existing points in the output array are left as is)
 /// @param outContactPoints2 Returns the contact points between the two shapes for shape 2 relative to inCenterOfMass (any existing points in the output array are left as is)
 /// @param outContactPoints2 Returns the contact points between the two shapes for shape 2 relative to inCenterOfMass (any existing points in the output array are left as is)
+#ifdef JPH_DEBUG_RENDERER
 /// @param inCenterOfMass Center of mass position of body 1
 /// @param inCenterOfMass Center of mass position of body 1
+#endif
 void ManifoldBetweenTwoFaces(Vec3Arg inContactPoint1, Vec3Arg inContactPoint2, Vec3Arg inPenetrationAxis, float inSpeculativeContactDistanceSq, const ConvexShape::SupportingFace &inShape1Face, const ConvexShape::SupportingFace &inShape2Face, ContactPoints &outContactPoints1, ContactPoints &outContactPoints2
 void ManifoldBetweenTwoFaces(Vec3Arg inContactPoint1, Vec3Arg inContactPoint2, Vec3Arg inPenetrationAxis, float inSpeculativeContactDistanceSq, const ConvexShape::SupportingFace &inShape1Face, const ConvexShape::SupportingFace &inShape2Face, ContactPoints &outContactPoints1, ContactPoints &outContactPoints2
 #ifdef JPH_DEBUG_RENDERER
 #ifdef JPH_DEBUG_RENDERER
 	, RVec3Arg inCenterOfMass
 	, RVec3Arg inCenterOfMass

+ 2 - 0
Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h

@@ -158,7 +158,9 @@ public:
 	/// @param inNumPoints The amount of points
 	/// @param inNumPoints The amount of points
 	/// @param inSurface The plane that forms the fluid surface (normal should point up)
 	/// @param inSurface The plane that forms the fluid surface (normal should point up)
 	/// @param ioBuffer A temporary buffer of Point's that should have inNumPoints entries and should stay alive while this class is alive
 	/// @param ioBuffer A temporary buffer of Point's that should have inNumPoints entries and should stay alive while this class is alive
+#ifdef JPH_DEBUG_RENDERER
 	/// @param inBaseOffset The offset to transform inTransform to world space (in double precision mode this can be used to shift the whole operation closer to the origin). Only used for debug drawing.
 	/// @param inBaseOffset The offset to transform inTransform to world space (in double precision mode this can be used to shift the whole operation closer to the origin). Only used for debug drawing.
+#endif // JPH_DEBUG_RENDERER
 						PolyhedronSubmergedVolumeCalculator(const Mat44 &inTransform, const Vec3 *inPoints, int inPointStride, int inNumPoints, const Plane &inSurface, Point *ioBuffer
 						PolyhedronSubmergedVolumeCalculator(const Mat44 &inTransform, const Vec3 *inPoints, int inPointStride, int inNumPoints, const Plane &inSurface, Point *ioBuffer
 #ifdef JPH_DEBUG_RENDERER // Not using JPH_IF_DEBUG_RENDERER for Doxygen
 #ifdef JPH_DEBUG_RENDERER // Not using JPH_IF_DEBUG_RENDERER for Doxygen
 		, RVec3 inBaseOffset
 		, RVec3 inBaseOffset

+ 2 - 0
Jolt/Physics/Collision/Shape/Shape.h

@@ -242,7 +242,9 @@ public:
 	/// @param outTotalVolume On return this contains the total volume of the shape
 	/// @param outTotalVolume On return this contains the total volume of the shape
 	/// @param outSubmergedVolume On return this contains the submerged volume of the shape
 	/// @param outSubmergedVolume On return this contains the submerged volume of the shape
 	/// @param outCenterOfBuoyancy On return this contains the world space center of mass of the submerged volume
 	/// @param outCenterOfBuoyancy On return this contains the world space center of mass of the submerged volume
+#ifdef JPH_DEBUG_RENDERER
 	/// @param inBaseOffset The offset to transform inCenterOfMassTransform to world space (in double precision mode this can be used to shift the whole operation closer to the origin). Only used for debug drawing.
 	/// @param inBaseOffset The offset to transform inCenterOfMassTransform to world space (in double precision mode this can be used to shift the whole operation closer to the origin). Only used for debug drawing.
+#endif
 	virtual void					GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy
 	virtual void					GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy
 #ifdef JPH_DEBUG_RENDERER // Not using JPH_IF_DEBUG_RENDERER for Doxygen
 #ifdef JPH_DEBUG_RENDERER // Not using JPH_IF_DEBUG_RENDERER for Doxygen
 		, RVec3Arg inBaseOffset
 		, RVec3Arg inBaseOffset