A MarkupModel part for drawing arrows. More...
Public Member Functions | |
MarkupPartArrows () | |
Constructs an empty part. More... | |
MarkupPartArrows (const Color3f &color) | |
Constructs an empty part with the given color. More... | |
virtual PartType | type () const |
Returns the type of the part. Always MarkupPart::ARROWS. More... | |
virtual BoundingBox | boundingBox () const |
Returns the current bounding box of the part. More... | |
virtual void | setPriority (int priority) |
Sets render priority of the part. More... | |
virtual int | priority () const |
Returns the render priority of the part. More... | |
virtual const Mat4d & | transformation () const |
Returns the current transformation matrix for the part. More... | |
virtual void | setTransformation (const Mat4d &matrix) |
Sets the transformation matrix to use for the part. More... | |
const Color3f & | color () const |
Returns the color of the arrows in the part. More... | |
void | setColor (const Color3f &color) |
Sets the color to use to draw the arrows in the part. More... | |
size_t | count () const |
Returns the number of points in the part. More... | |
Vec3d | startPosition (size_t index) const |
Returns the start position of the arrow with the given index. More... | |
Vec3d | endPosition (size_t index) const |
Returns the end position of the arrow with the given index. More... | |
void | add (const Vec3d &startPosition, const Vec3d &endPosition) |
Adds an arrow to the part, specified with a startPosition and an endPosition. More... | |
void | add (const std::vector< Vec3d > &startPositions, const std::vector< Vec3d > &endPositions) |
Adds multiple arrows to the part. More... | |
void | set (size_t index, const Vec3d &startPosition, const Vec3d &endPosition) |
Sets the start and end position of the arrow with the given index. More... | |
void | remove (size_t index) |
Removes the arrow at the given index. More... | |
void | removeAll () |
Removes all arrows in the part. More... | |
![]() | |
bool | visible () const |
Returns true if the part is visible. More... | |
void | setVisible (bool visible) |
Sets if the part should be visible or not. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Static Public Member Functions | |
static PtrRef< MarkupPartArrows > | create (const Vec3d &startPosition, const Vec3d &endPosition, const Color3f &color) |
Returns a newly created part with the given settings. More... | |
Additional Inherited Members | |
![]() | |
enum | PartType { LABELS, TEXTS_3D, TRIANGLES, INSTANCED_GEOMETRY, LINES, POINTS, ARROWS, FIXED_SIZE_ARROW, FIXED_SIZE_SPHERE, FIXED_SIZE_IMAGE_GLYPH } |
Enum specifying the type of MarkupPart. More... | |
A MarkupModel part for drawing arrows.
A number of arrows can be added to the part. An arrow is defined by a starting point and an end point. All the arrows share the same color.
cee::vis::MarkupPartArrows::MarkupPartArrows | ( | ) |
Constructs an empty part.
cee::vis::MarkupPartArrows::MarkupPartArrows | ( | const Color3f & | color | ) |
Constructs an empty part with the given color.
Adds an arrow to the part, specified with a startPosition and an endPosition.
The arrow head will be at the endPosition
void cee::vis::MarkupPartArrows::add | ( | const std::vector< Vec3d > & | startPositions, |
const std::vector< Vec3d > & | endPositions | ||
) |
Adds multiple arrows to the part.
|
virtual |
Returns the current bounding box of the part.
Implements cee::vis::MarkupPart.
const Color3f & cee::vis::MarkupPartArrows::color | ( | ) | const |
Returns the color of the arrows in the part.
size_t cee::vis::MarkupPartArrows::count | ( | ) | const |
Returns the number of points in the part.
|
static |
Returns a newly created part with the given settings.
The returned part will have one arrow (startPosition to endPosition) and the given color.
cee::Vec3d cee::vis::MarkupPartArrows::endPosition | ( | size_t | index | ) | const |
Returns the end position of the arrow with the given index.
|
virtual |
Returns the render priority of the part.
Implements cee::vis::MarkupPart.
void cee::vis::MarkupPartArrows::remove | ( | size_t | index | ) |
Removes the arrow at the given index.
void cee::vis::MarkupPartArrows::removeAll | ( | ) |
Removes all arrows in the part.
void cee::vis::MarkupPartArrows::set | ( | size_t | index, |
const Vec3d & | startPosition, | ||
const Vec3d & | endPosition | ||
) |
Sets the start and end position of the arrow with the given index.
Note: The arrow must already be added to the part.
void cee::vis::MarkupPartArrows::setColor | ( | const Color3f & | color | ) |
Sets the color to use to draw the arrows in the part.
|
virtual |
Sets render priority of the part.
The render priority determines the order in which parts get rendered. Parts with lower priorities get rendered first. The default priority is 10.
Implements cee::vis::MarkupPart.
|
virtual |
Sets the transformation matrix to use for the part.
Implements cee::vis::MarkupPart.
cee::Vec3d cee::vis::MarkupPartArrows::startPosition | ( | size_t | index | ) | const |
Returns the start position of the arrow with the given index.
|
virtual |
Returns the current transformation matrix for the part.
Implements cee::vis::MarkupPart.
|
virtual |
Returns the type of the part. Always MarkupPart::ARROWS.
Implements cee::vis::MarkupPart.