Loading...
Searching...
No Matches
CylinderGeometry Class Reference

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

`#include <cylindergeometry.h>`

Inheritance diagram for CylinderGeometry:

## Public Member Functions

| CylinderGeometry (const CylinderGeometry &other)
CylinderGeometry & | operator= (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.
std::multimap< float, Identifier > | hits (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.
void | addCylinder (const Vector3f &pos1, const Vector3f &pos2, float radius, const Vector3ub &color1, const Vector3ub &color2)
| Add a cylinder to the geometry object.
void | addCylinder (const Vector3f &pos1, const Vector3f &pos2, float radius, const Vector3ub &color, size_t index)
| Add a cylinder to the geometry object.
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.
std::vector< CylinderColor > & | cylinders ()
const std::vector< CylinderColor > & | cylinders () const
void | clear () override
size_t | size () const
void | setOpacity (float o)
Public Member Functions inherited from Drawable
| Drawable (const Drawable &other)
Drawable & | operator= (Drawable)
const GeometryNode * | parent () const
| Get a pointer to the drawable object's parent.
GeometryNode * | parent ()
void | setVisible (bool visibility)
| Set the visibility of the drawable object.
bool | isVisible () const
| Get the current visibility of the drawable.
Identifier & | identifier ()
const Identifier & | identifier () const
virtual Core::Array< Identifier > | areaHits (const Frustrum &f) const
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.
Protected Attributes inherited from Drawable
GeometryNode * | m_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 & |  | ) |

override virtual

Accept a visit from our friendly visitor.

Reimplemented from Drawable.

## render()

void render | ( | const Camera & | camera | ) |

override virtual

Parameters

  camera | The 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

override virtual

Return the primitives that are hit by the ray.

Parameters

  rayOrigin | Origin of the ray.
  rayEnd | End point of the ray.
  rayDirection | Normalized 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

  pos1 | Base of the cylinder axis.
  pos2 | Top of the cylinder axis.
  radius | Radius of the cylinder.
  color | Color 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

  pos1 | Base of the cylinder axis.
  pos2 | Top of the cylinder axis.
  radius | Radius of the cylinder.
  color1 | Color the start of the base of the cylinder.
  color2 | Color 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

  pos1 | Base of the cylinder axis.
  pos2 | Top of the cylinder axis.
  radius | Radius of the cylinder.
  color | Color the cylinder will be rendered.
  index | The 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

  pos1 | Base of the cylinder axis.
  pos2 | Top of the cylinder axis.
  radius | Radius of the cylinder.
  color | Color the start of the base of the cylinder.
  color2 | Color of the end of the cylinder.
  index | The index of the cylinder being added.

## cylinders()

std::vector< CylinderColor > & cylinders | ( |  | ) |

Get a reference to the cylinders.

## clear()

void clear | ( |  | ) |

override virtual

Clear the contents of the node.

Reimplemented from Drawable.

## size()

size_t size | ( |  | ) | const

Get the number of cylinders in the node object.

## setOpacity()

void setOpacity | ( | float | o | ) |

Set the opacity of the cylinders in this group.

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

- cylindergeometry.h