![]()  | 
  
    Jolt Physics
    
   A multi core friendly Game Physics Engine 
   | 
 
Class that does collision detection between wheels and ground. More...
#include <VehicleCollisionTester.h>
  
Public Member Functions | |
| JPH_OVERRIDE_NEW_DELETE | VehicleCollisionTester ()=default | 
| Constructors.  More... | |
| VehicleCollisionTester (ObjectLayer inObjectLayer) | |
| virtual | ~VehicleCollisionTester ()=default | 
| Virtual destructor.  More... | |
| ObjectLayer | GetObjectLayer () const | 
| Object layer to use for collision detection, this is used when the filters are not overridden.  More... | |
| void | SetObjectLayer (ObjectLayer inObjectLayer) | 
| void | SetBroadPhaseLayerFilter (const BroadPhaseLayerFilter *inFilter) | 
| Access to the broad phase layer filter, when set this overrides the object layer supplied in the constructor.  More... | |
| const BroadPhaseLayerFilter * | GetBroadPhaseLayerFilter () const | 
| void | SetObjectLayerFilter (const ObjectLayerFilter *inFilter) | 
| Access to the object layer filter, when set this overrides the object layer supplied in the constructor.  More... | |
| const ObjectLayerFilter * | GetObjectLayerFilter () const | 
| void | SetBodyFilter (const BodyFilter *inFilter) | 
| Access to the body filter, when set this overrides the default filter that filters out the vehicle body.  More... | |
| const BodyFilter * | GetBodyFilter () const | 
| 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 | 
  Public Member Functions inherited from RefTarget< VehicleCollisionTester > | |
| RefTarget ()=default | |
| Constructor.  More... | |
| RefTarget (const RefTarget &) | |
| ~RefTarget () | |
| assert no one is referencing us  More... | |
| void | SetEmbedded () const | 
| RefTarget & | operator= (const RefTarget &) | 
| Assignment operator.  More... | |
| uint32 | GetRefCount () const | 
| Get current refcount of this object.  More... | |
| void | AddRef () const | 
| Add or release a reference to this object.  More... | |
| void | Release () const | 
  Public Member Functions inherited from NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| void | operator= (const NonCopyable &)=delete | 
Protected Attributes | |
| const BroadPhaseLayerFilter * | mBroadPhaseLayerFilter = nullptr | 
| const ObjectLayerFilter * | mObjectLayerFilter = nullptr | 
| const BodyFilter * | mBodyFilter = nullptr | 
| ObjectLayer | mObjectLayer = cObjectLayerInvalid | 
  Protected Attributes inherited from RefTarget< VehicleCollisionTester > | |
| atomic< uint32 > | mRefCount | 
| Current reference count.  More... | |
Additional Inherited Members | |
  Static Public Member Functions inherited from RefTarget< VehicleCollisionTester > | |
| static int | sInternalGetRefCountOffset () | 
| INTERNAL HELPER FUNCTION USED BY SERIALIZATION.  More... | |
  Static Protected Attributes inherited from RefTarget< VehicleCollisionTester > | |
| static constexpr uint32 | cEmbedded | 
| A large value that gets added to the refcount to mark the object as embedded.  More... | |
Class that does collision detection between wheels and ground.
      
  | 
  default | 
Constructors.
      
  | 
  inlineexplicit | 
      
  | 
  virtualdefault | 
Virtual destructor.
      
  | 
  pure virtual | 
Do a collision test with the world
| inPhysicsSystem | The physics system that should be tested against | 
| inVehicleConstraint | The vehicle constraint | 
| inWheelIndex | Index of the wheel that we're testing collision for | 
| inOrigin | Origin for the test, corresponds to the world space position for the suspension attachment point | 
| inDirection | Direction for the test (unit vector, world space) | 
| inVehicleBodyID | This body should be filtered out during collision detection to avoid self collisions | 
| outBody | Body that the wheel collided with | 
| outSubShapeID | Sub shape ID that the wheel collided with | 
| outContactPosition | Contact point between wheel and floor, in world space | 
| outContactNormal | Contact normal between wheel and floor, pointing away from the floor | 
| outSuspensionLength | New length of the suspension [0, inSuspensionMaxLength] | 
Implemented in VehicleCollisionTesterRay, VehicleCollisionTesterCastSphere, and VehicleCollisionTesterCastCylinder.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Object layer to use for collision detection, this is used when the filters are not overridden.
      
  | 
  inline | 
      
  | 
  pure virtual | 
Do a cheap contact properties prediction based on the contact properties from the last collision test (provided as input parameters)
| inPhysicsSystem | The physics system that should be tested against | 
| inVehicleConstraint | The vehicle constraint | 
| inWheelIndex | Index of the wheel that we're testing collision for | 
| inOrigin | Origin for the test, corresponds to the world space position for the suspension attachment point | 
| inDirection | Direction for the test (unit vector, world space) | 
| inVehicleBodyID | The body ID for the vehicle itself | 
| ioBody | Body that the wheel previously collided with | 
| ioSubShapeID | Sub shape ID that the wheel collided with during the last check | 
| ioContactPosition | Contact point between wheel and floor during the last check, in world space | 
| ioContactNormal | Contact normal between wheel and floor during the last check, pointing away from the floor | 
| ioSuspensionLength | New length of the suspension [0, inSuspensionMaxLength] | 
Implemented in VehicleCollisionTesterRay, VehicleCollisionTesterCastSphere, and VehicleCollisionTesterCastCylinder.
      
  | 
  inline | 
Access to the body filter, when set this overrides the default filter that filters out the vehicle body.
      
  | 
  inline | 
Access to the broad phase layer filter, when set this overrides the object layer supplied in the constructor.
      
  | 
  inline | 
      
  | 
  inline | 
Access to the object layer filter, when set this overrides the object layer supplied in the constructor.
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected |