Class rayx::BeamlineNode¶
ClassList > rayx > BeamlineNode
Base class for all nodes in the beamline hierarchy (scene/model graph). More...
#include <Node.h>
Inherited by the following classes: rayx::DesignElement, rayx::DesignSource, rayx::Group
Public Functions¶
| Type | Name |
|---|---|
| const DesignElement * | asElement () const |
| DesignElement * | asElement () |
| const Group * | asGroup () const |
| Group * | asGroup () |
| const DesignSource * | asSource () const |
| DesignSource * | asSource () |
| virtual std::unique_ptr< BeamlineNode > | clone () const = 0 Creates a deep copy (clone) of this BeamlineNode . |
| virtual std::string | getName () const = 0 |
| int | getObjectId () const |
| virtual glm::dmat4 | getOrientation () const = 0 Gets the local orientation (rotation/transform) of this node. |
| const BeamlineNode * | getParent () const |
| BeamlineNode * | getParent () |
| virtual glm::dvec4 | getPosition () const = 0 Gets the local position of this node. |
| const BeamlineNode * | getRoot () const |
| BeamlineNode * | getRoot () |
| glm::dmat4 | getWorldOrientation () const Computes the absolute/world orientation of this node. |
| glm::dvec4 | getWorldPosition () const Computes the absolute/world position of this node. |
| bool | hasParent () const |
| virtual bool | isElement () const |
| virtual bool | isGroup () const |
| virtual bool | isSource () const |
| virtual const BeamlineNode * | operator[] (size_t index) const |
| virtual BeamlineNode * | operator[] (size_t index) |
| virtual const BeamlineNode * | operator[] (const std::string & name) const |
| virtual BeamlineNode * | operator[] (const std::string & name) |
| virtual void | setName (std::string name) = 0 |
| virtual | ~BeamlineNode () = default |
Detailed Description¶
This abstract class defines the common interface for any node in a beamline. Nodes can be groups, elements, or sources, each providing their own logic for position/orientation and potential child relationships.
Public Functions Documentation¶
function asElement [1/2]¶
function asElement [2/2]¶
function asGroup [1/2]¶
function asGroup [2/2]¶
function asSource [1/2]¶
function asSource [2/2]¶
function clone¶
Creates a deep copy (clone) of this BeamlineNode .
Derived classes must implement this to allow duplication of their internal state.
Returns:
A unique_ptr to the newly cloned BeamlineNode.
function getName¶
function getObjectId¶
function getOrientation¶
Gets the local orientation (rotation/transform) of this node.
Each node may have its own transform relative to its parent.
Returns:
A 4x4 matrix (dmat4) representing the local orientation.
function getParent [1/2]¶
function getParent [2/2]¶
function getPosition¶
Gets the local position of this node.
Each node may have its own transform relative to its parent.
Returns:
A 4D vector (dvec4) representing the local position.
function getRoot [1/2]¶
function getRoot [2/2]¶
function getWorldOrientation¶
Computes the absolute/world orientation of this node.
Recursively multiplies the parent's world orientation by the node's local orientation. If there is no parent, the local orientation is already in world space.
Returns:
A 4x4 matrix (dmat4) representing the orientation in world coordinates.
function getWorldPosition¶
Computes the absolute/world position of this node.
Recursively applies parent transformations until the root of the hierarchy is reached. If there is no parent, the local position is already in world space.
Returns:
A 4D vector (dvec4) representing the position in world coordinates.
function hasParent¶
function isElement¶
function isGroup¶
function isSource¶
function operator[]¶
function operator[]¶
function operator[]¶
function operator[]¶
function setName¶
function ~BeamlineNode¶
Ensures proper cleanup of derived classes when deleting through a pointer to BeamlineNode.
The documentation for this class was generated from the following file Intern/rayx-core/src/Beamline/Node.h