Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
jpp::scene::ICollisionCallback Class Referenceabstract

Callback interface for catching events of collisions. More...

#include <jimcpp/core/engine/ISceneNodeAnimatorCollisionResponse.hpp>

Inheritance diagram for jpp::scene::ICollisionCallback:
Inheritance graph
Collaboration diagram for jpp::scene::ICollisionCallback:
Collaboration graph

Public Member Functions

virtual bool onCollision (const ISceneNodeAnimatorCollisionResponse &animator)=0
 Will be called when a collision occurs.
 
- Public Member Functions inherited from jpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from jpp::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Detailed Description

Callback interface for catching events of collisions.

Implement this interface and use ISceneNodeAnimatorCollisionResponse::setCollisionCallback to be able to be notified if a collision has occurred.

Member Function Documentation

◆ onCollision()

virtual bool jpp::scene::ICollisionCallback::onCollision ( const ISceneNodeAnimatorCollisionResponse animator)
pure virtual

Will be called when a collision occurs.

See ISceneNodeAnimatorCollisionResponse::setCollisionCallback for more information.

Parameters
animatorCollision response animator in which the collision occurred. You can call this animator's methods to find the node, collisionPoint and/or collision triangle.
Return values
trueif the collision was handled in the animator. The animator's target node will not be stopped at the collision point, but will instead move fully to the location that triggered the collision check.
falseif the collision was not handled in the animator. The animator's target node will be moved to the collision position.

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

Jimcpp    @cppfx.xyz

K