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

This is the proxy class for placing and manipulating a mesh in the scene. More...

#include <entityproxy.h>

+ Inheritance diagram for Mezzanine::Graphics::EntityProxy:
+ Collaboration diagram for Mezzanine::Graphics::EntityProxy:

Public Member Functions

 EntityProxy (const UInt32 ID, SceneManager *Creator)
 Blank constructor. More...
 
 EntityProxy (const UInt32 ID, Mesh *TheMesh, SceneManager *Creator)
 Loaded Mesh constructor. More...
 
 EntityProxy (const UInt32 ID, const String &MeshName, const String &GroupName, SceneManager *Creator)
 Standard constructor. More...
 
 EntityProxy (const XML::Node &SelfRoot, SceneManager *Creator)
 XML constructor. More...
 
virtual ~EntityProxy ()
 Class destructor.
 
virtual Ogre::MovableObject * _GetBaseGraphicsObject () const
 Accessor for the internal graphics object. More...
 
virtual Ogre::Entity * _GetGraphicsObject () const
 Accessor for the internal entity. More...
 
virtual void AddToWorld ()
 Performs all the necessary task to ensure this object is connected to it's respective world and ready for use. More...
 
virtual Boole GetCastShadows () const
 Gets whether or not this proxy can cast a shadow. More...
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this WorldProxy. More...
 
virtual UInt32 GetLightMask () const
 Gets which types of lights will affect this proxy. More...
 
virtual MeshGetMesh () const
 Gets the mesh currently being used by this proxy. More...
 
virtual Mezzanine::ProxyType GetProxyType () const
 Accessor for the type of proxy. More...
 
virtual UInt32 GetQueryMask () const
 Gets the bitmask that will be used to determine if this object should be counted in scene queries. More...
 
virtual Boole GetReceiveShadows () const
 Gets whether or not this proxy can be rendered with a shadow casted on it. More...
 
virtual Real GetRenderDistance () const
 Gets the distance at which the proxy will stop rendering. More...
 
virtual UInt32 GetVisibilityMask () const
 Gets the bitmask that will be used to determine if this object should be visible when rendering. More...
 
virtual Boole GetVisible () const
 Gets whether or not this proxy is visible. More...
 
virtual void ProtoDeSerializeMesh (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the mesh of this object with it. 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 ProtoSerializeMesh (XML::Node &SelfRoot) const
 Convert the mesh of this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeProperties (XML::Node &SelfRoot) const
 Convert the properties of this class to an XML::Node ready for serialization. More...
 
virtual void RemoveFromWorld ()
 Unhooks this proxy from it's respective world. More...
 
virtual void SetCastShadows (const Boole CastShadows)
 Sets whether or not this proxy can cast a shadow. More...
 
virtual void SetLightMask (const UInt32 Mask)
 Sets which types of lights will affect this proxy. More...
 
virtual void SetMesh (const String &MeshName, const String &Group)
 Sets the mesh to be used by this proxy. More...
 
virtual void SetMesh (Mesh *ObjectMesh)
 Sets the mesh to be used by this proxy. More...
 
virtual void SetQueryMask (const UInt32 Mask)
 Sets the bitmesk that will be used to determine if this object should be counted in scene queries. More...
 
virtual void SetRenderDistance (const Real Distance)
 Sets the distance at which the proxy will stop rendering. More...
 
virtual void SetVisibilityMask (const UInt32 Mask)
 Sets the bitmask that will be used to determine if this object should be visible when rendering. More...
 
virtual void SetVisible (const Boole Visible)
 Sets whether or not this proxy is visible. More...
 
- Public Member Functions inherited from Mezzanine::Graphics::RenderableProxy
 RenderableProxy (SceneManager *Creator)
 XML-assist Constructor. More...
 
 RenderableProxy (const UInt32 ID, SceneManager *Creator)
 Normal Constructor. More...
 
virtual ~RenderableProxy ()
 Class destructor.
 
virtual Ogre::SceneNode * _GetGraphicsNode () const
 Accessor for the internal node in the scenegraph for this proxy. More...
 
virtual AxisAlignedBox GetAABB () const
 Gets this proxies AABB. More...
 
virtual WorldManagerGetCreator () const
 Gets a pointer to this proxies creator. More...
 
virtual Vector3 GetLocation () const
 Gets this objects current location. More...
 
virtual Quaternion GetOrientation () const
 Gets this objects current orientation. More...
 
virtual Vector3 GetScale () const
 Gets the scaling currently being applied to this object. More...
 
virtual Boole IsInWorld () const
 Gets whether or not this object is inside of it's world. More...
 
virtual void Pitch (const Real Angle)
 Rotate the object around the X axis. 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::WorldProxy
 WorldProxy ()
 Blank constructor.
 
 WorldProxy (const UInt32 ID)
 Normal/ID constructor. More...
 
virtual ~WorldProxy ()
 Class destructor.
 
void _Bind (WorldObject *NewParent)
 Binds this proxy to a WorldObject. More...
 
virtual WorldObjectGetParentObject () const
 Gets a pointer to the parent object controlling this proxy. More...
 
virtual UInt32 GetProxyID () const
 Gets the unique ID of this proxy. 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::Graphics::RenderableProxy
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::WorldProxy
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 CreateEntity (Mesh *ObjectMesh)
 Creates an internal entity based on the provided mesh. More...
 
virtual void CreateEntity (const String &MeshName, const String &GroupName)
 Creates an internal entity based on the provided mesh. More...
 
virtual void DestroyEntity ()
 Destroys the internal entity in use by this proxy. More...
 
virtual void ProtoDeSerializeImpl (const XML::Node &SelfRoot)
 Implementation method for deseriailizing additional sets of data. More...
 
virtual void ProtoSerializeImpl (XML::Node &SelfRoot) const
 Implementation method for serializing additional sets of data. More...
 

Protected Attributes

Boole CanCastShadows
 Stores whether or not this object can cast shadows on other objects. More...
 
Ogre::Entity * GraphicsEntity
 A pointer to the internal Entity this proxy is based on. More...
 
UInt32 LightMask
 A bitmask which will be compared against to determine which lights apply to this object. More...
 
MeshProxyMesh
 A pointer to the mesh being used by this proxy. More...
 
Real RenderDist
 Stores the maximum distance this object can be from the camera before it is clipped/culled. More...
 
Boole SceneVisible
 Stores whether or not this object should be rendered, regardless of other criteria. More...
 
- Protected Attributes inherited from Mezzanine::Graphics::RenderableProxy
Ogre::SceneNode * GraphicsNode
 A pointer to the internal object storing the proxy transform. More...
 
Boole InWorld
 This stores whether the proxy is currently in the graphics world or not. More...
 
SceneManagerManager
 This is a pointer to the scene manager that created and owns this proxy. More...
 
UInt32 QueryMask
 This is a bitmask identifying this objects type when being queried. Used for advanced query configuration. More...
 
UInt32 VisibilityMask
 This is a bitmask identifying this objects type when being rendered. Used for advanced visibility configuration. More...
 
- Protected Attributes inherited from Mezzanine::WorldProxy
WorldObjectParentObject
 Pointer to the Object this proxy belongs to. More...
 
UInt32 ProxyID
 The unique ID assigned to the type of proxy an instance is. More...
 

Detailed Description

This is the proxy class for placing and manipulating a mesh in the scene.

Definition at line 62 of file entityproxy.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::EntityProxy::EntityProxy ( const UInt32  ID,
SceneManager Creator 
)

Blank constructor.

Parameters
IDThe unique ID assigned to this EntityProxy.
CreatorA pointer to the manager that created this proxy.

Definition at line 62 of file entityproxy.cpp.

Mezzanine::Graphics::EntityProxy::EntityProxy ( const UInt32  ID,
Mesh TheMesh,
SceneManager Creator 
)

Loaded Mesh constructor.

Parameters
IDThe unique ID assigned to this EntityProxy.
TheMeshA pointer to the mesh to be applied to this proxy.
CreatorA pointer to the manager that created this proxy.

Definition at line 72 of file entityproxy.cpp.

Mezzanine::Graphics::EntityProxy::EntityProxy ( const UInt32  ID,
const String MeshName,
const String GroupName,
SceneManager Creator 
)

Standard constructor.

Parameters
IDThe unique ID assigned to this EntityProxy.
MeshNameThe name of the mesh to be loaded and applied to this proxy.
GroupNameThe resource group name where the mesh can be found.
CreatorA pointer to the manager that created this proxy.

Definition at line 82 of file entityproxy.cpp.

Mezzanine::Graphics::EntityProxy::EntityProxy ( const XML::Node SelfRoot,
SceneManager Creator 
)

XML constructor.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.
CreatorA pointer to the manager that created this proxy.

Definition at line 92 of file entityproxy.cpp.

Member Function Documentation

Ogre::MovableObject * Mezzanine::Graphics::EntityProxy::_GetBaseGraphicsObject ( ) const
virtual

Accessor for the internal graphics object.

Returns
Returns a pointer to the internal object of this proxy.

Implements Mezzanine::Graphics::RenderableProxy.

Definition at line 363 of file entityproxy.cpp.

Ogre::Entity * Mezzanine::Graphics::EntityProxy::_GetGraphicsObject ( ) const
virtual

Accessor for the internal entity.

Returns
Returns a pointer to the internal entity this proxy is based on.

Definition at line 360 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::AddToWorld ( )
virtual

Performs all the necessary task to ensure this object is connected to it's respective world and ready for use.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 152 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::CreateEntity ( Mesh ObjectMesh)
protectedvirtual

Creates an internal entity based on the provided mesh.

Parameters
ObjectMeshA pointer to the mesh to be applied to this proxy.

Definition at line 117 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::CreateEntity ( const String MeshName,
const String GroupName 
)
protectedvirtual

Creates an internal entity based on the provided mesh.

Parameters
MeshNameThe name of the mesh to be loaded and applied to this proxy.
GroupNameThe resource group name where the mesh can be found.

Definition at line 130 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::DestroyEntity ( )
protectedvirtual

Destroys the internal entity in use by this proxy.

Definition at line 136 of file entityproxy.cpp.

Boole Mezzanine::Graphics::EntityProxy::GetCastShadows ( ) const
virtual

Gets whether or not this proxy can cast a shadow.

Returns
Returns true if this proxy can cast a shadow, false otherwise.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 232 of file entityproxy.cpp.

String Mezzanine::Graphics::EntityProxy::GetDerivedSerializableName ( ) const
virtual

Gets the most derived serializable name of this WorldProxy.

Note
When creating a new WorldProxy 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::Graphics::RenderableProxy.

Definition at line 351 of file entityproxy.cpp.

UInt32 Mezzanine::Graphics::EntityProxy::GetLightMask ( ) const
virtual

Gets which types of lights will affect this proxy.

Returns
Returns a bitmask indicating the types of lights that will affect this proxies rendering.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 250 of file entityproxy.cpp.

Mesh * Mezzanine::Graphics::EntityProxy::GetMesh ( ) const
virtual

Gets the mesh currently being used by this proxy.

Returns
Returns a pointer to the mesh currently being used by this proxy.

Definition at line 203 of file entityproxy.cpp.

Mezzanine::ProxyType Mezzanine::Graphics::EntityProxy::GetProxyType ( ) const
virtual

Accessor for the type of proxy.

Todo:

Create sub-entity access methods on this class.

Create minor material manipulation methods on this class.

Create Animation state and Skeleton access methods on this class.

Returns
Returns enum value for the type of proxy this object is.

Implements Mezzanine::WorldProxy.

Definition at line 147 of file entityproxy.cpp.

UInt32 Mezzanine::Graphics::EntityProxy::GetQueryMask ( ) const
virtual

Gets the bitmask that will be used to determine if this object should be counted in scene queries.

Remarks
This bitmask is compared against the bitmask you provide when performing a scene query from the scenemanager.
Returns
Returns a bitmask describing the type of object this will be treated as when discovered in scene queries.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 276 of file entityproxy.cpp.

Boole Mezzanine::Graphics::EntityProxy::GetReceiveShadows ( ) const
virtual

Gets whether or not this proxy can be rendered with a shadow casted on it.

Returns
Returns true if this proxy can receive shadows, false otherwise.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 237 of file entityproxy.cpp.

Real Mezzanine::Graphics::EntityProxy::GetRenderDistance ( ) const
virtual

Gets the distance at which the proxy will stop rendering.

Returns
Returns a Real representing the max distance from the camera at which the proxy will be rendered.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 289 of file entityproxy.cpp.

String Mezzanine::Graphics::EntityProxy::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 354 of file entityproxy.cpp.

UInt32 Mezzanine::Graphics::EntityProxy::GetVisibilityMask ( ) const
virtual

Gets the bitmask that will be used to determine if this object should be visible when rendering.

Remarks
This bitmask is compared against the bitmask you provide to a viewport for what should be visible during rendering.
Returns
Returns a bitmask describing the type of object this will be treated as when rendering.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 263 of file entityproxy.cpp.

Boole Mezzanine::Graphics::EntityProxy::GetVisible ( ) const
virtual

Gets whether or not this proxy is visible.

Returns
Returns true if this proxy is being rendered, false otherwise.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 219 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::ProtoDeSerializeImpl ( const XML::Node SelfRoot)
protectedvirtual

Implementation method for deseriailizing additional sets of data.

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

Reimplemented from Mezzanine::WorldProxy.

Definition at line 111 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::ProtoDeSerializeMesh ( const XML::Node SelfRoot)
virtual

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

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

Definition at line 324 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::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::Graphics::RenderableProxy.

Definition at line 319 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::ProtoSerializeImpl ( XML::Node SelfRoot) const
protectedvirtual

Implementation method for serializing additional sets of data.

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

Reimplemented from Mezzanine::WorldProxy.

Definition at line 105 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::ProtoSerializeMesh ( XML::Node SelfRoot) const
virtual

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

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

Definition at line 305 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::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::Graphics::RenderableProxy.

Definition at line 300 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::RemoveFromWorld ( )
virtual

Unhooks this proxy from it's respective world.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 161 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::SetCastShadows ( const Boole  CastShadows)
virtual

Sets whether or not this proxy can cast a shadow.

Parameters
CastShadowsTrue to allow this proxy to cast a shadow, false to prevent it from casting a shadow.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 224 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::SetLightMask ( const UInt32  Mask)
virtual

Sets which types of lights will affect this proxy.

Parameters
MaskA bitmask used to indicate which types of lights will be applied to this proxy.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 242 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::SetMesh ( const String MeshName,
const String Group 
)
virtual

Sets the mesh to be used by this proxy.

Parameters
MeshNameThe name of the mesh to apply to this proxy.
GroupThe resource group to which the mesh belongs.

Definition at line 173 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::SetMesh ( Mesh ObjectMesh)
virtual

Sets the mesh to be used by this proxy.

Parameters
ObjectMeshThe mesh to apply to this proxy.

Definition at line 188 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::SetQueryMask ( const UInt32  Mask)
virtual

Sets the bitmesk that will be used to determine if this object should be counted in scene queries.

Remarks
This bitmask is compared against the bitmask you provide when performing a scene query from the scenemanager.
Parameters
MaskThe bitmask to be applied.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 268 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::SetRenderDistance ( const Real  Distance)
virtual

Sets the distance at which the proxy will stop rendering.

Note
Passing in zero will remove distance checking for this object when rendering.
Parameters
DistanceThe distance in world units from the camera when the proxy will stop being rendered.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 281 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::SetVisibilityMask ( const UInt32  Mask)
virtual

Sets the bitmask that will be used to determine if this object should be visible when rendering.

Remarks
This bitmask is compared against the bitmask you provide to a viewport for what should be visible during rendering.
Parameters
MaskThe bitmask to be applied.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 255 of file entityproxy.cpp.

void Mezzanine::Graphics::EntityProxy::SetVisible ( const Boole  Visible)
virtual

Sets whether or not this proxy is visible.

Parameters
VisibleTrue to allow this proxy to render, false otherwise.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 211 of file entityproxy.cpp.

Member Data Documentation

Boole Mezzanine::Graphics::EntityProxy::CanCastShadows
protected

Stores whether or not this object can cast shadows on other objects.

Definition at line 86 of file entityproxy.h.

Ogre::Entity* Mezzanine::Graphics::EntityProxy::GraphicsEntity
protected

A pointer to the internal Entity this proxy is based on.

Definition at line 70 of file entityproxy.h.

UInt32 Mezzanine::Graphics::EntityProxy::LightMask
protected

A bitmask which will be compared against to determine which lights apply to this object.

Definition at line 80 of file entityproxy.h.

Mesh* Mezzanine::Graphics::EntityProxy::ProxyMesh
protected

A pointer to the mesh being used by this proxy.

Definition at line 73 of file entityproxy.h.

Real Mezzanine::Graphics::EntityProxy::RenderDist
protected

Stores the maximum distance this object can be from the camera before it is clipped/culled.

Definition at line 77 of file entityproxy.h.

Boole Mezzanine::Graphics::EntityProxy::SceneVisible
protected

Stores whether or not this object should be rendered, regardless of other criteria.

Definition at line 83 of file entityproxy.h.


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