40 #ifndef _graphicsentityproxy_cpp
41 #define _graphicsentityproxy_cpp
47 #include "Graphics/scenemanager.h"
48 #include "Graphics/meshmanager.h"
49 #include "Graphics/mesh.h"
54 #include "stringtool.h"
67 LightMask(0xFFFFFFFF),
77 LightMask(0xFFFFFFFF),
87 LightMask(0xFFFFFFFF),
97 LightMask(0xFFFFFFFF),
119 if( ObjectMesh != NULL ) {
122 this->
GraphicsEntity->setUserAny( Ogre::Any( static_cast<RenderableProxy*>(
this ) ) );
149 return Mezzanine::PT_Graphics_EntityProxy;
329 if( !MeshNode.
Empty() ) {
331 String MeshName, MeshGroup = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME;
334 if( !CurrAttrib.
Empty() )
338 if( !CurrAttrib.
Empty() )
341 if( !MeshName.empty() && !MeshGroup.empty() ) {
355 {
return "EntityProxy"; }
virtual void SetLightMask(const UInt32 Mask)
Sets which types of lights will affect this proxy.
virtual Boole GetCastShadows() const
Gets whether or not this proxy can cast a shadow.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
A light-weight handle for manipulating attributes in DOM tree.
bool Boole
Generally acts a single bit, true or false.
virtual void ProtoSerializeImpl(XML::Node &SelfRoot) const
Implementation method for serializing additional sets of data.
Boole CanCastShadows
Stores whether or not this object can cast shadows on other objects.
This class contains utilities and functions to allow the manipulation of the Graphical scene...
virtual Ogre::Entity * _GetGraphicsObject() const
Accessor for the internal entity.
virtual Mezzanine::ProxyType GetProxyType() const
Accessor for the type of proxy.
virtual void ProtoSerializeImpl(XML::Node &SelfRoot) const
Implementation method for serializing additional sets of data.
This class is used to check and modify the properties of a graphics mesh.
SceneManager * Manager
This is a pointer to the scene manager that created and owns this proxy.
virtual void SetVisible(const Boole Visible)
Sets whether or not this proxy is visible.
Ogre::MeshPtr _GetInternalMesh() const
Gets the internal Mesh pointer.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
Ogre::Entity * GraphicsEntity
A pointer to the internal Entity this proxy is based on.
virtual Ogre::MovableObject * _GetBaseGraphicsObject() const
Accessor for the internal graphics object.
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
virtual Real GetRenderDistance() const
Gets the distance at which the proxy will stop rendering.
virtual UInt32 GetLightMask() const
Gets which types of lights will affect this proxy.
Boole SceneVisible
Stores whether or not this object should be rendered, regardless of other criteria.
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
This is the base proxy class for world proxies wrapping functionality of the graphics subsystem...
virtual UInt32 GetVisibilityMask() const
Gets the bitmask that will be used to determine if this object should be visible when rendering...
Any global enumerations shared between multiple classes is to be declared here.
UInt32 LightMask
A bitmask which will be compared against to determine which lights apply to this object.
bool Empty() const
Is this storing anything at all?
This implements the exception hiearchy for Mezzanine.
UInt32 QueryMask
This is a bitmask identifying this objects type when being queried. Used for advanced query configura...
Ogre::SceneNode * GraphicsNode
A pointer to the internal object storing the proxy transform.
float Real
A Datatype used to represent a real floating point number.
The interface for serialization.
bool SetValue(const Char8 *rhs)
Set the value of this.
Mesh * ProxyMesh
A pointer to the mesh being used by this proxy.
virtual Boole GetReceiveShadows() const
Gets whether or not this proxy can be rendered with a shadow casted on it.
virtual Mesh * GetMesh() const
Gets the mesh currently being used by this proxy.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
ConstString & GetName() const
Gets the Name of this Mesh.
static MeshManager * GetSingletonPtr()
Fetches a pointer to the singleton.
virtual void DestroyEntity()
Destroys the internal entity in use by this proxy.
virtual ~EntityProxy()
Class destructor.
virtual Boole GetVisible() const
Gets whether or not this proxy is visible.
A light-weight handle for manipulating nodes in DOM tree.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
ProxyType
Used by all World proxies to describe what their derived types are.
uint32_t UInt32
An 32-bit unsigned integer.
This file contains the declaration for the World proxy wrapping basic entity(mesh) functionality...
bool Empty() const
Is this storing anything at all?
virtual UInt32 GetQueryMask() const
Gets the bitmask that will be used to determine if this object should be counted in scene queries...
Real RenderDist
Stores the maximum distance this object can be from the camera before it is clipped/culled.
virtual void ProtoDeSerializeImpl(const XML::Node &SelfRoot)
Implementation method for deseriailizing additional sets of data.
UInt32 VisibilityMask
This is a bitmask identifying this objects type when being rendered. Used for advanced visibility con...
Ogre::SceneManager * _GetGraphicsWorldPointer() const
Gets the internal Ogre Scene Manager pointer.
EntityProxy(const UInt32 ID, SceneManager *Creator)
Blank constructor.
virtual void SetRenderDistance(const Real Distance)
Sets the distance at which the proxy will stop rendering.
Boole InWorld
This stores whether the proxy is currently in the graphics world or not.
The bulk of the engine components go in this namspace.
virtual void CreateEntity(Mesh *ObjectMesh)
Creates an internal entity based on the provided mesh.
virtual void SetMesh(const String &MeshName, const String &Group)
Sets the mesh to be used by this proxy.
virtual void SetVisibilityMask(const UInt32 Mask)
Sets the bitmask that will be used to determine if this object should be visible when rendering...
virtual void SetQueryMask(const UInt32 Mask)
Sets the bitmesk that will be used to determine if this object should be counted in scene queries...
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this WorldProxy.
virtual void ProtoSerializeMesh(XML::Node &SelfRoot) const
Convert the mesh of this class to an XML::Node ready for serialization.
ConstString & GetGroup() const
Gets the resource group this Mesh belongs to.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
virtual void ProtoDeSerializeMesh(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the mesh of this object with it.
std::string String
A datatype used to a series of characters.
virtual void SetCastShadows(const Boole CastShadows)
Sets whether or not this proxy can cast a shadow.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
virtual void ProtoDeSerializeImpl(const XML::Node &SelfRoot)
Implementation method for deseriailizing additional sets of data.