Browse Source

Fixed missing 'Arg' in parameter types (#331)

Jorrit Rouwe 2 years ago
parent
commit
84b751ba55

+ 1 - 1
Jolt/AABBTree/TriangleCodec/TriangleCodecIndexed8BitPackSOA4Flags.h

@@ -223,7 +223,7 @@ public:
 	{
 	{
 	private:
 	private:
 		/// Private helper functions to unpack the 1 vertex of 4 triangles (outX contains the x coordinate of triangle 0 .. 3 etc.)
 		/// Private helper functions to unpack the 1 vertex of 4 triangles (outX contains the x coordinate of triangle 0 .. 3 etc.)
-		JPH_INLINE void				Unpack(const VertexData *inVertices, UVec4 inIndex, Vec4 &outX, Vec4 &outY, Vec4 &outZ) const
+		JPH_INLINE void				Unpack(const VertexData *inVertices, UVec4Arg inIndex, Vec4 &outX, Vec4 &outY, Vec4 &outZ) const
 		{
 		{
 			// Get compressed data
 			// Get compressed data
 			UVec4 c1 = UVec4::sGatherInt4<8>(&inVertices->mVertexXY, inIndex);
 			UVec4 c1 = UVec4::sGatherInt4<8>(&inVertices->mVertexXY, inIndex);

+ 1 - 1
Jolt/Geometry/AABox4.h

@@ -202,7 +202,7 @@ JPH_INLINE UVec4 AABox4VsSphere(Vec4Arg inCenterX, Vec4Arg inCenterY, Vec4Arg in
 }
 }
 
 
 /// Test 4 AABoxes vs a sphere
 /// Test 4 AABoxes vs a sphere
-JPH_INLINE UVec4 AABox4VsSphere(Vec3 inCenter, float inRadiusSq, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ)
+JPH_INLINE UVec4 AABox4VsSphere(Vec3Arg inCenter, float inRadiusSq, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ)
 {
 {
 	return AABox4VsSphere(inCenter.SplatX(), inCenter.SplatY(), inCenter.SplatZ(), Vec4::sReplicate(inRadiusSq), inBoxMinX, inBoxMinY, inBoxMinZ, inBoxMaxX, inBoxMaxY, inBoxMaxZ);
 	return AABox4VsSphere(inCenter.SplatX(), inCenter.SplatY(), inCenter.SplatZ(), Vec4::sReplicate(inRadiusSq), inBoxMinX, inBoxMinY, inBoxMinZ, inBoxMaxX, inBoxMaxY, inBoxMaxZ);
 }
 }

+ 3 - 3
Jolt/Physics/Character/CharacterVirtual.h

@@ -178,12 +178,12 @@ public:
 	/// Settings struct with settings for ExtendedUpdate
 	/// Settings struct with settings for ExtendedUpdate
 	struct ExtendedUpdateSettings
 	struct ExtendedUpdateSettings
 	{
 	{
-		Vec3Arg							mStickToFloorStepDown { 0, -0.5f, 0 };									///< See StickToFloor inStepDown parameter. Can be zero to turn off.
-		Vec3Arg							mWalkStairsStepUp { 0, 0.4f, 0 };										///< See WalkStairs inStepUp parameter. Can be zero to turn off.
+		Vec3							mStickToFloorStepDown { 0, -0.5f, 0 };									///< See StickToFloor inStepDown parameter. Can be zero to turn off.
+		Vec3							mWalkStairsStepUp { 0, 0.4f, 0 };										///< See WalkStairs inStepUp parameter. Can be zero to turn off.
 		float							mWalkStairsMinStepForward { 0.02f };									///< See WalkStairs inStepForward parameter. Note that the parameter only indicates a magnitude, direction is taken from current velocity.
 		float							mWalkStairsMinStepForward { 0.02f };									///< See WalkStairs inStepForward parameter. Note that the parameter only indicates a magnitude, direction is taken from current velocity.
 		float							mWalkStairsStepForwardTest { 0.15f };									///< See WalkStairs inStepForwardTest parameter. Note that the parameter only indicates a magnitude, direction is taken from current velocity.
 		float							mWalkStairsStepForwardTest { 0.15f };									///< See WalkStairs inStepForwardTest parameter. Note that the parameter only indicates a magnitude, direction is taken from current velocity.
 		float							mWalkStairsCosAngleForwardContact { Cos(DegreesToRadians(75.0f)) };		///< Cos(angle) where angle is the maximum angle between the ground normal in the horizontal plane and the character forward vector where we're willing to adjust the step forward test towards the contact normal.
 		float							mWalkStairsCosAngleForwardContact { Cos(DegreesToRadians(75.0f)) };		///< Cos(angle) where angle is the maximum angle between the ground normal in the horizontal plane and the character forward vector where we're willing to adjust the step forward test towards the contact normal.
-		Vec3Arg							mWalkStairsStepDownExtra { Vec3::sZero() };								///< See WalkStairs inStepDownExtra
+		Vec3							mWalkStairsStepDownExtra { Vec3::sZero() };								///< See WalkStairs inStepDownExtra
 	};
 	};
 
 
 	/// This function combines Update, StickToFloor and WalkStairs. This function serves as an example of how these functions could be combined.
 	/// This function combines Update, StickToFloor and WalkStairs. This function serves as an example of how these functions could be combined.

+ 1 - 1
Samples/Tests/General/HighSpeedTest.cpp

@@ -56,7 +56,7 @@ void HighSpeedTest::CreateDominoBlocks(Vec3Arg inOffset, int inNumWalls, float i
 	mBodyInterface->CreateAndAddBody(box_settings, EActivation::DontActivate);
 	mBodyInterface->CreateAndAddBody(box_settings, EActivation::DontActivate);
 }
 }
 
 
-void HighSpeedTest::CreateDynamicObject(Vec3 inPosition, Vec3 inVelocity, Shape *inShape, EMotionQuality inMotionQuality)
+void HighSpeedTest::CreateDynamicObject(Vec3Arg inPosition, Vec3Arg inVelocity, Shape *inShape, EMotionQuality inMotionQuality)
 {
 {
 	BodyCreationSettings creation_settings;
 	BodyCreationSettings creation_settings;
 	creation_settings.SetShape(inShape);
 	creation_settings.SetShape(inShape);

+ 1 - 1
Samples/Tests/General/HighSpeedTest.h

@@ -22,7 +22,7 @@ public:
 	virtual void		CreateSettingsMenu(DebugUI *inUI, UIElement *inSubMenu) override;
 	virtual void		CreateSettingsMenu(DebugUI *inUI, UIElement *inSubMenu) override;
 
 
 private:
 private:
-	void				CreateDynamicObject(Vec3 inPosition, Vec3 inVelocity, Shape *inShape, EMotionQuality inMotionQuality = EMotionQuality::LinearCast);
+	void				CreateDynamicObject(Vec3Arg inPosition, Vec3Arg inVelocity, Shape *inShape, EMotionQuality inMotionQuality = EMotionQuality::LinearCast);
 	void				CreateDominoBlocks(Vec3Arg inOffset, int inNumWalls, float inDensity, float inRadius);
 	void				CreateDominoBlocks(Vec3Arg inOffset, int inNumWalls, float inDensity, float inRadius);
 	void				CreateFastSmallConvexObjects();
 	void				CreateFastSmallConvexObjects();
 	void				CreateSimpleScene();
 	void				CreateSimpleScene();

+ 4 - 4
UnitTests/Physics/ActiveEdgesTests.cpp

@@ -80,7 +80,7 @@ TEST_SUITE("ActiveEdgesTest")
 	}
 	}
 
 
 	// Collide our probe against the test shape and validate the hit results
 	// Collide our probe against the test shape and validate the hit results
-	static void sTestCollideShape(Shape *inProbeShape, Shape *inTestShape, Vec3 inTestShapeScale, const CollideShapeSettings &inSettings, Vec3 inProbeShapePos, const Array<ExpectedHit> &inExpectedHits)
+	static void sTestCollideShape(Shape *inProbeShape, Shape *inTestShape, Vec3Arg inTestShapeScale, const CollideShapeSettings &inSettings, Vec3Arg inProbeShapePos, const Array<ExpectedHit> &inExpectedHits)
 	{
 	{
 		AllHitCollisionCollector<CollideShapeCollector> collector;
 		AllHitCollisionCollector<CollideShapeCollector> collector;
 		CollisionDispatch::sCollideShapeVsShape(inProbeShape, inTestShape, Vec3::sReplicate(1.0f), inTestShapeScale, Mat44::sTranslation(inProbeShapePos), Mat44::sIdentity(), SubShapeIDCreator(), SubShapeIDCreator(), inSettings, collector);
 		CollisionDispatch::sCollideShapeVsShape(inProbeShape, inTestShape, Vec3::sReplicate(1.0f), inTestShapeScale, Mat44::sTranslation(inProbeShapePos), Mat44::sIdentity(), SubShapeIDCreator(), SubShapeIDCreator(), inSettings, collector);
@@ -89,7 +89,7 @@ TEST_SUITE("ActiveEdgesTest")
 	}
 	}
 
 
 	// Collide a probe shape against our test shape in various locations to verify active edge behavior
 	// Collide a probe shape against our test shape in various locations to verify active edge behavior
-	static void sTestCollideShape(const ShapeSettings *inTestShape, Vec3 inTestShapeScale, bool inActiveEdgesOnly)
+	static void sTestCollideShape(const ShapeSettings *inTestShape, Vec3Arg inTestShapeScale, bool inActiveEdgesOnly)
 	{
 	{
 		CollideShapeSettings settings;
 		CollideShapeSettings settings;
 		settings.mActiveEdgeMode = inActiveEdgesOnly? EActiveEdgeMode::CollideOnlyWithActive : EActiveEdgeMode::CollideWithAll;
 		settings.mActiveEdgeMode = inActiveEdgesOnly? EActiveEdgeMode::CollideOnlyWithActive : EActiveEdgeMode::CollideWithAll;
@@ -138,7 +138,7 @@ TEST_SUITE("ActiveEdgesTest")
 	}
 	}
 
 
 	// Cast our probe against the test shape and validate the hit results
 	// Cast our probe against the test shape and validate the hit results
-	static void sTestCastShape(Shape *inProbeShape, Shape *inTestShape, Vec3 inTestShapeScale, const ShapeCastSettings &inSettings, Vec3 inProbeShapePos, Vec3 inProbeShapeDirection, const Array<ExpectedHit> &inExpectedHits)
+	static void sTestCastShape(Shape *inProbeShape, Shape *inTestShape, Vec3Arg inTestShapeScale, const ShapeCastSettings &inSettings, Vec3Arg inProbeShapePos, Vec3Arg inProbeShapeDirection, const Array<ExpectedHit> &inExpectedHits)
 	{
 	{
 		AllHitCollisionCollector<CastShapeCollector> collector;
 		AllHitCollisionCollector<CastShapeCollector> collector;
 		ShapeCast shape_cast(inProbeShape, Vec3::sReplicate(1.0f), Mat44::sTranslation(inProbeShapePos), inProbeShapeDirection);
 		ShapeCast shape_cast(inProbeShape, Vec3::sReplicate(1.0f), Mat44::sTranslation(inProbeShapePos), inProbeShapeDirection);
@@ -148,7 +148,7 @@ TEST_SUITE("ActiveEdgesTest")
 	}
 	}
 
 
 	// Cast a probe shape against our test shape in various locations to verify active edge behavior
 	// Cast a probe shape against our test shape in various locations to verify active edge behavior
-	static void sTestCastShape(const ShapeSettings *inTestShape, Vec3 inTestShapeScale, bool inActiveEdgesOnly)
+	static void sTestCastShape(const ShapeSettings *inTestShape, Vec3Arg inTestShapeScale, bool inActiveEdgesOnly)
 	{
 	{
 		ShapeCastSettings settings;
 		ShapeCastSettings settings;
 		settings.mActiveEdgeMode = inActiveEdgesOnly? EActiveEdgeMode::CollideOnlyWithActive : EActiveEdgeMode::CollideWithAll;
 		settings.mActiveEdgeMode = inActiveEdgesOnly? EActiveEdgeMode::CollideOnlyWithActive : EActiveEdgeMode::CollideWithAll;