60 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;
74 virtual void PredictContactProperties(
PhysicsSystem &inPhysicsSystem,
const VehicleConstraint &inVehicleConstraint,
uint inWheelIndex,
RVec3Arg inOrigin,
Vec3Arg inDirection,
const BodyID &inVehicleBodyID,
Body *&ioBody,
SubShapeID &ioSubShapeID,
RVec3 &ioContactPosition,
Vec3 &ioContactNormal,
float &ioSuspensionLength)
const = 0;
96 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;
97 virtual void PredictContactProperties(
PhysicsSystem &inPhysicsSystem,
const VehicleConstraint &inVehicleConstraint,
uint inWheelIndex,
RVec3Arg inOrigin,
Vec3Arg inDirection,
const BodyID &inVehicleBodyID,
Body *&ioBody,
SubShapeID &ioSubShapeID,
RVec3 &ioContactPosition,
Vec3 &ioContactNormal,
float &ioSuspensionLength)
const override;
101 float mCosMaxSlopeAngle;
118 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;
119 virtual void PredictContactProperties(
PhysicsSystem &inPhysicsSystem,
const VehicleConstraint &inVehicleConstraint,
uint inWheelIndex,
RVec3Arg inOrigin,
Vec3Arg inDirection,
const BodyID &inVehicleBodyID,
Body *&ioBody,
SubShapeID &ioSubShapeID,
RVec3 &ioContactPosition,
Vec3 &ioContactNormal,
float &ioSuspensionLength)
const override;
124 float mCosMaxSlopeAngle;
139 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;
140 virtual void PredictContactProperties(
PhysicsSystem &inPhysicsSystem,
const VehicleConstraint &inVehicleConstraint,
uint inWheelIndex,
RVec3Arg inOrigin,
Vec3Arg inDirection,
const BodyID &inVehicleBodyID,
Body *&ioBody,
SubShapeID &ioSubShapeID,
RVec3 &ioContactPosition,
Vec3 &ioContactNormal,
float &ioSuspensionLength)
const override;
143 float mConvexRadiusFraction;
#define JPH_EXPORT
Definition: Core.h:227
unsigned int uint
Definition: Core.h:439
#define JPH_NAMESPACE_END
Definition: Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:361
#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:94
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition: NonCopyable.h:11
Filter class for object layers.
Definition: ObjectLayer.h:28
Definition: PhysicsSystem.h:29
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:53
Collision tester that tests collision using a cylinder shape.
Definition: VehicleCollisionTester.h:129
JPH_OVERRIDE_NEW_DELETE VehicleCollisionTesterCastCylinder(ObjectLayer inObjectLayer, float inConvexRadiusFraction=0.1f)
Definition: VehicleCollisionTester.h:136
Collision tester that tests collision using a sphere cast.
Definition: VehicleCollisionTester.h:106
JPH_OVERRIDE_NEW_DELETE VehicleCollisionTesterCastSphere(ObjectLayer inObjectLayer, float inRadius, Vec3Arg inUp=Vec3::sAxisY(), float inMaxSlopeAngle=DegreesToRadians(80.0f))
Definition: VehicleCollisionTester.h:115
Class that does collision detection between wheels and ground.
Definition: VehicleCollisionTester.h:20
ObjectLayer GetObjectLayer() const
Object layer to use for collision detection, this is used when the filters are not overridden.
Definition: VehicleCollisionTester.h:32
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
virtual void PredictContactProperties(PhysicsSystem &inPhysicsSystem, const VehicleConstraint &inVehicleConstraint, uint inWheelIndex, RVec3Arg inOrigin, Vec3Arg inDirection, const BodyID &inVehicleBodyID, Body *&ioBody, SubShapeID &ioSubShapeID, RVec3 &ioContactPosition, Vec3 &ioContactNormal, float &ioSuspensionLength) const =0
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:44
JPH_OVERRIDE_NEW_DELETE VehicleCollisionTester()=default
Constructors.
VehicleCollisionTester(ObjectLayer inObjectLayer)
Definition: VehicleCollisionTester.h:26
virtual ~VehicleCollisionTester()=default
Virtual destructor.
const BodyFilter * GetBodyFilter() const
Definition: VehicleCollisionTester.h:45
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:36
const BroadPhaseLayerFilter * GetBroadPhaseLayerFilter() const
Definition: VehicleCollisionTester.h:37
const ObjectLayerFilter * GetObjectLayerFilter() const
Definition: VehicleCollisionTester.h:41
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:40
void SetObjectLayer(ObjectLayer inObjectLayer)
Definition: VehicleCollisionTester.h:33
Collision tester that tests collision using a raycast.
Definition: VehicleCollisionTester.h:85
JPH_OVERRIDE_NEW_DELETE VehicleCollisionTesterRay(ObjectLayer inObjectLayer, Vec3Arg inUp=Vec3::sAxisY(), float inMaxSlopeAngle=DegreesToRadians(80.0f))
Definition: VehicleCollisionTester.h:93
Definition: VehicleConstraint.h:66