AvogadroLibs  1.96.0
Public Member Functions | List of all members
AmbientOcclusionSphereGeometry Class Reference

The AmbientOcclusionSphereGeometry class contains one or more spheres. More...

#include <ambientocclusionspheregeometry.h>

Inheritance diagram for AmbientOcclusionSphereGeometry:
Drawable

Public Member Functions

 AmbientOcclusionSphereGeometry (const AmbientOcclusionSphereGeometry &other)
 
AmbientOcclusionSphereGeometryoperator= (AmbientOcclusionSphereGeometry)
 
void accept (Visitor &) override
 
void update ()
 Update the VBOs, IBOs etc ready for rendering.
 
void render (const Camera &camera) override
 Render the sphere geometry. More...
 
std::multimap< float, Identifierhits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const override
 
void addSphere (const Vector3f &position, const Vector3ub &color, float radius, size_t index=MaxIndex)
 
Core::Array< SphereColor > & spheres ()
 
const Core::Array< SphereColor > & spheres () const
 
void clear () override
 
size_t size () 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 Core::Array< IdentifierareaHits (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. More...
 
- Protected Attributes inherited from Drawable
GeometryNodem_parent
 
bool m_visible
 
RenderPass m_renderPass
 
Identifier m_identifier
 

Detailed Description

<avogadro/rendering/ambientocclusionspheregeometry.h>

Author
Tim Vandermeersch

This Drawable is capable of storing the geometry for one or more spheres. A sphere is defined by a center point, a radius and a color. If the spheres are not a densely packed one-to-one mapping with the objects indices they can also optionally use an identifier that will point to some numeric ID for the purposes of picking.

Unlike the SphereGeometry class, this class also supports ambient occlusion.

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.

◆ addSphere()

void addSphere ( const Vector3f &  position,
const Vector3ub &  color,
float  radius,
size_t  index = MaxIndex 
)

Add a sphere to the geometry object.

◆ spheres()

Core::Array<SphereColor>& spheres ( )

Get a reference to the spheres.

◆ clear()

void clear ( )
overridevirtual

Clear the contents of the node.

Reimplemented from Drawable.

◆ size()

size_t size ( ) const

Get the number of spheres in the node object.


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