The PhysicalObject class is an abstract base class giving access to the required attributes of the physical object. More...
#include <physicalobject.h>
Public Member Functions | |
PhysicalObject () | |
virtual | ~PhysicalObject () |
virtual void | step (float dt) |
Called by World on all PhysicalObjects in the simulation so they can implement any custom physics. More... | |
virtual void | stepGraphics () |
stepGraphics More... | |
virtual b2Body * | body () const =0 |
Simple getter to get the physical representation of an object. More... | |
virtual QGraphicsItem * | item () const =0 |
Simple getter for returning QGraphicsItem connected to this object. More... | |
The PhysicalObject class is an abstract base class giving access to the required attributes of the physical object.
The PhysicalObject class is an abstract base class giving access to the required attributes of the physical object. It also provides a default implementation of the step function that does nothing.
|
inline |
|
inlinevirtual |
|
pure virtual |
Simple getter to get the physical representation of an object.
Implemented in Chirp, PushableObject, Wall, and Arena.
Referenced by World::removeObject(), and ChirpIrSensor::update().
|
pure virtual |
Simple getter for returning QGraphicsItem connected to this object.
Implemented in Chirp, PushableObject, Wall, and Arena.
Referenced by World::addObject(), and World::removeObject().
|
inlinevirtual |
Called by World on all PhysicalObjects in the simulation so they can implement any custom physics.
dt | seconds passed since last call. |
Reimplemented in Chirp, and PushableObject.
|
inlinevirtual |
stepGraphics
Reimplemented in Chirp, and PushableObject.