CubbyFlow::RigidBodyCollider3 Class Referencefinal

3-D rigid body collider class. More...

#include <Core/Collider/RigidBodyCollider3.h>

Inheritance diagram for CubbyFlow::RigidBodyCollider3:
CubbyFlow::Collider3

Classes

class  Builder
 Front-end to create RigidBodyCollider3 objects step by step. More...
 

Public Member Functions

 RigidBodyCollider3 (const Surface3Ptr &surface)
 Constructs a collider with a surface. More...
 
 RigidBodyCollider3 (const Surface3Ptr &surface, const Vector3D &linearVelocity, const Vector3D &angularVelocity)
 Constructs a collider with a surface and other parameters. More...
 
Vector3D VelocityAt (const Vector3D &point) const override
 Returns the velocity of the collider at given point. More...
 
- Public Member Functions inherited from CubbyFlow::Collider3
 Collider3 ()
 Default constructor. More...
 
virtual ~Collider3 ()
 Default destructor. More...
 
void ResolveCollision (double radius, double restitutionCoefficient, Vector3D *position, Vector3D *velocity)
 
double GetFrictionCoefficient () const
 Returns friction coefficient. More...
 
void SetFrictionCoefficient (double newFrictionCoeffient)
 Sets the friction coefficient. More...
 
const Surface3PtrGetSurface () const
 Returns the surface instance. More...
 
void Update (double currentTimeInSeconds, double timeIntervalInSeconds)
 Updates the collider state. More...
 
void SetOnBeginUpdateCallback (const OnBeginUpdateCallback &callback)
 Sets the callback function to be called when Collider3::update function is invoked. More...
 

Static Public Member Functions

static Builder GetBuilder ()
 Returns builder fox RigidBodyCollider3. More...
 

Public Attributes

Vector3D linearVelocity
 Linear velocity of the rigid body. More...
 
Vector3D angularVelocity
 Angular velocity of the rigid body. More...
 

Additional Inherited Members

- Public Types inherited from CubbyFlow::Collider3
using OnBeginUpdateCallback = std::function< void(Collider3 *, double, double)>
 Callback function type for update calls. More...
 
- Protected Member Functions inherited from CubbyFlow::Collider3
void SetSurface (const Surface3Ptr &newSurface)
 Assigns the surface instance from the subclass. More...
 
void GetClosestPoint (const Surface3Ptr &surface, const Vector3D &queryPoint, ColliderQueryResult *result) const
 Outputs closest point's information. More...
 
bool IsPenetrating (const ColliderQueryResult &colliderPoint, const Vector3D &position, double radius)
 Returns true if given point is in the opposite side of the surface. More...
 

Detailed Description

3-D rigid body collider class.

This class implements 3-D rigid body collider. The collider can only take rigid body motion with linear and rotational velocities.

Constructor & Destructor Documentation

◆ RigidBodyCollider3() [1/2]

CubbyFlow::RigidBodyCollider3::RigidBodyCollider3 ( const Surface3Ptr surface)
explicit

Constructs a collider with a surface.

◆ RigidBodyCollider3() [2/2]

CubbyFlow::RigidBodyCollider3::RigidBodyCollider3 ( const Surface3Ptr surface,
const Vector3D linearVelocity,
const Vector3D angularVelocity 
)

Constructs a collider with a surface and other parameters.

Member Function Documentation

◆ GetBuilder()

static Builder CubbyFlow::RigidBodyCollider3::GetBuilder ( )
static

Returns builder fox RigidBodyCollider3.

◆ VelocityAt()

Vector3D CubbyFlow::RigidBodyCollider3::VelocityAt ( const Vector3D point) const
overridevirtual

Returns the velocity of the collider at given point.

Implements CubbyFlow::Collider3.

Member Data Documentation

◆ angularVelocity

Vector3D CubbyFlow::RigidBodyCollider3::angularVelocity

Angular velocity of the rigid body.

◆ linearVelocity

Vector3D CubbyFlow::RigidBodyCollider3::linearVelocity

Linear velocity of the rigid body.


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