Changeset 7547 for code/trunk/src/orxonox/interfaces/PickupCarrier.h
- Timestamp:
- Oct 16, 2010, 12:37:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/interfaces/PickupCarrier.h
r7494 r7547 64 64 Different PickupCarriers are structured hierarchically, a pickup can be picked up by a PickupCarrier that can't really carry that particular pickup but one of its children (or one of their children) can, and thus it gets "handed down" until it is at the right place. 65 65 But this structure has to be established first. 66 - <b>getCarrierChildren()</b> To this end a PickupCarrier needs to implement getCarrierChildren() which returns a list of its direct PickupCarrier children. If you need an example, have a look at @ref orxonox::Pawn "Pawn" and @ref orxon x::Engine "Engine".66 - <b>getCarrierChildren()</b> To this end a PickupCarrier needs to implement getCarrierChildren() which returns a list of its direct PickupCarrier children. If you need an example, have a look at @ref orxonox::Pawn "Pawn" and @ref orxonox::Engine "Engine". 67 67 - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or NULL if the PickupCarrier is a root node in this hierarchy. 68 68 69 69 @author 70 70 Damian 'Mozork' Frick 71 72 @ingroup Pickup 71 73 */ 72 74 class _OrxonoxExport PickupCarrier : virtual public OrxonoxClass … … 88 90 void preDestroy(void); //!< Is called before the PickupCarrier is effectively destroyed. 89 91 90 bool isTarget(const Pickupable* pickup) ; //!< Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable.92 bool isTarget(const Pickupable* pickup) const; //!< Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable. 91 93 PickupCarrier* getTarget(const Pickupable* pickup); //!< Get the carrier that is both a child of the PickupCarrier (or the PickupCarrier itself) and a target of the input Pickupable. 92 94 … … 96 98 @return Returns the position as a Vector3. 97 99 */ 98 virtual const Vector3& getCarrierPosition(void) = 0;100 virtual const Vector3& getCarrierPosition(void) const = 0; 99 101 100 102 protected: … … 105 107 @return Returns a pointer to a list of all direct children. 106 108 */ 107 virtual std::vector<PickupCarrier*>* getCarrierChildren(void) = 0;109 virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const = 0; 108 110 /** 109 111 @brief Get the parent of this PickupSpawner. … … 111 113 @return Returns a pointer to the parent. 112 114 */ 113 virtual PickupCarrier* getCarrierParent(void) = 0;115 virtual PickupCarrier* getCarrierParent(void) const = 0; 114 116 115 117 /**
Note: See TracChangeset
for help on using the changeset viewer.