40 #ifndef _worldobject_cpp
41 #define _worldobject_cpp
43 #include "worldobject.h"
48 #include "Physics/collision.h"
118 if( !PropertiesNode.
Empty() ) {
121 if( !CurrAttrib.
Empty() )
125 if( !PositionNode.
Empty() ) {
131 if( !OrientationNode.
Empty() ) {
137 if( !ScaleNode.
Empty() ) {
153 {
return "WorldObject"; }
160 if(Physics::Col_Begin == State) {
162 }
else if(Physics::Col_End == State) {
163 std::set<Physics::Collision*>::iterator ColIt = this->
CurrentCollisions.find(Col);
virtual void _NotifyCollisionState(Physics::Collision *Col, const Physics::CollisionState State)
Notifies this World Object of a collision that is occuring with it.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
A light-weight handle for manipulating attributes in DOM tree.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
Thrown when the requested identity could not be found.
Node GetFirstChild() const
Get the first child Node of this Node.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
CollisionContainer CurrentCollisions
This member stores all existing collision events referencing this object.
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
World * ParentWorld
This is the world this object belongs to and will be inserted in/removed from.
bool Empty() const
Is this storing anything at all?
virtual const String & GetName() const
Gets the name of this object.
This implements the exception hiearchy for Mezzanine.
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...
The interface for serialization.
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
bool SetValue(const Char8 *rhs)
Set the value of this.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this WorldObject.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
A light-weight handle for manipulating nodes in DOM tree.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
This is an event class used to track collsions in the physics world.
bool Empty() const
Is this storing anything at all?
virtual void ProtoSerializeProxies(XML::Node &SelfRoot) const =0
Convert the proxies of this class to an XML::Node ready for serialization.
WorldObject(World *TheWorld)
Blank constructor.
CollisionState
Enum specifying the state change occuring in the collision.
virtual ~WorldObject()
Class destructor.
virtual World * GetWorld() const
Gets the world this object currently belongs to.
This is used to represent a point in space, or a vector through space.
The bulk of the engine components go in this namspace.
This class represents a world for objects to interact within.
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
void ProtoSerialize(XML::Node &CurrentRoot) const
Convert this class to an XML::Node ready for serialization.
This is used to store information about rotation in 3d space.
String ObjectName
The name of the object.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
std::string String
A datatype used to a series of characters.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
void ProtoSerialize(XML::Node &CurrentRoot) const
Convert this class to an XML::Node ready for serialization.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.