Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/portals/src/orxonox/worldentities/PortalEndPoint.cc @ 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.1 KB
Line 
1#include "PortalEndPoint.h"
2#include "core/XMLPort.h"
3
4namespace orxonox
5{
6    CreateFactory(PortalEndPoint);
7
8    std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
9
10    PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), material_(""), billboard_(0)
11    {
12        RegisterObject(PortalEndPoint);
13        trigger_.setDistance(10);
14        trigger_.setStayActive(true);
15    }
16   
17    PortalEndPoint::~PortalEndPoint()
18    {
19     
20    }
21
22    void PortalEndPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
23    {
24        SUPER(PortalEndPoint, XMLPort, xmlelement, mode);
25        XMLPortParam(PortalEndPoint, "id", setID, getID, xmlelement, mode);
26        XMLPortParamExtern(PortalEndPoint, Billboard, this->billboard_, "material", setMaterial, getMaterial, xmlelement, mode);
27        XMLPortParamExtern(PortalEndPoint, Billboard, this->billboard_, "colour", setColour, getColour, xmlelement, mode).defaultValues(ColourValue::White);
28       
29        if(mode == XMLPort::LoadObject)
30        {
31            idMap_s[this->id_] = this;
32        }
33    }
34}
Note: See TracBrowser for help on using the repository browser.