Spinning Topp Logo BlackTopp Studios
inc
shape.h
1 // © Copyright 2010 - 2016 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 /*
41  -----------------------------------------------------------------------------
42  This source file is part of ogre-procedural
43 
44  For the latest info, see http://code.google.com/p/ogre-procedural/
45 
46  Copyright (c) 2010-2013 Michael Broutin
47 
48  Permission is hereby granted, free of charge, to any person obtaining a copy
49  of this software and associated documentation files (the "Software"), to deal
50  in the Software without restriction, including without limitation the rights
51  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52  copies of the Software, and to permit persons to whom the Software is
53  furnished to do so, subject to the following conditions:
54 
55  The above copyright notice and this permission notice shall be included in
56  all copies or substantial portions of the Software.
57 
58  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
64  THE SOFTWARE.
65  -----------------------------------------------------------------------------
66  */
67 #ifndef _graphicsproceduralshape_h
68 #define _graphicsproceduralshape_h
69 
70 #include "Graphics/Procedural/proceduraldatatypes.h"
71 #include "Graphics/Procedural/proceduralenumerations.h"
72 
73 #include "linesegment.h"
74 #include "track.h"
75 
76 namespace Ogre
77 {
78  class ManualObject;
79 }
80 
81 namespace Mezzanine
82 {
83  namespace Graphics
84  {
85  class Mesh;
86  namespace Procedural
87  {
88  class Path;
89  class MultiShape;
90  struct IntersectionInShape;
91  ///////////////////////////////////////////////////////////////////////////////
92  /// @brief A collection of interconnected 2D points used to express an arbitrary 2D shape.
93  /// @details
94  ///////////////////////////////////////
96  {
97  public:
98  /// @brief Basic container type for the storage of Intersections in this class.
99  typedef std::vector<IntersectionInShape> IntersectionContainer;
100  /// @brief Iterator type for Intersections stored in this class.
101  typedef IntersectionContainer::iterator IntersectionIterator;
102  /// @brief Const Iterator type for Intersections stored in this class.
103  typedef IntersectionContainer::const_iterator ConstIntersectionIterator;
104  protected:
105  /// @internal
106  /// @brief Container storing all of the points that form this shape.
108  /// @internal
109  /// @brief Sets which extreme side of this shape is to be considered the outside of the shape. Useful when a shape is not closed.
111  /// @internal
112  /// @brief Whether or not the first point and last point should be connected, closing the shape.
114 
115  /// @internal
116  /// @brief Performs a boolean operation between this shape and another shape.
117  /// @param Other The other shape to perform the boolean operation with.
118  /// @param OpType The type of boolean operation to perform.
119  /// @return Returns a MultiShape containing the results of the boolean operation.
120  MultiShape _BooleanOperation(const Shape& Other, const Procedural::BooleanOperation OpType) const;
121  /// @internal
122  /// @brief Gets whether or not the current boolean operation is looking for outside edges of the two shapes being processed.
123  /// @param OpType The type of boolean operation being performed.
124  /// @param ShapeSelector A 0 or 1 describing which shape the current edge being processed belongs to.
125  /// @return Returns true if the current operation is seeking the outside edges of the two shapes, or false if it's seeking the inner edges.
126  Boole _IsLookingForOutside(const Procedural::BooleanOperation OpType, const Char8 ShapeSelector) const;
127  /// @internal
128  /// @brief Gets whether or not the segment being operated on is to be incremented.
129  /// @param Dot The Dot Product of the directions from the two points in an intersection.
130  /// @param OpType The type of boolean operation being performed.
131  /// @param ShapeSelector A 0 or 1 describing which shape the current edge being processed belongs to.
132  /// @return Returns 1 if the shape is being increased, or -1 if the shape is being decreased.
133  Char8 _IsIncreasing(const Real Dot, const Procedural::BooleanOperation OpType, const Char8 ShapeSelector) const;
134  /// @internal
135  /// @brief Determines which segment to follow when an intersection is encountered.
136  /// @param InputShapes An array of shapes being operated on.
137  /// @param OpType The type of boolean operation being performed.
138  /// @param Intersection The intersection that was encountered.
139  /// @param ShapeSelector A 0 or 1 that is the index of the shape that owns the segment to advance along.
140  /// @param IsIncreasing A -1 or 1 indicating whether the segment being operated on is to be incremented.
141  /// @param CurrentSegment The index of the line segment in the intersection to advance along.
142  /// @return Returns true if a valid segment to follow was found, or false if not viable segments were found.
143  Boole _FindWhereToGo(const Shape* InputShapes[], const Procedural::BooleanOperation OpType, const IntersectionInShape& Intersection, UInt8& ShapeSelector, Char8& IsIncreasing, Whole& CurrentSegment) const;
144  /// @internal
145  /// @brief Finds all detectable intersections between this shape and another shape.
146  /// @param Other The other shape to compare with this one.
147  /// @param Intersections A container of to be populated with the known intersections between this shape and another.
148  void _FindAllIntersections(const Shape& Other, IntersectionContainer& Intersections) const;
149  public:
150  /// @brief Class constructor.
151  Shape();
152  /// @brief Class destructor.
153  ~Shape();
154 
155  ///////////////////////////////////////////////////////////////////////////////
156  // Utility
157 
158  /// @brief Outputs a mesh representing this shape.
159  /// @param Name The name of the mesh to be generated.
160  /// @param Group The name of the resource group to create the mesh in.
161  /// @return Returns a pointer to the new mesh.
162  Mesh* GenerateMesh(const String& Name, const String& Group) const;
163 
164  /// @brief Appends all the points from another shape to this shape.
165  /// @param Other The other shape to append to this shape.
166  /// @return Returns a reference to this.
167  Shape& AppendShape(const Shape& Other);
168  /// @brief Appends all the points from another shape to this shape with their positions relative to the position of the last point in this shape.
169  /// @param Other The other shape to append to this shape.
170  /// @return Returns a reference to this.
171  Shape& AppendShapeRel(const Shape& Other);
172  /// @brief Extracts a part of the shape as a new shape.
173  /// @param First The first index of this shape to be in the new shape.
174  /// @param Last The last index of this shape to be in the new shape.
175  /// @return Returns a new shape containing the specified points from this shape.
176  Shape ExtractSubShape(const Whole First, const Whole Last);
177 
178  /// @brief Appends the contents of a 2D track to this shape.
179  /// @remarks Low values for NumPoints will cause curves to look blocky. How how it should be depends on the resolution of the curve you want.
180  /// @param Curve The 2D curved track of points to append to this shape.
181  /// @param NumPoints The number of points along the curve to generate for this shape.
182  template< template<class> class Interpolator >
183  void AppendTrack(const Track< Interpolator< Vector2 > >& Curve, const Whole NumPoints)
184  {
185  // Minus one because we want to include the end of the curve without going over the number of points requested
186  for( Whole CurrPoint = 0 ; CurrPoint < NumPoints ; ++CurrPoint )
187  {
188  Real InterpolateVal = static_cast<Real>( CurrPoint ) / static_cast<Real>( NumPoints - 1 );
189  Vector2 CurvePoint = Curve.GetInterpolated(InterpolateVal);
190  this->AddPoint(CurvePoint);
191  }
192  }
193 
194  /// @brief Gets the number of segments in this shape.
195  /// @return Returns a Whole containing the number of segments that form this shape.
196  Whole GetSegCount() const;
197  /// @brief Gets the total length of all segments in this shape.
198  /// @return Returns a Real representing the combined length of each segment in this shape.
199  Real GetTotalLength() const;
200  /// @brief Tells whether a point is inside a shape or not.
201  /// @param Point The point to check.
202  /// @return Returns true if the point is inside this shape, false otherwise.
203  Boole IsPointInside(const Vector2& Point) const;
204  /// @brief Computes the radius of a bounding circle centered on the origin of this shape.
205  /// @return Returns a Real representing the bounding radius of this shape.
206  Real FindBoundingRadius() const;
207 
208  /// @brief Gets the position on a segment.
209  /// @exception If the provided index is out of bounds or the Coord is outside of the range 0-1 then a PARAMETERS_EXCEPTION will be thrown.
210  /// @param Index The index of the point starting the segment to retrieve the point from.
211  /// @param Coord The relative point on the specified segment to get the position of.
212  /// @return Returns a Vector2 containing the point at the specified position.
213  Vector2 GetPosition(const Whole Index, const Real Coord) const;
214  /// @brief Gets the position at the specified length along the shape.
215  /// @exception If the shape has less than 2 points then a PARAMETERS_EXCEPTION will be thrown.
216  /// @param Coord The length position to get the 2D position of.
217  /// @return Returns a Vector2 containing the position of the point at the specified length.
218  Vector2 GetPosition(Real Coord) const;
219 
220  /// @brief Create a symetric copy of the points in this shape at the origin point.
221  /// @param Flip If true then this will process the points in this shape in reverse order.
222  /// @return Returns a reference to this.
223  Shape& Mirror(Boole Flip = false);
224  /// @brief Create a symetric copy of the points in this shape at an arbitrary point.
225  /// @param X The position on the X axis to mirror at.
226  /// @param Y The position on the Y axis to mirror at.
227  /// @param Flip If true then this will process the points in this shape in reverse order.
228  /// @return Returns a reference to this.
229  Shape& MirrorAroundPoint(const Real X, const Real Y, Boole Flip = false);
230  /// @brief Create a symetric copy of the points in this shape at an arbitrary point.
231  /// @param Point The position to mirror at.
232  /// @param Flip If true then this will process the points in this shape in reverse order.
233  /// @return Returns a reference to this.
234  Shape& MirrorAroundPoint(const Vector2& Point, Boole Flip = false);
235  /// @brief Create a symetric copy of the points in this shape at an arbitrary axis.
236  /// @param Axis The axis to mirror at.
237  /// @param Flip If true then this will process the points in this shape in reverse order.
238  /// @return Returns a reference to this.
239  Shape& MirrorAroundAxis(const Vector2& Axis, Boole Flip = false);
240 
241  /// @brief Reflect all points in this shape against a zero-origined line with a given normal.
242  /// @param Normal The normal to reflect all points on.
243  /// @return Returns a reference to this.
244  Shape& Reflect(const Vector2& Normal);
245 
246  /// @brief Makes this a closed shape, connecting the last point to the first point.
247  /// @return Returns a reference to this.
248  Shape& Close();
249  /// @brief Gets whether or not this shape is closed.
250  /// @return Returns true if the last point is connected to the first, false otherwise.
251  Boole IsClosed() const;
252 
253  /// @brief Reverses direction/ordering of the segments in this shape.
254  /// @return Returns a reference to this.
255  Shape& Reverse();
256  /// @brief Clears all points from this shape.
257  /// @return Returns a reference to this.
258  Shape& Reset();
259 
260  ///////////////////////////////////////////////////////////////////////////////
261  // Point Management
262 
263  /// @brief Adds a point to the shape.
264  /// @param Point The point to be added.
265  /// @return Returns a reference to this.
266  Shape& AddPoint(const Vector2& Point);
267  /// @brief Adds a point to the shape.
268  /// @param X The position of the point to add on the X axis.
269  /// @param Y The position of the point to add on the Y axis.
270  /// @return Returns a reference to this.
271  Shape& AddPoint(const Real X, const Real Y);
272  /// @brief Adds a point to the shape, relative to the last position added.
273  /// @param Point The position of the point to be added that is in local space of the last position added.
274  /// @return Returns a reference to this.
275  Shape& AddPointRel(const Vector2& Point);
276  /// @brief Adds a point to the shape, relative to the last position added.
277  /// @param X The relative position of the point to add on the X axis.
278  /// @param Y The relative position of the point to add on the Y axis.
279  /// @return Returns a reference to this.
280  Shape& AddPointRel(const Real X, const Real Y);
281  /// @brief Inserts a point to the shape.
282  /// @param Index the index before the inserted point.
283  /// @param X The position of the point to insert on the X axis.
284  /// @param Y The position of the point to insert on the Y axis.
285  /// @return Returns a reference to this.
286  Shape& InsertPoint(const Whole Index, const Real X, const Real Y);
287  /// @brief Inserts a point to the shape.
288  /// @param Index the index before the inserted point.
289  /// @param Point The point to be inserted.
290  /// @return Returns a reference to this.
291  Shape& InsertPoint(const Whole Index, const Vector2& Point);
292 
293  /// @brief Gets a point by index which can be out of bounds and will wrap.
294  /// @param Index The index of the point to retrieve.
295  /// @return Returns a const reference to the point at the specified index.
296  const Vector2& GetPoint(const Integer Index) const;
297  /// @brief Gets the number of points in this shape.
298  /// @return Returns a Whole representing the number of points in this shape.
299  Whole GetPointCount() const;
300  /// @brief Converts a potentially unsafe Integer index into a safe Whole index.
301  /// @param Index The index to be converted.
302  /// @return Returns the converted safe index.
303  Whole GetBoundedIndex(const Integer Index) const;
304 
305  /// @brief Gets a copy of raw vector data of this shape.
306  /// @return Returns a new Point2DContainer storing a copy of all the points in this shape.
307  Point2DContainer GetPoints() const;
308  /// @brief Gets raw vector data of this shape as a non-const reference.
309  /// @return Returns a reference to the container storing all of the points in this shape.
310  Point2DContainer& GetPointsReference();
311  /// @brief Gets raw vector data of this shape as a const reference.
312  /// @return Returns a const reference to the container storing all of the points in this shape.
313  const Point2DContainer& GetPointsReference() const;
314 
315  ///////////////////////////////////////////////////////////////////////////////
316  // Transform
317 
318  /// @brief Applies the given translation to all the points in this shape.
319  /// @note This will only transfrom the points currently in this shape, not any additional points made after calling this.
320  /// @param Trans The amount of translation to apply.
321  /// @return Returns a reference to this.
322  Shape& Translate(const Vector2& Trans);
323  /// @brief Applies the given translation to all the points in this shape.
324  /// @note This will only transfrom the points currently in this shape, not any additional points made after calling this.
325  /// @param TransX The amount of translation to apply on the X axis.
326  /// @param TransY The amount of translation to apply on the Y axis.
327  /// @return Returns a reference to this.
328  Shape& Translate(const Real TransX, const Real TransY);
329  /// @brief Applies the given rotation to all the points in this shape.
330  /// @note This will only transfrom the points currently in this shape, not any additional points made after calling this.
331  /// @param Angle The amount of rotation to be applied in radians.
332  /// @return Returns a reference to this.
333  Shape& Rotate(const Real Angle);
334  /// @brief Applies the given scale to all the points in this shape.
335  /// @note This will only transfrom the points currently in this shape, not any additional points made after calling this.
336  /// @param Scaling The amount of scaling to apply to each axis.
337  /// @return Returns a reference to this.
338  Shape& Scale(const Real Scaling);
339  /// @brief Applies the given scale to all the points in this shape.
340  /// @note This will only transfrom the points currently in this shape, not any additional points made after calling this.
341  /// @param ScaleX The amount of scaling to be applied on the X axis.
342  /// @param ScaleY The amount of scaling to be applied on the Y axis.
343  /// @return Returns a reference to this.
344  Shape& Scale(const Real ScaleX, const Real ScaleY);
345  /// @brief Applies the given scale to all the points in this shape.
346  /// @note This will only transfrom the points currently in this shape, not any additional points made after calling this.
347  /// @param Scaling The amount of scaling to apply to each axis.
348  /// @return Returns a reference to this.
349  Shape& Scale(const Vector2& Scaling);
350 
351  ///////////////////////////////////////////////////////////////////////////////
352  // Directions and Normals
353 
354  /// @brief Gets the direction of a point to the next point in the sequence.
355  /// @param Index The index of the point to retrieve the direction for.
356  /// @return Returns a Vector2 containing the direction from the specified point to the next point.
357  Vector2 GetDirectionAfter(const Whole Index) const;
358  /// @brief Gets the direction from a point to the previous point in the sequence.
359  /// @param Index The index of the point to retrieve the direction for.
360  /// @return Returns a Vector2 containing the direction from the specified point to the previous point.
361  Vector2 GetDirectionBefore(const Whole Index) const;
362  /// @brief Gets the averaged direction from the specified point to both the next and previous points in the sequence.
363  /// @param Index The index of the point to retrieve the direction for.
364  /// @return Returns a Vector2 containing the averaged direction for both the next and previous points from the specified point.
365  Vector2 GetAvgDirection(const Whole Index) const;
366 
367  /// @brief Gets the normal of the segment after the specified point.
368  /// @param Index The index of the point to retrieve the normal for.
369  /// @return Returns the normal of the segment after the specified index.
370  Vector2 GetNormalAfter(const Whole Index) const;
371  /// @brief Gets the normal of the segment before the specified point.
372  /// @param Index The index of the point to retrieve the normal for.
373  /// @return Returns the normal of the segment before the specified index.
374  Vector2 GetNormalBefore(const Whole Index) const;
375  /// @brief Gets the averaged normal of the segments before and after the specified point.
376  /// @param Index The index of the point to retrieve the normal for.
377  /// @return Returns the averaged normal of the segment before and after the specified index.
378  Vector2 GetAvgNormal(const Whole Index) const;
379 
380  ///////////////////////////////////////////////////////////////////////////////
381  // OutSide
382 
383  /// @brief Sets which side is the OutSide of this shape.
384  /// @note This is used for such things as normal generation. Default is right, which corresponds to placing points anti-clockwise.
385  /// @param Side A ShapeSide enum value describing which side of this shape is the OutSide.
386  /// @return Returns a reference to this.
387  Shape& SetOutSide(const Procedural::ShapeSide Side);
388  /// @brief Gets which side is the OutSide of this shape.
389  /// @return Returns a ShapeSide enum value describing which side of this shape is the OutSide.
390  Procedural::ShapeSide GetOutSide() const;
391  /// @brief Toggles the currently set "OutSide".
392  /// @return Returns a reference to this.
393  Shape& SwitchSide();
394  /// @brief On a closed shape, find if the outside is located on the right or on the left.
395  /// @note If the outside can easily be guessed in your context, you'd rather use SetOutside(), which doesn't need any computation. @n @n
396  /// Also note that this is a guess made by the algorithm.
397  /// @return Returns a ShapeSide enum value describing which side of this shape is the OutSide.
398  Procedural::ShapeSide FindRealOutSide() const;
399  /// @brief Gets whether the currently set OutSide is the real Outside.
400  /// @return Returns true if the detected OutSide matches the currently set OutSide, false otherwise.
401  Boole IsOutsideRealOutside() const;
402 
403  ///////////////////////////////////////////////////////////////////////////////
404  // Conversion
405 
406  /// @brief Converts the shape to a 3D path.
407  /// @return Returns a path where: 3D.X = 2D.X, 3D.Y = 0, 3D.Z = 2D.Y for each point in this shape.
408  Path ConvertToPath() const;
409  /// @brief Applies a "thickness" to a shape, ie a bit like the extruder, but in 2D.
410  /// @param Amount The amount of thickness to be applied to this shape.
411  /// @return Returns a MultiShape instance that is the thickened shape.
412  MultiShape Thicken(const Real Amount);
413 
414  ///////////////////////////////////////////////////////////////////////////////
415  // Boolean Operations
416 
417  /// @brief Computes the intersection between this shape and another one.
418  /// @remarks Both shapes must be closed.
419  /// @exception This will throw an exception if either shape is not closed or contains less than 2 points. A INVALID_STATE_EXCEPTION
420  /// will be thrown if the calling shape is invalid, or a PARAMETERS_EXCEPTION if the parameter shape is invalid.
421  /// @param Other The shape against which the intersection is computed.
422  /// @return The intersection of two shapes, as a new shape.
423  MultiShape BooleanIntersect(const Shape& Other) const;
424  /// @brief Computes the union between this shape and another one.
425  /// @remarks Both shapes must be closed.
426  /// @exception This will throw an exception if either shape is not closed or contains less than 2 points. A INVALID_STATE_EXCEPTION
427  /// will be thrown if the calling shape is invalid, or a PARAMETERS_EXCEPTION if the parameter shape is invalid.
428  /// @param Other The shape against which the union is computed.
429  /// @return The union of two shapes, as a new shape.
430  MultiShape BooleanUnion(const Shape& Other) const;
431  /// @brief Computes the difference between this shape and another one.
432  /// @remarks Both shapes must be closed.
433  /// @exception This will throw an exception if either shape is not closed or contains less than 2 points. A INVALID_STATE_EXCEPTION
434  /// will be thrown if the calling shape is invalid, or a PARAMETERS_EXCEPTION if the parameter shape is invalid.
435  /// @param Other The shape against which the diffenrence is computed.
436  /// @return The difference of two shapes, as a new shape.
437  MultiShape BooleanDifference(const Shape& Other) const;
438 
439  ///////////////////////////////////////////////////////////////////////////////
440  // Internal Methods
441 
442  /// @brief Appends the shape vertices to a manual object being edited.
443  /// @param Object The manual object to append to.
444  void _AppendToManualObject(Ogre::ManualObject* Object) const;
445  };//Shape
446  }//Procedural
447  }//Graphics
448 }//Mezzanine
449 
450 #endif
std::vector< IntersectionInShape > IntersectionContainer
Basic container type for the storage of Intersections in this class.
Definition: shape.h:99
bool Boole
Generally acts a single bit, true or false.
Definition: datatypes.h:173
This class is used to check and modify the properties of a graphics mesh.
Definition: mesh.h:63
int Integer
A datatype used to represent any integer close to.
Definition: datatypes.h:154
IntersectionContainer::iterator IntersectionIterator
Iterator type for Intersections stored in this class.
Definition: shape.h:101
uint8_t UInt8
An 8-bit unsigned integer.
Definition: datatypes.h:118
Boole Closed
Whether or not the first point and last point should be connected, closing the shape.
Definition: shape.h:113
float Real
A Datatype used to represent a real floating point number.
Definition: datatypes.h:141
char Char8
A datatype to represent one character.
Definition: datatypes.h:169
Procedural::ShapeSide OutSide
Sets which extreme side of this shape is to be considered the outside of the shape. Useful when a shape is not closed.
Definition: shape.h:110
ShapeSide
An enum used to express which side to work with in Shape operations.
std::vector< Vector2 > Point2DContainer
Basic container type for the storage of 2D points.
This is used to represent a point on a 2 dimentional area, such as a screen.
Definition: vector2.h:63
Convenience class storing data on the point in a 2D shape where multiple segments intersect...
Definition: shape.cpp:103
BooleanOperation
An enum used to describe which boolean operation to take when processing two triangle buffers...
IntersectionContainer::const_iterator ConstIntersectionIterator
Const Iterator type for Intersections stored in this class.
Definition: shape.h:103
#define MEZZ_LIB
Some platforms require special decorations to denote what is exported/imported in a share library...
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
Point2DContainer Points
Container storing all of the points that form this shape.
Definition: shape.h:107
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Definition: datatypes.h:151
void AppendTrack(const Track< Interpolator< Vector2 > > &Curve, const Whole NumPoints)
Appends the contents of a 2D track to this shape.
Definition: shape.h:183
A collection of interconnected 2D points used to express an arbitrary 2D shape.
Definition: shape.h:95
A grouping of individual 2D shapes used to express more elaborate shapes.
Definition: multishape.h:87
A collection of interconnected 3D points used to express path through 3D space.
Definition: path.h:93
std::string String
A datatype used to a series of characters.
Definition: datatypes.h:159
A base type that provides container features for different tracks.
Definition: track.h:65