Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
CollisionDispatch.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
12
14
16
19{
20public:
41
61
70
73
76
78 static void sInit();
79
82
85
88
91
92private:
93 static CollideShape sCollideShape[NumSubShapeTypes][NumSubShapeTypes];
94 static CastShape sCastShape[NumSubShapeTypes][NumSubShapeTypes];
95};
96
#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 Vec3.h:16
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