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

Public Member Functions

 SphereCollider (PhysicsBodyComponent *owner, decimalType radius, 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
 
decimalType GetRadius () const
 
- 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
 

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
 
- Protected Attributes inherited from RavEngine::PhysicsCollider
physx::PxShape * collider = nullptr
 
Ref< PhysicsMaterial > material
 

Constructor & Destructor Documentation

◆ SphereCollider()

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

Create a sphere collider with a material

Parameters
rradius of the collider
matthe physics material of the shape
positionthe relative position of the shape
rotationthe relative rotation of the shape

Member Function Documentation

◆ DebugDraw()

void SphereCollider::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: