A MarkupModel part for drawing lines. More...
Public Member Functions | |
MarkupPartLines () | |
Constructs an empty part. More... | |
MarkupPartLines (const Color3f &color, float lineWidth, bool alwaysVisible, float eyeLiftFactor) | |
Constructs a part with the given settings. More... | |
virtual PartType | type () const |
Returns the type of the part. Always MarkupPart::LINES. 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 current line color. More... | |
void | setColor (const Color3f &color) |
Sets the line color. More... | |
float | lineWidth () const |
Returns the current line width in pixels. More... | |
void | setLineWidth (float lineWidth) |
Sets the line width in pixels. More... | |
bool | alwaysVisible () const |
Returns true if the lines are always visible and does not use the z buffer. More... | |
void | setAlwaysVisible (bool showAlways) |
Sets if the lines should be always visible and not use the z buffer. More... | |
float | eyeLiftFactor () const |
Returns the eye lift factor of the lines. More... | |
void | setEyeLiftFactor (float factor) |
Sets the eye lift factor for the lines. More... | |
void | add (const Vec3d &vertex1, const Vec3d &vertex2) |
Adds the given line to the part. More... | |
void | add (const std::vector< Vec3d > &vertices) |
Adds the given lines to the part. More... | |
size_t | count () const |
Returns the number of line segments in the part. More... | |
void | removeAll () |
Removes all lines from the part. More... | |
const std::vector< Vec3d > & | vertices () const |
Returns the vertices describing the line segments of 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< MarkupPartLines > | create (const std::vector< Vec3d > &vertices, const Color3f &color, float lineWidth=1.0f, bool alwaysVisible=false, float eyeLiftFactor=0.0f) |
Returns a newly created part with the given line segments and settings. More... | |
static PtrRef< MarkupPartLines > | create (const Vec3d &vertex1, const Vec3d &vertex2, const Color3f &color, float lineWidth=1.0f, bool alwaysVisible=false, float eyeLiftFactor=0.0f) |
Returns a newly created part with one line segment <vertex1 -> vertex2> 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 lines.
The part can contain any number of lines, but all lines will share the same settings for
cee::vis::MarkupPartLines::MarkupPartLines | ( | ) |
Constructs an empty part.
cee::vis::MarkupPartLines::MarkupPartLines | ( | const Color3f & | color, |
float | lineWidth, | ||
bool | alwaysVisible, | ||
float | eyeLiftFactor | ||
) |
Constructs a part with the given settings.
Adds the given line to the part.
void cee::vis::MarkupPartLines::add | ( | const std::vector< Vec3d > & | vertices | ) |
Adds the given lines to the part.
The array must contain pairs of vertices specifying the line segments to add.
bool cee::vis::MarkupPartLines::alwaysVisible | ( | ) | const |
Returns true if the lines are always visible and does not use the z buffer.
|
virtual |
Returns the current bounding box of the part.
Implements cee::vis::MarkupPart.
const Color3f & cee::vis::MarkupPartLines::color | ( | ) | const |
Returns the current line color.
size_t cee::vis::MarkupPartLines::count | ( | ) | const |
Returns the number of line segments in the part.
|
static |
Returns a newly created part with the given line segments and settings.
The returned part will have vertices.size()/2
lines, as the array contains pairs of <start,end> vertices.
|
static |
Returns a newly created part with one line segment <vertex1 -> vertex2>
The returned part will have vertices.size()/2
lines, as the array contains pairs of <start,end> vertices.
float cee::vis::MarkupPartLines::eyeLiftFactor | ( | ) | const |
Returns the eye lift factor of the lines.
float cee::vis::MarkupPartLines::lineWidth | ( | ) | const |
Returns the current line width in pixels.
|
virtual |
Returns the render priority of the part.
Implements cee::vis::MarkupPart.
void cee::vis::MarkupPartLines::removeAll | ( | ) |
Removes all lines from the part.
void cee::vis::MarkupPartLines::setAlwaysVisible | ( | bool | showAlways | ) |
Sets if the lines should be always visible and not use the z buffer.
void cee::vis::MarkupPartLines::setColor | ( | const Color3f & | color | ) |
Sets the line color.
void cee::vis::MarkupPartLines::setEyeLiftFactor | ( | float | factor | ) |
Sets the eye lift factor for the lines.
The eye lift factor specifies if the lines should be moved towards the camera (or away from the camera if the factor is negative).
This is useful for controlling the ordering of items that are defined in the same plane.
void cee::vis::MarkupPartLines::setLineWidth | ( | float | lineWidth | ) |
Sets the line width in pixels.
|
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 11.
Implements cee::vis::MarkupPart.
|
virtual |
Sets the transformation matrix to use for the part.
Implements cee::vis::MarkupPart.
|
virtual |
Returns the current transformation matrix for the part.
Implements cee::vis::MarkupPart.
|
virtual |
Returns the type of the part. Always MarkupPart::LINES.
Implements cee::vis::MarkupPart.
const std::vector< Vec3d > & cee::vis::MarkupPartLines::vertices | ( | ) | const |
Returns the vertices describing the line segments of the part.
The array contains pairs of start, end vertices for the lines. E.g.: <v1,v2,v3,v4> = line <v1 -> v2> , line <v3 -> v4>