MezzanineEngine March 18, 2012

Mezzanine::WorldObject Class Reference

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

#include <worldobject.h>

Inheritance diagram for Mezzanine::WorldObject:
Mezzanine::NonStaticWorldObject Mezzanine::TerrainBase Mezzanine::ActorBase Mezzanine::AreaEffect Mezzanine::MeshTerrain Mezzanine::ActorRigid Mezzanine::ActorSoft Mezzanine::FieldOfForce Mezzanine::GravityField Mezzanine::GravityWell Mezzanine::TestAE

List of all members.

Public Member Functions

 WorldObject ()
 Class constructor.
virtual ~WorldObject ()
 Class destructor.
virtual btCollisionObject * _GetBasePhysicsObject () const
 Gets the internal physics object this World Object is based on.
virtual Ogre::SceneNode * _GetGraphicsNode () const
 Gets the internal graphics node this World Object uses for it's graphics transform.
virtual Ogre::Entity * _GetGraphicsObject () const
 Gets the internal graphics object this World Object is based on.
virtual void _NotifyCollisionState (Collision *Col, const Collision::CollisionState &State)
 Notifies this World Object of a collision that is occuring with it.
virtual void _Update ()=0
 Utility function for altering or checking the World Object every frame.
virtual void AddToWorld ()=0
 Adds the World Object to the World.
virtual
WorldObjectGraphicsSettings
GetGraphicsSettings () const
 Gets the graphics settings class associated with this World Object.
virtual Vector3 GetLocation () const
 Retrieves the location of the object.
virtual ConstStringGetName () const
 Gets the name of this World Object.
virtual
WorldObjectPhysicsSettings
GetPhysicsSettings () const
 Gets the physics settings class associated with this World Object.
virtual Vector3 GetScaling () const
 Gets the current scaling being applied to the World Object.
virtual Audio::SoundSetGetSounds () const
 Gets the set of sounds associated with this World Object.
virtual WorldAndSceneObjectType GetType () const =0
 Gets the type of the World Object instance.
virtual bool IsInWorld () const
 Gets whether or not this object is currently in the world.
virtual bool IsStaticOrKinematic () const
 Checks of the World Object is static or kinematic.
virtual void RemoveFromWorld ()=0
 Removes the World Object from the World.
virtual void SetLocation (const Vector3 &Location)
 Manually sets the location of the World Object.
virtual void SetLocation (const Real &x, const Real &y, const Real &z)
 Manually sets the location of the World Object.
virtual void SetScaling (const Vector3 &Scale)
 Sets the scale of the World Object.
virtual void SetSounds (Audio::SoundSet *Sounds)
 Sets the sounds to be used by this object.

Static Public Member Functions

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

Protected Member Functions

virtual void AttachToGraphics ()
 Makes the terrain visible.
virtual void DetachFromGraphics ()
 Makes the terrain invisible.
virtual String GraphicsSettingsSerializableName () const =0
 Get the name of the the XML tag that implementations of this class will use to save the serialized graphics settings.
virtual String PhysicsSettingsSerializableName () const =0
 Get the name of the the XML tag that implementations of this class will use to save the serialized s settings.
virtual void ProtoDeSerialize (const xml::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it.
virtual void ProtoSerialize (xml::Node &CurrentRoot) const
 Convert this class to an xml::Node ready for serialization.
virtual void ThrowSerialError (const String &Fail) const
 A Helper function that assembles strings and throws an exception.

Protected Attributes

std::set< Collision * > CurrentCollisions
 This member stores all existing collision events referencing this actor.
Ogre::SceneNode * GraphicsNode
 This class encapsulates the functionality of the Ogre::SceneNode using this.
Ogre::Entity * GraphicsObject
 This class encapsulates the functionality of the Ogre::Entity using this.
WorldObjectGraphicsSettingsGraphicsSettings
 This class encapsulates graphics specific configuration for this actor.
String Name
 The name of the terrain.
Audio::SoundSetObjectSounds
 This is a collection of sounds for use with this actor.
btCollisionObject * PhysicsObject
 This class encapsulates the functionality of the btCollisionObject using this.
WorldObjectPhysicsSettingsPhysicsSettings
 This class encapsulates physics specific configuration for this actor.
btCollisionShape * PhysicsShape
 This class encapsulates the functionality of the btCollisionShape using this.

Friends

class WorldNode
class WorldObjectGraphicsSettings
class WorldObjectPhysicsSettings

Detailed Description

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

In short a WorldObject is an object that has a physical representation and may also have a graphical representation and can be added and removed from the world. In almost all occasions these objects can also collide with other objects.

Definition at line 87 of file worldobject.h.


Member Function Documentation

btCollisionObject * Mezzanine::WorldObject::_GetBasePhysicsObject ( ) const [virtual]

Gets the internal physics object this World Object is based on.

Returns:
Returns a pointer to the internal Bullet object.

Definition at line 180 of file worldobject.cpp.

Ogre::SceneNode * Mezzanine::WorldObject::_GetGraphicsNode ( ) const [virtual]

Gets the internal graphics node this World Object uses for it's graphics transform.

Returns:
Returns a pointer to the internal graphics node.

Definition at line 190 of file worldobject.cpp.

Ogre::Entity * Mezzanine::WorldObject::_GetGraphicsObject ( ) const [virtual]

Gets the internal graphics object this World Object is based on.

Returns:
Returns a pointer to the internal graphics object.

Definition at line 185 of file worldobject.cpp.

void Mezzanine::WorldObject::_NotifyCollisionState ( Collision Col,
const Collision::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.

Reimplemented in Mezzanine::ActorRigid.

Definition at line 167 of file worldobject.cpp.

WorldObjectGraphicsSettings * Mezzanine::WorldObject::GetGraphicsSettings ( ) const [virtual]

Gets the graphics settings class associated with this World Object.

Returns:
Returns a pointer to the graphics settings class in use by this World Object.

Definition at line 144 of file worldobject.cpp.

Vector3 Mezzanine::WorldObject::GetLocation ( ) const [virtual]

Retrieves the location of the object.

This function will retrieve the location of the object within the world.

Returns:
A Mezzanine::Vector3 containing the location.

Reimplemented in Mezzanine::ActorSoft, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 107 of file worldobject.cpp.

ConstString & Mezzanine::WorldObject::GetName ( ) const [virtual]

Gets the name of this World Object.

Returns:
Returns a string containing the name of this World Object.

Reimplemented in Mezzanine::ActorSoft, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 117 of file worldobject.cpp.

WorldObjectPhysicsSettings * Mezzanine::WorldObject::GetPhysicsSettings ( ) const [virtual]

Gets the physics settings class associated with this World Object.

Returns:
Returns a pointer to the physics settings class in use by this World Object.

Reimplemented in Mezzanine::ActorRigid.

Definition at line 149 of file worldobject.cpp.

Vector3 Mezzanine::WorldObject::GetScaling ( ) const [virtual]

Gets the current scaling being applied to the World Object.

Returns:
Returns a vector3 representing the scaling being applied on all axes of this World Object.

Reimplemented in Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 138 of file worldobject.cpp.

Audio::SoundSet * Mezzanine::WorldObject::GetSounds ( ) const [virtual]

Gets the set of sounds associated with this World Object.

Returns:
Returns a pointer to a soundset containing all the sounds this World Object uses.

Definition at line 159 of file worldobject.cpp.

virtual WorldAndSceneObjectType Mezzanine::WorldObject::GetType ( ) const [pure virtual]

Gets the type of the World Object instance.

Returns:
Returns the type of the World Object instance

Implemented in Mezzanine::ActorBase, Mezzanine::ActorRigid, Mezzanine::ActorSoft, Mezzanine::AreaEffect, Mezzanine::GravityField, Mezzanine::GravityWell, and Mezzanine::FieldOfForce.

virtual String Mezzanine::WorldObject::GraphicsSettingsSerializableName ( ) const [protected, pure virtual]

Get the name of the the XML tag that implementations of this class will use to save the serialized graphics settings.

Returns:
A string containing name of the serialized graphics settings.

Implemented in Mezzanine::ActorBase, Mezzanine::ActorRigid, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

bool Mezzanine::WorldObject::IsInWorld ( ) const [virtual]

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

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

Definition at line 127 of file worldobject.cpp.

bool Mezzanine::WorldObject::IsStaticOrKinematic ( ) const [virtual]

Checks of the World Object is static or kinematic.

Checks of the World Object is static or kinematic, returns true if it is either.

Returns:
Returns true if the World Object is static or kinematic.

Definition at line 122 of file worldobject.cpp.

virtual String Mezzanine::WorldObject::PhysicsSettingsSerializableName ( ) const [protected, pure virtual]

Get the name of the the XML tag that implementations of this class will use to save the serialized s settings.

Returns:
A string containing name of the serialized graphics settings.

Implemented in Mezzanine::ActorBase, Mezzanine::ActorRigid, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

void Mezzanine::WorldObject::ProtoDeSerialize ( const xml::Node OneNode) [protected, virtual]

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

Parameters:
OneNodeand xml::Node containing the data.
Warning:
A precondition of using this is that all of the actors intended for use must already be Deserialized.

Reimplemented in Mezzanine::ActorBase, Mezzanine::ActorRigid, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 235 of file worldobject.cpp.

void Mezzanine::WorldObject::ProtoSerialize ( xml::Node CurrentRoot) const [protected, virtual]

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

Parameters:
CurrentRootThe point in the XML hierarchy that all this vectorw should be appended to.

Reimplemented in Mezzanine::ActorBase, Mezzanine::ActorRigid, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 201 of file worldobject.cpp.

String Mezzanine::WorldObject::SerializableName ( ) [static]

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

Returns:
A string containing "Point2PointConstraint"

Reimplemented in Mezzanine::ActorBase, Mezzanine::ActorRigid, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 284 of file worldobject.cpp.

void Mezzanine::WorldObject::SetLocation ( const Vector3 Location) [virtual]

Manually sets the location of the World Object.

Calling this function prior to adding it to the World will have no effect.
In most situations you won't want to use this function, and instead produce movement through physics functions.

Parameters:
LocationThe Vector3 representing the location.

Reimplemented in Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 98 of file worldobject.cpp.

void Mezzanine::WorldObject::SetLocation ( const Real x,
const Real y,
const Real z 
) [virtual]

Manually sets the location of the World Object.

Calling this function prior to adding it to the World will have no effect.
In most situations you won't want to use this function, and instead produce movement through physics functions.

Parameters:
xLocation on the X vector.
yLocation on the Y vector.
zLocation on the Z vector.

Definition at line 92 of file worldobject.cpp.

void Mezzanine::WorldObject::SetScaling ( const Vector3 Scale) [virtual]

Sets the scale of the World Object.

This function will alter the scaling/size of the World Object with the given vector3.

Parameters:
ScaleThe vector3 by which to apply the scale. Will scale each axis' accordingly.

Reimplemented in Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 132 of file worldobject.cpp.

void Mezzanine::WorldObject::SetSounds ( Audio::SoundSet Sounds) [virtual]

Sets the sounds to be used by this object.

Parameters:
SoundsThe soundset to be assigned to this object.

Definition at line 154 of file worldobject.cpp.

void Mezzanine::WorldObject::ThrowSerialError ( const String Fail) const [protected, virtual]

A Helper function that assembles strings and throws an exception.

Parameters:
FailThe item that failed.

Reimplemented in Mezzanine::ActorBase, Mezzanine::ActorRigid, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.

Definition at line 198 of file worldobject.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines