40 #ifndef _gravityfield_cpp
41 #define _gravityfield_cpp
43 #include "gravityfield.h"
45 #include "Physics/rigidproxy.h"
46 #include "Physics/ghostproxy.h"
47 #include "Physics/physicsmanager.h"
79 {
return Mezzanine::WO_AreaEffectGravityField; }
86 (*AddedIt)->GetProxies(Mezzanine::PT_Physics_RigidProxy,RigidProxies);
87 for(
ProxyIterator ProxIt = RigidProxies.begin() ; ProxIt != RigidProxies.end() ; ++ProxIt )
100 (*RemovedIt)->GetProxies(Mezzanine::PT_Physics_RigidProxy,RigidProxies);
101 for(
ProxyIterator ProxIt = RigidProxies.begin() ; ProxIt != RigidProxies.end() ; ++ProxIt )
114 { this->
Grav = Gravity; }
117 {
return this->
Grav; }
145 if( !PropertiesNode.
Empty() ) {
148 if( !GravityNode.
Empty() ) {
164 {
return "GravityField"; }
194 {
delete ToBeDestroyed; }
This is the base class for all collision shapes.
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.
GravityField(World *TheWorld)
Blank constructor.
ObjectContainer AddedObjects
Container of actors that have been added since last frame.
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
virtual ~GravityFieldFactory()
Class destructor.
virtual ~GravityField()
Class destructor.
ObjectContainer::iterator ObjectIterator
Iterator type for Object instances stored by this class.
Thrown when the requested identity could not be found.
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.
virtual void SetFieldGravity(const Vector3 &Gravity)
Sets the gravity force for this field.
virtual Mezzanine::WorldObjectType GetType() const
Gets the type of the object instance.
virtual GravityField * CreateGravityField(const String &Name, World *TheWorld)
Creates a GravityField object.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
virtual void ApplyEffect()
World * ParentWorld
This is the world this object belongs to and will be inserted in/removed from.
virtual AreaEffect * CreateAreaEffect(const String &Name, World *TheWorld, const NameValuePairMap &Params)
Vector3 Grav
The stored value for this fields gravity.
bool Empty() const
Is this storing anything at all?
This implements the exception hiearchy for Mezzanine.
This is an implementation of the AreaEffect class that alters gravity in a region.
The interface for serialization.
std::vector< WorldProxy * > ProxyContainer
Basic container type for WorldProxy storage by this class.
virtual String GetTypeName() const
bool SetValue(const Char8 *rhs)
Set the value of this.
This class is used to define area's in the world that have unique effects.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
GravityFieldFactory()
Class constructor.
A light-weight handle for manipulating nodes in DOM tree.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this WorldObject.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
This is a proxy from which rigid body proxys are handled.
virtual void DestroyAreaEffect(AreaEffect *ToBeDestroyed)
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
This is simply a place for storing all the Physics Related functions.
ProxyContainer::iterator ProxyIterator
Iterator type for WorldProxy instances stored by this class.
This is used to represent a point in space, or a vector through space.
WorldObjectType
Used by various classes to help identify what class an object is.
The bulk of the engine components go in this namspace.
This class represents a world for objects to interact within.
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
virtual void SetGravity(const Vector3 &Gravity)
Sets the gravity for only this proxy.
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.
ObjectContainer RemovedObjects
Container of actors that have been removed since last frame.
std::map< String, String > NameValuePairMap
This is a datatype mostly used for describing settings or parameters that can't be declared in advanc...
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.
void ProtoSerialize(XML::Node &CurrentRoot) const
Convert this class to an XML::Node ready for serialization.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
virtual Vector3 GetFieldGravity() const
Gets the gravity of this field.