AvogadroLibs 1.97.0
|
The GeometryNode class is the common base of all geometry nodes. More...
#include <avogadro/rendering/geometrynode.h>
Public Member Functions | |
void | accept (Visitor &) override |
void | addDrawable (Drawable *object) |
Add a drawable object to the geometry node. More... | |
bool | removeDrawable (Drawable *node) |
Remove child node, this node will no longer be deleted. More... | |
Drawable * | drawable (size_t index) |
Get the child Node at the specified index. More... | |
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, Identifier > | hits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const |
Core::Array< Identifier > | areaHits (const Frustrum &frustrum) const |
![]() | |
virtual void | accept (Visitor &) |
const GroupNode * | parent () const |
Get a pointer to the node's parent. More... | |
GroupNode * | parent () |
void | setVisible (bool visibility) |
Set the visibility of the node. More... | |
bool | isVisible () const |
Get the current visibility of the node. More... | |
template<typename T > | |
T * | cast () |
Attempt to dynamic_cast to specified node type. More... | |
template<typename T > | |
const T * | cast () const |
Protected Attributes | |
std::vector< Drawable * > | m_drawables |
![]() | |
GroupNode * | m_parent |
bool | m_visible |
Additional Inherited Members | |
![]() | |
void | setParent (GroupNode *parent) |
Set the parent node for the node. More... | |
The GeometryNode contains any Drawable objects, and is the only node type that results in anything being rendered to the screen.
|
overridevirtual |
Accept a visit from our friendly visitor.
Reimplemented from Node.
bool removeDrawable | ( | Drawable * | node | ) |
node | Node to be removed. |
Drawable * drawable | ( | size_t | index | ) |
index | The index of the child. |
std::multimap< float, Identifier > hits | ( | const Vector3f & | rayOrigin, |
const Vector3f & | rayEnd, | ||
const Vector3f & | rayDirection | ||
) | const |
Return the primitives that are hit by the ray.
rayOrigin | Origin of the ray. |
rayEnd | End point of the ray. |
rayDirection | Normalized direction of the ray. |
Core::Array< Identifier > areaHits | ( | const Frustrum & | frustrum | ) | const |
Return the primitives within the supplied frustrum.