40 #ifndef _softproxy_cpp
41 #define _softproxy_cpp
43 #include "Physics/softproxy.h"
44 #include "Physics/physicsmanager.h"
48 #include "stringtool.h"
52 #include <btBulletDynamicsCommon.h>
53 #include <BulletSoftBody/btSoftRigidDynamicsWorld.h>
167 return Mezzanine::PT_Physics_SoftProxy;
268 Boole WasInWorld =
false;
270 if( !InWorldAttrib.
Empty() ) {
296 {
return "SoftProxy"; }
virtual Mezzanine::ProxyType GetProxyType() const
Accessor for the type of proxy.
This is the base class for all collision shapes.
virtual void ProtoDeSeriailzeNodes(XML::Node &SelfRoot) const
Take the data stored in an XML Node and overwrite the nodes (and their specific properties) of this o...
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 ProtoDeSerializeShape(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the shape 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...
bool Boole
Generally acts a single bit, true or false.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
virtual btCollisionObject * _GetBasePhysicsObject() const
Accessor for the internal physics object.
PhysicsManager * Manager
This is a pointer to the physics manager that created and owns this proxy.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
Thrown when we just have not coded a thing yet, but we knew what the API should look like...
virtual void ProtoSeriailzeNodes(XML::Node &SelfRoot) const
Convert the nodes (and their specific properties) of this class to an XML::Node ready for serializati...
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this WorldProxy.
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
virtual void CreateSoftObject(const Real Mass)
Used to create the physics representation of the soft body.
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
virtual Quaternion GetOrientation() const
Gets this objects current orientation.
Any global enumerations shared between multiple classes is to be declared here.
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
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.
float Real
A Datatype used to represent a real floating point number.
The interface for serialization.
bool SetValue(const Char8 *rhs)
Set the value of this.
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be applied to this object.
Int16 CollisionGroup
The classifications pertaining to this object in regards to collisions.
A light-weight handle for manipulating nodes in DOM tree.
ProxyType
Used by all World proxies to describe what their derived types are.
uint32_t UInt32
An 32-bit unsigned integer.
SoftProxy(const UInt32 ID, const Real Mass, PhysicsManager *Creator)
Class constructor.
virtual void ProtoSerializeShape(XML::Node &SelfRoot) const
Convert the shape of this class to an XML::Node ready for serialization.
bool Empty() const
Is this storing anything at all?
btSoftBody * PhysicsSoftBody
SoftBody proxy used by the internal physics.
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
virtual ~SoftProxy()
Class destructor.
btSoftRigidDynamicsWorld * _GetPhysicsWorldPointer()
This returns a pointer to the bullet physics world. This is for internal use only.
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
This is a proxy from which physics objects that can collide with each other are handled.
virtual btSoftBody * _GetPhysicsObject() const
Accessor for the internal soft body physics proxy.
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.
This is used to represent a point in space, or a vector through space.
virtual void SetCollisionShape(CollisionShape *Shape)
Sets the collision shape to be used.
The bulk of the engine components go in this namspace.
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.
Int16 CollisionMask
Stores the kind of World Objects that can collide with each other.
This is used to store information about rotation in 3d space.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
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.