Rogue Wave Views Foundation Package API Reference Guide |
Rogue Wave Views Documentation Home |
Geometric class. More...
#include <ilviews/base/ptarray.h>
Public Member Functions | |
IlvPointArray () | |
Constructor. More... | |
IlvPointArray (IlUInt count, const IlvPoint *points, IlBoolean copy=IlTrue) | |
Constructor. More... | |
IlvPointArray (const IlvPointArray &source) | |
Copy constructor. More... | |
~IlvPointArray () | |
Destructor. More... | |
void | addPoints (IlUInt count, const IlvPoint *points, IlUInt where) |
Appends a point array. More... | |
void | applyTransform (const IlvTransformer *t) |
Applies a transformer to the object. More... | |
IlInt | area (const IlvTransformer *t=0) const |
Computes the area of the point array. More... | |
const IlvRect & | bbox () const |
Retrieves the bounding box of the points. More... | |
void | boundingBox (IlvRect &box, const IlvTransformer *t=0) const |
Retrieves the transformed bounding box of the points. More... | |
void | movePoint (const IlvPoint &pos, IlUInt which) |
Moves a point. More... | |
IlUInt | nbHorizontalIntersect (const IlvPoint &p) const |
Counts horizontal crossings. More... | |
IlUInt | npoints () const |
Retrieves the size of the array. More... | |
IlBoolean | outlineContains (const IlvPoint &p) const |
Hit test. More... | |
const IlvPoint * | points () const |
Retrieves the IlvPoint array. More... | |
const IlvPoint * | points (IlUInt index) const |
Retrieves a pointer in the IlvPoint array. More... | |
IlBoolean | removePoints (IlUInt start, IlUInt count) |
Removes a block of points. More... | |
void | setPoints (IlUInt count, const IlvPoint *points, IlBoolean copy=IlTrue) |
Sets the point array. More... | |
Geometric class.
Library: xviews or winviews or mviews (mutually exclusive)
IlvPointArray
is a class that encapsulates an array of IlvPoints
so that you can more easily manipulate these arrays.
IlvPointArray::IlvPointArray | ( | ) |
Constructor.
Initializes a new, empty instance of IlvPointArray
.
Constructor.
count | The number of initial points of this array. |
points | The array of at least count points that defines the shape of this new instance. |
copy | If set to IlTrue , this constructor makes a copy of points and the user is responsible of freeing points if necessary. If copy is IlFalse , the IlvPointArray stores directly the parameter points and the user must not modify it anymore. |
IlvPointArray::IlvPointArray | ( | const IlvPointArray & | source | ) |
Copy constructor.
Initializes a new IlvPointArray
as a copy of source.
source | The instance that is copied. |
IlvPointArray::~IlvPointArray | ( | ) |
Destructor.
The destructor deletes the internal point array. The IlvPointArray
must always be considered as the owner of the array of the IlvPoint
it stores. This array is deleted when the object is destroyed.
Appends a point array.
count | The number of points to be appended. |
points | The array of at least count IlvPoints that are appended. This array is copied, so the user is responsible for deleting points if necessary. |
where | The insertion index. where becomes the index of the first point of points in the new array. |
void IlvPointArray::applyTransform | ( | const IlvTransformer * | t | ) |
Applies a transformer to the object.
The transformer t is applied to each point in the array.
t | The transformer to be applied. |
IlInt IlvPointArray::area | ( | const IlvTransformer * | t = 0 | ) | const |
Computes the area of the point array.
t | The transformer that must be applied before the area is computed. |
IlvPoints
of the object. This area is positive if the polygon turns clockwise. const IlvRect& IlvPointArray::bbox | ( | ) | const |
Retrieves the bounding box of the points.
IlvPoints
in the array. void IlvPointArray::boundingBox | ( | IlvRect & | box, |
const IlvTransformer * | t = 0 |
||
) | const |
Retrieves the transformed bounding box of the points.
box | The output transformed bounding box. It is the IlvRect obtained by applying the transformer t to the bounding box of the IlvPointArray . box strictly includes the bounding box of the point array if the transformer t is applied to each point. |
t | The transformed to be applied. If this parameter is not provided, or set to 0 , the points are not transformed when the bounding box is computed. |
Moves a point.
pos | The new location of the point. |
which | The index of the point to move. |
Counts horizontal crossings.
p | The source point of the horizontal ray. |
IlvPoints
of the object. The ray starts at p and goes towards positive x
. IlUInt IlvPointArray::npoints | ( | ) | const |
Retrieves the size of the array.
IlvPoints
in the internal array. Hit test.
p | The point whose location is tested. |
IlTrue
if p lies on a segment of the polyline formed by the sequence of IlvPoints
of the object. const IlvPoint* IlvPointArray::points | ( | ) | const |
Retrieves the IlvPoint
array.
IlvPoints
. This array must not be modified nor freed. Removes a block of points.
start | The index of the first point to be removed. |
count | The number of consecutive points to be removed. |
IlTrue
if the operation is successful, and IlFalse
if the operation cannot be performed (not enough points in the array). Sets the point array.
count | The number of points that are set. |
points | The source array of points. It must store at least count IlvPoints . |
copy | Indicates, if set to IlTrue , that the array is copied before it is stored in this object. If copy is IlFalse , the IlvPointArray stores directly the parameter points and the user must no longer modify it. |
© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.