40 #ifndef _graphicsrenderableproxy_cpp
41 #define _graphicsrenderableproxy_cpp
47 #include "Graphics/scenemanager.h"
52 #include "stringtool.h"
63 VisibilityMask(
Ogre::MovableObject::getDefaultVisibilityFlags()),
64 QueryMask(
Ogre::MovableObject::getDefaultQueryFlags()),
74 VisibilityMask(
Ogre::MovableObject::getDefaultVisibilityFlags()),
75 QueryMask(
Ogre::MovableObject::getDefaultQueryFlags()),
256 if( !PropertiesNode.
Empty() ) {
259 if( !CurrAttrib.
Empty() )
262 CurrAttrib = PropertiesNode.
GetAttribute(
"CastShadows");
263 if( !CurrAttrib.
Empty() )
267 if( !CurrAttrib.
Empty() )
270 CurrAttrib = PropertiesNode.
GetAttribute(
"VisibilityMask");
271 if( !CurrAttrib.
Empty() )
275 if( !CurrAttrib.
Empty() )
278 CurrAttrib = PropertiesNode.
GetAttribute(
"RenderDistance");
279 if( !CurrAttrib.
Empty() )
293 {
return "RenderableProxy"; }
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 ~RenderableProxy()
Class destructor.
virtual Boole GetReceiveShadows() const
Gets whether or not this proxy can be rendered with a shadow casted on it.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
virtual UInt32 GetLightMask() const
Gets which types of lights will affect this proxy.
virtual void SetLightMask(const UInt32 Mask)
Sets which types of lights will affect this proxy.
virtual UInt32 GetVisibilityMask() const
Gets the bitmask that will be used to determine if this object should be visible when rendering...
virtual void Scale(const Vector3 &Scale)
Scales the object from it's current size.
A light-weight handle for manipulating attributes in DOM tree.
virtual Boole GetVisible() const
Gets whether or not this proxy is visible.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this WorldProxy.
virtual AxisAlignedBox GetAABB() const
Gets this proxies AABB.
bool Boole
Generally acts a single bit, true or false.
virtual void SetVisible(const Boole Visible)
Sets whether or not this proxy is visible.
This class contains utilities and functions to allow the manipulation of the Graphical scene...
virtual void SetOrientation(const Quaternion &Ori)
Sets the orientation of this object in parent space.
virtual Ogre::MovableObject * _GetBaseGraphicsObject() const =0
Accessor for the internal graphics object.
virtual void Roll(const Real Angle)
Rotate the object around the Z axis.
virtual Vector3 GetLocation() const
Gets this objects current location.
virtual Boole GetCastShadows() const
Gets whether or not this proxy can cast a shadow.
This file contains the declaration for the base class from which graphics proxies inherit...
virtual void Translate(const Vector3 &Trans)
Moves this object from it's current location.
Thrown when the requested identity could not be found.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
SceneManager * Manager
This is a pointer to the scene manager that created and owns this proxy.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
static String GetSerializableName()
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized...
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
virtual WorldManager * GetCreator() const
Gets a pointer to this proxies creator.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
Any global enumerations shared between multiple classes is to be declared here.
virtual void Rotate(const Vector3 &Axis, const Real Angle)
Rotates the object from it's existing rotation.
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 SetRenderDistance(const Real Distance)
Sets the distance at which the proxy will stop rendering.
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.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
Whole AsWhole(Whole def=0) const
Attempts to convert the value of the attribute to a Whole and returns the results.
Ogre::Quaternion GetOgreQuaternion(Boole normalize=false) const
Gets a Ogre quaternion.
virtual Quaternion GetOrientation() const
Gets this objects current orientation.
virtual void SetScale(const Vector3 &Sc)
Sets the scaling to be applied to this object.
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. ...
This is the base class for proxy objects belonging to the various 3D subsystems.
uint32_t UInt32
An 32-bit unsigned integer.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
static Vector3 Unit_Y()
Gets a vector representing the Y unit of a Vector3.
bool Empty() const
Is this storing anything at all?
virtual void RemoveFromWorld()
Unhooks this proxy from it's respective world.
Ogre::Vector3 GetOgreVector3() const
Gets a Ogre vector3.
virtual UInt32 GetQueryMask() const
Gets the bitmask that will be used to determine if this object should be counted in scene queries...
Real AsReal(Real def=0) const
Attempts to convert the value of the attribute to a Real and returns the results. ...
virtual void Pitch(const Real Angle)
Rotate the object around the X axis.
This is the base class for all managers that belong to a single world instance.
static Vector3 Unit_X()
Gets a vector representing the X unit of a Vector3.
static Vector3 Unit_Z()
Gets a vector representing the Z unit of a Vector3.
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.
This is used to represent a point in space, or a vector through space.
virtual Real GetRenderDistance() const
Gets the distance at which the proxy will stop rendering.
virtual void SetCastShadows(const Boole CastShadows)
Sets whether or not this proxy can cast a shadow.
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 Boole IsInWorld() const
Gets whether or not this object is inside of it's world.
virtual void SetLocation(const Vector3 &Loc)
Sets the location of this object in parent space.
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
virtual Ogre::SceneNode * _GetGraphicsNode() const
Accessor for the internal node in the scenegraph for this proxy.
This is used to store information about rotation in 3d space.
RenderableProxy(SceneManager *Creator)
XML-assist Constructor.
virtual void Yaw(const Real Angle)
Rotate the object around the Y axis.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
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.
virtual Vector3 GetScale() const
Gets the scaling currently being applied to this object.
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.
This is a utility class used to represent the Axis-Aligned Bounding Boxes of objects in various subsy...