Avogadro::Rendering::LineStripGeometry#

class LineStripGeometry : public Drawable#

The LineStripGeometry class is used to store sets of line strips.

<avogadro/rendering/linestripgeometry.h>

Subclassed by ArcStrip, QuadOutline

Unnamed Group

size_t addLineStrip(const Core::Array<Vector3f> &vertices, const Core::Array<Vector4ub> &color, float lineWidth)#

Add a complete line strip to the object.

Note

All arrays must be the same length, or this function call will fail, returning InvalidIndex.

Parameters:
  • vertices – The 3D vertices which will be connected to form the line strip.

  • color – Vertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used.

  • lineWidth – The width of the line strip.

Returns:

The index of the first vertex added by this call.

size_t addLineStrip(const Core::Array<Vector3f> &vertices, const Core::Array<Vector3ub> &color, float lineWidth)#

Add a complete line strip to the object.

Note

All arrays must be the same length, or this function call will fail, returning InvalidIndex.

Parameters:
  • vertices – The 3D vertices which will be connected to form the line strip.

  • color – Vertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used.

  • lineWidth – The width of the line strip.

Returns:

The index of the first vertex added by this call.

size_t addLineStrip(const Core::Array<Vector3f> &vertices, const Vector3ub &color, float lineWidth)#

Add a complete line strip to the object.

Note

All arrays must be the same length, or this function call will fail, returning InvalidIndex.

Parameters:
  • vertices – The 3D vertices which will be connected to form the line strip.

  • color – Vertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used.

  • lineWidth – The width of the line strip.

Returns:

The index of the first vertex added by this call.

size_t addLineStrip(const Core::Array<Vector3f> &vertices, float lineWidth)#

Add a complete line strip to the object.

Note

All arrays must be the same length, or this function call will fail, returning InvalidIndex.

Parameters:
  • vertices – The 3D vertices which will be connected to form the line strip.

  • color – Vertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used.

  • lineWidth – The width of the line strip.

Returns:

The index of the first vertex added by this call.

Unnamed Group

inline void setColor(const Vector3ub &c)#

The default color of the lines. This is used to set the color of new vertices when no explicit vertex color is specified.

inline Vector3ub color() const#

The default color of the lines. This is used to set the color of new vertices when no explicit vertex color is specified.

Unnamed Group

inline void setOpacity(unsigned char opacity_)#

The default opacity of the lines. This is used when either no explicit vertex color is specified, or a three component color is used.

inline unsigned char opacity() const#

The default opacity of the lines. This is used when either no explicit vertex color is specified, or a three component color is used.

Public Functions

LineStripGeometry()#
LineStripGeometry(const LineStripGeometry &other)#
~LineStripGeometry() override#
inline LineStripGeometry &operator=(LineStripGeometry)#
virtual void accept(Visitor&) override#

Accept a visit from our friendly visitor.

virtual void render(const Camera &camera) override#

Render the line strips.

Parameters:

camera – The current camera to be used for rendering.

virtual void clear() override#

Clear the contents of the node.

inline Core::Array<PackedVertex> vertices() const#

The vertex array.

Public Static Attributes

static const size_t InvalidIndex#

Friends

friend void swap(LineStripGeometry &lhs, LineStripGeometry &rhs)#
struct PackedVertex#

Public Functions

inline PackedVertex(const Vector3f &v, const Vector4ub &c)#

Public Members

Vector3f vertex#
Vector4ub color#

Public Static Functions

static inline int vertexOffset()#
static inline int colorOffset()#