RavEngine
Loading...
Searching...
No Matches
RavEngine::BoxCollider Class Reference
Inheritance diagram for RavEngine::BoxCollider:
[legend]
Collaboration diagram for RavEngine::BoxCollider:
[legend]

Public Member Functions

 BoxCollider (PhysicsBodyComponent *owner, const vector3 &ext, Ref< PhysicsMaterial > mat, const vector3 &position=vector3(0, 0, 0), const quaternion &rotation=quaternion(1.0, 0.0, 0.0, 0.0))
 
void DebugDraw (RavEngine::DebugDrawer &dbg, color_t, const RavEngine::Transform &) const override
 
- Public Member Functions inherited from RavEngine::PhysicsCollider
void UpdateFilterData (PhysicsBodyComponent *owner)
 
void SetType (CollisionType)
 
CollisionType GetType () const
 
void SetQueryable (bool)
 
bool GetQueryable () const
 
void SetRelativeTransform (const vector3 &position, const quaternion &rotation)
 
Transformation GetRelativeTransform () const
 

Protected Attributes

vector3 extent
 
- Protected Attributes inherited from RavEngine::PhysicsCollider
physx::PxShape * collider = nullptr
 
Ref< PhysicsMaterial > material
 

Additional Inherited Members

- Public Types inherited from RavEngine::PhysicsCollider
enum class  CollisionType { Trigger , Collider }
 
- Protected Member Functions inherited from RavEngine::PhysicsCollider
matrix4 CalculateWorldMatrix (const RavEngine::Transform &) const
 

Constructor & Destructor Documentation

◆ BoxCollider()

BoxCollider::BoxCollider ( PhysicsBodyComponent *  owner,
const vector3 &  ext,
Ref< PhysicsMaterial >  mat,
const vector3 &  position = vector3(0, 0, 0),
const quaternion &  rotation = quaternion(1.0, 0.0, 0.0, 0.0) 
)

Create a box collider with an extent and a physics material

Parameters
extthe dimensions of the collider
matthe physics material to assign
Note
The current scale of the transform is assumed to be the identity size for ResizeToFit.

Member Function Documentation

◆ DebugDraw()

void BoxCollider::DebugDraw ( RavEngine::DebugDrawer &  dbg,
color_t  debug_color,
const RavEngine::Transform &  tr 
) const
overridevirtual

Draw a wireframe shape representing the boundary of this collider

Parameters
colorthe hex color to use to draw, in format 0xRRGGBBAA

Reimplemented from RavEngine::PhysicsCollider.


The documentation for this class was generated from the following files: