|
@@ -91,7 +91,7 @@ class TriangleShape::TriangleNoConvex final : public Support
|
|
{
|
|
{
|
|
public:
|
|
public:
|
|
TriangleNoConvex(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3) :
|
|
TriangleNoConvex(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3) :
|
|
- mTriangleSuport(inV1, inV2, inV3)
|
|
|
|
|
|
+ mTriangleSupport(inV1, inV2, inV3)
|
|
{
|
|
{
|
|
static_assert(sizeof(TriangleNoConvex) <= sizeof(SupportBuffer), "Buffer size too small");
|
|
static_assert(sizeof(TriangleNoConvex) <= sizeof(SupportBuffer), "Buffer size too small");
|
|
JPH_ASSERT(IsAligned(this, alignof(TriangleNoConvex)));
|
|
JPH_ASSERT(IsAligned(this, alignof(TriangleNoConvex)));
|
|
@@ -99,7 +99,7 @@ public:
|
|
|
|
|
|
virtual Vec3 GetSupport(Vec3Arg inDirection) const override
|
|
virtual Vec3 GetSupport(Vec3Arg inDirection) const override
|
|
{
|
|
{
|
|
- return mTriangleSuport.GetSupport(inDirection);
|
|
|
|
|
|
+ return mTriangleSupport.GetSupport(inDirection);
|
|
}
|
|
}
|
|
|
|
|
|
virtual float GetConvexRadius() const override
|
|
virtual float GetConvexRadius() const override
|
|
@@ -108,7 +108,7 @@ public:
|
|
}
|
|
}
|
|
|
|
|
|
private:
|
|
private:
|
|
- TriangleConvexSupport mTriangleSuport;
|
|
|
|
|
|
+ TriangleConvexSupport mTriangleSupport;
|
|
};
|
|
};
|
|
|
|
|
|
class TriangleShape::TriangleWithConvex final : public Support
|
|
class TriangleShape::TriangleWithConvex final : public Support
|
|
@@ -116,7 +116,7 @@ class TriangleShape::TriangleWithConvex final : public Support
|
|
public:
|
|
public:
|
|
TriangleWithConvex(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3, float inConvexRadius) :
|
|
TriangleWithConvex(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3, float inConvexRadius) :
|
|
mConvexRadius(inConvexRadius),
|
|
mConvexRadius(inConvexRadius),
|
|
- mTriangleSuport(inV1, inV2, inV3)
|
|
|
|
|
|
+ mTriangleSupport(inV1, inV2, inV3)
|
|
{
|
|
{
|
|
static_assert(sizeof(TriangleWithConvex) <= sizeof(SupportBuffer), "Buffer size too small");
|
|
static_assert(sizeof(TriangleWithConvex) <= sizeof(SupportBuffer), "Buffer size too small");
|
|
JPH_ASSERT(IsAligned(this, alignof(TriangleWithConvex)));
|
|
JPH_ASSERT(IsAligned(this, alignof(TriangleWithConvex)));
|
|
@@ -124,7 +124,7 @@ public:
|
|
|
|
|
|
virtual Vec3 GetSupport(Vec3Arg inDirection) const override
|
|
virtual Vec3 GetSupport(Vec3Arg inDirection) const override
|
|
{
|
|
{
|
|
- Vec3 support = mTriangleSuport.GetSupport(inDirection);
|
|
|
|
|
|
+ Vec3 support = mTriangleSupport.GetSupport(inDirection);
|
|
float len = inDirection.Length();
|
|
float len = inDirection.Length();
|
|
if (len > 0.0f)
|
|
if (len > 0.0f)
|
|
support += (mConvexRadius / len) * inDirection;
|
|
support += (mConvexRadius / len) * inDirection;
|
|
@@ -138,7 +138,7 @@ public:
|
|
|
|
|
|
private:
|
|
private:
|
|
float mConvexRadius;
|
|
float mConvexRadius;
|
|
- TriangleConvexSupport mTriangleSuport;
|
|
|
|
|
|
+ TriangleConvexSupport mTriangleSupport;
|
|
};
|
|
};
|
|
|
|
|
|
const ConvexShape::Support *TriangleShape::GetSupportFunction(ESupportMode inMode, SupportBuffer &inBuffer, Vec3Arg inScale) const
|
|
const ConvexShape::Support *TriangleShape::GetSupportFunction(ESupportMode inMode, SupportBuffer &inBuffer, Vec3Arg inScale) const
|