A grouping of individual 2D shapes used to express more elaborate shapes. More...
#include <multishape.h>
Public Types | |
typedef LineSegmentContainer::const_iterator | ConstLineSegmentIterator |
Const Iterator type for LineSegment2D instances being stored in this class. | |
typedef ShapeContainer::const_iterator | ConstShapeIterator |
Const Iterator type for Shape instances being stored in this class. | |
typedef std::vector< LineSegment2D > | LineSegmentContainer |
Basic container type for LineSegment2D storage in this class. | |
typedef LineSegmentContainer::iterator | LineSegmentIterator |
Iterator type for LineSegment2D instances being stored in this class. | |
typedef std::vector< Shape > | ShapeContainer |
Basic container type for Shape storage in this class. | |
typedef ShapeContainer::iterator | ShapeIterator |
Iterator type for Shape instances being stored in this class. | |
Public Member Functions | |
MultiShape () | |
Blank constructor. | |
MultiShape (const Shape &ToAdd) | |
Single shape constructor. More... | |
MultiShape (const ShapeContainer &ToAdd) | |
Multiple shape constructor. More... | |
~MultiShape () | |
Class destructor. | |
MultiShape & | AddMultiShape (const MultiShape &Other) |
Append every shape of another MultiShape to this MultiShape. More... | |
MultiShape & | AddShape (const Shape &ToAdd) |
Adds a shape to this MultiShape. More... | |
void | BuildFromSegmentSoup (const LineSegmentContainer &Segments) |
Creates this MultiShape from a listing of segments. More... | |
MultiShape & | Close () |
Closes each shape in this MultiShape. More... | |
Mesh * | GenerateMesh (const String &Name, const String &Group) |
Outputs a mesh representing this MultiShape. More... | |
Whole | GetNumShapes () const |
Gets the number of shapes in this MultiShape. More... | |
Point2DContainer | GetPoints () const |
Gets a container of all the points in this MultiShape. More... | |
Shape & | GetShape (const Whole Index) |
Gets a shape by index. More... | |
const Shape & | GetShape (const Whole Index) const |
Gets a shape by index. More... | |
Boole | IsClosed () const |
Gets whether or not every Shape in this MultiShape is closed. More... | |
Boole | IsOutsideRealOutside () const |
Gets whether the currently set OutSide is the real Outside. More... | |
Boole | IsPointInside (const Vector2 &Point) const |
Gets whether or not a point is inside this MultiShape. More... | |
void | RemoveAllShapes () |
Removes all shapes from this MultiShape. | |
Protected Attributes | |
ShapeContainer | Shapes |
Container storing all of the Shapes that form this MultiShape. More... | |
A grouping of individual 2D shapes used to express more elaborate shapes.
There are a number of assumptions that are made and are not checked against; the shapes must not cross each other.
Definition at line 87 of file multishape.h.
Mezzanine::Graphics::Procedural::MultiShape::MultiShape | ( | const Shape & | ToAdd | ) |
Single shape constructor.
ToAdd | The shape to be added to this MultiShape. |
Definition at line 88 of file multishape.cpp.
Mezzanine::Graphics::Procedural::MultiShape::MultiShape | ( | const ShapeContainer & | ToAdd | ) |
Multiple shape constructor.
ToAdd | A container of shapes that will all be added to this MultiShape. |
Definition at line 91 of file multishape.cpp.
MultiShape & Mezzanine::Graphics::Procedural::MultiShape::AddMultiShape | ( | const MultiShape & | Other | ) |
Append every shape of another MultiShape to this MultiShape.
Other | The other MultiShape to append. |
Definition at line 304 of file multishape.cpp.
MultiShape & Mezzanine::Graphics::Procedural::MultiShape::AddShape | ( | const Shape & | ToAdd | ) |
Adds a shape to this MultiShape.
ToAdd | The shape to be added. |
Definition at line 298 of file multishape.cpp.
void Mezzanine::Graphics::Procedural::MultiShape::BuildFromSegmentSoup | ( | const LineSegmentContainer & | Segments | ) |
Creates this MultiShape from a listing of segments.
Segments | The segments to form this MultiShape from. |
Definition at line 116 of file multishape.cpp.
MultiShape & Mezzanine::Graphics::Procedural::MultiShape::Close | ( | ) |
Closes each shape in this MultiShape.
Definition at line 278 of file multishape.cpp.
Mesh * Mezzanine::Graphics::Procedural::MultiShape::GenerateMesh | ( | const String & | Name, |
const String & | Group | ||
) |
Outputs a mesh representing this MultiShape.
Name | The name of the mesh to be generated. |
Group | The name of the resource group to create the mesh in. |
Definition at line 100 of file multishape.cpp.
Whole Mezzanine::Graphics::Procedural::MultiShape::GetNumShapes | ( | ) | const |
Gets the number of shapes in this MultiShape.
Definition at line 317 of file multishape.cpp.
Point2DContainer Mezzanine::Graphics::Procedural::MultiShape::GetPoints | ( | ) | const |
Gets a container of all the points in this MultiShape.
Definition at line 187 of file multishape.cpp.
Gets a shape by index.
Index | The index of the shape to retrieve. |
Definition at line 311 of file multishape.cpp.
Gets a shape by index.
Index | The index of the shape to retrieve. |
Definition at line 314 of file multishape.cpp.
Boole Mezzanine::Graphics::Procedural::MultiShape::IsClosed | ( | ) | const |
Gets whether or not every Shape in this MultiShape is closed.
Definition at line 285 of file multishape.cpp.
Boole Mezzanine::Graphics::Procedural::MultiShape::IsOutsideRealOutside | ( | ) | const |
Gets whether the currently set OutSide is the real Outside.
Definition at line 249 of file multishape.cpp.
Gets whether or not a point is inside this MultiShape.
Point | The location in 2D space to check. |
Definition at line 198 of file multishape.cpp.
|
protected |
Container storing all of the Shapes that form this MultiShape.
Definition at line 105 of file multishape.h.