Colobot
Public Member Functions | List of all members
CMovableObject Class Referenceabstract

Interface for objects that can move (have an engine) More...

#include <movable_object.h>

Inheritance diagram for CMovableObject:
Inheritance graph
[legend]

Public Member Functions

 CMovableObject (ObjectInterfaceTypes &types)
 
virtual CPhysicsGetPhysics ()=0
 Returns CPhysics instance associated with this object. If the object implements Movable interface, and type != OBJECT_TOTO, this can be assumed to be != nullptr. More...
 
virtual CMotionGetMotion ()=0
 Returns CMotion instance associated with this object. If the object implements Movable interface, this can be assumed to be != nullptr. More...
 

Detailed Description

Interface for objects that can move (have an engine)

TODO: Currently, it just returns pointers to CPhysics and CMotion. These classes should be probably merged with CObject, and maybe even split into some more interfaces.

Member Function Documentation

virtual CPhysics* CMovableObject::GetPhysics ( )
pure virtual

Returns CPhysics instance associated with this object. If the object implements Movable interface, and type != OBJECT_TOTO, this can be assumed to be != nullptr.

Implemented in COldObject.

virtual CMotion* CMovableObject::GetMotion ( )
pure virtual

Returns CMotion instance associated with this object. If the object implements Movable interface, this can be assumed to be != nullptr.

Implemented in COldObject.


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