AvogadroLibs  1.96.0
Classes | Public Member Functions | Static Public Attributes | List of all members
LineStripGeometry Class Reference

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

#include <linestripgeometry.h>

Inheritance diagram for LineStripGeometry:
Drawable

Classes

struct  PackedVertex
 

Public Member Functions

 LineStripGeometry (const LineStripGeometry &other)
 
LineStripGeometryoperator= (LineStripGeometry)
 
void accept (Visitor &) override
 
void render (const Camera &camera) override
 Render the line strips. More...
 
void clear () override
 
Core::Array< PackedVertexvertices () const
 
size_t addLineStrip (const Core::Array< Vector3f > &vertices, const Core::Array< Vector4ub > &color, float lineWidth)
 
size_t addLineStrip (const Core::Array< Vector3f > &vertices, const Core::Array< Vector3ub > &color, float lineWidth)
 
size_t addLineStrip (const Core::Array< Vector3f > &vertices, float lineWidth)
 
void setColor (const Vector3ub &c)
 
Vector3ub color () const
 
void setOpacity (unsigned char opacity_)
 
unsigned char opacity () const
 
- Public Member Functions inherited from Drawable
 Drawable (const Drawable &other)
 
Drawableoperator= (Drawable)
 
const GeometryNodeparent () const
 Get a pointer to the drawable object's parent. More...
 
GeometryNodeparent ()
 
void setVisible (bool visibility)
 Set the visibility of the drawable object. More...
 
bool isVisible () const
 Get the current visibility of the drawable. More...
 
Identifieridentifier ()
 
const Identifieridentifier () const
 
virtual std::multimap< float, Identifierhits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const
 
virtual Core::Array< IdentifierareaHits (const Frustrum &f) const
 
void setRenderPass (RenderPass pass)
 
RenderPass renderPass () const
 

Static Public Attributes

static const size_t InvalidIndex
 

Additional Inherited Members

- Protected Member Functions inherited from Drawable
void setParent (GeometryNode *parent)
 Set the parent node for the node. More...
 
- Protected Attributes inherited from Drawable
GeometryNodem_parent
 
bool m_visible
 
RenderPass m_renderPass
 
Identifier m_identifier
 

Detailed Description

<avogadro/rendering/linestripgeometry.h>

Member Function Documentation

◆ accept()

void accept ( Visitor )
overridevirtual

Accept a visit from our friendly visitor.

Reimplemented from Drawable.

◆ render()

void render ( const Camera camera)
overridevirtual
Parameters
cameraThe current camera to be used for rendering.

Reimplemented from Drawable.

◆ clear()

void clear ( )
overridevirtual

Clear the contents of the node.

Reimplemented from Drawable.

◆ addLineStrip() [1/3]

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

Add a complete line strip to the object.

Parameters
verticesThe 3D vertices which will be connected to form the line strip.
colorVertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used.
lineWidthThe width of the line strip.
Note
All arrays must be the same length, or this function call will fail, returning InvalidIndex.
Returns
The index of the first vertex added by this call.

◆ addLineStrip() [2/3]

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

Add a complete line strip to the object.

Parameters
verticesThe 3D vertices which will be connected to form the line strip.
colorVertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used.
lineWidthThe width of the line strip.
Note
All arrays must be the same length, or this function call will fail, returning InvalidIndex.
Returns
The index of the first vertex added by this call.

◆ addLineStrip() [3/3]

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

Add a complete line strip to the object.

Parameters
verticesThe 3D vertices which will be connected to form the line strip.
colorVertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used.
lineWidthThe width of the line strip.
Note
All arrays must be the same length, or this function call will fail, returning InvalidIndex.
Returns
The index of the first vertex added by this call.

◆ setColor()

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.

◆ color()

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.

◆ setOpacity()

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.

◆ opacity()

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.

◆ vertices()

Core::Array<PackedVertex> vertices ( ) const

The vertex array.


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