Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | List of all members
orxonox::PortalEndPoint Class Reference

A PortalEndPoint serves as portal entrance and/or exit. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/modules/portals/PortalEndPoint.h>

Inheritance diagram for orxonox::PortalEndPoint:
orxonox::StaticEntity orxonox::RadarViewable orxonox::WorldEntity orxonox::OrxonoxInterface orxonox::BaseObject orxonox::Synchronisable orxonox::Configurable orxonox::Destroyable orxonox::OrxonoxClass orxonox::OrxonoxInterface orxonox::Listable orxonox::Configurable orxonox::Destroyable orxonox::Configurable orxonox::Destroyable orxonox::Identifiable orxonox::Listable orxonox::Listable orxonox::Identifiable orxonox::Identifiable

Public Member Functions

 PortalEndPoint (Context *context)
 
virtual ~PortalEndPoint ()
 
virtual void changedActivity (void) override
 When the activity is changed, it is changed for all attached objects as well. More...
 
bool execute (bool bTriggered, BaseObject *trigger)
 This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed. More...
 
unsigned int getID () const
 
unsigned int getReenterDelay ()
 
const std::string & getTemplate ()
 Get the name of the attached design template. More...
 
void jumpOut (MobileEntity *entity)
 Let an Entity jump out of this portal no matter where it was before. More...
 
bool letsEnter (MobileEntity *entity)
 Tells wether a certain Entity is allowed to enter the PortalEndPoint? More...
 
void setID (unsigned int id)
 
void setReenterDelay (unsigned int seconds)
 
void setTarget (const std::string &target)
 
void setTemplate (const std::string &name)
 Set templateName_ (the name of the design Template) and add that Template to this Object. More...
 
virtual void XMLEventPort (Element &xmlelement, XMLPort::Mode mode) override
 Defines the possible event states of this object and parses eventsources from an XML file. More...
 
virtual void XMLPort (Element &xmlelement, XMLPort::Mode mode) override
 XML loading and saving. More...
 
- Public Member Functions inherited from orxonox::StaticEntity
 StaticEntity (Context *context)
 
virtual ~StaticEntity ()
 
virtual void setOrientation (const Quaternion &orientation) override
 
virtual void setPosition (const Vector3 &position) override
 
- Public Member Functions inherited from orxonox::WorldEntity
 WorldEntity (Context *context)
 Creates a new WorldEntity that may immediately be used. More...
 
virtual ~WorldEntity ()
 Destroys the WorldEntity AND ALL its children with it. More...
 
void activatePhysics ()
 Activates physics if the CollisionType is not None. More...
 
bool addedToPhysicalWorld () const
 Tells whether the object has already been added to the Bullet physics World. More...
 
void attach (WorldEntity *object)
 Attaches a child WorldEntity to this object. More...
 
void attachCollisionShape (CollisionShape *shape)
 Attaches a collision Shape to this object (delegated to the internal CompoundCollisionShape) More...
 
void attachNode (Ogre::SceneNode *node)
 Attaches an Ogre::SceneNode to this WorldEntity. More...
 
void attachOgreObject (Ogre::MovableObject *object)
 Attaches an Ogre::MovableObject to this WorldEntity. More...
 
void attachOgreObject (Ogre::BillboardSet *object)
 
void attachOgreObject (Ogre::Camera *object)
 
void attachOgreObject (Ogre::Entity *object)
 
void attachOgreObject (Ogre::ParticleSystem *object)
 
void attachToNode (Ogre::SceneNode *node)
 Attaches this object to a parent SceneNode. More...
 
void attachToParent (WorldEntity *parent)
 
 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
virtual void changedScale ()
 
virtual void changedVisibility (void) override
 When the visibility is changed, it is changed for all attached objects as well. More...
 
virtual bool collidesAgainst (WorldEntity *otherObject, const btCollisionShape *ownCollisionShape, btManifoldPoint &contactPoint)
 Virtual function that gets called when this object collides with another. More...
 
void deactivatePhysics ()
 Deactivates physics but the CollisionType does not change. More...
 
void detach (WorldEntity *object)
 Detaches a child WorldEntity from this instance. More...
 
void detachCollisionShape (CollisionShape *shape)
 Detaches a collision Shape from this object (delegated to the internal CompoundCollisionShape) More...
 
void detachFromNode (Ogre::SceneNode *node)
 Detaches this object from a parent SceneNode. More...
 
void detachFromParent ()
 
void detachNode (Ogre::SceneNode *node)
 Detaches an Ogre::SceneNode from this WorldEntity. More...
 
void detachOgreObject (Ogre::MovableObject *object)
 Detaches an Ogre::MovableObject from this WorldEntity. More...
 
void detachOgreObject (Ogre::BillboardSet *object)
 
void detachOgreObject (Ogre::Camera *object)
 
void detachOgreObject (Ogre::Entity *object)
 
void detachOgreObject (Ogre::ParticleSystem *object)
 
Ogre::MovableObject * detachOgreObject (const Ogre::String &name)
 Detaches an Ogre::MovableObject (by string) from this WorldEntity. More...
 
void disableCollisionCallback ()
 Disables the collidesAgainst(.) function. More...
 
void enableCollisionCallback ()
 Enables the collidesAgainst(.) function. The object doesn't respond to collision otherwise! More...
 
float getAngularDamping () const
 Returns the angular damping. More...
 
float getAngularFactor () const
 Returns the angular factor. More...
 
CollisionShapegetAttachedCollisionShape (unsigned int index)
 Returns an attached collision Shape of this object (delegated to the internal CompoundCollisionShape) More...
 
WorldEntitygetAttachedObject (unsigned int index)
 Returns an attached object (merely for XMLPort). More...
 
const std::set< WorldEntity * > & getAttachedObjects () const
 
float getCcdMotionThreshold () const
 Returns the currently used motion threshold for CCD (0 means CCD is deactivated). More...
 
float getCcdSweptSphereRadius () const
 Returns the currently used radius of the sphere for CCD. More...
 
CollisionType getCollisionType () const
 Returns the CollisionType. More...
 
std::string getCollisionTypeStr () const
 Gets the CollisionType by string (used for the XMLPort) More...
 
bool getDeleteWithParent () const
 
float getFriction () const
 Returns the amount of friction applied to the object. More...
 
std::string getID (void)
 
float getLinearDamping () const
 Returns the linear damping. More...
 
const btVector3 & getLocalInertia () const
 Returns the diagonal elements of the inertia tensor when calculated in local coordinates. More...
 
float getMass () const
 Returns the mass of this object without its children. More...
 
const Ogre::SceneNode * getNode () const
 
const Quaternion & getOrientation () const
 
WorldEntitygetParent () const
 
const Vector3 & getPosition () const
 
float getRestitution () const
 Returns the restitution parameter. More...
 
float getScale () const
 
const Vector3 & getScale3D () const
 
float getTotalMass () const
 Returns the total mass of this object with all its attached children. More...
 
virtual const Vector3 & getVelocity () const
 
const Quaternion & getWorldOrientation () const
 Returns the orientation relative to the root space. More...
 
const Vector3 & getWorldPosition () const
 Returns the position relative to the root space. More...
 
float getWorldScale () const
 Returns the scaling applied relative to the root space in 3 coordinates. More...
 
const Vector3 & getWorldScale3D () const
 Returns the scaling applied relative to the root space in 3 coordinates. More...
 
bool hasCollisionResponse ()
 Tells whether there could be a collision response. More...
 
bool hasPhysics () const
 Tells whether the object has any connection to the Bullet physics engine. If hasPhysics() is false, the object may still have a velocity. More...
 
bool isCollisionCallbackActive () const
 Tells whether there could be a collision callback via collidesAgainst(.) More...
 
bool isDynamic () const
 
bool isKinematic () const
 
bool isPhysicsActive () const
 Tells whether physics has been activated (you can temporarily deactivate it) More...
 
bool isStatic () const
 
void lookAt (const Vector3 &target, TransformSpace relativeTo=TransformSpace::Parent, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
 Makes this WorldEntity look at a specific target location. More...
 
void notifyChildMassChanged ()
 Recalculates the accumulated child mass and calls recalculateMassProps() and notifies the parent of the change. More...
 
void notifyChildPropsChanged ()
 
void notifyCollisionShapeChanged ()
 Undertakes the necessary steps to change the collision shape in Bullet, even at runtime. More...
 
void pitch (const Degree &angle, TransformSpace relativeTo=TransformSpace::Local)
 
void roll (const Degree &angle, TransformSpace relativeTo=TransformSpace::Local)
 
void rotate (const Quaternion &rotation, TransformSpace relativeTo=TransformSpace::Local)
 Rotates this WorldEntity by a quaternion. More...
 
void rotate (const Vector3 &axis, const Degree &angle, TransformSpace relativeTo=TransformSpace::Local)
 
void scale (float scale)
 
void scale3D (const Vector3 &scale)
 
void scale3D (float x, float y, float z)
 
void setAngularDamping (float angularDamping)
 Applies a tensor independent rotation damping. Angular velocities will simply diminish exponentially. More...
 
void setAngularFactor (float angularFactor)
 Sets an artificial parameter that tells how much torque is applied when you apply a non-central force. More...
 
void setCcdMotionThreshold (float ccdMotionThreshold)
 Sets the motion threshold for continuous collision detection (CCD). More...
 
void setCcdSweptSphereRadius (float ccdSweptSphereRadius)
 Sets the radius of the sphere which is used for continuous collision detection (CCD). More...
 
void setCollisionResponse (bool value)
 Enables or disables collision response (default is of course on) More...
 
void setCollisionType (CollisionType type)
 Sets the CollisionType. More...
 
void setCollisionTypeStr (const std::string &type)
 Sets the CollisionType by string (used for the XMLPort) More...
 
void setDeleteWithParent (bool value)
 
void setDirection (const Vector3 &direction, TransformSpace relativeTo=TransformSpace::Local, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
 Makes this WorldEntity look in specific direction. More...
 
void setDirection (float x, float y, float z, TransformSpace relativeTo=TransformSpace::Local, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
 
void setFriction (float friction)
 Applies friction to the object. Friction occurs when two objects collide. More...
 
void setID (std::string id)
 
void setLinearDamping (float linearDamping)
 Applies a mass independent damping. Velocities will simply diminish exponentially. More...
 
void setMass (float mass)
 Sets the mass of this object. Note that the total mass may be influenced by attached objects! More...
 
void setOrientation (float w, float x, float y, float z)
 
void setOrientation (const Vector3 &axis, const Radian &angle)
 
void setOrientation (const Vector3 &axis, const Degree &angle)
 
void setPosition (float x, float y, float z)
 
void setRestitution (float restitution)
 Sets how much reaction is applied in a collision. More...
 
void setScale (float scale)
 
virtual void setScale3D (const Vector3 &scale)
 Sets the three dimensional scaling of this object. More...
 
void setScale3D (float x, float y, float z)
 
void translate (const Vector3 &distance, TransformSpace relativeTo=TransformSpace::Parent)
 Translates this WorldEntity by a vector. More...
 
void translate (float x, float y, float z, TransformSpace relativeTo=TransformSpace::Parent)
 
void yaw (const Degree &angle, TransformSpace relativeTo=TransformSpace::Local)
 
- Public Member Functions inherited from orxonox::BaseObject
 BaseObject (Context *context)
 Constructor: Registers the object in the BaseObject-list. More...
 
virtual ~BaseObject ()
 Destructor. More...
 
void addEventListener (BaseObject *listener)
 Adds an object which listens to the events of this object. More...
 
void addEventSource (BaseObject *source, const std::string &state)
 Adds a new event source for a specific state. More...
 
void addTemplate (const std::string &name)
 Adds a Template to the object. More...
 
void addTemplate (Template *temp)
 Adds a Template to the object. More...
 
virtual void changedMainStateName ()
 This function gets called if the main state name of the object changes. More...
 
virtual void changedName ()
 This function gets called if the name of the object changes. More...
 
void fireEvent (const std::string &name="")
 Fires an event (without a state). More...
 
void fireEvent (bool activate, const std::string &name="")
 Fires an event which activates or deactivates a state. More...
 
void fireEvent (bool activate, BaseObject *originator, const std::string &name="")
 Fires an event which activates or deactivates a state with agiven originator (the object which triggered the event). More...
 
void fireEvent (Event &event)
 Fires an event, using the Event struct. More...
 
BaseObjectgetCreator () const
 
BaseObjectgetEventListener (unsigned int index) const
 Returns an event listener with a given index. More...
 
BaseObjectgetEventSource (unsigned int index, const std::string &state) const
 Returns an eventsource with a given index. More...
 
const XMLFilegetFile () const
 Returns a pointer to the XMLFile that loaded this object. More...
 
const std::string & getFilename () const
 Returns the levelfile that loaded this object. More...
 
GametypegetGametype () const
 
LevelgetLevel () const
 
const std::string & getLoaderIndentation () const
 Returns the indentation of the debug output in the Loader. More...
 
const std::string & getMainStateName () const
 Returns the name of the main state. More...
 
const std::string & getName () const
 Returns the name of the object. More...
 
NamespacegetNamespace () const
 
const std::string & getOldName () const
 Returns the old name of the object. More...
 
ScenegetScene () const
 
virtual uint32_t getSceneID () const
 
const std::set< Template * > & getTemplates () const
 Returns the set of all aplied templates. More...
 
const mboolisActive () const
 Returns the state of the objects activity. More...
 
bool isInitialized () const
 Returns if the object was initialized (passed the object registration). More...
 
const mboolisVisible () const
 Returns the state of the objects visibility. More...
 
virtual void processEvent (Event &event)
 Processing an event by calling the right main state. More...
 
void removeEventSource (BaseObject *source)
 Removes an eventsource (but doesn't unregister itself at the source). More...
 
void setActive (bool bActive)
 Sets the state of the objects activity. More...
 
void setCreator (BaseObject *creator)
 
void setFile (const XMLFile *file)
 Sets a pointer to the xml file that loaded this object. More...
 
void setGametype (const StrongOrWeakPtr< Gametype > &gametype)
 
void setLevel (const StrongOrWeakPtr< Level > &level)
 
void setLoaderIndentation (const std::string &indentation)
 Sets the indentation of the debug output in the Loader. More...
 
void setMainState (bool state)
 Sets the main state of the object to a given boolean value. More...
 
void setMainStateName (const std::string &name)
 Sets the name of the main state (used for event reactions). More...
 
void setName (const std::string &name)
 Sets the name of the object. More...
 
void setNamespace (const StrongOrWeakPtr< Namespace > &ns)
 
void setScene (const StrongOrWeakPtr< Scene > &scene, uint32_t sceneID)
 
void setVisible (bool bVisible)
 Sets the state of the objects visibility. More...
 
- Public Member Functions inherited from orxonox::OrxonoxClass
 OrxonoxClass ()
 
OrxonoxClassoperator= (const OrxonoxClass &)=default
 
- Public Member Functions inherited from orxonox::Configurable
 Configurable ()
 
void setConfigValues ()
 Function to collect the SetConfigValue-macro calls. More...
 
- Public Member Functions inherited from orxonox::Listable
 Listable ()
 Constructor: Allocates space in the element list. More...
 
 Listable (Context *context)
 Constructor: Allocates space in the element list and assigns the context. More...
 
virtual ~Listable ()
 Destructor: Removes the object from the object-lists. More...
 
ContextgetContext () const
 
void setContext (Context *context)
 Changes the context. More...
 
void unregisterObject ()
 Removes this object from the object-lists. More...
 
- Public Member Functions inherited from orxonox::Identifiable
 Identifiable ()
 Constructor: Sets the default values. More...
 
virtual ~Identifiable ()
 
ORX_FORCEINLINE voidgetDerivedPointer (unsigned int classID)
 Returns a valid pointer of any derived type that is registered in the class hierarchy. More...
 
template<class T >
ORX_FORCEINLINE T * getDerivedPointer (unsigned int classID)
 Version of getDerivedPointer with template. More...
 
template<class T >
ORX_FORCEINLINE const T * getDerivedPointer (unsigned int classID) const
 Const version of getDerivedPointer with template. More...
 
IdentifiergetIdentifier () const
 Returns the Identifier of the object. More...
 
bool isA (const Identifier *identifier)
 Returns true if the object's class is of the given type or a derivative. More...
 
template<class B >
bool isA (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is of the given type or a derivative. More...
 
bool isA (const Identifiable *object)
 Returns true if the object's class is of the given type or a derivative. More...
 
bool isChildOf (const Identifier *identifier)
 Returns true if the object's class is a child of the given type. More...
 
template<class B >
bool isChildOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a child of the given type. More...
 
bool isChildOf (const Identifiable *object)
 Returns true if the object's class is a child of the given type. More...
 
bool isDirectChildOf (const Identifier *identifier)
 Returns true if the object's class is a direct child of the given type. More...
 
template<class B >
bool isDirectChildOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isDirectChildOf (const Identifiable *object)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isDirectParentOf (const Identifier *identifier)
 Returns true if the object's class is a direct parent of the given type. More...
 
template<class B >
bool isDirectParentOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a direct parent of the given type. More...
 
bool isDirectParentOf (const Identifiable *object)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isExactlyA (const Identifier *identifier)
 Returns true if the object's class is exactly of the given type. More...
 
template<class B >
bool isExactlyA (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is exactly of the given type. More...
 
bool isExactlyA (const Identifiable *object)
 Returns true if the object's class is exactly of the given type. More...
 
bool isParentOf (const Identifier *identifier)
 Returns true if the object's class is a parent of the given type. More...
 
template<class B >
bool isParentOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a parent of the given type. More...
 
bool isParentOf (const Identifiable *object)
 Returns true if the object's class is a parent of the given type. More...
 
- Public Member Functions inherited from orxonox::Destroyable
 Destroyable ()
 Constructor: Sets the default values. More...
 
virtual ~Destroyable ()
 Destructor: Notifies all DestructionListener (for example weak pointers) that this object is being deleted. More...
 
void destroy ()
 Deletes the object if no strong pointers point to this object. More...
 
void destroyLater ()
 Works like destroy() but doesn't destroy the object until the current tick has ended. More...
 
unsigned int getReferenceCount () const
 Returns the number of strong pointers that point to this object. More...
 
- Public Member Functions inherited from orxonox::Synchronisable
virtual ~Synchronisable ()
 Destructor: Delete all callback objects and remove objectID_ from the objectMap_. More...
 
uint32_t getClassID () const
 
unsigned int getContextID () const
 
uint32_t getNrOfVariables ()
 
uint32_t getObjectID () const
 
unsigned int getPriority () const
 
uint8_t getSyncMode () const
 
uint32_t getVarSize (VariableID ID)
 
template<>
_NetworkExport void registerVariable (std::string &variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
 
template<>
void registerVariable (std::string &variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
 
void setSyncMode (uint8_t mode)
 This function sets the synchronisation mode of the object If set to 0x0 variables will not be synchronised at all If set to 0x1 variables will only be synchronised to the client If set to 0x2 variables will only be synchronised to the server If set to 0x3 variables will be synchronised bidirectionally (only if set so in registerVar) More...
 
template<>
_NetworkExport void unregisterVariable (std::string &variable)
 
template<>
void unregisterVariable (std::string &variable)
 
- Public Member Functions inherited from orxonox::OrxonoxInterface
 OrxonoxInterface ()
 
- Public Member Functions inherited from orxonox::RadarViewable
 RadarViewable (BaseObject *creator, const WorldEntity *wePtr)
 Constructor. More...
 
virtual ~RadarViewable ()
 
const std::string & getRadarName () const
 
float getRadarObjectCamouflage () const
 
const ColourValue & getRadarObjectColour () const
 
float getRadarObjectScale () const
 
Shape getRadarObjectShape () const
 
bool getRadarVisibility () const
 
Vector3 getRVOrientedVelocity () const
 
Vector3 getRVVelocity () const
 
const Vector3 & getRVWorldPosition () const
 
const std::string & getUniqueId ()
 
virtual const WorldEntitygetWorldEntity () const
 
virtual void setRadarName (const std::string &name)
 
void setRadarObjectCamouflage (float camouflage)
 
void setRadarObjectColour (const ColourValue &colour)
 
void setRadarObjectScale (float scale)
 
void setRadarObjectShape (Shape shape)
 
void setRadarVisibility (bool b)
 
void settingsChanged ()
 

Static Public Attributes

static std::map< unsigned int, PortalEndPoint * > idMap_s
 Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint. More...
 
- Static Public Attributes inherited from orxonox::WorldEntity
static const Vector3 BACK = Vector3::UNIT_Z
 
static const Vector3 DOWN = Vector3::NEGATIVE_UNIT_Y
 
static const Vector3 FRONT = Vector3::NEGATIVE_UNIT_Z
 
static const Vector3 LEFT = Vector3::NEGATIVE_UNIT_X
 
static const Vector3 RIGHT = Vector3::UNIT_X
 
static const Vector3 UP = Vector3::UNIT_Y
 

Private Attributes

unsigned int id_
 the hopefully (depends on the writer of the levelfile) unique id, which is used to establish links between PortalEndPoints More...
 
std::map< MobileEntity *, time_t > jumpOutTimes_
 Stores the time at which a certain MobileEntity jumped out of this PortalEndPoint. More...
 
WorldSoundportalSound_
 
std::set< MobileEntity * > recentlyJumpedOut_
 Stores the entities witch recently jumped out of this PortalEndPoint and haven't left the activation radius yet. This is needed in order to prevent them from beeing pulled into the PortalEndPoint they have just come out of. More...
 
int reenterDelay_
 
std::string templateName_
 The name of the design template used for this endpoint. More...
 
DistanceMultiTriggertrigger_
 the DistanceMultiTrigger which notices near entities of the defined type More...
 

Static Private Attributes

static const std::string EVENTFUNCTIONNAME = "execute"
 = "execute" More...
 

Additional Inherited Members

- Public Types inherited from orxonox::WorldEntity
enum  CollisionType { CollisionType::Dynamic, CollisionType::Kinematic, CollisionType::Static, CollisionType::None }
 Denotes the possible types of physical objects in a Scene. More...
 
enum  TransformSpace { TransformSpace::Local, TransformSpace::Parent, TransformSpace::World }
 Enumeration denoting the spaces which a transform can be relative to. More...
 
- Public Types inherited from orxonox::RadarViewable
enum  Shape { Shape::Square, Shape::Dot, Shape::Triangle }
 
- Static Public Member Functions inherited from orxonox::BaseObject
static void loadAllEventStates (Element &xmlelement, XMLPort::Mode mode, BaseObject *object, Identifier *identifier)
 Manually loads all event states, even if the class doesn't officially support them. More...
 
- Static Public Member Functions inherited from orxonox::Synchronisable
static bool deleteObject (uint32_t objectID_)
 Finds and deletes the Synchronisable with the appropriate objectID_. More...
 
static Synchronisablefabricate (uint8_t *&mem, uint8_t mode=0x0)
 This function fabricated a new synchrnisable (and children of it), sets calls updateData and create After calling this function the mem pointer will be increased by the size of the needed data. More...
 
static unsigned int getNumberOfDeletedObject ()
 
static SynchronisablegetSynchronisable (uint32_t objectID_)
 This function looks up the objectID_ in the objectMap_ and returns a pointer to the right Synchronisable. More...
 
static uint32_t popDeletedObject ()
 
static void setClient (bool b)
 This function sets the internal mode for synchronisation. More...
 
- Public Attributes inherited from orxonox::RadarViewable
bool isHumanShip_
 
- Protected Member Functions inherited from orxonox::WorldEntity
virtual void parentChanged ()
 
- Protected Member Functions inherited from orxonox::BaseObject
void addEventState (const std::string &name, EventState *container)
 Adds a new event-state to the object. More...
 
EventStategetEventState (const std::string &name) const
 Returns the event-state with the given name. More...
 
- Protected Member Functions inherited from orxonox::Destroyable
virtual void preDestroy ()
 This virtual function is called if destroy() is called and no StrongPtr points to this object. More...
 
- Protected Member Functions inherited from orxonox::Synchronisable
 Synchronisable (Context *context)
 Constructor: Initializes all Variables and sets the right objectID_. More...
 
uint32_t findContextID (Context *context)
 Returns the id of the context. More...
 
template<class T >
void registerVariable (T &variable, uint8_t mode=0x1, NetworkCallbackBase *cb=nullptr, bool bidirectional=false)
 
template<class T >
void registerVariable (std::set< T > &variable, uint8_t mode=0x1, NetworkCallbackBase *cb=nullptr, bool bidirectional=false)
 
void setPriority (unsigned int freq)
 
template<class T >
void unregisterVariable (T &var)
 
- Protected Attributes inherited from orxonox::WorldEntity
std::string id_
 Used by the ScriptableController to identify objects. More...
 
Ogre::SceneNode * node_
 
btRigidBody * physicalBody_
 Bullet rigid body. Everything physical is applied to this instance. More...
 
- Protected Attributes inherited from orxonox::BaseObject
mbool bActive_
 True = the object is active. More...
 
mbool bVisible_
 True = the object is visible. More...
 
FunctorPtr mainStateFunctor_
 
std::string mainStateName_
 
std::string name_
 The name of the object. More...
 
std::set< std::string > networkTemplateNames_
 
std::string oldName_
 The old name of the object. More...
 

Detailed Description

A PortalEndPoint serves as portal entrance and/or exit.

Constructor & Destructor Documentation

orxonox::PortalEndPoint::PortalEndPoint ( Context context)
orxonox::PortalEndPoint::~PortalEndPoint ( )
virtual

Member Function Documentation

void orxonox::PortalEndPoint::changedActivity ( void  )
overridevirtual

When the activity is changed, it is changed for all attached objects as well.

Reimplemented from orxonox::WorldEntity.

bool orxonox::PortalEndPoint::execute ( bool  bTriggered,
BaseObject trigger 
)

This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed.

Parameters
bTriggeredtrue if the trigger was triggered on, false if the trigger has switched to off
triggerthe MultiTriggerContainer containing the triggering BaseObject (and trigger_ the portal's MultiDistanceTrigger which we already know)
unsigned int orxonox::PortalEndPoint::getID ( void  ) const
inline
unsigned int orxonox::PortalEndPoint::getReenterDelay ( )
inline
const std::string& orxonox::PortalEndPoint::getTemplate ( )
inline

Get the name of the attached design template.

void orxonox::PortalEndPoint::jumpOut ( MobileEntity entity)

Let an Entity jump out of this portal no matter where it was before.

Parameters
entityThe Entity which should jump out of this portal
bool orxonox::PortalEndPoint::letsEnter ( MobileEntity entity)

Tells wether a certain Entity is allowed to enter the PortalEndPoint?

Returns
true if the entity not just came out of this portal and the reenterDelay has expired for it, false otherwise
void orxonox::PortalEndPoint::setID ( unsigned int  id)
inline
void orxonox::PortalEndPoint::setReenterDelay ( unsigned int  seconds)
inline
void orxonox::PortalEndPoint::setTarget ( const std::string &  target)
inline
Parameters
targetadd types which are allowed to activate the PortalEndPoint
void orxonox::PortalEndPoint::setTemplate ( const std::string &  name)
inline

Set templateName_ (the name of the design Template) and add that Template to this Object.

void orxonox::PortalEndPoint::XMLEventPort ( Element &  xmlelement,
XMLPort::Mode  mode 
)
overridevirtual

Defines the possible event states of this object and parses eventsources from an XML file.

Parameters
xmlelementThe XML-element
modeThe mode defines the operation that is being executed: loading or saving the object (from or to XML respectively)

Reimplemented from orxonox::BaseObject.

void orxonox::PortalEndPoint::XMLPort ( Element &  xmlelement,
XMLPort::Mode  mode 
)
overridevirtual

XML loading and saving.

Parameters
xmlelementThe XML-element
modeThe mode defines the operation that is being executed: loading or saving the object (from or to XML respectively)

Reimplemented from orxonox::WorldEntity.

Member Data Documentation

const std::string orxonox::PortalEndPoint::EVENTFUNCTIONNAME = "execute"
staticprivate

= "execute"

unsigned int orxonox::PortalEndPoint::id_
private

the hopefully (depends on the writer of the levelfile) unique id, which is used to establish links between PortalEndPoints

std::map< unsigned int, PortalEndPoint * > orxonox::PortalEndPoint::idMap_s
static

Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint.

std::map<MobileEntity *, time_t> orxonox::PortalEndPoint::jumpOutTimes_
private

Stores the time at which a certain MobileEntity jumped out of this PortalEndPoint.

WorldSound* orxonox::PortalEndPoint::portalSound_
private
std::set<MobileEntity *> orxonox::PortalEndPoint::recentlyJumpedOut_
private

Stores the entities witch recently jumped out of this PortalEndPoint and haven't left the activation radius yet. This is needed in order to prevent them from beeing pulled into the PortalEndPoint they have just come out of.

int orxonox::PortalEndPoint::reenterDelay_
private
std::string orxonox::PortalEndPoint::templateName_
private

The name of the design template used for this endpoint.

DistanceMultiTrigger* orxonox::PortalEndPoint::trigger_
private

the DistanceMultiTrigger which notices near entities of the defined type


The documentation for this class was generated from the following files: