AvogadroLibs 1.98.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
GeometryNode Class Reference

The GeometryNode class is the common base of all geometry nodes. More...

#include <avogadro/rendering/geometrynode.h>

Inheritance diagram for GeometryNode:
Node

Public Member Functions

void accept (Visitor &) override
 
void addDrawable (Drawable *object)
 Add a drawable object to the geometry node.
 
bool removeDrawable (Drawable *node)
 Remove child node, this node will no longer be deleted.
 
Drawabledrawable (size_t index)
 Get the child Node at the specified index.
 
std::vector< Drawable * > & drawables ()
 Get a reference to the child nodes list.
 
const std::vector< Drawable * > drawables () const
 
void clearDrawables ()
 Remove all drawable objects.
 
void render (const Camera &camera)
 Render the drawables in the geometry node.
 
std::multimap< float, Identifierhits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const
 
Core::Array< IdentifierareaHits (const Frustrum &frustrum) const
 
- Public Member Functions inherited from Node
const GroupNodeparent () const
 Get a pointer to the node's parent.
 
GroupNodeparent ()
 
void setVisible (bool visibility)
 Set the visibility of the node.
 
bool isVisible () const
 Get the current visibility of the node.
 
template<typename T >
T * cast ()
 Attempt to dynamic_cast to specified node type.
 
template<typename T >
const T * cast () const
 

Protected Attributes

std::vector< Drawable * > m_drawables
 
- Protected Attributes inherited from Node
GroupNodem_parent
 
bool m_visible
 

Additional Inherited Members

- Protected Member Functions inherited from Node
void setParent (GroupNode *parent)
 Set the parent node for the node.
 

Detailed Description

Author
Marcus D. Hanwell

The GeometryNode contains any Drawable objects, and is the only node type that results in anything being rendered to the screen.

Member Function Documentation

◆ accept()

void accept ( Visitor )
overridevirtual

Accept a visit from our friendly visitor.

Reimplemented from Node.

◆ addDrawable()

void addDrawable ( Drawable object)
Parameters
objectDrawable object to be added.

◆ removeDrawable()

bool removeDrawable ( Drawable node)
Parameters
nodeNode to be removed.
Returns
True if the node was removed, false if it was not found.

◆ drawable()

Drawable * drawable ( size_t  index)
Parameters
indexThe index of the child.
Returns
A pointer to the child node, or nullptr if the index is out of range.

◆ hits()

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

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.

◆ areaHits()

Core::Array< Identifier > areaHits ( const Frustrum frustrum) const

Return the primitives within the supplied frustrum.


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