Colobot
Loading...
Searching...
No Matches
CMovableObject Class Referenceabstract

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

#include <src/object/interface/movable_object.h>

Inheritance diagram for CMovableObject:

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.
virtual CMotionGetMotion ()=0
 Returns CMotion instance associated with this object. If the object implements Movable interface, this can be assumed to be != nullptr.

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

◆ GetPhysics()

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.

◆ GetMotion()

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: