40 #ifndef _softdebris_cpp
41 #define _softdebris_cpp
48 #include "Graphics/scenemanager.h"
51 #include "Physics/physicsmanager.h"
52 #include "Physics/softproxy.h"
57 #include "stringtool.h"
125 {
return Mezzanine::WO_DebrisSoft; }
144 Proxies.push_back( this->
EntProx );
145 Proxies.push_back( this->
SofProx );
150 if( Types & Mezzanine::PT_Graphics_EntityProxy ) {
151 Proxies.push_back( this->
EntProx );
153 if( Types & Mezzanine::PT_Physics_SoftProxy ) {
154 Proxies.push_back( this->
SofProx );
326 if( !ProxiesNode.
Empty() ) {
333 if( !EntProxNode.
Empty() ) {
342 if( !SofProxNode.
Empty() ) {
361 {
return "SoftDebris"; }
373 if( ToBeDestroyed == NULL )
376 if( this->
EntProx == ToBeDestroyed ) {
380 if( this->
SofProx == ToBeDestroyed ) {
398 {
return new SoftDebris(Name,Mass,TheWorld); }
406 NameValuePairMap::const_iterator ParamIt = Params.find(
"Mass" );
407 if( ParamIt != Params.end() )
417 {
delete ToBeDestroyed; }
virtual void _Update()
Utility function for altering or checking the World Object every frame.
virtual void Yaw(const Real Angle)
Rotate the object around the Y axis.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
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 DestroyDebris(Debris *ToBeDestroyed)
Destroys a Debris created by this factory.
bool Boole
Generally acts a single bit, true or false.
Graphics::EntityProxy * EntProx
A pointer to the graphics representation of this debris.
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 Roll(const Real Angle)
Rotate the object around the Z axis.
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.
virtual Vector3 GetScale() const
Gets the scaling currently being applied to this object.
Node GetFirstChild() const
Get the first child Node of this Node.
virtual Graphics::EntityProxy * GetEntityProxy() const
Gets a pointer to the graphics portion of this debris.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
virtual Quaternion GetOrientation() const
Gets this objects current orientation.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
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 void RemoveFromWorld()
Removes the object from the World.
virtual Boole IsKinematic() const
Is the object kinematic.
virtual void DestroySoftDebris()
Destruction method for RigidDebris.
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
virtual Quaternion GetOrientation() const
Gets this objects current orientation.
This is the proxy class for placing and manipulating a mesh in the scene.
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
virtual void Rotate(const Vector3 &Axis, const Real Angle)
Rotates the object from it's existing rotation.
virtual ~SoftDebrisFactory()
Class destructor.
bool Empty() const
Is this storing anything at all?
This implements the exception hiearchy for Mezzanine.
virtual ~SoftDebris()
Class destructor.
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 String GetDerivedSerializableName() const
Gets the most derived serializable name of this WorldObject.
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
virtual void SetOrientation(const Quaternion &Ori)
Sets the orientation of this object in parent space.
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
virtual void Yaw(const Real Angle)
Rotate the object around the Y axis.
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.
bool SetValue(const Char8 *rhs)
Set the value of this.
virtual void CreateSoftDebris(const Real Mass)
Common construction method for SoftDebris.
virtual void ProtoDeSerializeProxies(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the proxies of this object with it...
Physics::SoftProxy * SofProx
A pointer to the physics representation of this debris.
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be 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 Boole IsKinematic() const
Checks of the object is kinematic.
A light-weight handle for manipulating nodes in DOM tree.
This is the proxy object for soft/compressable bodies.
A simple world object without a large structure ideal for representing loose small objects...
SoftProxy * CreateSoftProxy(const Real Mass)
Creates a new SoftProxy.
virtual Boole IsInWorld() const
Gets whether or not this object is currently in the world.
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 Debris * CreateDebris(const String &Name, World *TheWorld, const NameValuePairMap &Params)
Creates a Debris of the type represented by this factory.
void _Bind(WorldObject *NewParent)
Binds this proxy to a WorldObject.
SoftDebrisFactory()
Class constructor.
virtual void Pitch(const Real Angle)
Rotate the object around the X axis.
virtual void Roll(const Real Angle)
Rotate the object around the Z axis.
virtual void ProtoSerializeProxies(XML::Node &SelfRoot) const
Convert the proxies of 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...
This is simply a place for storing all the Physics Related functions.
virtual Vector3 GetScale() const
Gets the scaling currently being applied to this object.
virtual void Rotate(const Vector3 &Axis, const Real Angle)
Rotates the object from it's existing rotation.
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 _NotifyProxyDestroyed(WorldProxy *ToBeDestroyed)
Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to upda...
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 SoftDebris * CreateSoftDebris(const String &Name, const Real Mass, World *TheWorld)
Creates a SoftDebris object.
virtual void Scale(const Vector3 &Scale)
Scales the object from it's current size.
The bulk of the engine components go in this namspace.
SoftDebris(World *TheWorld)
Blank constructor.
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be applied to this object.
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
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 Vector3 GetLocation() const
Gets this objects current location.
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
virtual Physics::SoftProxy * GetSoftProxy() const
Gets a pointer to the physics portion of this debris.
virtual void GetProxies(ProxyContainer &Proxies)
Populates a container with all of the WorldProxies being used by this WorldObject.
virtual Vector3 GetLocation() const
Gets this objects current location.
virtual String GetTypeName() const
Gets the name of the Debris that is created by this factory.
virtual void AddToWorld()
Adds the object to the World.
This is used to store information about rotation in 3d space.
virtual Boole IsStatic() const
Checks of the object is static.
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.
virtual WorldObjectType GetType() const
Gets the type of the object instance.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
std::map< String, String > NameValuePairMap
This is a datatype mostly used for describing settings or parameters that can't be declared in advanc...
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 Pitch(const Real Angle)
Rotate the object around the X axis.
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.
virtual void Scale(const Vector3 &Scale)
Scales the object from it's current size.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
This file contains the declaration for the debris class that will compress and deform.