59 virtual bool Collide(
PhysicsSystem &inPhysicsSystem,
const VehicleConstraint &inVehicleConstraint,
uint inWheelIndex,
RVec3Arg inOrigin,
Vec3Arg inDirection,
const BodyID &inVehicleBodyID,
Body *&outBody,
SubShapeID &outSubShapeID,
RVec3 &outContactPosition,
Vec3 &outContactNormal,
float &outSuspensionLength)
const = 0;
81 virtual bool Collide(
PhysicsSystem &inPhysicsSystem,
const VehicleConstraint &inVehicleConstraint,
uint inWheelIndex,
RVec3Arg inOrigin,
Vec3Arg inDirection,
const BodyID &inVehicleBodyID,
Body *&outBody,
SubShapeID &outSubShapeID,
RVec3 &outContactPosition,
Vec3 &outContactNormal,
float &outSuspensionLength)
const override;
85 float mCosMaxSlopeAngle;
102 virtual bool Collide(
PhysicsSystem &inPhysicsSystem,
const VehicleConstraint &inVehicleConstraint,
uint inWheelIndex,
RVec3Arg inOrigin,
Vec3Arg inDirection,
const BodyID &inVehicleBodyID,
Body *&outBody,
SubShapeID &outSubShapeID,
RVec3 &outContactPosition,
Vec3 &outContactNormal,
float &outSuspensionLength)
const override;
107 float mCosMaxSlopeAngle;
122 virtual bool Collide(
PhysicsSystem &inPhysicsSystem,
const VehicleConstraint &inVehicleConstraint,
uint inWheelIndex,
RVec3Arg inOrigin,
Vec3Arg inDirection,
const BodyID &inVehicleBodyID,
Body *&outBody,
SubShapeID &outSubShapeID,
RVec3 &outContactPosition,
Vec3 &outContactNormal,
float &outSuspensionLength)
const override;
125 float mConvexRadiusFraction;
unsigned int uint
Definition Core.h:309
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
constexpr float DegreesToRadians(float inV)
Convert a value from degrees to radians.
Definition Math.h:13
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:29
uint16 ObjectLayer
Definition ObjectLayer.h:16
JPH_INLINE float Cos(float inX)
Cosine of x (input in radians)
Definition Trigonometry.h:20
Class function to filter out bodies, returns true if test should collide with body.
Definition BodyFilter.h:16
ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition BodyID.h:13
Filter class for broadphase layers.
Definition BroadPhaseLayer.h:89
Filter class for object layers.
Definition ObjectLayer.h:28
Definition PhysicsSystem.h:28
Definition Reference.h:35
A sub shape id contains a path to an element (usually a triangle or other primitive type) of a compou...
Definition SubShapeID.h:23
static JPH_INLINE Vec3 sAxisY()
Definition Vec3.h:52
Collision tester that tests collision using a cylinder shape.
Definition VehicleCollisionTester.h:112
JPH_OVERRIDE_NEW_DELETE VehicleCollisionTesterCastCylinder(ObjectLayer inObjectLayer, float inConvexRadiusFraction=0.1f)
Definition VehicleCollisionTester.h:119
virtual bool Collide(PhysicsSystem &inPhysicsSystem, const VehicleConstraint &inVehicleConstraint, uint inWheelIndex, RVec3Arg inOrigin, Vec3Arg inDirection, const BodyID &inVehicleBodyID, Body *&outBody, SubShapeID &outSubShapeID, RVec3 &outContactPosition, Vec3 &outContactNormal, float &outSuspensionLength) const override
Definition VehicleCollisionTester.cpp:195
Collision tester that tests collision using a sphere cast.
Definition VehicleCollisionTester.h:90
JPH_OVERRIDE_NEW_DELETE VehicleCollisionTesterCastSphere(ObjectLayer inObjectLayer, float inRadius, Vec3Arg inUp=Vec3::sAxisY(), float inMaxSlopeAngle=DegreesToRadians(80.0f))
Definition VehicleCollisionTester.h:99
virtual bool Collide(PhysicsSystem &inPhysicsSystem, const VehicleConstraint &inVehicleConstraint, uint inWheelIndex, RVec3Arg inOrigin, Vec3Arg inDirection, const BodyID &inVehicleBodyID, Body *&outBody, SubShapeID &outSubShapeID, RVec3 &outContactPosition, Vec3 &outContactNormal, float &outSuspensionLength) const override
Definition VehicleCollisionTester.cpp:105
Class that does collision detection between wheels and ground.
Definition VehicleCollisionTester.h:19
ObjectLayer GetObjectLayer() const
Object layer to use for collision detection, this is used when the filters are not overridden.
Definition VehicleCollisionTester.h:31
const ObjectLayerFilter * mObjectLayerFilter
Definition VehicleCollisionTester.h:63
virtual bool Collide(PhysicsSystem &inPhysicsSystem, const VehicleConstraint &inVehicleConstraint, uint inWheelIndex, RVec3Arg inOrigin, Vec3Arg inDirection, const BodyID &inVehicleBodyID, Body *&outBody, SubShapeID &outSubShapeID, RVec3 &outContactPosition, Vec3 &outContactNormal, float &outSuspensionLength) const =0
ObjectLayer mObjectLayer
Definition VehicleCollisionTester.h:65
void SetBodyFilter(const BodyFilter *inFilter)
Access to the body filter, when set this overrides the default filter that filters out the vehicle bo...
Definition VehicleCollisionTester.h:43
const BroadPhaseLayerFilter * mBroadPhaseLayerFilter
Definition VehicleCollisionTester.h:62
const BodyFilter * mBodyFilter
Definition VehicleCollisionTester.h:64
JPH_OVERRIDE_NEW_DELETE VehicleCollisionTester()=default
Constructors.
VehicleCollisionTester(ObjectLayer inObjectLayer)
Definition VehicleCollisionTester.h:25
virtual ~VehicleCollisionTester()=default
Virtual destructor.
const BodyFilter * GetBodyFilter() const
Definition VehicleCollisionTester.h:44
void SetBroadPhaseLayerFilter(const BroadPhaseLayerFilter *inFilter)
Access to the broad phase layer filter, when set this overrides the object layer supplied in the cons...
Definition VehicleCollisionTester.h:35
const BroadPhaseLayerFilter * GetBroadPhaseLayerFilter() const
Definition VehicleCollisionTester.h:36
const ObjectLayerFilter * GetObjectLayerFilter() const
Definition VehicleCollisionTester.h:40
void SetObjectLayerFilter(const ObjectLayerFilter *inFilter)
Access to the object layer filter, when set this overrides the object layer supplied in the construct...
Definition VehicleCollisionTester.h:39
void SetObjectLayer(ObjectLayer inObjectLayer)
Definition VehicleCollisionTester.h:32
Collision tester that tests collision using a raycast.
Definition VehicleCollisionTester.h:70
JPH_OVERRIDE_NEW_DELETE VehicleCollisionTesterRay(ObjectLayer inObjectLayer, Vec3Arg inUp=Vec3::sAxisY(), float inMaxSlopeAngle=DegreesToRadians(80.0f))
Definition VehicleCollisionTester.h:78
virtual bool Collide(PhysicsSystem &inPhysicsSystem, const VehicleConstraint &inVehicleConstraint, uint inWheelIndex, RVec3Arg inOrigin, Vec3Arg inDirection, const BodyID &inVehicleBodyID, Body *&outBody, SubShapeID &outSubShapeID, RVec3 &outContactPosition, Vec3 &outContactNormal, float &outSuspensionLength) const override
Definition VehicleCollisionTester.cpp:19
Definition VehicleConstraint.h:67