A simple class providing basic methods to generate vertices with. More...
#include <simplerenderer.h>
Public Member Functions | |
void | _AppendVertices (std::vector< VertexData > &Vertices) |
Appends the vertices of this renderable to another vector. More... | |
bool | _IsDirty () |
Gets whether or not this renderer is dirty. More... | |
virtual void | _MarkDirty ()=0 |
Marks this renderable as well as all parent objects as dirty. More... | |
void | _Redraw (bool Force) |
Regenerates the verticies in this renderable. More... | |
virtual String | GetDerivedSerializableName () const |
Gets the most derived serializable name of this Renderable. More... | |
virtual String | GetPrimaryAtlas () const |
Gets the currently set primary atlas. 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 | 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 | ProtoSerialize (XML::Node &ParentNode) const |
Convert 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 | SetPrimaryAtlas (const String &Atlas) |
Sets the Atlas to be assumed when one isn't provided for atlas related tasks. More... | |
Static Public Member Functions | |
static String | GetSerializableName () |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More... | |
Protected Member Functions | |
SimpleRenderer () | |
Class constructor. | |
virtual | ~SimpleRenderer () |
Class destructor. | |
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. More... | |
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. More... | |
virtual void | RedrawImpl (bool Force)=0 |
Provides the class specific implementation for regenerating vertices for this renderable. More... | |
Protected Attributes | |
bool | Dirty |
This determines whether or not the verticies in this renderer need to be refreshed. More... | |
String | PriAtlas |
This contains the name of the atlas that will be used as default when one isn't specified. More... | |
std::vector< VertexData > | RenderVertices |
This is a container storing all the Verticies generated by this renderer. More... | |
A simple class providing basic methods to generate vertices with.
Definition at line 57 of file simplerenderer.h.
void Mezzanine::UI::SimpleRenderer::_AppendVertices | ( | std::vector< VertexData > & | Vertices) |
Appends the vertices of this renderable to another vector.
Vertices | The vector of vertex's to append to. |
Definition at line 156 of file simplerenderer.cpp.
bool Mezzanine::UI::SimpleRenderer::_IsDirty | ( | ) |
Gets whether or not this renderer is dirty.
Definition at line 142 of file simplerenderer.cpp.
|
pure virtual |
Marks this renderable as well as all parent objects as dirty.
Implemented in Mezzanine::UI::RenderLayer, and Mezzanine::UI::LineListRenderer.
void Mezzanine::UI::SimpleRenderer::_Redraw | ( | bool | Force) |
Regenerates the verticies in this renderable.
Force | If true this will force this object to redraw it's verticies regardless of whether it is dirty. |
Definition at line 147 of file simplerenderer.cpp.
|
virtual |
Gets the most derived serializable name of this Renderable.
Reimplemented in Mezzanine::UI::TextLayer, Mezzanine::UI::RenderLayer, Mezzanine::UI::ImageLayer, Mezzanine::UI::SingleLineTextLayer, Mezzanine::UI::MultiLineTextLayer, and Mezzanine::UI::QuadRenderer.
Definition at line 133 of file simplerenderer.cpp.
|
virtual |
Gets the currently set primary atlas.
Definition at line 84 of file simplerenderer.cpp.
|
static |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.
Definition at line 136 of file simplerenderer.cpp.
|
virtual |
Take the data stored in an XML Node and overwrite this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Reimplemented in Mezzanine::UI::TextLayer.
Definition at line 110 of file simplerenderer.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 in Mezzanine::UI::TextLayer, Mezzanine::UI::RenderLayer, Mezzanine::UI::ImageLayer, Mezzanine::UI::SingleLineTextLayer, Mezzanine::UI::MultiLineTextLayer, and Mezzanine::UI::QuadRenderer.
Definition at line 115 of file simplerenderer.cpp.
|
virtual |
Convert this class to an XML::Node ready for serialization.
ParentNode | The point in the XML hierarchy that all this renderable should be appended to. |
Reimplemented in Mezzanine::UI::TextLayer.
Definition at line 90 of file simplerenderer.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 in Mezzanine::UI::TextLayer, Mezzanine::UI::RenderLayer, Mezzanine::UI::ImageLayer, Mezzanine::UI::SingleLineTextLayer, Mezzanine::UI::MultiLineTextLayer, and Mezzanine::UI::QuadRenderer.
Definition at line 97 of file simplerenderer.cpp.
|
protectedvirtual |
Pushes vertex information for a triangle to a vector. Equivalent to calling "PushVertex" three times.
Definition at line 71 of file simplerenderer.cpp.
|
protectedvirtual |
Collects all the relevant information for a single vertex and pushes it to a vector.
Definition at line 59 of file simplerenderer.cpp.
|
protectedpure virtual |
Provides the class specific implementation for regenerating vertices for this renderable.
Implemented in Mezzanine::UI::TextLayer, Mezzanine::UI::ImageLayer, and Mezzanine::UI::LineListRenderer.
|
virtual |
Sets the Atlas to be assumed when one isn't provided for atlas related tasks.
Atlas | The name of the atlas to be used. |
Definition at line 81 of file simplerenderer.cpp.
|
protected |
This determines whether or not the verticies in this renderer need to be refreshed.
Definition at line 62 of file simplerenderer.h.
|
protected |
This contains the name of the atlas that will be used as default when one isn't specified.
Definition at line 65 of file simplerenderer.h.
|
protected |
This is a container storing all the Verticies generated by this renderer.
Definition at line 68 of file simplerenderer.h.