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

The CylinderGeometry contains one or more cylinders. More...

#include <cylindergeometry.h>

Inheritance diagram for CylinderGeometry:
Drawable

Public Member Functions

 CylinderGeometry (const CylinderGeometry &other)
 
CylinderGeometryoperator= (CylinderGeometry)
 
void accept (Visitor &) override
 
void update ()
 Update the VBOs, IBOs etc ready for rendering.
 
void render (const Camera &camera) override
 Render the cylinder geometry. More...
 
std::multimap< float, Identifierhits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const override
 
void addCylinder (const Vector3f &pos1, const Vector3f &pos2, float radius, const Vector3ub &color)
 Add a cylinder to the geometry object. More...
 
void addCylinder (const Vector3f &pos1, const Vector3f &pos2, float radius, const Vector3ub &color1, const Vector3ub &color2)
 Add a cylinder to the geometry object. More...
 
void addCylinder (const Vector3f &pos1, const Vector3f &pos2, float radius, const Vector3ub &color, size_t index)
 Add a cylinder to the geometry object. More...
 
void addCylinder (const Vector3f &pos1, const Vector3f &pos2, float radius, const Vector3ub &color, const Vector3ub &color2, size_t index)
 Add a cylinder to the geometry object. More...
 
std::vector< CylinderColor > & cylinders ()
 
const std::vector< CylinderColor > & cylinders () const
 
void clear () override
 
size_t size () 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/cylindergeometry.h>

Author
Marcus D. Hanwell

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.

◆ hits()

std::multimap< float, Identifier > hits ( const Vector3f &  rayOrigin,
const Vector3f &  rayEnd,
const Vector3f &  rayDirection 
) const
overridevirtual

Return the primitives that are hit by the ray.

Parameters
rayOriginOrigin of the ray.
rayEndEnd point of the ray.
rayDirectionNormalized direction of the ray.
Returns
Sorted collection of primitives that were hit.

Reimplemented from Drawable.

◆ addCylinder() [1/4]

void addCylinder ( const Vector3f &  pos1,
const Vector3f &  pos2,
float  radius,
const Vector3ub &  color 
)
Parameters
pos1Base of the cylinder axis.
pos2Top of the cylinder axis.
radiusRadius of the cylinder.
colorColor the cylinder will be rendered.

◆ addCylinder() [2/4]

void addCylinder ( const Vector3f &  pos1,
const Vector3f &  pos2,
float  radius,
const Vector3ub &  color1,
const Vector3ub &  color2 
)
Parameters
pos1Base of the cylinder axis.
pos2Top of the cylinder axis.
radiusRadius of the cylinder.
color1Color the start of the base of the cylinder.
color2Color of the end of the cylinder.

◆ addCylinder() [3/4]

void addCylinder ( const Vector3f &  pos1,
const Vector3f &  pos2,
float  radius,
const Vector3ub &  color,
size_t  index 
)
Parameters
pos1Base of the cylinder axis.
pos2Top of the cylinder axis.
radiusRadius of the cylinder.
colorColor the cylinder will be rendered.
indexThe index of the cylinder being added.

◆ addCylinder() [4/4]

void addCylinder ( const Vector3f &  pos1,
const Vector3f &  pos2,
float  radius,
const Vector3ub &  color,
const Vector3ub &  color2,
size_t  index 
)
Parameters
pos1Base of the cylinder axis.
pos2Top of the cylinder axis.
radiusRadius of the cylinder.
colorColor the start of the base of the cylinder.
color2Color of the end of the cylinder.
indexThe index of the cylinder being added.

◆ cylinders()

std::vector< CylinderColor > & cylinders ( )

Get a reference to the cylinders.

◆ clear()

void clear ( )
overridevirtual

Clear the contents of the node.

Reimplemented from Drawable.

◆ size()

size_t size ( ) const

Get the number of cylinders in the node object.


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