Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/portals/src/orxonox/worldentities/PortalLink.h @ 8177

Last change on this file since 8177 was 8177, checked in by anbueche, 13 years ago

added PortalEndPoint and PortalLink, billboard for endpoint implemented

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#ifndef _PortalLink_H__
2#define _PortalLink_H__
3
4#include "OrxonoxPrereqs.h"
5#include "tools/interfaces/Tickable.h"
6#include "core/BaseObject.h"
7#include "PortalEndPoint.h"
8
9#include <set>
10
11namespace orxonox
12{
13    class _OrxonoxExport PortalLink : public BaseObject
14    {
15        public:
16            PortalLink(BaseObject* creator);
17            virtual ~PortalLink();
18   
19            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
20            virtual void tick(float dt);
21            inline void setFromID(unsigned int from)
22            {
23                this->fromID_ = from;
24            }
25            inline unsigned int getFromID(unsigned int) const
26            {
27                return this->fromID_;
28            }
29            inline void setToID(unsigned int to)
30            {
31                this->toID_ = to;
32            }
33            inline unsigned int getToID(unsigned int) const
34            {
35                return this->toID_;
36            }
37            void use(WorldEntity * entity);
38        protected:
39        private:
40            unsigned int fromID_;
41            unsigned int toID_;
42            PortalEndPoint* from_;
43            PortalEndPoint* to_;
44            float activationRadius_;
45            std::set<WorldEntity *> recentlyPorted;
46            bool isNowPortable(WorldEntity * ent);
47    };
48
49}
50
51#endif /* _Portals_H__ */
Note: See TracBrowser for help on using the repository browser.