Colobot
|
Interface for objects that hold other objects. More...
#include <src/object/interface/slotted_object.h>
Public Types | |
enum class | Pseudoslot { POWER , CARRYING } |
! Object-independent identifiers for certain special slots More... | |
Public Member Functions | |
CSlottedObject (ObjectInterfaceTypes &types) | |
virtual int | MapPseudoSlot (Pseudoslot pseudoslot)=0 |
Given one of the PSEUDOSLOT enums, returns real slot number, or -1 if specified pseudoslot is not present in this object. | |
virtual int | GetNumSlots ()=0 |
Get number of slots. Valid slot numbers are 0 up to GetNumSlots()-1. Using invalid slot numbers in the other functions will crash the game. | |
virtual Math::Vector | GetSlotPosition (int slotNum)=0 |
Get relative position of a slot. | |
virtual float | GetSlotAngle (int slotNum)=0 |
Get relative angle (in radians) where robot should be positioned when inserting into a slot. | |
virtual float | GetSlotAcceptanceAngle (int slotNum)=0 |
Get the maximum angular distance from the ideal angle (in radians) where robot should be positioned when inserting into a slot. | |
virtual CObject * | GetSlotContainedObject (int slotNum)=0 |
Get object contained in a slot. | |
virtual void | SetSlotContainedObject (int slotNum, CObject *object)=0 |
Set object contained in a slot. | |
void | SetSlotContainedObjectReq (Pseudoslot pseudoslot, CObject *object) |
CObject * | GetSlotContainedObjectOpt (Pseudoslot pseudoslot) |
CObject * | GetSlotContainedObjectReq (Pseudoslot pseudoslot) |
Interface for objects that hold other objects.
|
strong |
! Object-independent identifiers for certain special slots
|
pure virtual |
Given one of the PSEUDOSLOT enums, returns real slot number, or -1 if specified pseudoslot is not present in this object.
Implemented in COldObject.
|
pure virtual |
Get number of slots. Valid slot numbers are 0 up to GetNumSlots()-1. Using invalid slot numbers in the other functions will crash the game.
Implemented in COldObject.
|
pure virtual |
Get relative position of a slot.
Implemented in COldObject.
|
pure virtual |
Get relative angle (in radians) where robot should be positioned when inserting into a slot.
Implemented in COldObject.
|
pure virtual |
Get the maximum angular distance from the ideal angle (in radians) where robot should be positioned when inserting into a slot.
Implemented in COldObject.
|
pure virtual |
Get object contained in a slot.
Implemented in COldObject.
|
pure virtual |
Set object contained in a slot.
Implemented in COldObject.