Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Mezzanine::WorldObject Class Referenceabstract

This is the base class from which classes that are insertable into the physical world. More...

#include <worldobject.h>

+ Inheritance diagram for Mezzanine::WorldObject:
+ Collaboration diagram for Mezzanine::WorldObject:

Public Types

typedef std::set< Physics::Collision * > CollisionContainer
 Basic container type for the current collisions applied to this object.
 
typedef CollisionContainer::iterator CollisionIterator
 Iterator type for the current collisions applied to this object.
 
typedef CollisionContainer::const_iterator ConstCollisionIterator
 Const Iterator type for the current collisions applied to this object.
 
typedef ProxyContainer::const_iterator ConstProxyIterator
 Const Iterator type for WorldProxy instances stored by this class.
 
typedef std::vector< WorldProxy * > ProxyContainer
 Basic container type for WorldProxy storage by this class.
 
typedef ProxyContainer::iterator ProxyIterator
 Iterator type for WorldProxy instances stored by this class.
 

Public Member Functions

 WorldObject (World *TheWorld)
 Blank constructor. More...
 
 WorldObject (const String &Name, World *TheWorld)
 Class constructor. More...
 
virtual ~WorldObject ()
 Class destructor.
 
virtual void _NotifyCollisionState (Physics::Collision *Col, const Physics::CollisionState State)
 Notifies this World Object of a collision that is occuring with it. More...
 
virtual void _NotifyProxyDestroyed (WorldProxy *ToBeDestroyed)=0
 Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to update. More...
 
virtual void _Update ()=0
 Utility function for altering or checking the World Object every frame. More...
 
virtual void AddToWorld ()=0
 Adds the object to the World.
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this WorldObject. More...
 
virtual const StringGetName () const
 Gets the name of this object. More...
 
virtual void GetProxies (ProxyContainer &Proxies)=0
 Populates a container with all of the WorldProxies being used by this WorldObject. More...
 
virtual void GetProxies (const UInt32 Types, ProxyContainer &Proxies)=0
 Populates a container with all the WorldProxies being used by this WorldObject specified in a provided mask. More...
 
virtual Mezzanine::WorldObjectType GetType () const =0
 Gets the type of the object instance. More...
 
virtual WorldGetWorld () const
 Gets the world this object currently belongs to. More...
 
virtual Boole IsInWorld () const =0
 Gets whether or not this object is currently in the world. More...
 
virtual Boole IsKinematic () const =0
 Checks of the object is kinematic. More...
 
virtual Boole IsStatic () const =0
 Checks of the object is static. More...
 
virtual void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
virtual void ProtoDeSerializeProperties (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the properties of this object with it. More...
 
virtual void ProtoDeSerializeProxies (const XML::Node &SelfRoot)=0
 Take the data stored in an XML Node and overwrite the proxies of this object with it. More...
 
virtual void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeProperties (XML::Node &SelfRoot) const
 Convert the properties of this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeProxies (XML::Node &SelfRoot) const =0
 Convert the proxies of this class to an XML::Node ready for serialization. More...
 
virtual void RemoveFromWorld ()=0
 Removes the object from the World.
 
- Public Member Functions inherited from Mezzanine::TransformableObject
virtual ~TransformableObject ()
 Class Destructor.
 
virtual Vector3 ConvertGlobalToLocal (const Vector3 &Location) const
 Converts a point in global space to the same point in local space. More...
 
virtual Quaternion ConvertGlobalToLocal (const Quaternion &Orientation) const
 Converts a rotation in global space to the same rotation in local space. More...
 
virtual Vector3 ConvertLocalToGlobal (const Vector3 &Location) const
 Converts a point in local space to the same point in global space. More...
 
virtual Quaternion ConvertLocalToGlobal (const Quaternion &Orientation) const
 Converts a rotation in local space to the same rotation in global space. More...
 
virtual Vector3 GetLocation () const =0
 Gets this objects current location. More...
 
virtual Quaternion GetOrientation () const =0
 Gets this objects current orientation. More...
 
virtual Vector3 GetScale () const =0
 Gets the scaling currently being applied to this object. More...
 
virtual void Pitch (const Real Angle)=0
 Rotate the object around the X axis. More...
 
virtual void Roll (const Real Angle)=0
 Rotate the object around the Z axis. More...
 
virtual void Rotate (const Vector3 &Axis, const Real Angle)=0
 Rotates the object from it's existing rotation. More...
 
virtual void Rotate (const Quaternion &Rotation)=0
 Rotates the object from it's existing rotation. More...
 
virtual void Scale (const Vector3 &Scale)=0
 Scales the object from it's current size. More...
 
virtual void Scale (const Real X, const Real Y, const Real Z)=0
 Scales the object from it's current size. More...
 
virtual void SetLocation (const Vector3 &Loc)=0
 Sets the location of this object in parent space. More...
 
virtual void SetLocation (const Real X, const Real Y, const Real Z)=0
 Sets the location of this object in parent space via Reals. More...
 
virtual void SetOrientation (const Quaternion &Ori)=0
 Sets the orientation of this object in parent space. More...
 
virtual void SetOrientation (const Real X, const Real Y, const Real Z, const Real W)=0
 Sets the orientation of this object in parent space via Reals. More...
 
virtual void SetScale (const Vector3 &Sc)=0
 Sets the scaling to be applied to this object. More...
 
virtual void SetScale (const Real X, const Real Y, const Real Z)=0
 Sets the scaling to be applied to this object via Reals. More...
 
virtual void Translate (const Vector3 &Trans)=0
 Moves this object from it's current location. More...
 
virtual void Translate (const Real X, const Real Y, const Real Z)=0
 Moves this object from it's current location. More...
 
virtual void Yaw (const Real Angle)=0
 Rotate the object around the Y axis. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More...
 

Protected Attributes

CollisionContainer CurrentCollisions
 This member stores all existing collision events referencing this object. More...
 
String ObjectName
 The name of the object. More...
 
WorldParentWorld
 This is the world this object belongs to and will be inserted in/removed from. More...
 

Detailed Description

This is the base class from which classes that are insertable into the physical world.

Definition at line 60 of file worldobject.h.

Constructor & Destructor Documentation

Mezzanine::WorldObject::WorldObject ( World TheWorld)

Blank constructor.

Parameters
TheWorldA pointer to the world this object belongs to.

Definition at line 52 of file worldobject.cpp.

Mezzanine::WorldObject::WorldObject ( const String Name,
World TheWorld 
)

Class constructor.

Parameters
NameThe name to be given to this object.
TheWorldA pointer to the world this object belongs to.

Definition at line 56 of file worldobject.cpp.

Member Function Documentation

void Mezzanine::WorldObject::_NotifyCollisionState ( Physics::Collision Col,
const Physics::CollisionState  State 
)
virtual

Notifies this World Object of a collision that is occuring with it.

Parameters
ColA pointer to the collision pertaining to this World Object.
StateThe state of the collision pertaining to this World Object.

Definition at line 158 of file worldobject.cpp.

virtual void Mezzanine::WorldObject::_NotifyProxyDestroyed ( WorldProxy ToBeDestroyed)
pure virtual

Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to update.

Note
Forced destruction should only happen if a subsystem is being shutdown at a time when the WorldObject is still operational.
Parameters
ToBeDestroyedThe WorldProxy that is marked for destruction.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

virtual void Mezzanine::WorldObject::_Update ( )
pure virtual

Utility function for altering or checking the World Object every frame.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

String Mezzanine::WorldObject::GetDerivedSerializableName ( ) const
virtual

Gets the most derived serializable name of this WorldObject.

Note
When creating a new WorldObject class verify this method has a valid return for it in order for serialization to work properly.
Returns
Returns the name of the XML tag from the most derived class of "this".

Reimplemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, Mezzanine::SoftDebris, Mezzanine::FieldOfForce, Mezzanine::GravityWell, Mezzanine::GravityField, and Mezzanine::Debris.

Definition at line 149 of file worldobject.cpp.

const String & Mezzanine::WorldObject::GetName ( ) const
virtual

Gets the name of this object.

Returns
Returns a string containing the name of this object.

Definition at line 67 of file worldobject.cpp.

virtual void Mezzanine::WorldObject::GetProxies ( ProxyContainer Proxies)
pure virtual

Populates a container with all of the WorldProxies being used by this WorldObject.

Parameters
ProxiesThe container of proxies to be populated.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

virtual void Mezzanine::WorldObject::GetProxies ( const UInt32  Types,
ProxyContainer Proxies 
)
pure virtual

Populates a container with all the WorldProxies being used by this WorldObject specified in a provided mask.

Parameters
TypesThe bitmask specifing the types of world proxies to populate the container with.
ProxiesThe container of proxies to be populated.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

String Mezzanine::WorldObject::GetSerializableName ( )
static

Get the name of the the XML tag the proxy class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 152 of file worldobject.cpp.

virtual Mezzanine::WorldObjectType Mezzanine::WorldObject::GetType ( ) const
pure virtual

Gets the type of the object instance.

Returns
Returns the type of the object instance

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, Mezzanine::SoftDebris, Mezzanine::FieldOfForce, Mezzanine::GravityWell, and Mezzanine::GravityField.

World * Mezzanine::WorldObject::GetWorld ( ) const
virtual

Gets the world this object currently belongs to.

Returns
Returns a pointer to the world that owns this object.

Definition at line 70 of file worldobject.cpp.

virtual Boole Mezzanine::WorldObject::IsInWorld ( ) const
pure virtual

Gets whether or not this object is currently in the world.

Returns
Returns a Boole indicating if this object has been added to the world.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

virtual Boole Mezzanine::WorldObject::IsKinematic ( ) const
pure virtual

Checks of the object is kinematic.

Returns
Returns true if the object is kinematic, false otherwise.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

virtual Boole Mezzanine::WorldObject::IsStatic ( ) const
pure virtual

Checks of the object is static.

Returns
Returns true if the object is static, false otherwise.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

void Mezzanine::WorldObject::ProtoDeSerialize ( const XML::Node SelfRoot)
virtual

Take the data stored in an XML Node and overwrite this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Definition at line 107 of file worldobject.cpp.

void Mezzanine::WorldObject::ProtoDeSerializeProperties ( const XML::Node SelfRoot)
virtual

Take the data stored in an XML Node and overwrite the properties of this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Reimplemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, Mezzanine::SoftDebris, Mezzanine::FieldOfForce, Mezzanine::GravityWell, Mezzanine::GravityField, and Mezzanine::Debris.

Definition at line 113 of file worldobject.cpp.

virtual void Mezzanine::WorldObject::ProtoDeSerializeProxies ( const XML::Node SelfRoot)
pure virtual

Take the data stored in an XML Node and overwrite the proxies of this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

void Mezzanine::WorldObject::ProtoSerialize ( XML::Node ParentNode) const
virtual

Convert this class to an XML::Node ready for serialization.

Parameters
ParentNodeThe point in the XML hierarchy that all this renderable should be appended to.

Definition at line 79 of file worldobject.cpp.

void Mezzanine::WorldObject::ProtoSerializeProperties ( XML::Node SelfRoot) const
virtual

Convert the properties of this class to an XML::Node ready for serialization.

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Reimplemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, Mezzanine::SoftDebris, Mezzanine::FieldOfForce, Mezzanine::GravityWell, Mezzanine::GravityField, and Mezzanine::Debris.

Definition at line 87 of file worldobject.cpp.

virtual void Mezzanine::WorldObject::ProtoSerializeProxies ( XML::Node SelfRoot) const
pure virtual

Convert the proxies of this class to an XML::Node ready for serialization.

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Implemented in Mezzanine::AreaEffect, Mezzanine::RigidDebris, and Mezzanine::SoftDebris.

Member Data Documentation

CollisionContainer Mezzanine::WorldObject::CurrentCollisions
protected

This member stores all existing collision events referencing this object.

Definition at line 78 of file worldobject.h.

String Mezzanine::WorldObject::ObjectName
protected

The name of the object.

Definition at line 81 of file worldobject.h.

World* Mezzanine::WorldObject::ParentWorld
protected

This is the world this object belongs to and will be inserted in/removed from.

Definition at line 84 of file worldobject.h.


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