ChirpSim
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | List of all members
PhysicalObject Class Referenceabstract

The PhysicalObject class is an abstract base class giving access to the required attributes of the physical object. More...

#include <physicalobject.h>

Inheritance diagram for PhysicalObject:
Inheritance graph

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

PhysicalObject::PhysicalObject ( )
inline
virtual PhysicalObject::~PhysicalObject ( )
inlinevirtual

Member Function Documentation

virtual b2Body* PhysicalObject::body ( ) const
pure virtual

Simple getter to get the physical representation of an object.

Returns
Physical representation of object used by b2World class.

Implemented in Chirp, PushableObject, Wall, and Arena.

Referenced by World::removeObject(), and ChirpIrSensor::update().

Here is the caller graph for this function:

virtual QGraphicsItem* PhysicalObject::item ( ) const
pure virtual

Simple getter for returning QGraphicsItem connected to this object.

Returns
The graphic representation of the object.

Implemented in Chirp, PushableObject, Wall, and Arena.

Referenced by World::addObject(), and World::removeObject().

Here is the caller graph for this function:

virtual void PhysicalObject::step ( float  dt)
inlinevirtual

Called by World on all PhysicalObjects in the simulation so they can implement any custom physics.

Parameters
dtseconds passed since last call.

Reimplemented in Chirp, and PushableObject.

virtual void PhysicalObject::stepGraphics ( )
inlinevirtual

stepGraphics

Reimplemented in Chirp, and PushableObject.


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