![]() |
VR-Forces 4.0.4 Class Documentation
|
Instances of DtFormation are a list of DtFormationEntry objects which make up an aggregate formation. More...

Public Member Functions | |
| DtFormation () | |
| default constructor | |
| DtFormation (const DtString &name, DtReaderWriterRegistry *const parentRegistry=0) | |
| constructor | |
| DtFormation (const DtFormation &orig) | |
| copy constructor | |
| DtFormation & | operator= (const DtFormation &orig) |
| assignment operator | |
| virtual | ~DtFormation () |
| destructor | |
| virtual void | addPosition (int promotionId, int leaderPromotionId, const DtVector &positionOffset) |
| Add an entry to the formation. | |
| virtual void | removeAndDeleteAll () |
| Removes and deletes memory associated with all entries in the formation. | |
| virtual const DtFormationEntry * | getFormationEntryForPromotionId (int) const |
| virtual DtFormationEntry * | getFormationEntryForPromotionId (int) |
| virtual std::list< DtVector > | formationPositions (int numEntitiesInFormation) const |
| bool | operator== (const DtFormation &) const |
| bool | operator!= (const DtFormation &) const |
| virtual void | addEntry (DtFormationEntry *entry) |
| Adds new entry to ourself. | |
| virtual DtFormationEntry * | createAndAddFormationEntry () |
| Creates and adds a new DtFormationEntry to the table. | |
Protected Member Functions | |
| virtual DtVector | newFormationEntryOffset () const |
| Returns a new formation entry offset. If the first node, returns 0, 0, 0, else returns -10, 0, 0. | |
| virtual void | removeEntry (DtFormationEntry *entry) |
| Removes and deletes the entry. | |
| virtual void | copyList (const DtFormation &orig) |
| virtual void | emptyList () |
| Used by the destructor. | |
| virtual DtlObjPtr | getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings) |
| Constructs a DtFormationEntry item, and then retrieves it from the stream. | |
Instances of DtFormation are a list of DtFormationEntry objects which make up an aggregate formation.
default constructor
| DtFormation::DtFormation | ( | const DtString & | name, |
| DtReaderWriterRegistry *const | parentRegistry = 0 |
||
| ) |
constructor
| DtFormation::DtFormation | ( | const DtFormation & | orig | ) |
copy constructor
| virtual DtFormation::~DtFormation | ( | ) | [virtual] |
destructor
| DtFormation& DtFormation::operator= | ( | const DtFormation & | orig | ) |
assignment operator
| virtual void DtFormation::addPosition | ( | int | promotionId, |
| int | leaderPromotionId, | ||
| const DtVector & | positionOffset | ||
| ) | [virtual] |
Add an entry to the formation.
promotionId: Indicates relative 'importance' of position in the formation, starting with 0, e.g. 0 is the leader, 1 follows 0, 2 follows 1, and so on. All members in a formation have a unique promotion Id, starting with 0. There should be no gaps in promotionIds in a formation. For example, you should not have a formation consisting of 0, 1, 4, 5, 6 (the leaderPromotionId (in this case 2 and 3 are missing). leaderPromotionId: Promotion id of the formation member this entry is to follow. For the overall leader (the promotionId that doesn't follow anyone else, this value should -1. positionOffset: Offset in body coordinates of the leader, at which an entity in this formation position should try to maintain.
| virtual void DtFormation::removeAndDeleteAll | ( | ) | [virtual] |
Removes and deletes memory associated with all entries in the formation.
| virtual const DtFormationEntry* DtFormation::getFormationEntryForPromotionId | ( | int | ) | const [virtual] |
| virtual DtFormationEntry* DtFormation::getFormationEntryForPromotionId | ( | int | ) | [virtual] |
| virtual std::list<DtVector> DtFormation::formationPositions | ( | int | numEntitiesInFormation | ) | const [virtual] |
| bool DtFormation::operator== | ( | const DtFormation & | ) | const |
| bool DtFormation::operator!= | ( | const DtFormation & | ) | const |
| virtual void DtFormation::addEntry | ( | DtFormationEntry * | entry | ) | [virtual] |
Adds new entry to ourself.
| virtual DtFormationEntry* DtFormation::createAndAddFormationEntry | ( | ) | [virtual] |
Creates and adds a new DtFormationEntry to the table.
If it is the first node, will be at 0, 0, 0. If a node other than the first node, will call newFormationEntryOffset() to return the new offset. The node will follow the last node in the formation
| virtual DtVector DtFormation::newFormationEntryOffset | ( | ) | const [protected, virtual] |
Returns a new formation entry offset. If the first node, returns 0, 0, 0, else returns -10, 0, 0.
| virtual void DtFormation::removeEntry | ( | DtFormationEntry * | entry | ) | [protected, virtual] |
Removes and deletes the entry.
| virtual void DtFormation::copyList | ( | const DtFormation & | orig | ) | [protected, virtual] |
| virtual void DtFormation::emptyList | ( | ) | [protected, virtual] |
Used by the destructor.
It removes and DELETES all formation entries on the list.
| virtual DtlObjPtr DtFormation::getData | ( | DtlObjPtr | args, |
| const DtFilename & | searchPath, | ||
| const DtVariableBindingsList & | variableBindings | ||
| ) | [protected, virtual] |
Constructs a DtFormationEntry item, and then retrieves it from the stream.
Implements DtRwList.