Spinning Topp Logo BlackTopp Studios
inc
rigiddebris.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 _rigiddebris_cpp
41 #define _rigiddebris_cpp
42 
43 /// @file
44 /// @brief This file contains the implementation for the debris class that does not deform.
45 
46 #include "rigiddebris.h"
47 
48 #include "Graphics/scenemanager.h"
49 #include "Graphics/entityproxy.h"
50 
51 #include "Physics/physicsmanager.h"
52 #include "Physics/rigidproxy.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  RigProx(NULL)
69  { }
70 
71  RigidDebris::RigidDebris(const String& Name, const Real Mass, World* TheWorld) :
72  Debris(Name,TheWorld),
73  EntProx(NULL),
74  RigProx(NULL)
75  { this->CreateRigidDebris(Mass); }
76 
77  RigidDebris::RigidDebris(const String& Name, const Real Mass, Graphics::Mesh* DebMesh, Physics::CollisionShape* DebShape, World* TheWorld) :
78  Debris(Name,TheWorld),
79  EntProx(NULL),
80  RigProx(NULL)
81  { this->CreateRigidDebris(Mass,DebMesh,DebShape); }
82 
83  RigidDebris::RigidDebris(const XML::Node& SelfRoot, World* TheWorld) :
84  Debris(TheWorld),
85  EntProx(NULL),
86  RigProx(NULL)
87  { this->ProtoDeSerialize(SelfRoot); }
88 
90  { this->DestroyRigidDebris(); }
91 
93  {
94  Graphics::SceneManager* SceneMan = static_cast<Graphics::SceneManager*>( this->ParentWorld->GetManager(ManagerBase::MT_SceneManager) );
95  if( SceneMan ) {
96  this->EntProx = SceneMan->CreateEntityProxy(false);
97  this->EntProx->_Bind( this );
98  }
99 
100  Physics::PhysicsManager* PhysMan = static_cast<Physics::PhysicsManager*>( this->ParentWorld->GetManager(ManagerBase::MT_PhysicsManager) );
101  if( PhysMan ) {
102  this->RigProx = PhysMan->CreateRigidProxy(Mass);
103  this->RigProx->_Bind( this );
104  }
105 
106  if( this->EntProx && this->RigProx ) {
107  this->RigProx->AddSyncObject( this->EntProx );
108  }
109  }
110 
112  {
113  Graphics::SceneManager* SceneMan = static_cast<Graphics::SceneManager*>( this->ParentWorld->GetManager(ManagerBase::MT_SceneManager) );
114  if( SceneMan ) {
115  this->EntProx = SceneMan->CreateEntityProxy(DebMesh,false);
116  this->EntProx->_Bind( this );
117  }
118 
119  Physics::PhysicsManager* PhysMan = static_cast<Physics::PhysicsManager*>( this->ParentWorld->GetManager(ManagerBase::MT_PhysicsManager) );
120  if( PhysMan ) {
121  this->RigProx = PhysMan->CreateRigidProxy(Mass,DebShape,false);
122  this->RigProx->_Bind( this );
123  }
124 
125  if( this->EntProx && this->RigProx ) {
126  this->RigProx->AddSyncObject( this->EntProx );
127  }
128  }
129 
131  {
132  this->RemoveFromWorld();
133  if( this->EntProx ) {
134  Graphics::SceneManager* SceneMan = static_cast<Graphics::SceneManager*>( this->ParentWorld->GetManager(ManagerBase::MT_SceneManager) );
135  if( SceneMan ) {
136  SceneMan->DestroyProxy( this->EntProx );
137  this->EntProx = NULL;
138  }
139  }
140 
141  if( this->RigProx ) {
142  Physics::PhysicsManager* PhysMan = static_cast<Physics::PhysicsManager*>( this->ParentWorld->GetManager(ManagerBase::MT_PhysicsManager) );
143  if( PhysMan ) {
144  PhysMan->DestroyProxy( this->RigProx );
145  this->RigProx = NULL;
146  }
147  }
148  }
149 
150  ///////////////////////////////////////////////////////////////////////////////
151  // Utility and Configuration
152 
154  { return Mezzanine::WO_DebrisRigid; }
155 
157  { return this->EntProx; }
158 
160  { return this->RigProx; }
161 
163  { return this->RigProx->IsInWorld(); }
164 
166  { return this->RigProx->IsStatic(); }
167 
169  { return this->RigProx->IsKinematic(); }
170 
172  {
173  Proxies.push_back( this->EntProx );
174  Proxies.push_back( this->RigProx );
175  }
176 
177  void RigidDebris::GetProxies(const UInt32 Types, ProxyContainer& Proxies)
178  {
179  if( Types & Mezzanine::PT_Graphics_EntityProxy ) {
180  Proxies.push_back( this->EntProx );
181  }
182  if( Types & Mezzanine::PT_Physics_RigidProxy ) {
183  Proxies.push_back( this->RigProx );
184  }
185  }
186 
187  ///////////////////////////////////////////////////////////////////////////////
188  // Working with the World
189 
191  {
192  if( this->EntProx )
193  this->EntProx->AddToWorld();
194 
195  if( this->RigProx )
196  this->RigProx->AddToWorld();
197  }
198 
200  {
201  if( this->EntProx )
202  this->EntProx->RemoveFromWorld();
203 
204  if( this->RigProx )
205  this->RigProx->RemoveFromWorld();
206  }
207 
208  ///////////////////////////////////////////////////////////////////////////////
209  // Transform Methods
210 
212  {
213  this->RigProx->SetLocation(Loc);
214  this->EntProx->SetLocation(Loc);
215  }
216 
217  void RigidDebris::SetLocation(const Real X, const Real Y, const Real Z)
218  {
219  this->RigProx->SetLocation(X,Y,Z);
220  this->EntProx->SetLocation(X,Y,Z);
221  }
222 
224  {
225  return this->RigProx->GetLocation();
226  }
227 
229  {
230  this->RigProx->SetOrientation(Ori);
231  this->EntProx->SetOrientation(Ori);
232  }
233 
234  void RigidDebris::SetOrientation(const Real X, const Real Y, const Real Z, const Real W)
235  {
236  this->RigProx->SetOrientation(X,Y,Z,W);
237  this->EntProx->SetOrientation(X,Y,Z,W);
238  }
239 
241  {
242  return this->RigProx->GetOrientation();
243  }
244 
246  {
247  this->RigProx->SetScale(Sc);
248  this->EntProx->SetScale(Sc);
249  }
250 
251  void RigidDebris::SetScale(const Real X, const Real Y, const Real Z)
252  {
253  this->RigProx->SetScale(X,Y,Z);
254  this->EntProx->SetScale(X,Y,Z);
255  }
256 
258  {
259  return this->RigProx->GetScale();
260  }
261 
262  void RigidDebris::Translate(const Vector3& Trans)
263  {
264  this->RigProx->Translate(Trans);
265  this->EntProx->Translate(Trans);
266  }
267 
268  void RigidDebris::Translate(const Real X, const Real Y, const Real Z)
269  {
270  this->RigProx->Translate(X,Y,Z);
271  this->EntProx->Translate(X,Y,Z);
272  }
273 
274  void RigidDebris::Yaw(const Real Angle)
275  {
276  this->RigProx->Yaw(Angle);
277  this->EntProx->Yaw(Angle);
278  }
279 
280  void RigidDebris::Pitch(const Real Angle)
281  {
282  this->RigProx->Pitch(Angle);
283  this->EntProx->Pitch(Angle);
284  }
285 
286  void RigidDebris::Roll(const Real Angle)
287  {
288  this->RigProx->Roll(Angle);
289  this->EntProx->Roll(Angle);
290  }
291 
292  void RigidDebris::Rotate(const Vector3& Axis, const Real Angle)
293  {
294  this->RigProx->Rotate(Axis,Angle);
295  this->EntProx->Rotate(Axis,Angle);
296  }
297 
298  void RigidDebris::Rotate(const Quaternion& Rotation)
299  {
300  this->RigProx->Rotate(Rotation);
301  this->EntProx->Rotate(Rotation);
302  }
303 
304  void RigidDebris::Scale(const Vector3& Scale)
305  {
306  this->RigProx->Scale(Scale);
307  this->EntProx->Scale(Scale);
308  }
309 
310  void RigidDebris::Scale(const Real X, const Real Y, const Real Z)
311  {
312  this->RigProx->Scale(X,Y,Z);
313  this->EntProx->Scale(X,Y,Z);
314  }
315 
316  ///////////////////////////////////////////////////////////////////////////////
317  // Serialization
318 
320  {
321  this->Debris::ProtoSerializeProperties(SelfRoot);
322  }
323 
325  {
326  // No base implementations to call
327  XML::Node ProxiesNode = SelfRoot.AppendChild( RigidDebris::GetSerializableName() + "Proxies" );
328 
329  if( ProxiesNode.AppendAttribute("Version").SetValue("1") )
330  {
331  XML::Node EntProxNode = ProxiesNode.AppendChild("EntProx");
332  this->EntProx->ProtoSerialize( EntProxNode );
333  XML::Node RigProxNode = ProxiesNode.AppendChild("RigProx");
334  this->RigProx->ProtoSerialize( RigProxNode );
335 
336  return;
337  }else{
338  SerializeError("Create XML Attribute Values",RigidDebris::GetSerializableName() + "Proxies",true);
339  }
340  }
341 
343  {
344  this->Debris::ProtoDeSerializeProperties(SelfRoot);
345  }
346 
348  {
349  this->DestroyRigidDebris();
350  // No base implementations to call
351  //XML::Attribute CurrAttrib;
352  XML::Node ProxiesNode = SelfRoot.GetChild( RigidDebris::GetSerializableName() + "Proxies" );
353 
354  if( !ProxiesNode.Empty() ) {
355  if(ProxiesNode.GetAttribute("Version").AsInt() == 1) {
356  /// @todo I don't think an exception is appropriate for the failure of the worldmanager validity checks,
357  /// however a warning should be written to the log if that happens. This should be updated to do that once
358  /// logging refactors are done.
359 
360  XML::Node EntProxNode = ProxiesNode.GetChild("EntProx").GetFirstChild();
361  if( !EntProxNode.Empty() ) {
362  Graphics::SceneManager* SceneMan = static_cast<Graphics::SceneManager*>( this->ParentWorld->GetManager(ManagerBase::MT_SceneManager) );
363  if( SceneMan ) {
364  this->EntProx = SceneMan->CreateEntityProxy( EntProxNode );
365  this->EntProx->_Bind( this );
366  }
367  }
368 
369  XML::Node RigProxNode = ProxiesNode.GetChild("RigProx").GetFirstChild();
370  if( !RigProxNode.Empty() ) {
371  Physics::PhysicsManager* PhysMan = static_cast<Physics::PhysicsManager*>( this->ParentWorld->GetManager(ManagerBase::MT_PhysicsManager) );
372  if( PhysMan ) {
373  this->RigProx = PhysMan->CreateRigidProxy(RigProxNode);
374  this->RigProx->_Bind( this );
375  }
376  }
377 
378  if( this->EntProx && this->RigProx ) {
379  this->RigProx->AddSyncObject( this->EntProx );
380  }
381  }else{
382  MEZZ_EXCEPTION(ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML Version for " + (RigidDebris::GetSerializableName() + "Proxies" ) + ": Not Version 1.");
383  }
384  }else{
385  MEZZ_EXCEPTION(ExceptionBase::II_IDENTITY_NOT_FOUND_EXCEPTION,RigidDebris::GetSerializableName() + "Proxies" + " was not found in the provided XML node, which was expected.");
386  }
387  }
388 
391 
393  { return "RigidDebris"; }
394 
395  ///////////////////////////////////////////////////////////////////////////////
396  // Internal Methods
397 
399  {
400  // Do nothing
401  }
402 
404  {
405  if( ToBeDestroyed == NULL )
406  return;
407 
408  if( this->EntProx == ToBeDestroyed ) {
409  if( this->RigProx ) {
410  this->RigProx->RemoveSyncObject( this->EntProx );
411  }
412 
413  this->EntProx = NULL;
414  }
415 
416  if( this->RigProx == ToBeDestroyed ) {
417  this->RigProx = NULL;
418  }
419  }
420 
421  ///////////////////////////////////////////////////////////////////////////////
422  // RigidDebrisFactory Methods
423 
425  { }
426 
428  { }
429 
432 
434  { return new RigidDebris(Name,Mass,TheWorld); }
435 
437  { return new RigidDebris(Name,Mass,DebMesh,DebShape,TheWorld); }
438 
440  { return static_cast<RigidDebris*>( this->CreateDebris(XMLNode,TheWorld) ); }
441 
442  Debris* RigidDebrisFactory::CreateDebris(const String& Name, World* TheWorld, const NameValuePairMap& Params)
443  {
444  Real Mass = 0;
445  NameValuePairMap::const_iterator ParamIt = Params.find( "Mass" );
446  if( ParamIt != Params.end() )
447  Mass = StringTools::ConvertToReal( (*ParamIt).second );
448 
449  return new RigidDebris(Name,Mass,TheWorld);
450  }
451 
453  { return new RigidDebris(XMLNode,TheWorld); }
454 
456  { delete ToBeDestroyed; }
457 }//Mezzanine
458 
459 #endif
RigidDebris(World *TheWorld)
Blank constructor.
Definition: rigiddebris.cpp:65
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.
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 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.
Definition: datatypes.h:173
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 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.
Definition: exception.h:94
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.
Definition: exception.h:3048
This class is used to check and modify the properties of a graphics mesh.
Definition: mesh.h:63
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...
Definition: exception.h:112
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.
Definition: worldobject.h:84
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.
Definition: entityproxy.h:62
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.
A non-deformable debris.
Definition: rigiddebris.h:64
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.
Definition: debris.cpp:70
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.
Definition: rigidproxy.cpp:265
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
Definition: worldproxy.cpp:84
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
Definition: rigidproxy.cpp:116
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
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.
Definition: node.h:89
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...
Definition: debris.h:54
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 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.
Definition: worldproxy.cpp:174
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...
Definition: rigidproxy.cpp:274
virtual void CreateRigidDebris(const Real Mass)
Common construction method for RigidDebris.
Definition: rigiddebris.cpp:92
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.
Definition: rigidproxy.h:102
virtual ~RigidDebris()
Class destructor.
Definition: rigiddebris.cpp:89
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.
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 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
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
Definition: rigidproxy.cpp:126
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 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.
Definition: rigiddebris.h:69
virtual void RemoveFromWorld()
Removes the object from the World.
This is used to store information about rotation in 3d space.
Definition: quaternion.h:68
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...
Definition: datatypes.h:209
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...
Definition: debris.cpp:75
std::string String
A datatype used to a series of characters.
Definition: datatypes.h:159
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.
Real ConvertToReal(const String &ToConvert)
Converts a string into a Real.
Definition: stringtool.cpp:392
Physics::RigidProxy * RigProx
A pointer to the physics representation of this debris.
Definition: rigiddebris.h:72
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.