Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/portals/src/modules/portals/PortalEndPoint.h @ 8200

Last change on this file since 8200 was 8200, checked in by FelixSchulthess, 13 years ago

blah

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#ifndef _PortalEndPoint_H__
2#define _PortalEndPoint_H__
3
4#include "portals/PortalsPrereqs.h"
5
6#include <set>
7#include <string>
8#include <map>
9
10#include "worldentities/StaticEntity.h"
11#include "graphics/Billboard.h"
12#include "objects/triggers/DistanceMultiTrigger.h"
13
14namespace orxonox
15{
16    class _PortalsExport PortalEndPoint : public DistanceMultiTrigger
17    {
18        public:
19            PortalEndPoint(BaseObject* creator);
20            virtual ~PortalEndPoint();
21            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
22            //virtual void tick(float dt);
23            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints
24            inline void setID(unsigned int id)
25            {
26                this->id_ = id;
27            }
28           
29            inline unsigned int getID() const
30            {
31                return this->id_;
32            }
33            void jumpOut(WorldEntity * entity); //!< relocate an entity to the position of the endpoint and add it to the set of recentlyPortedOut entities
34            void tick(float dt);
35            bool hasRecentlyJumpedOut(WorldEntity * entity); //!< check if a certain entity recently jumped out of this endpoint
36        protected:
37        private:
38            unsigned int id_;
39            std::set<WorldEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link
40    };
41
42}
43
44#endif /* _Portals_H__ */
Note: See TracBrowser for help on using the repository browser.