33 static inline void sCollideShapeVsShape(
const Shape *
inShape1,
const Shape *
inShape2,
Vec3Arg inScale1,
Vec3Arg inScale2,
Mat44Arg inCenterOfMassTransform1,
Mat44Arg inCenterOfMassTransform2,
const SubShapeIDCreator &
inSubShapeIDCreator1,
const SubShapeIDCreator &
inSubShapeIDCreator2,
const CollideShapeSettings &
inCollideShapeSettings,
CollideShapeCollector &
ioCollector,
const ShapeFilter &
inShapeFilter = { })
39 sCollideShape[(
int)
inShape1->GetSubType()][(
int)
inShape2->GetSubType()](
inShape1,
inShape2,
inScale1,
inScale2,
inCenterOfMassTransform1,
inCenterOfMassTransform2,
inSubShapeIDCreator1,
inSubShapeIDCreator2,
inCollideShapeSettings,
ioCollector,
inShapeFilter);
72 using CollideShape =
void (*)(
const Shape *
inShape1,
const Shape *
inShape2,
Vec3Arg inScale1,
Vec3Arg inScale2,
Mat44Arg inCenterOfMassTransform1,
Mat44Arg inCenterOfMassTransform2,
const SubShapeIDCreator &
inSubShapeIDCreator1,
const SubShapeIDCreator &
inSubShapeIDCreator2,
const CollideShapeSettings &
inCollideShapeSettings,
CollideShapeCollector &
ioCollector,
const ShapeFilter &
inShapeFilter);
87 static void sReversedCollideShape(
const Shape *
inShape1,
const Shape *
inShape2,
Vec3Arg inScale1,
Vec3Arg inScale2,
Mat44Arg inCenterOfMassTransform1,
Mat44Arg inCenterOfMassTransform2,
const SubShapeIDCreator &
inSubShapeIDCreator1,
const SubShapeIDCreator &
inSubShapeIDCreator2,
const CollideShapeSettings &
inCollideShapeSettings,
CollideShapeCollector &
ioCollector,
const ShapeFilter &
inShapeFilter);
93 static CollideShape sCollideShape[NumSubShapeTypes][NumSubShapeTypes];
94 static CastShape sCastShape[NumSubShapeTypes][NumSubShapeTypes];
#define JPH_EXPORT
Definition Core.h:227
#define JPH_NAMESPACE_END
Definition Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
AllocateFunction Allocate
Definition Memory.cpp:59
#define JPH_IF_TRACK_NARROWPHASE_STATS(...)
Definition NarrowPhaseStats.h:17
EShapeSubType
This enumerates all shape types, each shape can return its type through Shape::GetSubType.
Definition Shape.h:74
Settings to be passed with a collision query.
Definition CollideShape.h:94
Virtual interface that allows collecting multiple collision results.
Definition CollisionCollector.h:45
Dispatch function, main function to handle collisions between shapes.
Definition CollisionDispatch.h:19
static void sRegisterCollideShape(EShapeSubType inType1, EShapeSubType inType2, CollideShape inFunction)
Register a collide shape function in the collision table.
Definition CollisionDispatch.h:81
static void sRegisterCastShape(EShapeSubType inType1, EShapeSubType inType2, CastShape inFunction)
Register a cast shape function in the collision table.
Definition CollisionDispatch.h:84
static void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter={ })
Definition CollisionDispatch.h:33
static void sCastShapeVsShapeWorldSpace(const ShapeCast &inShapeCastWorld, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector)
Definition CollisionDispatch.h:65
static void sCastShapeVsShapeLocalSpace(const ShapeCast &inShapeCastLocal, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector)
Definition CollisionDispatch.h:53
void(*)(const ShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) CastShape
Function that casts a shape vs another shape (see sCastShapeVsShapeLocalSpace)
Definition CollisionDispatch.h:75
void(*)(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) CollideShape
Function that collides 2 shapes (see sCollideShapeVsShape)
Definition CollisionDispatch.h:72
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
Settings to be passed with a shape cast.
Definition ShapeCast.h:92
Filter class.
Definition ShapeFilter.h:17
Base class for all shapes (collision volume of a body). Defines a virtual interface for collision det...
Definition Shape.h:178
Definition SubShapeID.h:108
Definition ShapeCast.h:69
ShapeCastType PostTransformed(typename Mat::ArgType inTransform) const
Transform this shape cast using inTransform. Multiply transform on the left left hand side.
Definition ShapeCast.h:42