v2.0.0
Loading...
Searching...
No Matches
DISP3DLIB::PolylineObject Class Reference

Connected line segments through an ordered list of points. More...

#include <polylineobject.h>

Public Member Functions

 PolylineObject ()
 ~PolylineObject ()
void setPoints (const QVector< Eigen::Vector3f > &vecPoints)
void clear ()
void setRadius (float fRadius)
void setGradient (const QColor &startColor, const QColor &endColor)
InstancedStreams streams () const
const RenderKey & renderKey () const
int indexCount () const
int instanceCount () const
bool isVisible () const
void setVisible (bool bVisible)
bool hasData () const

Detailed Description

Connected line segments through an ordered list of points.

Renders an ordered sequence of points as connected line segments.

Each segment is one instance of a unit cylinder, using the same instance layout as DipoleObject and NetworkObject so the existing Dipole pipeline can draw it without a dedicated shader.

Definition at line 78 of file polylineobject.h.

Constructor & Destructor Documentation

◆ PolylineObject()

DISP3DLIB::PolylineObject::PolylineObject ( )

Constructs a PolylineObject without any points.

Definition at line 37 of file polylineobject.cpp.

◆ ~PolylineObject()

DISP3DLIB::PolylineObject::~PolylineObject ( )
default

Destroys the PolylineObject.

Member Function Documentation

◆ clear()

void DISP3DLIB::PolylineObject::clear ( )

Clears all points.

Definition at line 69 of file polylineobject.cpp.

◆ hasData()

bool DISP3DLIB::PolylineObject::hasData ( ) const
inline
Returns
Whether there is at least one segment to draw.

Definition at line 186 of file polylineobject.h.

◆ indexCount()

int DISP3DLIB::PolylineObject::indexCount ( ) const
inline
Returns
Number of indices in the unit segment mesh.

Definition at line 148 of file polylineobject.h.

◆ instanceCount()

int DISP3DLIB::PolylineObject::instanceCount ( ) const
inline
Returns
Number of segment instances, one less than the number of points.

Definition at line 157 of file polylineobject.h.

◆ isVisible()

bool DISP3DLIB::PolylineObject::isVisible ( ) const
inline
Returns
Whether the polyline is drawn.

Definition at line 166 of file polylineobject.h.

◆ renderKey()

const RenderKey & DISP3DLIB::PolylineObject::renderKey ( ) const
inline
Returns
Identity of this object in the renderer's GPU cache.

Definition at line 139 of file polylineobject.h.

◆ setGradient()

void DISP3DLIB::PolylineObject::setGradient ( const QColor & startColor,
const QColor & endColor )

Sets the colours the segments are graded between from start to end.

Grading the line makes the direction of travel readable without any extra decoration.

Parameters
[in]startColorColour of the first segment.
[in]endColorColour of the last segment.

Definition at line 87 of file polylineobject.cpp.

◆ setPoints()

void DISP3DLIB::PolylineObject::setPoints ( const QVector< Eigen::Vector3f > & vecPoints)

Sets the points of the polyline.

Fewer than two points clears the object, since a single point has no segment to draw.

Parameters
[in]vecPointsPoints in scene coordinates, in order.

Definition at line 54 of file polylineobject.cpp.

◆ setRadius()

void DISP3DLIB::PolylineObject::setRadius ( float fRadius)

Sets the radius of the drawn segments.

Parameters
[in]fRadiusSegment radius in scene units.

Definition at line 79 of file polylineobject.cpp.

◆ setVisible()

void DISP3DLIB::PolylineObject::setVisible ( bool bVisible)
inline

Sets whether the polyline is drawn.

Parameters
[in]bVisibleTrue to draw the polyline.

Definition at line 177 of file polylineobject.h.

◆ streams()

InstancedStreams DISP3DLIB::PolylineObject::streams ( ) const
Returns
CPU streams of the unit segment mesh and of one instance per segment.

Definition at line 217 of file polylineobject.cpp.


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