C3D Toolkit  Kernel - 117950, Vision -

Two-dimensional polygon. More...

#include <mesh_polygon.h>

+ Inheritance diagram for MbPolygon:
+ Collaboration diagram for MbPolygon:

Public Member Functions

 MbPolygon ()
 Constructor without parameters.
 MbPolygon (const MbPolygon &)
 ~MbPolygon ()
void Reserve (size_t additionalSpace)
 Reserve memory for additionalSpace elements.
void SetMaxDelta (uint16 delta)
 Set the maximum increment.
void Adjust ()
 Free the unnecessary memory.
size_t Count () const
 Get count of points.
void HardFlushPoints ()
 HardFlush clear the polygon (free all the memory).
void SimpleFlushPoints ()
 Flush clear polygon.
void AddPoint (double x, double y)
 Add a new point.
void AddPoint (const MbCartPoint &)
 Add a new point.
void AddPolygon (const MbPolygon &)
 Add a polygon.
bool RemovePoint (size_t index)
 Remove the point.
bool GetPoint (size_t i, MbCartPoint &) const
 Get the next point.
bool GetPoint (size_t i, MbFloatPoint &) const
 Get the next point.
bool SetPoint (size_t i, const MbCartPoint &)
 Change a point.
bool SetPoint (size_t i, const MbFloatPoint &)
 Change a point.
bool GetCoords (size_t i, double &x, double &y) const
 Get the next point.
void GetPoints (SArray< MbCartPoint > &) const
 Fill the container.
void GetPoints (SArray< MbFloatPoint > &) const
 Fill the container.
const MbFloatPointGetPoint (size_t i) const
 Get point.
void Move (const MbVector &)
 Move the polygon.
void Rotate (const MbCartPoint &, const MbDirection &)
 Rotate a polygon about a point.
void Transform (const MbMatrix &)
 Transform a polygon according to the matrix.
void Inverse ()
 Inverse the direction.
const MbRectGetRect () const
 Get bounding box.
double GetLength () const
 Get length of the polygon.
double GetSag () const
 Get sag.
void SetSag (double s)
 Set sag.
bool IsConvex () const
 Whether the polygon is convex.
double Area () const
 Area of the polygon.
MbPolylineConvertToPolyline () const
 Create a polyline from the polygon.
const MbFloatPointGetAddr () const
 Get the address of the beginning of the array.
- Public Member Functions inherited from MbRefItem
virtual MbeRefType RefType () const
 Registration type (for copying, duplication).
refcount_t GetUseCount () const
 Get count of references (get count of owners of an object).
refcount_t AddRef () const
 Increase count of references by one.
refcount_t DecRef () const
 Decrease count of references by one.
refcount_t Release () const
 Decrease count of references by one and if count of references became zero, then remove itself.

Additional Inherited Members

- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.

Detailed Description

Two-dimensional polygon.

Two-dimensional polygon is an ordered set of points in two-dimensional space, sequential connection of them produces a polyline that approximate a two-dimensional object.

The documentation for this class was generated from the following file: