40 #ifndef _rigiddebris_cpp
41 #define _rigiddebris_cpp
48 #include "Graphics/scenemanager.h"
51 #include "Physics/physicsmanager.h"
52 #include "Physics/rigidproxy.h"
57 #include "stringtool.h"
154 {
return Mezzanine::WO_DebrisRigid; }
173 Proxies.push_back( this->
EntProx );
174 Proxies.push_back( this->
RigProx );
179 if( Types & Mezzanine::PT_Graphics_EntityProxy ) {
180 Proxies.push_back( this->
EntProx );
182 if( Types & Mezzanine::PT_Physics_RigidProxy ) {
183 Proxies.push_back( this->
RigProx );
354 if( !ProxiesNode.
Empty() ) {
361 if( !EntProxNode.
Empty() ) {
370 if( !RigProxNode.
Empty() ) {
393 {
return "RigidDebris"; }
405 if( ToBeDestroyed == NULL )
408 if( this->
EntProx == ToBeDestroyed ) {
416 if( this->
RigProx == ToBeDestroyed ) {
437 {
return new RigidDebris(Name,Mass,DebMesh,DebShape,TheWorld); }
445 NameValuePairMap::const_iterator ParamIt = Params.find(
"Mass" );
446 if( ParamIt != Params.end() )
456 {
delete ToBeDestroyed; }
RigidDebris(World *TheWorld)
Blank constructor.
This is the base class for all collision shapes.
virtual Boole IsInWorld() const
Gets whether or not this object is currently in the world.
virtual void Yaw(const Real Angle)
Rotate the object around the Y axis.
virtual RigidDebris * CreateRigidDebris(const String &Name, const Real Mass, World *TheWorld)
Creates a RigidDebris object.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
virtual void ProtoSerializeProxies(XML::Node &SelfRoot) const
Convert the proxies of this class to an XML::Node ready for serialization.
WorldManager * GetManager(const Whole ManagerToGet)
This is will find the manager of a given type.
virtual void Pitch(const Real Angle)
Rotate the object around the X axis.
virtual void Scale(const Vector3 &Scale)
Scales the object from it's current size.
virtual void ProtoDeSerializeProxies(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the proxies of this object with it...
virtual Quaternion GetOrientation() const
Gets this objects current orientation.
bool Boole
Generally acts a single bit, true or false.
This class contains utilities and functions to allow the manipulation of the Graphical scene...
virtual void Rotate(const Vector3 &Axis, const Real Angle)
Rotates the object from it's existing rotation.
virtual void SetOrientation(const Quaternion &Ori)
Sets the orientation of this object in parent space.
virtual void DestroyDebris(Debris *ToBeDestroyed)
Destroys a Debris created by this factory.
virtual void Scale(const Vector3 &Scale)
Scales the object from it's current size.
virtual void Roll(const Real Angle)
Rotate the object around the Z axis.
virtual String GetTypeName() const
Gets the name of the Debris that is created by this factory.
virtual void Roll(const Real Angle)
Rotate the object around the Z axis.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
virtual Physics::RigidProxy * GetRigidProxy() const
Gets a pointer to the physics portion of this debris.
EntityProxy * CreateEntityProxy(const Boole AddToWorld)
Creates a new EntityProxy.
virtual void Translate(const Vector3 &Trans)
Moves this object from it's current location.
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.
This class is used to check and modify the properties of a graphics mesh.
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
virtual void Yaw(const Real Angle)
Rotate the object around the Y axis.
virtual Vector3 GetLocation() const
Gets this objects current location.
World * ParentWorld
This is the world this object belongs to and will be inserted in/removed from.
virtual void Translate(const Vector3 &Trans)
Moves this object from it's current location.
virtual Boole IsStatic() const
Checks of the object is static.
virtual Boole IsKinematic() const
Is the object kinematic.
virtual Debris * CreateDebris(const String &Name, World *TheWorld, const NameValuePairMap &Params)
Creates a Debris of the type represented by this factory.
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
This is the proxy class for placing and manipulating a mesh in the scene.
RigidDebrisFactory()
Class constructor.
virtual void SetOrientation(const Quaternion &Ori)
Sets the orientation of this object in parent space.
virtual void Rotate(const Vector3 &Axis, const Real Angle)
Rotates the object from it's existing rotation.
virtual void _Update()
Utility function for altering or checking the World Object every frame.
bool Empty() const
Is this storing anything at all?
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
This implements the exception hiearchy for Mezzanine.
virtual void Roll(const Real Angle)
Rotate the object around the Z axis.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
virtual void AddToWorld()
Adds the object to the World.
virtual Graphics::EntityProxy * GetEntityProxy() const
Gets a pointer to the graphics portion of this debris.
virtual void AddSyncObject(TransformableObject *ToBeAdded)
Adds a TransformableObject that will force it's transform to sync with this RigidProxy.
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
float Real
A Datatype used to represent a real floating point number.
The interface for serialization.
std::vector< WorldProxy * > ProxyContainer
Basic container type for WorldProxy storage by this class.
virtual Vector3 GetScale() const
Gets the scaling currently being applied to this object.
bool SetValue(const Char8 *rhs)
Set the value of this.
This file contains the declaration for the debris class that does not deform.
virtual Vector3 GetScale() const
Gets the scaling currently being applied to this object.
virtual void SetOrientation(const Quaternion &Ori)
Sets the orientation of this object in parent space.
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be applied to this object.
virtual Boole IsStatic() const
Is the object static.
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be applied to this object.
A light-weight handle for manipulating nodes in DOM tree.
virtual void _NotifyProxyDestroyed(WorldProxy *ToBeDestroyed)
Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to upda...
A simple world object without a large structure ideal for representing loose small objects...
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
This is the base class for proxy objects belonging to the various 3D subsystems.
uint32_t UInt32
An 32-bit unsigned integer.
This file contains the declaration for the World proxy wrapping basic entity(mesh) functionality...
virtual void DestroyRigidDebris()
Destruction method for RigidDebris.
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be applied to this object.
virtual void Pitch(const Real Angle)
Rotate the object around the X axis.
virtual Vector3 GetLocation() const
Gets this objects current location.
virtual void GetProxies(ProxyContainer &Proxies)
Populates a container with all of the WorldProxies being used by this WorldObject.
void _Bind(WorldObject *NewParent)
Binds this proxy to a WorldObject.
virtual Boole IsKinematic() const
Checks of the object is kinematic.
virtual void Rotate(const Vector3 &Axis, const Real Angle)
Rotates the object from it's existing rotation.
virtual void Pitch(const Real Angle)
Rotate the object around the X axis.
virtual void RemoveSyncObject(TransformableObject *ToBeRemoved)
Removes a proxy being sync'd, so it will no longer match it's transform with this RigidProxy...
virtual void CreateRigidDebris(const Real Mass)
Common construction method for RigidDebris.
virtual Quaternion GetOrientation() const
Gets this objects current orientation.
RigidProxy * CreateRigidProxy(const Real Mass)
Creates a new RigidProxy.
This is a proxy from which rigid body proxys are handled.
virtual ~RigidDebris()
Class destructor.
This is simply a place for storing all the Physics Related functions.
This is used to represent a point in space, or a vector through space.
virtual void Translate(const Vector3 &Trans)
Moves this object from it's current location.
WorldObjectType
Used by various classes to help identify what class an object is.
virtual void Scale(const Vector3 &Scale)
Scales the object from it's current size.
The bulk of the engine components go in this namspace.
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
void DestroyProxy(CollidableProxy *ToBeDestroyed)
Deletes a CollidableProxy.
void DestroyProxy(RenderableProxy *ToBeDestroyed)
Deletes a RenderableProxy.
This class represents a world for objects to interact within.
virtual Boole IsInWorld() const
Gets whether or not this object is inside of it's world.
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
Graphics::EntityProxy * EntProx
A pointer to the graphics representation of this debris.
virtual void RemoveFromWorld()
Removes the object from the World.
This is used to store information about rotation in 3d space.
virtual void Yaw(const Real Angle)
Rotate the object around the Y axis.
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.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this WorldObject.
std::map< String, String > NameValuePairMap
This is a datatype mostly used for describing settings or parameters that can't be declared in advanc...
virtual ~RigidDebrisFactory()
Class destructor.
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
std::string String
A datatype used to a series of characters.
virtual WorldObjectType GetType() const
Gets the type of the object instance.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
Physics::RigidProxy * RigProx
A pointer to the physics representation of this debris.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.