Skip to content

Commit

Permalink
Fixed missing 'Arg' in parameter types (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouwe committed Nov 12, 2022
1 parent 70430ea commit 84b751b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class TriangleCodecIndexed8BitPackSOA4Flags
{
private:
/// 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
UVec4 c1 = UVec4::sGatherInt4<8>(&inVertices->mVertexXY, inIndex);
Expand Down
2 changes: 1 addition & 1 deletion Jolt/Geometry/AABox4.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ JPH_INLINE UVec4 AABox4VsSphere(Vec4Arg inCenterX, Vec4Arg inCenterY, Vec4Arg in
}

/// 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);
}
Expand Down
6 changes: 3 additions & 3 deletions Jolt/Physics/Character/CharacterVirtual.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ class CharacterVirtual : public CharacterBase
/// Settings struct with settings for ExtendedUpdate
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 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.
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.
Expand Down
2 changes: 1 addition & 1 deletion Samples/Tests/General/HighSpeedTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void HighSpeedTest::CreateDominoBlocks(Vec3Arg inOffset, int inNumWalls, float i
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;
creation_settings.SetShape(inShape);
Expand Down
2 changes: 1 addition & 1 deletion Samples/Tests/General/HighSpeedTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class HighSpeedTest : public Test
virtual void CreateSettingsMenu(DebugUI *inUI, UIElement *inSubMenu) override;

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 CreateFastSmallConvexObjects();
void CreateSimpleScene();
Expand Down
8 changes: 4 additions & 4 deletions UnitTests/Physics/ActiveEdgesTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TEST_SUITE("ActiveEdgesTest")
}

// 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;
CollisionDispatch::sCollideShapeVsShape(inProbeShape, inTestShape, Vec3::sReplicate(1.0f), inTestShapeScale, Mat44::sTranslation(inProbeShapePos), Mat44::sIdentity(), SubShapeIDCreator(), SubShapeIDCreator(), inSettings, collector);
Expand All @@ -89,7 +89,7 @@ TEST_SUITE("ActiveEdgesTest")
}

// 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;
settings.mActiveEdgeMode = inActiveEdgesOnly? EActiveEdgeMode::CollideOnlyWithActive : EActiveEdgeMode::CollideWithAll;
Expand Down Expand Up @@ -138,7 +138,7 @@ TEST_SUITE("ActiveEdgesTest")
}

// 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;
ShapeCast shape_cast(inProbeShape, Vec3::sReplicate(1.0f), Mat44::sTranslation(inProbeShapePos), inProbeShapeDirection);
Expand All @@ -148,7 +148,7 @@ TEST_SUITE("ActiveEdgesTest")
}

// 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;
settings.mActiveEdgeMode = inActiveEdgesOnly? EActiveEdgeMode::CollideOnlyWithActive : EActiveEdgeMode::CollideWithAll;
Expand Down

0 comments on commit 84b751b

Please sign in to comment.