A generator that will create a 3D model by moving a 2D shape along a 3D Path. More...
#include <extruder.h>
Inheritance diagram for Mezzanine::Graphics::Procedural::Extruder:
Collaboration diagram for Mezzanine::Graphics::Procedural::Extruder:Public Types | |
| typedef TrackMap::const_iterator | ConstTrackMapIterator |
| Const Iterator type for ParameterTracks. | |
| typedef Track< LinearInterpolator< Real > > | ParameterTrack |
| Convenience type for a Track that stores additional optional data. | |
| typedef std::map< Whole, ParameterTrack * > | TrackMap |
| Container type for storing ParameterTracks. | |
| typedef TrackMap::iterator | TrackMapIterator |
| Iterator type for ParameterTracks. | |
Public Types inherited from Mezzanine::Graphics::Procedural::MeshGenerator< Extruder > | |
| enum | GeneratorOptions |
| A convenience enum used to describe boolean options for a generator. | |
Public Member Functions | |
| Extruder () | |
| Class constructor. | |
| virtual | ~Extruder () |
| Class destructor. | |
| virtual void | AddToTriangleBuffer (TriangleBuffer &Buffer) const |
| Adds the vertices and indices as configured in this generator to a triangle buffer. More... | |
| Extruder & | SetCapped (const Boole Cap) |
| Sets whether or not the ends of each Path extruded are to be enclosed. More... | |
| Extruder & | SetMultiPathToExtrude (const MultiPath &ToExtrude) |
| Sets a MultiPath to be extruded along. More... | |
| Extruder & | SetMultiShapeToExtrude (const MultiShape &ToExtrude) |
| Sets a Multishape to be extruded. More... | |
| Extruder & | SetPathToExtrude (const Path &ToExtrude) |
| Sets a single Path to be extruded along. More... | |
| Extruder & | SetPathUTextureTrack (const Whole PathIndex, ParameterTrack *PathU) |
| Sets how the "U" component texture coordinates are to be generated for extruded shapes. More... | |
| Extruder & | SetRotationTrack (const Whole PathIndex, ParameterTrack *Rotation) |
| Sets how shapes are to be rotated on a specific Path. More... | |
| Extruder & | SetScaleTrack (const Whole PathIndex, ParameterTrack *Scale) |
| Sets how shapes are to be scaled on a specific Path. More... | |
| Extruder & | SetShapeToExtrude (const Shape &ToExtrude) |
| Sets a single Shape to be extruded. More... | |
| Extruder & | SetShapeVTextureTrack (const Whole ShapeIndex, ParameterTrack *ShapeV) |
| Sets how the "V" component texture coordinates are to be generated for extruded shapes. More... | |
Public Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< Extruder > | |
| MeshGenerator () | |
| Class constructor. | |
| virtual | ~MeshGenerator () |
| Class destructor. | |
| TriangleBuffer | BuildTriangleBuffer () const |
| Creates a TriangleBuffer with the the vertices and indices as configured in this generator. More... | |
| Mesh * | GenerateMesh (const String &MeshName, const String &MeshGroup, const String &MatName, const String &MatGroup) const |
| Generates the mesh. More... | |
| Extruder & | ResetTransforms () |
| Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More... | |
| Extruder & | SetEnableNormals (Boole EnableNormals) |
| Sets whether normals are enabled or not. More... | |
| Extruder & | SetNumTexCoordSet (const UInt8 NumSets) |
| Sets the number of texture coordintate sets. More... | |
| Extruder & | SetOrientation (const Quaternion &Ori) |
| Sets an orientation baked into the resulting mesh. More... | |
| Extruder & | SetOrientation (const Real X, const Real Y, const Real Z, const Real W) |
| Sets an orientation baked into the resulting mesh. More... | |
| Extruder & | SetPosition (const Vector3 &Loc) |
| Sets a translation baked into the resulting mesh. More... | |
| Extruder & | SetPosition (const Real X, const Real Y, const Real Z) |
| Sets a translation baked into the resulting mesh. More... | |
| Extruder & | SetScale (const Vector3 &Scaling) |
| Sets a scale baked into the resulting mesh. More... | |
| Extruder & | SetScale (const Real Scaling) |
| Sets a uniform scale baked into the resulting mesh. More... | |
| Extruder & | SetScale (const Real X, const Real Y, const Real Z) |
| Sets a scale baked into the resulting mesh. More... | |
| Extruder & | SetSwitchUV (Boole SwitchUV) |
| Sets whether to switch U and V texture coordinates. More... | |
| Extruder & | SetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom) |
| Sets the texture rectangle. More... | |
| Extruder & | SetUTile (const Real uTile) |
| Sets the U Tile. More... | |
| Extruder & | SetVTile (const Real vTile) |
| Sets the V Tile. More... | |
Protected Member Functions | |
| void | GenerateExtrusionCaps (TriangleBuffer &Buffer) const |
| Creates the caps at the end of each shape extruded along a given Path. More... | |
| void | GenerateExtrusionIntersection (TriangleBuffer &Buffer, const MultiPath::PathIntersection &Intersection, const Whole ShapeIndex) const |
| Creates an intersection of segments. More... | |
| void | GenerateExtrusionSegment (TriangleBuffer &Buffer, const Whole ShapeIndex, const Whole PathIndex, const Whole PathSegBegin, const Whole PathSegEnd) const |
| Creates a sequence of non-intersecting segments. More... | |
| void | GenerateExtrusionShape (TriangleBuffer &Buffer, const Whole PathIndex, const Whole ShapeIndex, const Real PathCoord, const Vector3 &Position, const Quaternion &LeftOri, const Quaternion &RightOri, const Real Scale, const Real ScaleLeftCorrect, const Real ScaleRightCorrect, const Boole JoinWithNextShape) const |
| Creates a single part of a segment being extruded. More... | |
| Vector2 | GenerateUVs (const Whole PathIndex, const Whole ShapeIndex, const Real PathCoord, const Real ShapeCoord) const |
| Creates appropriate UV coordinates for a given Vertex. More... | |
Protected Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< Extruder > | |
| void | AddPoint (TriangleBuffer &Buffer, const Vector3 &Loc, const Vector3 &Norm, const Vector2 &UV) const |
| Adds a new point to a triangle buffer, using the format defined for that MeshGenerator. More... | |
Protected Attributes | |
| Boole | Capped |
| Whether or not the ends of each Path will be capped. More... | |
| MultiPath | PathsToExtrude |
| A MultiPath storing all of the Paths the 2D shapes will be extruded along. More... | |
| TrackMap | PathUTextureTracks |
| A map of optional Tracks that store how texture coordinates are to be assigned along the Paths being extruded along. More... | |
| TrackMap | RotationTracks |
| A map of optional Tracks that store how the shapes on a given Path are to be rotated. More... | |
| TrackMap | ScaleTracks |
| A map of optional Tracks that store how the shapes on a given Path are to be scaled. More... | |
| MultiShape | ShapesToExtrude |
| A MultiShape storing all of the 2D shapes that will be extruded along the specified Paths. More... | |
| TrackMap | ShapeVTextureTracks |
| A map of optional Tracks that store how texture coordinates are to be assigned along the Shapes being extruded. More... | |
Protected Attributes inherited from Mezzanine::Graphics::Procedural::MeshGenerator< Extruder > | |
| UInt8 | GeneratorOpts |
| Storage for the boolean options to be used by this generator. More... | |
| UInt8 | NumTexCoordSet |
| The number of texture coordinate sets to include. More... | |
| Quaternion | Orientation |
| Orientation to apply the mesh. More... | |
| Vector3 | Position |
| Position to apply to the mesh. More... | |
| Vector3 | Scale |
| Scale to apply to the mesh. More... | |
| Real | UTile |
| U tile for texture coords generation. More... | |
| Vector2 | UVOrigin |
| Rectangle in which the texture coordinates will be placed. More... | |
| Real | VTile |
| V tile for texture coords generation. More... | |
A generator that will create a 3D model by moving a 2D shape along a 3D Path.
Definition at line 84 of file extruder.h.
|
virtual |
Adds the vertices and indices as configured in this generator to a triangle buffer.
| Buffer | The buffer to append this generators vertices and indices to. |
| If | neither the shape or multishape are defined an INVALID_STATE_EXCEPTION will be thrown. |
Implements Mezzanine::Graphics::Procedural::MeshGenerator< Extruder >.
Definition at line 376 of file extruder.cpp.
|
protected |
Creates the caps at the end of each shape extruded along a given Path.
| Buffer | The buffer to be modified. |
Definition at line 142 of file extruder.cpp.
|
protected |
Creates an intersection of segments.
| Buffer | The buffer to be modified. |
| Intersection | A single intersection of multiple segments in the MultiPath. |
| ShapeIndex | The index of the Shape to be extruded. |
Definition at line 301 of file extruder.cpp.
|
protected |
Creates a sequence of non-intersecting segments.
| Buffer | The buffer to be modified. |
| ShapeIndex | The index of the Shape to be extruded. |
| PathIndex | The index of the Path to be extruded along. |
| PathSegBegin | The index of the start of the segment on the specified Path. |
| PathSegEnd | The index of the end of the segment on the specified Path. |
Definition at line 237 of file extruder.cpp.
|
protected |
Creates a single part of a segment being extruded.
| Buffer | The buffer to be modified. |
| PathIndex | The index of the Path being extruded. |
| ShapeIndex | The index of the Shape being extruded. |
| PathCoord | The coordinate position on the current Path being extruded. |
| Position | The position on the Path the Shape will be extruded at. |
| LeftOri | The rotation to be applied to Negative-X positioned points in the Shape being extruded. |
| RightOri | The rotation to be applied to Positive-X positioned points in the Shape being extruded. |
| Scale | The scaling to be applied to the Shape being extruded at this segment. |
| ScaleLeftCorrect | The scaling adjustment to apply on the Negative-X positioned points in the Shape being extruded. |
| ScaleRightCorrect | The scaling adjustment to apply on the Positive-X positioned points in the Shape being extruded. |
| JoinWithNextShape | Whether or not to set up the indicies to |
Definition at line 107 of file extruder.cpp.
|
protected |
Creates appropriate UV coordinates for a given Vertex.
| PathIndex | The index of the Path being extruded. |
| ShapeIndex | The index of the Shape being extruded. |
| PathCoord | The coordinate position on the current Path being extruded. |
| ShapeCoord | The coordinate position on the current Shape being extruded. |
Definition at line 93 of file extruder.cpp.
Sets whether or not the ends of each Path extruded are to be enclosed.
Definition at line 480 of file extruder.cpp.
| Extruder & Mezzanine::Graphics::Procedural::Extruder::SetMultiPathToExtrude | ( | const MultiPath & | ToExtrude | ) |
Sets a MultiPath to be extruded along.
| ToExtrude | A MultiPath storing all of the Paths the 2D shapes will be extruded along. |
Definition at line 425 of file extruder.cpp.
| Extruder & Mezzanine::Graphics::Procedural::Extruder::SetMultiShapeToExtrude | ( | const MultiShape & | ToExtrude | ) |
Sets a Multishape to be extruded.
| ToExtrude | A MultiShape storing all of the 2D shapes that will be extruded along the specified Paths. |
Definition at line 440 of file extruder.cpp.
Sets a single Path to be extruded along.
| ToExtrude | A Path to be extruded along. |
Definition at line 417 of file extruder.cpp.
| Extruder & Mezzanine::Graphics::Procedural::Extruder::SetPathUTextureTrack | ( | const Whole | PathIndex, |
| ParameterTrack * | PathU | ||
| ) |
Sets how the "U" component texture coordinates are to be generated for extruded shapes.
| PathIndex | The index of the Path this Track is to be applied to. |
| PathU | A pointer to an optional Track that stores how texture coordinates are to be assigned along the Path being extruded along. Initial Value: NULL. |
Definition at line 463 of file extruder.cpp.
| Extruder & Mezzanine::Graphics::Procedural::Extruder::SetRotationTrack | ( | const Whole | PathIndex, |
| ParameterTrack * | Rotation | ||
| ) |
Sets how shapes are to be rotated on a specific Path.
| PathIndex | The index of the Path this Track is to be applied to. |
| Rotation | A pointer to an optional Track that stores how the shapes on a given Path are to be rotated. Initial Value: NULL. |
Definition at line 455 of file extruder.cpp.
| Extruder & Mezzanine::Graphics::Procedural::Extruder::SetScaleTrack | ( | const Whole | PathIndex, |
| ParameterTrack * | Scale | ||
| ) |
Sets how shapes are to be scaled on a specific Path.
| PathIndex | The index of the Path this Track is to be applied to. |
| Scale | A pointer to an optional Track that stores how the shapes on a given Path are to be scaled. Initial Value: NULL. |
Definition at line 447 of file extruder.cpp.
Sets a single Shape to be extruded.
| ToExtrude | A Shape to be extruded. |
Definition at line 433 of file extruder.cpp.
| Extruder & Mezzanine::Graphics::Procedural::Extruder::SetShapeVTextureTrack | ( | const Whole | ShapeIndex, |
| ParameterTrack * | ShapeV | ||
| ) |
Sets how the "V" component texture coordinates are to be generated for extruded shapes.
| ShapeIndex | The index of the Shape this Track is to be applied to. |
| ShapeV | A pointer to an optional Track that stores how texture coordinates are to be assigned along the shape being extruded. Initial Value: NULL. |
Definition at line 471 of file extruder.cpp.
|
protected |
Whether or not the ends of each Path will be capped.
Definition at line 116 of file extruder.h.
|
protected |
A MultiPath storing all of the Paths the 2D shapes will be extruded along.
Definition at line 98 of file extruder.h.
|
protected |
A map of optional Tracks that store how texture coordinates are to be assigned along the Paths being extruded along.
Definition at line 110 of file extruder.h.
|
protected |
A map of optional Tracks that store how the shapes on a given Path are to be rotated.
Definition at line 107 of file extruder.h.
|
protected |
A map of optional Tracks that store how the shapes on a given Path are to be scaled.
Definition at line 104 of file extruder.h.
|
protected |
A MultiShape storing all of the 2D shapes that will be extruded along the specified Paths.
Definition at line 101 of file extruder.h.
|
protected |
A map of optional Tracks that store how texture coordinates are to be assigned along the Shapes being extruded.
Definition at line 113 of file extruder.h.
1.8.9.1. Thanks to the
Open Icon Library
for help with some of the icons.