This is the base class from which classes that are insertable into the physical world. More...
#include <worldobject.h>
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 ConstString & | GetName () 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::SoundSet * | GetSounds () 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. | |
| WorldObjectGraphicsSettings * | GraphicsSettings |
| This class encapsulates graphics specific configuration for this actor. | |
| String | Name |
| The name of the terrain. | |
| Audio::SoundSet * | ObjectSounds |
| This is a collection of sounds for use with this actor. | |
| btCollisionObject * | PhysicsObject |
| This class encapsulates the functionality of the btCollisionObject using this. | |
| WorldObjectPhysicsSettings * | PhysicsSettings |
| 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 |
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.
| btCollisionObject * Mezzanine::WorldObject::_GetBasePhysicsObject | ( | ) | const [virtual] |
Gets the internal physics object this World Object is based on.
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.
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.
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.
| Col | A pointer to the collision pertaining to this World Object. |
| State | The 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.
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.
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.
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.
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.
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.
Definition at line 159 of file worldobject.cpp.
| virtual WorldAndSceneObjectType Mezzanine::WorldObject::GetType | ( | ) | const [pure virtual] |
Gets 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.
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.
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.
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.
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.
| OneNode | and xml::Node containing the data. |
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.
| CurrentRoot | The 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.
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.
| Location | The 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.
| x | Location on the X vector. |
| y | Location on the Y vector. |
| z | Location 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.
| Scale | The 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.
| Sounds | The 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.
| Fail | The item that failed. |
Reimplemented in Mezzanine::ActorBase, Mezzanine::ActorRigid, Mezzanine::AreaEffect, and Mezzanine::NonStaticWorldObject.
Definition at line 198 of file worldobject.cpp.
1.7.3