Spinning Topp Logo BlackTopp Studios
inc
softdebris.cpp
Go to the documentation of this file.
1 // © Copyright 2010 - 2016 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 #ifndef _softdebris_cpp
41 #define _softdebris_cpp
42 
43 /// @file
44 /// @brief This file contains the implementation for the debris class that will compress and deform.
45 
46 #include "softdebris.h"
47 
48 #include "Graphics/scenemanager.h"
49 #include "Graphics/entityproxy.h"
50 
51 #include "Physics/physicsmanager.h"
52 #include "Physics/softproxy.h"
53 
54 #include "entresol.h"
55 #include "world.h"
56 #include "exception.h"
57 #include "stringtool.h"
58 #include "serialization.h"
59 
60 namespace Mezzanine
61 {
62  ///////////////////////////////////////////////////////////////////////////////
63  // RigidDebris Methods
64 
66  Debris(TheWorld),
67  EntProx(NULL),
68  SofProx(NULL)
69  { }
70 
71  SoftDebris::SoftDebris(const String& Name, const Real Mass, World* TheWorld) :
72  Debris(Name,TheWorld),
73  EntProx(NULL),
74  SofProx(NULL)
75  { this->CreateSoftDebris(Mass); }
76 
77  SoftDebris::SoftDebris(const XML::Node& SelfRoot, World* TheWorld) :
78  Debris(TheWorld),
79  EntProx(NULL),
80  SofProx(NULL)
81  { this->ProtoDeSerialize(SelfRoot); }
82 
84  { this->DestroySoftDebris(); }
85 
87  {
88  Graphics::SceneManager* SceneMan = static_cast<Graphics::SceneManager*>( this->ParentWorld->GetManager(ManagerBase::MT_SceneManager) );
89  if( SceneMan ) {
90  this->EntProx = SceneMan->CreateEntityProxy(false);
91  this->EntProx->_Bind( this );
92  }
93 
94  Physics::PhysicsManager* PhysMan = static_cast<Physics::PhysicsManager*>( this->ParentWorld->GetManager(ManagerBase::MT_PhysicsManager) );
95  if( PhysMan ) {
96  this->SofProx = PhysMan->CreateSoftProxy(Mass);
97  this->SofProx->_Bind( this );
98  }
99  }
100 
102  {
103  this->RemoveFromWorld();
104  if( this->EntProx ) {
105  Graphics::SceneManager* SceneMan = static_cast<Graphics::SceneManager*>( this->ParentWorld->GetManager(ManagerBase::MT_SceneManager) );
106  if( SceneMan ) {
107  SceneMan->DestroyProxy( this->EntProx );
108  this->EntProx = NULL;
109  }
110  }
111 
112  if( this->SofProx ) {
113  Physics::PhysicsManager* PhysMan = static_cast<Physics::PhysicsManager*>( this->ParentWorld->GetManager(ManagerBase::MT_PhysicsManager) );
114  if( PhysMan ) {
115  PhysMan->DestroyProxy( this->SofProx );
116  this->SofProx = NULL;
117  }
118  }
119  }
120 
121  ///////////////////////////////////////////////////////////////////////////////
122  // Utility and Configuration
123 
125  { return Mezzanine::WO_DebrisSoft; }
126 
128  { return this->EntProx; }
129 
131  { return this->SofProx; }
132 
134  { return this->SofProx->IsInWorld(); }
135 
137  { return this->SofProx->IsStatic(); }
138 
140  { return this->SofProx->IsKinematic(); }
141 
143  {
144  Proxies.push_back( this->EntProx );
145  Proxies.push_back( this->SofProx );
146  }
147 
148  void SoftDebris::GetProxies(const UInt32 Types, ProxyContainer& Proxies)
149  {
150  if( Types & Mezzanine::PT_Graphics_EntityProxy ) {
151  Proxies.push_back( this->EntProx );
152  }
153  if( Types & Mezzanine::PT_Physics_SoftProxy ) {
154  Proxies.push_back( this->SofProx );
155  }
156  }
157 
158  ///////////////////////////////////////////////////////////////////////////////
159  // Working with the World
160 
162  {
163  if( this->EntProx )
164  this->EntProx->AddToWorld();
165 
166  if( this->SofProx )
167  this->SofProx->AddToWorld();
168  }
169 
171  {
172  if( this->EntProx )
173  this->EntProx->RemoveFromWorld();
174 
175  if( this->SofProx )
176  this->SofProx->RemoveFromWorld();
177  }
178 
179  ///////////////////////////////////////////////////////////////////////////////
180  // Transform Methods
181 
183  {
184  this->SofProx->SetLocation(Loc);
185  this->EntProx->SetLocation(Loc);
186  }
187 
188  void SoftDebris::SetLocation(const Real X, const Real Y, const Real Z)
189  {
190  this->SofProx->SetLocation(X,Y,Z);
191  this->EntProx->SetLocation(X,Y,Z);
192  }
193 
195  {
196  return this->SofProx->GetLocation();
197  }
198 
200  {
201  this->SofProx->SetOrientation(Ori);
202  this->EntProx->SetOrientation(Ori);
203  }
204 
205  void SoftDebris::SetOrientation(const Real X, const Real Y, const Real Z, const Real W)
206  {
207  this->SofProx->SetOrientation(X,Y,Z,W);
208  this->EntProx->SetOrientation(X,Y,Z,W);
209  }
210 
212  {
213  return this->SofProx->GetOrientation();
214  }
215 
217  {
218  this->SofProx->SetScale(Sc);
219  this->EntProx->SetScale(Sc);
220  }
221 
222  void SoftDebris::SetScale(const Real X, const Real Y, const Real Z)
223  {
224  this->SofProx->SetScale(X,Y,Z);
225  this->EntProx->SetScale(X,Y,Z);
226  }
227 
229  {
230  return this->SofProx->GetScale();
231  }
232 
233  void SoftDebris::Translate(const Vector3& Trans)
234  {
235  this->SofProx->Translate(Trans);
236  this->EntProx->Translate(Trans);
237  }
238 
239  void SoftDebris::Translate(const Real X, const Real Y, const Real Z)
240  {
241  this->SofProx->Translate(X,Y,Z);
242  this->EntProx->Translate(X,Y,Z);
243  }
244 
245  void SoftDebris::Yaw(const Real Angle)
246  {
247  this->SofProx->Yaw(Angle);
248  this->EntProx->Yaw(Angle);
249  }
250 
251  void SoftDebris::Pitch(const Real Angle)
252  {
253  this->SofProx->Pitch(Angle);
254  this->EntProx->Pitch(Angle);
255  }
256 
257  void SoftDebris::Roll(const Real Angle)
258  {
259  this->SofProx->Roll(Angle);
260  this->EntProx->Roll(Angle);
261  }
262 
263  void SoftDebris::Rotate(const Vector3& Axis, const Real Angle)
264  {
265  this->SofProx->Rotate(Axis,Angle);
266  this->EntProx->Rotate(Axis,Angle);
267  }
268 
269  void SoftDebris::Rotate(const Quaternion& Rotation)
270  {
271  this->SofProx->Rotate(Rotation);
272  this->EntProx->Rotate(Rotation);
273  }
274 
275  void SoftDebris::Scale(const Vector3& Scale)
276  {
277  this->SofProx->Scale(Scale);
278  this->EntProx->Scale(Scale);
279  }
280 
281  void SoftDebris::Scale(const Real X, const Real Y, const Real Z)
282  {
283  this->SofProx->Scale(X,Y,Z);
284  this->EntProx->Scale(X,Y,Z);
285  }
286 
287 
288  ///////////////////////////////////////////////////////////////////////////////
289  // Serialization
290 
292  {
293  this->Debris::ProtoSerializeProperties(SelfRoot);
294  }
295 
297  {
298  // No base implementations to call
299  XML::Node ProxiesNode = SelfRoot.AppendChild( SoftDebris::GetSerializableName() + "Proxies" );
300 
301  if( ProxiesNode.AppendAttribute("Version").SetValue("1") )
302  {
303  XML::Node EntProxNode = ProxiesNode.AppendChild("EntProx");
304  this->EntProx->ProtoSerialize( EntProxNode );
305  XML::Node SofProxNode = ProxiesNode.AppendChild("SofProx");
306  this->SofProx->ProtoSerialize( SofProxNode );
307 
308  return;
309  }else{
310  SerializeError("Create XML Attribute Values",SoftDebris::GetSerializableName() + "Proxies",true);
311  }
312  }
313 
315  {
316  this->Debris::ProtoDeSerializeProperties(SelfRoot);
317  }
318 
320  {
321  this->DestroySoftDebris();
322  // No base implementations to call
323  //XML::Attribute CurrAttrib;
324  XML::Node ProxiesNode = SelfRoot.GetChild( SoftDebris::GetSerializableName() + "Proxies" );
325 
326  if( !ProxiesNode.Empty() ) {
327  if(ProxiesNode.GetAttribute("Version").AsInt() == 1) {
328  /// @todo I don't think an exception is appropriate for the failure of the worldmanager validity checks,
329  /// however a warning should be written to the log if that happens. This should be updated to do that once
330  /// logging refactors are done.
331 
332  XML::Node EntProxNode = ProxiesNode.GetChild("EntProx").GetFirstChild();
333  if( !EntProxNode.Empty() ) {
334  Graphics::SceneManager* SceneMan = static_cast<Graphics::SceneManager*>( this->ParentWorld->GetManager(ManagerBase::MT_SceneManager) );
335  if( SceneMan ) {
336  this->EntProx = SceneMan->CreateEntityProxy( EntProxNode );
337  this->EntProx->_Bind( this );
338  }
339  }
340 
341  XML::Node SofProxNode = ProxiesNode.GetChild("SofProx").GetFirstChild();
342  if( !SofProxNode.Empty() ) {
343  Physics::PhysicsManager* PhysMan = static_cast<Physics::PhysicsManager*>( this->ParentWorld->GetManager(ManagerBase::MT_PhysicsManager) );
344  if( PhysMan ) {
345  this->SofProx = PhysMan->CreateSoftProxy(SofProxNode);
346  this->SofProx->_Bind( this );
347  }
348  }
349  }else{
350  MEZZ_EXCEPTION(ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML Version for " + (SoftDebris::GetSerializableName() + "Proxies" ) + ": Not Version 1.");
351  }
352  }else{
353  MEZZ_EXCEPTION(ExceptionBase::II_IDENTITY_NOT_FOUND_EXCEPTION,SoftDebris::GetSerializableName() + "Proxies" + " was not found in the provided XML node, which was expected.");
354  }
355  }
356 
358  { return SoftDebris::GetSerializableName(); }
359 
361  { return "SoftDebris"; }
362 
363  ///////////////////////////////////////////////////////////////////////////////
364  // Internal Methods
365 
367  {
368  // Do nothing
369  }
370 
372  {
373  if( ToBeDestroyed == NULL )
374  return;
375 
376  if( this->EntProx == ToBeDestroyed ) {
377  this->EntProx = NULL;
378  }
379 
380  if( this->SofProx == ToBeDestroyed ) {
381  this->SofProx = NULL;
382  }
383  }
384 
385  ///////////////////////////////////////////////////////////////////////////////
386  // RigidDebrisFactory Methods
387 
389  { }
390 
392  { }
393 
395  { return SoftDebris::GetSerializableName(); }
396 
397  SoftDebris* SoftDebrisFactory::CreateSoftDebris(const String& Name, const Real Mass, World* TheWorld)
398  { return new SoftDebris(Name,Mass,TheWorld); }
399 
401  { return static_cast<SoftDebris*>( this->CreateDebris(XMLNode,TheWorld) ); }
402 
403  Debris* SoftDebrisFactory::CreateDebris(const String& Name, World* TheWorld, const NameValuePairMap& Params)
404  {
405  Real Mass = 0;
406  NameValuePairMap::const_iterator ParamIt = Params.find( "Mass" );
407  if( ParamIt != Params.end() )
408  Mass = StringTools::ConvertToReal( (*ParamIt).second );
409 
410  return new SoftDebris(Name,Mass,TheWorld);
411  }
412 
414  { return new SoftDebris(XMLNode,TheWorld); }
415 
417  { delete ToBeDestroyed; }
418 }//Mezzanine
419 
420 #endif
virtual void _Update()
Utility function for altering or checking the World Object every frame.
Definition: softdebris.cpp:366
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.
Definition: world.cpp:324
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.
Definition: softdebris.cpp:416
bool Boole
Generally acts a single bit, true or false.
Definition: datatypes.h:173
Graphics::EntityProxy * EntProx
A pointer to the graphics representation of this debris.
Definition: softdebris.h:67
This class contains utilities and functions to allow the manipulation of the Graphical scene...
Definition: scenemanager.h:85
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.
A deformable debris.
Definition: softdebris.h:62
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.
Definition: exception.h:94
virtual Vector3 GetScale() const
Gets the scaling currently being applied to this object.
Definition: softdebris.cpp:228
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.
Definition: softdebris.cpp:127
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
Definition: exception.h:3048
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.
Definition: softdebris.cpp:211
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
Definition: exception.h:112
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
Definition: softdebris.cpp:291
World * ParentWorld
This is the world this object belongs to and will be inserted in/removed from.
Definition: worldobject.h:84
virtual void Translate(const Vector3 &Trans)
Moves this object from it's current location.
Definition: softdebris.cpp:233
virtual void RemoveFromWorld()
Removes the object from the World.
Definition: softdebris.cpp:170
virtual Boole IsKinematic() const
Is the object kinematic.
virtual void DestroySoftDebris()
Destruction method for RigidDebris.
Definition: softdebris.cpp:101
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
Definition: softproxy.cpp:195
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
virtual Quaternion GetOrientation() const
Gets this objects current orientation.
Definition: softproxy.cpp:222
This is the proxy class for placing and manipulating a mesh in the scene.
Definition: entityproxy.h:62
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
Definition: softproxy.cpp:177
virtual void Rotate(const Vector3 &Axis, const Real Angle)
Rotates the object from it's existing rotation.
virtual ~SoftDebrisFactory()
Class destructor.
Definition: softdebris.cpp:391
bool Empty() const
Is this storing anything at all?
This implements the exception hiearchy for Mezzanine.
virtual ~SoftDebris()
Class destructor.
Definition: softdebris.cpp:83
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.
Definition: debris.cpp:70
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this WorldObject.
Definition: softdebris.cpp:357
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
Definition: worldproxy.cpp:84
virtual void SetOrientation(const Quaternion &Ori)
Sets the orientation of this object in parent space.
Definition: softproxy.cpp:212
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
Definition: softproxy.cpp:245
virtual void Yaw(const Real Angle)
Rotate the object around the Y axis.
Definition: softdebris.cpp:245
float Real
A Datatype used to represent a real floating point number.
Definition: datatypes.h:141
The interface for serialization.
std::vector< WorldProxy * > ProxyContainer
Basic container type for WorldProxy storage by this class.
Definition: worldobject.h:64
bool SetValue(const Char8 *rhs)
Set the value of this.
virtual void CreateSoftDebris(const Real Mass)
Common construction method for SoftDebris.
Definition: softdebris.cpp:86
virtual void ProtoDeSerializeProxies(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the proxies of this object with it...
Definition: softdebris.cpp:319
Physics::SoftProxy * SofProx
A pointer to the physics representation of this debris.
Definition: softdebris.h:70
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
Definition: softdebris.cpp:182
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be applied to this object.
Definition: softproxy.cpp:227
virtual void SetOrientation(const Quaternion &Ori)
Sets the orientation of this object in parent space.
Definition: softdebris.cpp:199
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.
Definition: softdebris.cpp:139
A light-weight handle for manipulating nodes in DOM tree.
Definition: node.h:89
This is the proxy object for soft/compressable bodies.
Definition: softproxy.h:55
A simple world object without a large structure ideal for representing loose small objects...
Definition: debris.h:54
SoftProxy * CreateSoftProxy(const Real Mass)
Creates a new SoftProxy.
virtual Boole IsInWorld() const
Gets whether or not this object is currently in the world.
Definition: softdebris.cpp:133
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.
Definition: worldproxy.h:53
uint32_t UInt32
An 32-bit unsigned integer.
Definition: datatypes.h:126
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.
Definition: softdebris.cpp:403
void _Bind(WorldObject *NewParent)
Binds this proxy to a WorldObject.
Definition: worldproxy.cpp:174
SoftDebrisFactory()
Class constructor.
Definition: softdebris.cpp:388
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.
Definition: softdebris.cpp:257
virtual void ProtoSerializeProxies(XML::Node &SelfRoot) const
Convert the proxies of this class to an XML::Node ready for serialization.
Definition: softdebris.cpp:296
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
Definition: softproxy.cpp:170
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.
Definition: softproxy.cpp:237
virtual void Rotate(const Vector3 &Axis, const Real Angle)
Rotates the object from it's existing rotation.
Definition: softdebris.cpp:263
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
Definition: softdebris.cpp:314
virtual void _NotifyProxyDestroyed(WorldProxy *ToBeDestroyed)
Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to upda...
Definition: softdebris.cpp:371
This is used to represent a point in space, or a vector through space.
Definition: vector3.h:77
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.
Definition: enumerations.h:147
virtual SoftDebris * CreateSoftDebris(const String &Name, const Real Mass, World *TheWorld)
Creates a SoftDebris object.
Definition: softdebris.cpp:397
virtual void Scale(const Vector3 &Scale)
Scales the object from it's current size.
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
SoftDebris(World *TheWorld)
Blank constructor.
Definition: softdebris.cpp:65
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be applied to this object.
Definition: softdebris.cpp:216
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
Definition: softdebris.cpp:360
void DestroyProxy(CollidableProxy *ToBeDestroyed)
Deletes a CollidableProxy.
void DestroyProxy(RenderableProxy *ToBeDestroyed)
Deletes a RenderableProxy.
This class represents a world for objects to interact within.
Definition: world.h:74
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.
Definition: softproxy.cpp:205
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.
Definition: softdebris.cpp:130
virtual void GetProxies(ProxyContainer &Proxies)
Populates a container with all of the WorldProxies being used by this WorldObject.
Definition: softdebris.cpp:142
virtual Vector3 GetLocation() const
Gets this objects current location.
Definition: softdebris.cpp:194
virtual String GetTypeName() const
Gets the name of the Debris that is created by this factory.
Definition: softdebris.cpp:394
virtual void AddToWorld()
Adds the object to the World.
Definition: softdebris.cpp:161
This is used to store information about rotation in 3d space.
Definition: quaternion.h:68
virtual Boole IsStatic() const
Checks of the object is static.
Definition: softdebris.cpp:136
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.
Definition: softdebris.cpp:124
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...
Definition: datatypes.h:209
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
Definition: debris.cpp:75
virtual void Pitch(const Real Angle)
Rotate the object around the X axis.
Definition: softdebris.cpp:251
std::string String
A datatype used to a series of characters.
Definition: datatypes.h:159
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
Real ConvertToReal(const String &ToConvert)
Converts a string into a Real.
Definition: stringtool.cpp:392
virtual void Scale(const Vector3 &Scale)
Scales the object from it's current size.
Definition: softdebris.cpp:275
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.