40 float dist_sq = closest_point.
LengthSq();
66 float penetration = triangle_normal.
Dot(v0 - ioVertex.
GetPosition());
75 if (normal.Dot(triangle_normal) > 0.0f)
77 float normal_length = normal.Length();
78 float penetration = -normal_length;
#define JPH_EXPORT
Definition Core.h:275
#define JPH_NAMESPACE_END
Definition Core.h:425
std::uint32_t uint32
Definition Core.h:503
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
const Vec3 Vec3Arg
Definition MathTypes.h:19
const Mat44 & Mat44Arg
Definition MathTypes.h:29
Definition CollideSoftBodyVertexIterator.h:15
void SetCollision(const Plane &inCollisionPlane, int inCollidingShapeIndex) const
Update the collision of the current vertex.
Definition CollideSoftBodyVertexIterator.h:93
Vec3 GetPosition() const
Get the position of the current vertex.
Definition CollideSoftBodyVertexIterator.h:70
bool UpdatePenetration(float inLargestPenetration) const
Definition CollideSoftBodyVertexIterator.h:83
static float sTriangleThickness
Definition CollideSoftBodyVerticesVsTriangles.h:89
JPH_INLINE void ProcessTriangle(Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2)
Definition CollideSoftBodyVerticesVsTriangles.h:30
JPH_INLINE void FinishVertex(const CollideSoftBodyVertexIterator &ioVertex, int inCollidingShapeIndex) const
Definition CollideSoftBodyVerticesVsTriangles.h:52
uint32 mSet
Definition CollideSoftBodyVerticesVsTriangles.h:99
Mat44 mInvTransform
Definition CollideSoftBodyVerticesVsTriangles.h:92
Vec3 mLocalPosition
Definition CollideSoftBodyVerticesVsTriangles.h:94
CollideSoftBodyVerticesVsTriangles(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale)
Definition CollideSoftBodyVerticesVsTriangles.h:16
Vec3 mV2
Definition CollideSoftBodyVerticesVsTriangles.h:95
float mClosestDistanceSq
Definition CollideSoftBodyVerticesVsTriangles.h:98
float mNormalSign
Definition CollideSoftBodyVerticesVsTriangles.h:97
Vec3 mScale
Definition CollideSoftBodyVerticesVsTriangles.h:93
Vec3 mClosestPoint
Definition CollideSoftBodyVerticesVsTriangles.h:96
Vec3 mV1
Definition CollideSoftBodyVerticesVsTriangles.h:95
Mat44 mTransform
Definition CollideSoftBodyVerticesVsTriangles.h:91
JPH_INLINE void StartVertex(const CollideSoftBodyVertexIterator &inVertex)
Definition CollideSoftBodyVerticesVsTriangles.h:24
Vec3 mV0
Definition CollideSoftBodyVerticesVsTriangles.h:95
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
static Plane sFromPointAndNormal(Vec3Arg inPoint, Vec3Arg inNormal)
Create from point and normal.
Definition Plane.h:21
JPH_INLINE float Dot(Vec3Arg inV2) const
Dot product.
Definition Vec3.inl:650
static JPH_INLINE Vec3 sAxisY()
Definition Vec3.h:57
JPH_INLINE float LengthSq() const
Squared length of vector.
Definition Vec3.inl:666
Vec3 GetClosestPointOnTriangle(Vec3Arg inA, Vec3Arg inB, Vec3Arg inC, uint32 &outSet)
Definition ClosestPoint.h:160
Helper functions to get properties of a scaling vector.
Definition ScaleHelpers.h:13