This class is used to define area's in the world that have unique effects. More...
#include <areaeffect.h>
Public Types | |
typedef ObjectContainer::const_iterator | ConstObjectIterator |
Const Iterator type for Object instances stored by this class. | |
typedef std::vector < WorldObject * > | ObjectContainer |
Basic container type for Object storage by this class. | |
typedef ObjectContainer::iterator | ObjectIterator |
Iterator type for Object instances stored by this class. | |
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. | |
Public Member Functions | |
AreaEffect (World *TheWorld) | |
Blank constructor. More... | |
AreaEffect (const String &Name, World *TheWorld) | |
Class constructor. More... | |
virtual | ~AreaEffect () |
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 void | ApplyEffect ()=0 |
Defines and applies the effect of the field. More... | |
ObjectContainer & | GetAddedObjects () |
Gets the list of objects that have been added to the list since the last simulation step. More... | |
virtual String | GetDerivedSerializableName () const |
Gets the most derived serializable name of this WorldObject. More... | |
virtual Physics::GhostProxy * | GetGhostProxy () const |
Gets a pointer to the physics portion of this AreaEffect. More... | |
virtual Vector3 | GetLocation () const |
Gets this objects current location. More... | |
UInt32 | GetNumAddedObjects () const |
Gets the number of objects added to this AE since the last update. More... | |
UInt32 | GetNumOverlappingObjects () const |
Gets the number of objects currently overlapping with this AE. More... | |
UInt32 | GetNumRemovedObjects () const |
Gets the number of objects removed from this AE since the last update. More... | |
virtual Quaternion | GetOrientation () const |
Gets this objects current orientation. More... | |
ObjectContainer & | GetOverlappingObjects () |
Gets the list of objects within this field. 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... | |
ObjectContainer & | GetRemovedObjects () |
Gets the list of objects that have been removed from the list since the last simulation step. 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 Boolean | IsInWorld () const |
Gets whether or not this object is currently in the world. More... | |
virtual Boolean | IsKinematic () const |
Checks of the object is kinematic. More... | |
virtual Boolean | 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::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 String & | GetName () const |
Gets the name of this object. More... | |
virtual World * | GetWorld () 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::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 | CreateAreaEffect () |
Common constructor method for AreaEffect base class. More... | |
virtual void | DestroyAreaEffect () |
Common destructor method for AreaEffect base class. More... | |
Protected Attributes | |
ObjectContainer | AddedObjects |
Container of actors that have been added since last frame. More... | |
ProxyContainer | AEProxies |
Container of proxies that representing this AE field. More... | |
Physics::GhostProxy * | Ghost |
A pointer to the ghost powering this AE field. More... | |
ObjectContainer | OverlappingObjects |
Container for actors within the field area. More... | |
ObjectContainer | RemovedObjects |
Container of actors that have been removed since last frame. 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... | |
World * | ParentWorld |
This is the world this object belongs to and will be inserted in/removed from. More... | |
This class is used to define area's in the world that have unique effects.
Common uses for this class are for gravity fields, and explosions. But can be made to do more.
Note: This is a base class intended to be derived from. This class cannot be created itself. To make an AreaEffect class that does what you want it to, simple inherit from this class with an AE class of your own, and define the ApplyEffect() function to do what you want your effect to do.
Definition at line 64 of file areaeffect.h.
Mezzanine::AreaEffect::AreaEffect | ( | World * | TheWorld) |
Blank constructor.
TheWorld | A pointer to the world this object belongs to. |
Definition at line 68 of file areaeffect.cpp.
Class constructor.
Name | The name to be given to this object. |
TheWorld | A pointer to the world this object belongs to. |
Definition at line 73 of file areaeffect.cpp.
|
virtual |
Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to update.
Implements Mezzanine::WorldObject.
Definition at line 373 of file areaeffect.cpp.
|
virtual |
Utility function for altering or checking the World Object every frame.
Implements Mezzanine::WorldObject.
Definition at line 333 of file areaeffect.cpp.
|
virtual |
Adds the object to the World.
Implements Mezzanine::WorldObject.
Definition at line 137 of file areaeffect.cpp.
|
pure virtual |
Defines and applies the effect of the field.
When inheriting this class, this function is what defines the effect the field has.
This function will be called on by the physics manager and shouldn't be called manually.
Implemented in Mezzanine::FieldOfForce, Mezzanine::GravityWell, and Mezzanine::GravityField.
|
protectedvirtual |
Common constructor method for AreaEffect base class.
Definition at line 81 of file areaeffect.cpp.
|
protectedvirtual |
Common destructor method for AreaEffect base class.
Definition at line 94 of file areaeffect.cpp.
AreaEffect::ObjectContainer & Mezzanine::AreaEffect::GetAddedObjects | ( | ) |
Gets the list of objects that have been added to the list since the last simulation step.
Definition at line 164 of file areaeffect.cpp.
|
virtual |
Gets the most derived serializable name of this WorldObject.
Reimplemented from Mezzanine::WorldObject.
Reimplemented in Mezzanine::FieldOfForce, Mezzanine::GravityWell, and Mezzanine::GravityField.
Definition at line 324 of file areaeffect.cpp.
|
virtual |
Gets a pointer to the physics portion of this AreaEffect.
Definition at line 110 of file areaeffect.cpp.
|
virtual |
Gets this objects current location.
Implements Mezzanine::TransformableObject.
Definition at line 186 of file areaeffect.cpp.
UInt32 Mezzanine::AreaEffect::GetNumAddedObjects | ( | ) | const |
Gets the number of objects added to this AE since the last update.
Definition at line 155 of file areaeffect.cpp.
UInt32 Mezzanine::AreaEffect::GetNumOverlappingObjects | ( | ) | const |
Gets the number of objects currently overlapping with this AE.
Definition at line 152 of file areaeffect.cpp.
UInt32 Mezzanine::AreaEffect::GetNumRemovedObjects | ( | ) | const |
Gets the number of objects removed from this AE since the last update.
Definition at line 158 of file areaeffect.cpp.
|
virtual |
Gets this objects current orientation.
Implements Mezzanine::TransformableObject.
Definition at line 201 of file areaeffect.cpp.
AreaEffect::ObjectContainer & Mezzanine::AreaEffect::GetOverlappingObjects | ( | ) |
Gets the list of objects within this field.
Definition at line 161 of file areaeffect.cpp.
|
virtual |
Populates a container with all of the WorldProxies being used by this WorldObject.
Proxies | The container of proxies to be populated. |
Implements Mezzanine::WorldObject.
Definition at line 122 of file areaeffect.cpp.
|
virtual |
Populates a container with all the WorldProxies being used by this WorldObject specified in a provided mask.
Types | The bitmask specifing the types of world proxies to populate the container with. |
Proxies | The container of proxies to be populated. |
Implements Mezzanine::WorldObject.
Definition at line 127 of file areaeffect.cpp.
AreaEffect::ObjectContainer & Mezzanine::AreaEffect::GetRemovedObjects | ( | ) |
Gets the list of objects that have been removed from the list since the last simulation step.
Definition at line 167 of file areaeffect.cpp.
|
virtual |
Gets the scaling currently being applied to this object.
Implements Mezzanine::TransformableObject.
Definition at line 216 of file areaeffect.cpp.
|
static |
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized.
Definition at line 327 of file areaeffect.cpp.
|
virtual |
Gets the type of the object instance.
Implements Mezzanine::WorldObject.
Reimplemented in Mezzanine::FieldOfForce, Mezzanine::GravityWell, and Mezzanine::GravityField.
Definition at line 107 of file areaeffect.cpp.
|
virtual |
Gets whether or not this object is currently in the world.
Implements Mezzanine::WorldObject.
Definition at line 113 of file areaeffect.cpp.
|
virtual |
Checks of the object is kinematic.
Implements Mezzanine::WorldObject.
Definition at line 119 of file areaeffect.cpp.
|
virtual |
Checks of the object is static.
Implements Mezzanine::WorldObject.
Definition at line 116 of file areaeffect.cpp.
|
virtual |
Rotate the object around the X axis.
Angle | The angle to rotate this object in radians. |
Implements Mezzanine::TransformableObject.
Definition at line 236 of file areaeffect.cpp.
|
virtual |
Take the data stored in an XML Node and overwrite the properties of this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Reimplemented from Mezzanine::WorldObject.
Reimplemented in Mezzanine::FieldOfForce, Mezzanine::GravityWell, and Mezzanine::GravityField.
Definition at line 290 of file areaeffect.cpp.
|
virtual |
Take the data stored in an XML Node and overwrite the proxies of this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Implements Mezzanine::WorldObject.
Definition at line 295 of file areaeffect.cpp.
|
virtual |
Convert the properties of this class to an XML::Node ready for serialization.
SelfRoot | The root node containing all the serialized data for this instance. |
Reimplemented from Mezzanine::WorldObject.
Reimplemented in Mezzanine::FieldOfForce, Mezzanine::GravityWell, and Mezzanine::GravityField.
Definition at line 269 of file areaeffect.cpp.
|
virtual |
Convert the proxies of this class to an XML::Node ready for serialization.
SelfRoot | The root node containing all the serialized data for this instance. |
Implements Mezzanine::WorldObject.
Definition at line 274 of file areaeffect.cpp.
|
virtual |
Removes the object from the World.
Implements Mezzanine::WorldObject.
Definition at line 143 of file areaeffect.cpp.
|
virtual |
Rotate the object around the Z axis.
Angle | The angle to rotate this object in radians. |
Implements Mezzanine::TransformableObject.
Definition at line 241 of file areaeffect.cpp.
Rotates the object from it's existing rotation.
Axis | The axis on which this object will be rotated. |
Angle | The angle to rotate this object in radians. |
Implements Mezzanine::TransformableObject.
Definition at line 246 of file areaeffect.cpp.
|
virtual |
Rotates the object from it's existing rotation.
Rotation | The rotation to apply to this object. |
Implements Mezzanine::TransformableObject.
Definition at line 251 of file areaeffect.cpp.
|
virtual |
Scales the object from it's current size.
Scale | A Vector3 representing the scaling to apply to this object. |
Implements Mezzanine::TransformableObject.
Definition at line 256 of file areaeffect.cpp.
Scales the object from it's current size.
X | The scaling factor to apply on the X axis. |
Y | The scaling factor to apply on the Y axis. |
Z | The scaling factor to apply on the Z axis. |
Implements Mezzanine::TransformableObject.
Definition at line 261 of file areaeffect.cpp.
|
virtual |
Sets the location of this object in parent space.
Location | A Vector3 representing the location this object is to be set to. |
Implements Mezzanine::TransformableObject.
Definition at line 176 of file areaeffect.cpp.
Sets the location of this object in parent space via Reals.
X | The position on the X axis where this object is to be set. |
Y | The position on the Y axis where this object is to be set. |
Z | The position on the Z axis where this object is to be set. |
Implements Mezzanine::TransformableObject.
Definition at line 181 of file areaeffect.cpp.
|
virtual |
Sets the orientation of this object in parent space.
Orientation | A Quaternion representing the rotation this object is to be set to. |
Implements Mezzanine::TransformableObject.
Definition at line 191 of file areaeffect.cpp.
|
virtual |
Sets the orientation of this object in parent space via Reals.
X | The X component of the Axis. |
Y | The Y component of the Axis. |
Z | The Z component of the Axis. |
W | Rotation on the Axis X, Y and Z defined. |
Implements Mezzanine::TransformableObject.
Definition at line 196 of file areaeffect.cpp.
|
virtual |
Sets the scaling to be applied to this object.
Scale | A Vector3 representing the amount of scaling to apply to this object. |
Implements Mezzanine::TransformableObject.
Definition at line 206 of file areaeffect.cpp.
Sets the scaling to be applied to this object via Reals.
X | The scaling factor to apply on the X axis. |
Y | The scaling factor to apply on the Y axis. |
Z | The scaling factor to apply on the Z axis. |
Implements Mezzanine::TransformableObject.
Definition at line 211 of file areaeffect.cpp.
|
virtual |
Moves this object from it's current location.
Trans | A Vector3 representing the amount of movement to apply to this object. |
Implements Mezzanine::TransformableObject.
Definition at line 221 of file areaeffect.cpp.
Moves this object from it's current location.
X | The amount of movement to apply on the X axis. |
Y | The amount of movement to apply on the Y axis. |
Z | The amount of movement to apply on the Z axis. |
Implements Mezzanine::TransformableObject.
Definition at line 226 of file areaeffect.cpp.
|
virtual |
Rotate the object around the Y axis.
Angle | The angle to rotate this object in radians. |
Implements Mezzanine::TransformableObject.
Definition at line 231 of file areaeffect.cpp.
|
protected |
Container of actors that have been added since last frame.
Definition at line 79 of file areaeffect.h.
|
protected |
Container of proxies that representing this AE field.
Definition at line 85 of file areaeffect.h.
|
protected |
A pointer to the ghost powering this AE field.
Definition at line 88 of file areaeffect.h.
|
protected |
Container for actors within the field area.
Definition at line 76 of file areaeffect.h.
|
protected |
Container of actors that have been removed since last frame.
Definition at line 82 of file areaeffect.h.