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

Interface for objects powered using power cells. More...

#include <powered_object.h>

Inheritance diagram for CPoweredObject:
Inheritance graph
[legend]

Public Member Functions

 CPoweredObject (ObjectInterfaceTypes &types)
 
virtual CObjectGetPower ()=0
 Returns the power cell. More...
 
virtual void SetPower (CObject *power)=0
 Sets power cell. More...
 
virtual Math::Vector GetPowerPosition ()=0
 Returns the relative position of power cell. More...
 
virtual void SetPowerPosition (const Math::Vector &powerPosition)=0
 Sets the relative position of power cell. More...
 

Detailed Description

Interface for objects powered using power cells.

TODO: It currently includes objects that take other objects as input and convert them, for example PowerPlant. We should create a dedicated interface for such uses.

Member Function Documentation

virtual CObject* CPoweredObject::GetPower ( )
pure virtual

Returns the power cell.

Implemented in COldObject.

virtual void CPoweredObject::SetPower ( CObject power)
pure virtual

Sets power cell.

Implemented in COldObject.

virtual Math::Vector CPoweredObject::GetPowerPosition ( )
pure virtual

Returns the relative position of power cell.

Implemented in COldObject.

virtual void CPoweredObject::SetPowerPosition ( const Math::Vector powerPosition)
pure virtual

Sets the relative position of power cell.

Implemented in COldObject.


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