This is an object comprised of a series of lines. More...
#include <linelist.h>
Public Types | |
typedef std::vector< Vector2 > | PointVector |
Basic container type for the storage of all the points in 2D space that create the line to be rendered. | |
Public Types inherited from Mezzanine::UI::Renderable | |
enum | RenderableType { RT_LineList, RT_Screen, RT_Widget } |
A small enum to describe the type of renderable this is. | |
Public Member Functions | |
virtual void | _AppendRenderData (ScreenRenderData &RenderData) |
Appends the vertices of this renderable to another vector. More... | |
virtual void | _MarkDirty () |
Marks this renderable as dirty, and informs other renderables if needed. More... | |
LineList & | AddActualPoint (const Real &X, const Real &Y) |
Adds a new point/line to the list via 2 reals. More... | |
LineList & | AddActualPoint (const Vector2 &Position) |
Adds a new point/line to the list via a vector2. More... | |
LineList & | AddPoint (const Real &X, const Real &Y) |
Adds a new point/line to the list via 2 reals. More... | |
LineList & | AddPoint (const Vector2 &Position) |
Adds a new point/line to the list via a vector2. More... | |
LineList & | Begin (const Whole &LineThickness, const ColourValue &LineColour) |
Starts a new line list. More... | |
void | End (Boole Closed=false) |
Finalizes the list and prepares it for rendering. More... | |
const ColourValue & | GetLineColour () const |
Gets the colour of this linelist. More... | |
const Real & | GetLineThickness () const |
Gets the thickness of the line generated by this linelist. More... | |
const PointVector & | GetPoints () const |
Gets the vector of points stored by this linelist. More... | |
RenderableType | GetRenderableType () const |
Gets the type of renderable this is. More... | |
virtual Boole | GetVisible () const |
Gets the visibility setting of this renderable. More... | |
virtual void | Hide () |
Forces this renderable to hide. More... | |
Boole | IsClosed () const |
Gets whether or not this linelist is enclosed. More... | |
virtual Boole | IsVisible () const |
Gets whether or not this renderable is being drawn. More... | |
virtual void | SetVisible (Boole CanSee) |
Sets the visibility of this renderable. More... | |
virtual void | Show () |
Forces this renderable to be shown. More... | |
virtual void | UpdateDimensions () |
Updates the dimensions of this QuadRenderable based on the transform of it's parent. More... | |
Public Member Functions inherited from Mezzanine::UI::Renderable | |
virtual void | _Clean ()=0 |
Refreshes the render data of this renderable. More... | |
Boole | _IsDirty () const |
Gets whether or not this renderable is dirty. More... | |
virtual String | GetDerivedSerializableName () const |
Gets the most derived serializable name of this Renderable. More... | |
const String & | GetName () const |
Gets the name of this renderable. More... | |
Screen * | GetScreen () const |
Gets the parent screen of this renderable. More... | |
Boole | IsScreen () const |
Gets whether or not this renderable is a Screen. More... | |
Boole | IsWidget () const |
Gets whether or not this renderable is a Widget. 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... | |
Protected Member Functions | |
LineList (const String &RendName, Screen *PScreen) | |
Class constructor. More... | |
virtual | ~LineList () |
Class destructor. | |
Protected Member Functions inherited from Mezzanine::UI::Renderable | |
Renderable (Screen *Parent) | |
Blank constructor. More... | |
Renderable (const String &RendName, Screen *Parent) | |
Class constructor. More... | |
virtual | ~Renderable () |
Class destructor. | |
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 | Closed |
A bool indicating whether or not an additional segment should be generated between the first and last points. More... | |
ColourValue | Colour |
The colour of the line. More... | |
PointVector | Positions |
The points in 2D space that create this line. More... | |
LineListRenderer * | Renderer |
The internal renderer responsible for generating this lines vertices. More... | |
Real | Thickness |
The pixel thickness of the each line segment in this linelist. More... | |
Protected Attributes inherited from Mezzanine::UI::Renderable | |
Boole | Dirty |
Stores whether this Renderables vertices need to be regenerated. More... | |
String | Name |
The unique name of this Renderable. More... | |
Screen * | ParentScreen |
A pointer to the Screen that created this Renderable. More... | |
Boole | Visible |
Stores whether this Renderable is to be rendered (also dependent on parent visibility). More... | |
Friends | |
class | ExtendedRenderableFactory |
Additional Inherited Members | |
Static Public Member Functions inherited from Mezzanine::UI::Renderable | |
static String | GetSerializableName () |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More... | |
This is an object comprised of a series of lines.
This class isn't an object, but rather just a series of lines. As such it doesn't have a position or size. The position functions exist only to create additional points for the lines to connect.
Definition at line 61 of file linelist.h.
Class constructor.
RendName | The name to give to this Linelist. |
PScreen | Pointer to the parent Screen that created this linelist. |
Definition at line 147 of file linelist.cpp.
|
virtual |
Appends the vertices of this renderable to another vector.
RenderData | The vector of vertex's to append to. |
Implements Mezzanine::UI::Renderable.
Definition at line 283 of file linelist.cpp.
|
virtual |
Marks this renderable as dirty, and informs other renderables if needed.
Implements Mezzanine::UI::Renderable.
Definition at line 278 of file linelist.cpp.
Adds a new point/line to the list via 2 reals.
X | Coordinate on the X vector. |
Y | Coordinate on the Y vector. |
Definition at line 183 of file linelist.cpp.
Adds a new point/line to the list via a vector2.
Position | A vector2 representing the position on screen. |
Definition at line 189 of file linelist.cpp.
Adds a new point/line to the list via 2 reals.
X | Relative coordinate on the X vector. |
Y | Relative coordinate on the Y vector. |
Definition at line 171 of file linelist.cpp.
Adds a new point/line to the list via a vector2.
Position | A vector2 representing the relative position on screen. |
Definition at line 177 of file linelist.cpp.
LineList & Mezzanine::UI::LineList::Begin | ( | const Whole & | LineThickness, |
const ColourValue & | LineColour | ||
) |
Starts a new line list.
If this function is called while lines have already been defined, it will clear the current list of lines and start a new list.
LineThickness | The thickness of the line to draw in pixels. |
LineColour | The colour of the line. |
Definition at line 162 of file linelist.cpp.
void Mezzanine::UI::LineList::End | ( | Boole | Closed = false | ) |
Finalizes the list and prepares it for rendering.
Closed | Whether or not the line list connects back to it's starting position. If true this will create one last line connecting the last provided position with the first. |
Definition at line 195 of file linelist.cpp.
const ColourValue & Mezzanine::UI::LineList::GetLineColour | ( | ) | const |
Gets the colour of this linelist.
Definition at line 219 of file linelist.cpp.
const Real & Mezzanine::UI::LineList::GetLineThickness | ( | ) | const |
Gets the thickness of the line generated by this linelist.
Definition at line 224 of file linelist.cpp.
const LineList::PointVector & Mezzanine::UI::LineList::GetPoints | ( | ) | const |
Gets the vector of points stored by this linelist.
Definition at line 209 of file linelist.cpp.
|
virtual |
Gets the type of renderable this is.
Implements Mezzanine::UI::Renderable.
Definition at line 204 of file linelist.cpp.
|
virtual |
Gets the visibility setting of this renderable.
Implements Mezzanine::UI::Renderable.
Definition at line 240 of file linelist.cpp.
|
virtual |
Forces this renderable to hide.
Implements Mezzanine::UI::Renderable.
Definition at line 255 of file linelist.cpp.
Boole Mezzanine::UI::LineList::IsClosed | ( | ) | const |
Gets whether or not this linelist is enclosed.
Definition at line 214 of file linelist.cpp.
|
virtual |
Gets whether or not this renderable is being drawn.
This function will check the visibility of all parent objects to see if it is being drawn. This will not tell you whether or not this renderable has it's own visibility setting enabled. For that see: GetVisible().
Implements Mezzanine::UI::Renderable.
Definition at line 245 of file linelist.cpp.
|
virtual |
Sets the visibility of this renderable.
CanSee | Boole determining whether or not this renderable should be visible. |
Implements Mezzanine::UI::Renderable.
Definition at line 232 of file linelist.cpp.
|
virtual |
Forces this renderable to be shown.
Implements Mezzanine::UI::Renderable.
Definition at line 250 of file linelist.cpp.
|
virtual |
Updates the dimensions of this QuadRenderable based on the transform of it's parent.
This function is called automatically when a parent changes in size, and shouldn't need to be called manually.
Definition at line 263 of file linelist.cpp.
|
protected |
A bool indicating whether or not an additional segment should be generated between the first and last points.
Definition at line 82 of file linelist.h.
|
protected |
The colour of the line.
Definition at line 70 of file linelist.h.
|
protected |
The points in 2D space that create this line.
Definition at line 73 of file linelist.h.
|
protected |
The internal renderer responsible for generating this lines vertices.
Definition at line 76 of file linelist.h.
|
protected |
The pixel thickness of the each line segment in this linelist.
Definition at line 79 of file linelist.h.