Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mezzanine::RigidDebris Class Reference

A non-deformable debris. More...

#include <rigiddebris.h>

+ Inheritance diagram for Mezzanine::RigidDebris:
+ Collaboration diagram for Mezzanine::RigidDebris:

Public Member Functions

 RigidDebris (World *TheWorld)
 Blank constructor. More...
 
 RigidDebris (const String &Name, const Real Mass, World *TheWorld)
 Class constructor. More...
 
 RigidDebris (const String &Name, const Real Mass, Graphics::Mesh *DebMesh, Physics::CollisionShape *DebShape, World *TheWorld)
 Class constructor. More...
 
 RigidDebris (const XML::Node &SelfRoot, World *TheWorld)
 XML constructor. More...
 
virtual ~RigidDebris ()
 Class destructor.
 
virtual void _NotifyProxyDestroyed (WorldProxy *ToBeDestroyed)
 Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to update. More...
 
virtual void _Update ()
 Utility function for altering or checking the World Object every frame. More...
 
virtual void AddToWorld ()
 Adds the object to the World. More...
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this WorldObject. More...
 
virtual Graphics::EntityProxyGetEntityProxy () const
 Gets a pointer to the graphics portion of this debris. More...
 
virtual Vector3 GetLocation () const
 Gets this objects current location. More...
 
virtual Quaternion GetOrientation () const
 Gets this objects current orientation. More...
 
virtual void GetProxies (ProxyContainer &Proxies)
 Populates a container with all of the WorldProxies being used by this WorldObject. More...
 
virtual void GetProxies (const UInt32 Types, ProxyContainer &Proxies)
 Populates a container with all the WorldProxies being used by this WorldObject specified in a provided mask. More...
 
virtual Physics::RigidProxyGetRigidProxy () const
 Gets a pointer to the physics portion of this debris. More...
 
virtual Vector3 GetScale () const
 Gets the scaling currently being applied to this object. More...
 
virtual WorldObjectType GetType () const
 Gets the type of the object instance. More...
 
virtual Boole IsInWorld () const
 Gets whether or not this object is currently in the world. More...
 
virtual Boole IsKinematic () const
 Checks of the object is kinematic. More...
 
virtual Boole IsStatic () const
 Checks of the object is static. More...
 
virtual void Pitch (const Real Angle)
 Rotate the object around the X axis. More...
 
virtual void ProtoDeSerializeProperties (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the properties of this object with it. More...
 
virtual void ProtoDeSerializeProxies (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the proxies of this object with it. More...
 
virtual void ProtoSerializeProperties (XML::Node &SelfRoot) const
 Convert the properties of this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeProxies (XML::Node &SelfRoot) const
 Convert the proxies of this class to an XML::Node ready for serialization. More...
 
virtual void RemoveFromWorld ()
 Removes the object from the World. More...
 
virtual void Roll (const Real Angle)
 Rotate the object around the Z axis. More...
 
virtual void Rotate (const Vector3 &Axis, const Real Angle)
 Rotates the object from it's existing rotation. More...
 
virtual void Rotate (const Quaternion &Rotation)
 Rotates the object from it's existing rotation. More...
 
virtual void Scale (const Vector3 &Scale)
 Scales the object from it's current size. More...
 
virtual void Scale (const Real X, const Real Y, const Real Z)
 Scales the object from it's current size. More...
 
virtual void SetLocation (const Vector3 &Loc)
 Sets the location of this object in parent space. More...
 
virtual void SetLocation (const Real X, const Real Y, const Real Z)
 Sets the location of this object in parent space via Reals. More...
 
virtual void SetOrientation (const Quaternion &Ori)
 Sets the orientation of this object in parent space. More...
 
virtual void SetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets the orientation of this object in parent space via Reals. More...
 
virtual void SetScale (const Vector3 &Sc)
 Sets the scaling to be applied to this object. More...
 
virtual void SetScale (const Real X, const Real Y, const Real Z)
 Sets the scaling to be applied to this object via Reals. More...
 
virtual void Translate (const Vector3 &Trans)
 Moves this object from it's current location. More...
 
virtual void Translate (const Real X, const Real Y, const Real Z)
 Moves this object from it's current location. More...
 
virtual void Yaw (const Real Angle)
 Rotate the object around the Y axis. More...
 
- Public Member Functions inherited from Mezzanine::Debris
 Debris (World *TheWorld)
 Blank constructor. More...
 
 Debris (const String &Name, World *TheWorld)
 Class constructor. More...
 
virtual ~Debris ()
 Class destructor.
 
- Public Member Functions inherited from Mezzanine::WorldObject
 WorldObject (World *TheWorld)
 Blank constructor. More...
 
 WorldObject (const String &Name, World *TheWorld)
 Class constructor. More...
 
virtual ~WorldObject ()
 Class destructor.
 
virtual void _NotifyCollisionState (Physics::Collision *Col, const Physics::CollisionState State)
 Notifies this World Object of a collision that is occuring with it. More...
 
virtual const StringGetName () const
 Gets the name of this object. More...
 
virtual WorldGetWorld () const
 Gets the world this object currently belongs to. More...
 
virtual void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
virtual void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
- Public Member Functions inherited from Mezzanine::TransformableObject
virtual ~TransformableObject ()
 Class Destructor.
 
virtual Vector3 ConvertGlobalToLocal (const Vector3 &Location) const
 Converts a point in global space to the same point in local space. More...
 
virtual Quaternion ConvertGlobalToLocal (const Quaternion &Orientation) const
 Converts a rotation in global space to the same rotation in local space. More...
 
virtual Vector3 ConvertLocalToGlobal (const Vector3 &Location) const
 Converts a point in local space to the same point in global space. More...
 
virtual Quaternion ConvertLocalToGlobal (const Quaternion &Orientation) const
 Converts a rotation in local space to the same rotation in global space. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::Debris
static String GetSerializableName ()
 Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::WorldObject
static String GetSerializableName ()
 Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More...
 

Protected Member Functions

virtual void CreateRigidDebris (const Real Mass)
 Common construction method for RigidDebris. More...
 
virtual void CreateRigidDebris (const Real Mass, Graphics::Mesh *DebMesh, Physics::CollisionShape *DebShape)
 Verbose construction method for RigidDebris. More...
 
virtual void DestroyRigidDebris ()
 Destruction method for RigidDebris. More...
 

Protected Attributes

Graphics::EntityProxyEntProx
 A pointer to the graphics representation of this debris. More...
 
Physics::RigidProxyRigProx
 A pointer to the physics representation of this debris. More...
 
- Protected Attributes inherited from Mezzanine::WorldObject
CollisionContainer CurrentCollisions
 This member stores all existing collision events referencing this object. More...
 
String ObjectName
 The name of the object. More...
 
WorldParentWorld
 This is the world this object belongs to and will be inserted in/removed from. More...
 

Additional Inherited Members

- Public Types inherited from Mezzanine::WorldObject
typedef std::set< Physics::Collision * > CollisionContainer
 Basic container type for the current collisions applied to this object.
 
typedef CollisionContainer::iterator CollisionIterator
 Iterator type for the current collisions applied to this object.
 
typedef CollisionContainer::const_iterator ConstCollisionIterator
 Const Iterator type for the current collisions applied to this object.
 
typedef ProxyContainer::const_iterator ConstProxyIterator
 Const Iterator type for WorldProxy instances stored by this class.
 
typedef std::vector< WorldProxy * > ProxyContainer
 Basic container type for WorldProxy storage by this class.
 
typedef ProxyContainer::iterator ProxyIterator
 Iterator type for WorldProxy instances stored by this class.
 

Detailed Description

A non-deformable debris.

Definition at line 64 of file rigiddebris.h.

Constructor & Destructor Documentation

Mezzanine::RigidDebris::RigidDebris ( World TheWorld)

Blank constructor.

Parameters
TheWorldA pointer to the world this object belongs to.

Definition at line 65 of file rigiddebris.cpp.

Mezzanine::RigidDebris::RigidDebris ( const String Name,
const Real  Mass,
World TheWorld 
)

Class constructor.

Parameters
NameThe name to be given to this object.
MassThe mass of the debris object.
TheWorldA pointer to the world this object belongs to.

Definition at line 71 of file rigiddebris.cpp.

Mezzanine::RigidDebris::RigidDebris ( const String Name,
const Real  Mass,
Graphics::Mesh DebMesh,
Physics::CollisionShape DebShape,
World TheWorld 
)

Class constructor.

Parameters
NameThe name to be given to this object.
MassThe mass of the debris object.
DebMeshA pointer to the Graphics mesh that will be applied to the new RigidDebris.
DebShapeA pointer to the Collision shape that will be applied to the new RigidDebris.
TheWorldA pointer to the world this object belongs to.

Definition at line 77 of file rigiddebris.cpp.

Mezzanine::RigidDebris::RigidDebris ( const XML::Node SelfRoot,
World TheWorld 
)

XML constructor.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.
TheWorldA pointer to the world this object belongs to.

Definition at line 83 of file rigiddebris.cpp.

Member Function Documentation

void Mezzanine::RigidDebris::_NotifyProxyDestroyed ( WorldProxy ToBeDestroyed)
virtual

Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to update.

Note
Forced destruction should only happen if a subsystem is being shutdown at a time when the WorldObject is still operational.
Parameters
ToBeDestroyedThe WorldProxy that is marked for destruction.

Implements Mezzanine::WorldObject.

Definition at line 403 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::_Update ( )
virtual

Utility function for altering or checking the World Object every frame.

Implements Mezzanine::WorldObject.

Definition at line 398 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::AddToWorld ( )
virtual

Adds the object to the World.

Implements Mezzanine::WorldObject.

Definition at line 190 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::CreateRigidDebris ( const Real  Mass)
protectedvirtual

Common construction method for RigidDebris.

Parameters
MassThe mass of the debris object.

Definition at line 92 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::CreateRigidDebris ( const Real  Mass,
Graphics::Mesh DebMesh,
Physics::CollisionShape DebShape 
)
protectedvirtual

Verbose construction method for RigidDebris.

Parameters
MassThe mass of the debris object.
DebMeshA pointer to the Graphics mesh that will be applied to the new RigidDebris.
DebShapeA pointer to the Collision shape that will be applied to the new RigidDebris.

Definition at line 111 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::DestroyRigidDebris ( )
protectedvirtual

Destruction method for RigidDebris.

Definition at line 130 of file rigiddebris.cpp.

String Mezzanine::RigidDebris::GetDerivedSerializableName ( ) const
virtual

Gets the most derived serializable name of this WorldObject.

Note
When creating a new WorldObject class verify this method has a valid return for it in order for serialization to work properly.
Returns
Returns the name of the XML tag from the most derived class of "this".

Reimplemented from Mezzanine::Debris.

Definition at line 389 of file rigiddebris.cpp.

Graphics::EntityProxy * Mezzanine::RigidDebris::GetEntityProxy ( ) const
virtual

Gets a pointer to the graphics portion of this debris.

Returns
Returns a pointer to the Entity proxy representing the graphics portion of this debris.

Definition at line 156 of file rigiddebris.cpp.

Vector3 Mezzanine::RigidDebris::GetLocation ( ) const
virtual

Gets this objects current location.

Returns
Returns Vector3 representing the current rotation of this object in parent space.

Implements Mezzanine::TransformableObject.

Definition at line 223 of file rigiddebris.cpp.

Quaternion Mezzanine::RigidDebris::GetOrientation ( ) const
virtual

Gets this objects current orientation.

Returns
Returns a Quaternion representing the current orientation of this object in parent space.

Implements Mezzanine::TransformableObject.

Definition at line 240 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::GetProxies ( ProxyContainer Proxies)
virtual

Populates a container with all of the WorldProxies being used by this WorldObject.

Parameters
ProxiesThe container of proxies to be populated.

Implements Mezzanine::WorldObject.

Definition at line 171 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::GetProxies ( const UInt32  Types,
ProxyContainer Proxies 
)
virtual

Populates a container with all the WorldProxies being used by this WorldObject specified in a provided mask.

Parameters
TypesThe bitmask specifing the types of world proxies to populate the container with.
ProxiesThe container of proxies to be populated.

Implements Mezzanine::WorldObject.

Definition at line 177 of file rigiddebris.cpp.

Physics::RigidProxy * Mezzanine::RigidDebris::GetRigidProxy ( ) const
virtual

Gets a pointer to the physics portion of this debris.

Returns
Returns a pointer to the Rigid proxy representing the physics portion of this debris.

Definition at line 159 of file rigiddebris.cpp.

Vector3 Mezzanine::RigidDebris::GetScale ( ) const
virtual

Gets the scaling currently being applied to this object.

Returns
Returns a Vector3 representing the amount this object is being scaled.

Implements Mezzanine::TransformableObject.

Definition at line 257 of file rigiddebris.cpp.

String Mezzanine::RigidDebris::GetSerializableName ( )
static

Get the name of the the XML tag the proxy class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 392 of file rigiddebris.cpp.

WorldObjectType Mezzanine::RigidDebris::GetType ( ) const
virtual

Gets the type of the object instance.

Returns
Returns the type of the object instance

Implements Mezzanine::WorldObject.

Definition at line 153 of file rigiddebris.cpp.

Boole Mezzanine::RigidDebris::IsInWorld ( ) const
virtual

Gets whether or not this object is currently in the world.

Returns
Returns a Boole indicating if this object has been added to the world.

Implements Mezzanine::WorldObject.

Definition at line 162 of file rigiddebris.cpp.

Boole Mezzanine::RigidDebris::IsKinematic ( ) const
virtual

Checks of the object is kinematic.

Returns
Returns true if the object is kinematic, false otherwise.

Implements Mezzanine::WorldObject.

Definition at line 168 of file rigiddebris.cpp.

Boole Mezzanine::RigidDebris::IsStatic ( ) const
virtual

Checks of the object is static.

Returns
Returns true if the object is static, false otherwise.

Implements Mezzanine::WorldObject.

Definition at line 165 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Pitch ( const Real  Angle)
virtual

Rotate the object around the X axis.

Parameters
AngleThe angle to rotate this object in radians.

Implements Mezzanine::TransformableObject.

Definition at line 280 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::ProtoDeSerializeProperties ( const XML::Node SelfRoot)
virtual

Take the data stored in an XML Node and overwrite the properties of this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Reimplemented from Mezzanine::Debris.

Definition at line 342 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::ProtoDeSerializeProxies ( const XML::Node SelfRoot)
virtual

Take the data stored in an XML Node and overwrite the proxies of this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.
Todo:
I don't think an exception is appropriate for the failure of the worldmanager validity checks, however a warning should be written to the log if that happens. This should be updated to do that once logging refactors are done.

Implements Mezzanine::WorldObject.

Definition at line 347 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::ProtoSerializeProperties ( XML::Node SelfRoot) const
virtual

Convert the properties of this class to an XML::Node ready for serialization.

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Reimplemented from Mezzanine::Debris.

Definition at line 319 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::ProtoSerializeProxies ( XML::Node SelfRoot) const
virtual

Convert the proxies of this class to an XML::Node ready for serialization.

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Implements Mezzanine::WorldObject.

Definition at line 324 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::RemoveFromWorld ( )
virtual

Removes the object from the World.

Implements Mezzanine::WorldObject.

Definition at line 199 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Roll ( const Real  Angle)
virtual

Rotate the object around the Z axis.

Parameters
AngleThe angle to rotate this object in radians.

Implements Mezzanine::TransformableObject.

Definition at line 286 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Rotate ( const Vector3 Axis,
const Real  Angle 
)
virtual

Rotates the object from it's existing rotation.

Note
This method has an additive effect with the objects current rotation. Unlike "SetOrientation" this method does not replace the existing orientation with what you provide.
Parameters
AxisThe axis on which this object will be rotated.
AngleThe angle to rotate this object in radians.

Implements Mezzanine::TransformableObject.

Definition at line 292 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Rotate ( const Quaternion Rotation)
virtual

Rotates the object from it's existing rotation.

Note
This method has an additive effect with the objects current rotation. Unlike "SetOrientation" this method does not replace the existing orientation with what you provide.
Parameters
RotationThe rotation to apply to this object.

Implements Mezzanine::TransformableObject.

Definition at line 298 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Scale ( const Vector3 Scale)
virtual

Scales the object from it's current size.

Note
This method has an additive effect with the objects' current scaling. Unlike "SetScale" this method does not replace the existing scale with what you provide.
Parameters
ScaleA Vector3 representing the scaling to apply to this object.

Implements Mezzanine::TransformableObject.

Definition at line 304 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Scale ( const Real  X,
const Real  Y,
const Real  Z 
)
virtual

Scales the object from it's current size.

Note
This method has an additive effect with the objects' current scaling. Unlike "SetScale" this method does not replace the existing scale with what you provide.
Parameters
XThe scaling factor to apply on the X axis.
YThe scaling factor to apply on the Y axis.
ZThe scaling factor to apply on the Z axis.

Implements Mezzanine::TransformableObject.

Definition at line 310 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::SetLocation ( const Vector3 Loc)
virtual

Sets the location of this object in parent space.

Parameters
LocA Vector3 representing the location this object is to be set to.

Implements Mezzanine::TransformableObject.

Definition at line 211 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::SetLocation ( const Real  X,
const Real  Y,
const Real  Z 
)
virtual

Sets the location of this object in parent space via Reals.

Parameters
XThe position on the X axis where this object is to be set.
YThe position on the Y axis where this object is to be set.
ZThe position on the Z axis where this object is to be set.

Implements Mezzanine::TransformableObject.

Definition at line 217 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::SetOrientation ( const Quaternion Ori)
virtual

Sets the orientation of this object in parent space.

Parameters
OriA Quaternion representing the rotation this object is to be set to.

Implements Mezzanine::TransformableObject.

Definition at line 228 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::SetOrientation ( const Real  X,
const Real  Y,
const Real  Z,
const Real  W 
)
virtual

Sets the orientation of this object in parent space via Reals.

Parameters
XThe X component of the Axis.
YThe Y component of the Axis.
ZThe Z component of the Axis.
WRotation on the Axis X, Y and Z defined.

Implements Mezzanine::TransformableObject.

Definition at line 234 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::SetScale ( const Vector3 Sc)
virtual

Sets the scaling to be applied to this object.

Parameters
ScA Vector3 representing the amount of scaling to apply to this object.

Implements Mezzanine::TransformableObject.

Definition at line 245 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::SetScale ( const Real  X,
const Real  Y,
const Real  Z 
)
virtual

Sets the scaling to be applied to this object via Reals.

Parameters
XThe scaling factor to apply on the X axis.
YThe scaling factor to apply on the Y axis.
ZThe scaling factor to apply on the Z axis.

Implements Mezzanine::TransformableObject.

Definition at line 251 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Translate ( const Vector3 Trans)
virtual

Moves this object from it's current location.

Note
This method has an additive effect with the objects current location. Unlike "SetLocation" this method does not replace the existing location with what you provide.
Parameters
TransA Vector3 representing the amount of movement to apply to this object.

Implements Mezzanine::TransformableObject.

Definition at line 262 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Translate ( const Real  X,
const Real  Y,
const Real  Z 
)
virtual

Moves this object from it's current location.

Note
This method has an additive effect with the objects current location. Unlike "SetLocation" this method does not replace the existing location with what you provide.
Parameters
XThe amount of movement to apply on the X axis.
YThe amount of movement to apply on the Y axis.
ZThe amount of movement to apply on the Z axis.

Implements Mezzanine::TransformableObject.

Definition at line 268 of file rigiddebris.cpp.

void Mezzanine::RigidDebris::Yaw ( const Real  Angle)
virtual

Rotate the object around the Y axis.

Parameters
AngleThe angle to rotate this object in radians.

Implements Mezzanine::TransformableObject.

Definition at line 274 of file rigiddebris.cpp.

Member Data Documentation

Graphics::EntityProxy* Mezzanine::RigidDebris::EntProx
protected

A pointer to the graphics representation of this debris.

Definition at line 69 of file rigiddebris.h.

Physics::RigidProxy* Mezzanine::RigidDebris::RigProx
protected

A pointer to the physics representation of this debris.

Definition at line 72 of file rigiddebris.h.


The documentation for this class was generated from the following files: