2 #ifndef GRAMODS_GRAPHICS_NODE
3 #define GRAMODS_GRAPHICS_NODE
5 #include <gmGraphics/config.hh>
7 #include <gmGraphics/Camera.hh>
8 #include <gmGraphics/IntersectionLine.hh>
10 #include <gmCore/Object.hh>
12 #include <Eigen/Eigen>
15 BEGIN_NAMESPACE_GMGRAPHICS;
24 typedef std::vector<std::shared_ptr<Node>> list;
39 void apply(Object *node,
const Eigen::Affine3f &transform);
41 std::vector<Eigen::Affine3f> stack {Eigen::Affine3f::Identity()};
66 std::optional<std::pair<float, float>> getNearFar()
const;
69 float near = std::numeric_limits<float>::max();
70 float far = std::numeric_limits<float>::min();
109 END_NAMESPACE_GMGRAPHICS;
Base type for objects in the Gramods package for standardized handling of construction,...
Definition: Object.hh:42
The base of graphics Camera implementations.
Definition: Camera.hh:19
The scenegraph node base.
Definition: Node.hh:20
virtual std::string getDefaultKey() override
Returns the default key, in Configuration, for the Object.
Definition: Node.hh:106
virtual std::vector< float > getIntersections(const IntersectionLine &line)
Check and return intersections between the provided line and the shape represented by this node.
Definition: Node.hh:98
The visitor of a design pattern for automatic traversal.
Definition: Object.hh:75
Line for intersection with ray or segment.
Definition: IntersectionLine.hh:15
Visitor that extracts the optimal near and far planes for a scenegraph.
Definition: Node.hh:56
Visitor that renders a scenegraph to the currently active viewport.
Definition: Node.hh:84