The SphereGeometry class contains one or more spheres.
More...
#include <avogadro/rendering/spheregeometry.h>
|
|
| SphereGeometry (const SphereGeometry &other) |
|
SphereGeometry & | operator= (SphereGeometry) |
| void | accept (Visitor &) override |
|
void | update () |
| | Update the VBOs, IBOs etc ready for rendering.
|
| void | render (const Camera &camera) override |
| | Render the sphere geometry.
|
| std::multimap< float, Identifier > | hits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const override |
| Core::Array< Identifier > | areaHits (const Frustrum &f) const override |
| void | setOpacity (float o) |
| 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 |
|
| 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 |
| void | setRenderPass (RenderPass pass) |
| RenderPass | renderPass () const |
|
| void | setParent (GeometryNode *parent) |
| | Set the parent node for the node.
|
|
GeometryNode * | m_parent |
|
bool | m_visible |
|
RenderPass | m_renderPass |
|
Identifier | m_identifier |
- Author
- Marcus D. Hanwell
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.
◆ accept()
Accept a visit from our friendly visitor.
Reimplemented from Drawable.
◆ render()
| void render |
( |
const Camera & | camera | ) |
|
|
overridevirtual |
- 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 |
|
overridevirtual |
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.
◆ areaHits()
Return the primitives within the supplied frustrum.
Reimplemented from Drawable.
◆ setOpacity()
| void setOpacity |
( |
float | o | ) |
|
Set the opacity of the spheres in this group.
◆ addSphere()
| void addSphere |
( |
const Vector3f & | position, |
|
|
const Vector3ub & | color, |
|
|
float | radius, |
|
|
size_t | index = MaxIndex ) |
Add a sphere to the geometry object.
◆ spheres()
Get a reference to the spheres.
◆ clear()
Clear the contents of the node.
Reimplemented from Drawable.
◆ size()
Get the number of spheres in the node object.
The documentation for this class was generated from the following file: