Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/portals/PortalLink.h @ 8490

Last change on this file since 8490 was 8457, checked in by FelixSchulthess, 14 years ago

merged portals branch into trunk

  • Property svn:executable set to *
File size: 1.6 KB
RevLine 
[8177]1#ifndef _PortalLink_H__
2#define _PortalLink_H__
3
[8200]4#include "portals/PortalsPrereqs.h"
[8177]5#include "tools/interfaces/Tickable.h"
6#include "core/BaseObject.h"
7#include "PortalEndPoint.h"
[8198]8#include "objects/eventsystem/EventListener.h"
[8177]9
[8243]10#include <map>
[8177]11
12namespace orxonox
13{
[8243]14    class _PortalsExport PortalLink : public BaseObject
[8177]15    {
16        public:
17            PortalLink(BaseObject* creator);
18            virtual ~PortalLink();
19            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
[8455]20            inline void setFromID(unsigned int from)    //!< set the ID of the PortalEndPoint which should act as the entrance of this link
[8177]21            {
22                this->fromID_ = from;
23            }
24            inline unsigned int getFromID(unsigned int) const
25            {
26                return this->fromID_;
27            }
[8455]28            inline void setToID(unsigned int to)     //!< set the ID of the PortalEndPoint which should act as the exit of this link
[8177]29            {
30                this->toID_ = to;
31            }
32            inline unsigned int getToID(unsigned int) const
33            {
34                return this->toID_;
35            }
[8455]36            static void use(MobileEntity * entity, PortalEndPoint * entrance);   //
[8177]37        protected:
38        private:
[8243]39            static std::map<PortalEndPoint *, PortalEndPoint *> links_s;
[8177]40            unsigned int fromID_;
41            unsigned int toID_;
42            PortalEndPoint* from_;
43            PortalEndPoint* to_;
44            float activationRadius_;
45            bool isNowPortable(WorldEntity * ent);
46    };
47
48}
49
[8200]50#endif /* _Portals_H__ */
Note: See TracBrowser for help on using the repository browser.