JugiMap Framework
|
The GeometricShape is the base class for geometric shapes. More...
#include <jmVectorShapes.h>
Inherited by BezierShape, EllipseShape, PolyLineShape, and SinglePointShape.
Public Member Functions | |
ShapeKind | GetKind () |
Returns the kind of this shape. More... | |
virtual bool | IsValid ()=0 |
Returns true if this shape is a valid geometric object; otherwise returns false. More... | |
bool | IsClosed () |
Returns true if this shape is a closed geometric object; otherwise returns false. More... | |
void | _SetClosed (bool _closed) |
Set the closed parameter when you create a geometric shape by hand. Do not change it for existing shapes! More... | |
std::vector< TShapePoint > & | GetPath () |
Returns a reference to the path vector of this geometric shape. More... | |
virtual void | RebuildPath ()=0 |
Rebuild the path from the current shape geometry. More... | |
float | GetPathLength () |
Returns the length of the path. More... | |
virtual Vec2f | GetPathPoint (float p) |
Returns a point along the path at the given parametric position p. More... | |
virtual Vec2f | GetPathPoint (float p, float &directionAngle) |
Returns a point along the path at the given parametric position p. More... | |
Static Public Member Functions | |
static GeometricShape * | Copy (GeometricShape *_geomShape) |
Create a new geometric object which is a copy of the given *_geomShape*. More... | |
static void | Assign (GeometricShape *sSrc, GeometricShape *sDst) |
Assign the content of the given sSrc to the sDst. More... | |
The GeometricShape is the base class for geometric shapes.
The GeometricShape provides the shape data for the VectorShape objects. It can be used for standalone objects in collision functions.
|
static |
Create a new geometric object which is a copy of the given *_geomShape*.
|
static |
Assign the content of the given sSrc to the sDst.
Assigning shapes sSrc and sDst must be of the same kind!
|
inline |
Returns the kind of this shape.
|
pure virtual |
Returns true if this shape is a valid geometric object; otherwise returns false.
This function is usually called from the VectorShape::IsValid.
Implemented in SinglePointShape, EllipseShape, BezierShape, and PolyLineShape.
|
inline |
Returns true if this shape is a closed geometric object; otherwise returns false.
This function is usually called from the VectorShape::IsClosed.
|
inline |
Set the closed parameter when you create a geometric shape by hand. Do not change it for existing shapes!
|
inline |
Returns a reference to the path vector of this geometric shape.
This function is usually called from the VectorShape::GetPath.
|
pure virtual |
Rebuild the path from the current shape geometry.
This function is usually called from the VectorShape::RebuildPath.
Implemented in SinglePointShape, EllipseShape, BezierShape, and PolyLineShape.
|
inline |
Returns the length of the path.
This function is usually called from the VectorShape::GetPathLength.
|
virtual |
Returns a point along the path at the given parametric position p.
This function is usually called from the VectorShape::GetPathPoint.
p | A parameter in the range of [0.0 - 1.0] where 0.0 gives the starting point and 1.0 gives the end point of the path. |
Reimplemented in SinglePointShape.
|
virtual |
Returns a point along the path at the given parametric position p.
This function is usually called from the VectorShape::GetPathPoint.
p | A parameter in the range of [0.0 - 1.0] where 0.0 gives the starting point and 1.0 gives the end point of the path. |
directionAngle | The direction angle of the path at the returned point. |
Reimplemented in SinglePointShape.