40 #ifndef _uisimplerenderer_cpp
41 #define _uisimplerenderer_cpp
43 #include "UI/simplerenderer.h"
67 TempVert.
Atlas = Atlas;
120 if( !PropertiesNode.
Empty() ) {
123 if( !CurrAttrib.
Empty() )
137 {
return "SimpleRenderer"; }
149 if( this->
Dirty || Force ) {
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
A light-weight handle for manipulating attributes in DOM tree.
static String GetSerializableName()
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialize...
Boole _IsDirty()
Gets whether or not this renderer is dirty.
virtual void PushTriangle(const Vector2 &A, const Vector2 &B, const Vector2 &C, const Vector2 &UV, const ColourValue &Colour, const String &Atlas)
Pushes vertex information for a triangle to a vector. Equivalent to calling "PushVertex" three times...
bool Boole
Generally acts a single bit, true or false.
Real X
Coordinate on the X vector.
Real Z
Coordinate on the Z vector.
Vector2 UV
The UV position (or texture coordinates) of this vertex if a texture is being applied to it...
ColourValue Colour
The colour of the vertex.
void _AppendVertices(std::vector< VertexData > &Vertices)
Appends the vertices of this renderable to another vector.
Thrown when the requested identity could not be found.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
String PriAtlas
This contains the name of the atlas that will be used as default when one isn't specified.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
Vertex Vert
The actual vertex data relevant to rendering.
This is a simple class for holding 4 reals representing the colour any give object or lightsource can...
SimpleRenderer()
Class constructor.
bool Empty() const
Is this storing anything at all?
virtual ~SimpleRenderer()
Class destructor.
This implements the exception hiearchy for Mezzanine.
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
Vector3 Position
The 3D position of this vertex for placement in front of the frustrum.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
std::vector< VertexData > RenderVertices
This is a container storing all the vertices generated by this renderer.
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...
String Atlas
Name of the Atlas the texture belongs to if a texture is being applied to it.
Real Y
Coordinate on the Y vector.
A light-weight handle for manipulating nodes in DOM tree.
Real X
Coordinate on the X vector.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
Boole Dirty
This determines whether or not the vertices in this renderer need to be refreshed.
This is used to represent a point on a 2 dimentional area, such as a screen.
bool Empty() const
Is this storing anything at all?
Real Y
Coordinate on the Y vector.
Basic class describing a vertex in the UI to be rendered.
virtual void RedrawImpl(Boole Force)=0
Provides the class specific implementation for regenerating vertices for this renderable.
The bulk of the engine components go in this namspace.
virtual String GetPrimaryAtlas() const
Gets the currently set primary atlas.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
void _Redraw(Boole Force)
Regenerates the verticies in this renderable.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
virtual void SetPrimaryAtlas(const String &Atlas)
Sets the Atlas to be assumed when one isn't provided for atlas related tasks.
std::string String
A datatype used to a series of characters.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this Renderable.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
virtual void PushVertex(const Real &X, const Real &Y, const Vector2 &UV, const ColourValue &Colour, const String &Atlas)
Collects all the relevant information for a single vertex and pushes it to a vector.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.