This is field that applies force in a direction, and doesn't tamper with gravity. More...
#include <fieldofforce.h>
Public Member Functions | |
FieldOfForce (World *TheWorld) | |
Blank constructor. More... | |
FieldOfForce (const String &Name, World *TheWorld) | |
Class constructor. More... | |
FieldOfForce (const XML::Node &SelfRoot, World *TheWorld) | |
XML constructor. More... | |
virtual | ~FieldOfForce () |
Class destructor. | |
virtual void | ApplyEffect () |
virtual Real | GetAttenuationAmount () const |
Gets the amount of force that is attenuated over distance. More... | |
virtual Vector3 | GetAttenuationSource () const |
Gets the source of the force for calculating attenuation. More... | |
virtual Mezzanine::AttenuationStyle | GetAttenuationStyle () const |
Gets the method of attenuation of force over a distance. More... | |
virtual String | GetDerivedSerializableName () const |
Gets the most derived serializable name of this WorldObject. More... | |
virtual Vector3 | GetDirectionOfForce () const |
Gets the currenly set direction force is to be applied. More... | |
virtual Real | GetFieldStrength () const |
Gets the strength of the field. More... | |
virtual Mezzanine::WorldObjectType | GetType () const |
Gets the type of the object instance. 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 | ProtoSerializeProperties (XML::Node &SelfRoot) const |
Convert the properties of this class to an XML::Node ready for serialization. More... | |
virtual void | SetAttenuation (const Real Amount, const Mezzanine::AttenuationStyle Style, const Vector3 &Source) |
Sets the attenuation for this field. More... | |
virtual void | SetAttenuationAmount (const Real Amount) |
Sets the amount of force that is attenuated over distance. More... | |
virtual void | SetAttenuationSource (const Vector3 &Source) |
Sets the source of the force for calculating attenuation. More... | |
virtual void | SetAttenuationStyle (const Mezzanine::AttenuationStyle Style) |
Sets the method of attenuation of force over a distance. More... | |
virtual void | SetDirectionOfForce (const Vector3 &ForceDirection) |
Sets the direction force is to be applied within this field. More... | |
virtual void | SetFieldStrength (const Real FieldStrength) |
Sets the strenth of the field. More... | |
Public Member Functions inherited from Mezzanine::AreaEffect | |
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... | |
ObjectContainer & | GetAddedObjects () |
Gets the list of objects that have been added to the list since the last simulation step. 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 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 | 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 | 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::AreaEffect | |
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 Attributes | |
Real | AttenAmount |
How much the Gravity weakens over distance. More... | |
Vector3 | AttenSource |
The user defined source if enabled. More... | |
Mezzanine::AttenuationStyle | AttenStyle |
How gravity weakens over distance, if at all. More... | |
Vector3 | Direction |
The direction the force is applied. More... | |
Real | Strength |
The amount of force exerted on other objects. More... | |
Protected Attributes inherited from Mezzanine::AreaEffect | |
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... | |
Additional Inherited Members | |
Public Types inherited from Mezzanine::AreaEffect | |
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. | |
Protected Member Functions inherited from Mezzanine::AreaEffect | |
virtual void | CreateAreaEffect () |
Common constructor method for AreaEffect base class. More... | |
virtual void | DestroyAreaEffect () |
Common destructor method for AreaEffect base class. More... | |
This is field that applies force in a direction, and doesn't tamper with gravity.
This class is similiar to a gravity well in that it can attenuate, but different in that the direction is constant, the source of force(for calculating attenuation) can be outside the field itself, and the direction is constant.
Placing the source of attenuation inside the field will cause the object to accelerate as it gets close to the source, and then will be applied less force(but in the same direction) as it moves from the source. This behavior makes this class good for creating a booster-like AE.
Definition at line 56 of file fieldofforce.h.
Mezzanine::FieldOfForce::FieldOfForce | ( | World * | TheWorld) |
Blank constructor.
TheWorld | A pointer to the world this object belongs to. |
Definition at line 55 of file fieldofforce.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 64 of file fieldofforce.cpp.
XML constructor.
SelfRoot | An XML::Node containing the data to populate this class with. |
TheWorld | A pointer to the world this object belongs to. |
Definition at line 73 of file fieldofforce.cpp.
|
virtual |
Implements Mezzanine::AreaEffect.
Definition at line 91 of file fieldofforce.cpp.
|
virtual |
Gets the amount of force that is attenuated over distance.
Definition at line 184 of file fieldofforce.cpp.
|
virtual |
Gets the source of the force for calculating attenuation.
Definition at line 190 of file fieldofforce.cpp.
|
virtual |
Gets the method of attenuation of force over a distance.
Definition at line 178 of file fieldofforce.cpp.
|
virtual |
Gets the most derived serializable name of this WorldObject.
Reimplemented from Mezzanine::AreaEffect.
Definition at line 258 of file fieldofforce.cpp.
|
virtual |
Gets the currenly set direction force is to be applied.
Definition at line 165 of file fieldofforce.cpp.
|
virtual |
Gets the strength of the field.
Definition at line 159 of file fieldofforce.cpp.
|
static |
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized.
Definition at line 261 of file fieldofforce.cpp.
|
virtual |
Gets the type of the object instance.
Reimplemented from Mezzanine::AreaEffect.
Definition at line 88 of file fieldofforce.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::AreaEffect.
Definition at line 218 of file fieldofforce.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::AreaEffect.
Definition at line 196 of file fieldofforce.cpp.
|
virtual |
Sets the attenuation for this field.
Amount | The amount of force that is dropped off per 1 unit of distance objects are from the AE source. |
Style | The style of attenuation to apply, see the AttenuationStyle enum for more details. |
Source | A vector3 representing the source of force to use when calculating attenuation. |
Definition at line 168 of file fieldofforce.cpp.
|
virtual |
Sets the amount of force that is attenuated over distance.
Amount | The amount of force that is dropped off per 1 unit of distance (with linear attenuation). |
Definition at line 181 of file fieldofforce.cpp.
|
virtual |
Sets the source of the force for calculating attenuation.
Source | A vector3 representing the source of force to use when calculating attenuation. |
Definition at line 187 of file fieldofforce.cpp.
|
virtual |
Sets the method of attenuation of force over a distance.
Style | The style of attenuation to apply, see the AttenuationStyle enum for more details. |
Definition at line 175 of file fieldofforce.cpp.
|
virtual |
Sets the direction force is to be applied within this field.
ForceDirection | A vector3 representing the direction force is to be applied. |
Definition at line 162 of file fieldofforce.cpp.
|
virtual |
Sets the strenth of the field.
FieldStrength | The strength the field will have when exerting force onto other objects. |
Definition at line 156 of file fieldofforce.cpp.
|
protected |
How much the Gravity weakens over distance.
Definition at line 67 of file fieldofforce.h.
|
protected |
The user defined source if enabled.
Definition at line 61 of file fieldofforce.h.
|
protected |
How gravity weakens over distance, if at all.
Definition at line 73 of file fieldofforce.h.
|
protected |
The direction the force is applied.
Definition at line 64 of file fieldofforce.h.
|
protected |
The amount of force exerted on other objects.
Definition at line 70 of file fieldofforce.h.