AvogadroLibs 1.97.0
Classes | Public Member Functions | List of all members
DashedLineGeometry Class Reference

The DashedLineGeometry class is used to store sets of dashed lines. More...

#include <DashedLinegeometry.h>

Inheritance diagram for DashedLineGeometry:
Drawable

Classes

struct  PackedVertex
 

Public Member Functions

 DashedLineGeometry (const DashedLineGeometry &other)
 
DashedLineGeometryoperator= (DashedLineGeometry)
 
void accept (Visitor &) override
 
void render (const Camera &camera) override
 Render the line strips. More...
 
void clear () override
 
size_t addDashedLine (const Vector3f &start, const Vector3f &end, const Vector4ub &color, int dashCount)
 
size_t addDashedLine (const Vector3f &start, const Vector3f &end, const Vector3ub &color, int dashCount)
 
size_t addDashedLine (const Vector3f &start, const Vector3f &end, int dashCount)
 
void setColor (const Vector3ub &c)
 
Vector3ub color () const
 
void setOpacity (unsigned char opacity_)
 
unsigned char opacity () const
 
void setLineWidth (unsigned char lineWidth_)
 
unsigned char lineWidth () const
 
- Public Member Functions inherited from Drawable
 Drawable (const Drawable &other)
 
Drawableoperator= (Drawable)
 
virtual void accept (Visitor &)
 
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...
 
virtual void render (const Camera &camera)
 Render the contents 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
 
virtual void clear ()
 
void setRenderPass (RenderPass pass)
 
RenderPass renderPass () const
 

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/dashedlinegeometry.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.

◆ addDashedLine() [1/3]

size_t addDashedLine ( const Vector3f &  start,
const Vector3f &  end,
const Vector4ub &  color,
int  dashCount 
)

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.

◆ addDashedLine() [2/3]

size_t addDashedLine ( const Vector3f &  start,
const Vector3f &  end,
const Vector3ub &  color,
int  dashCount 
)

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.

◆ addDashedLine() [3/3]

size_t addDashedLine ( const Vector3f &  start,
const Vector3f &  end,
int  dashCount 
)

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.

◆ setLineWidth()

void setLineWidth ( unsigned char  lineWidth_)

The line width used for all of the lines.

◆ lineWidth()

unsigned char lineWidth ( ) const

The line width used for all of the lines.


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