|
gramods
|
Visitor that extracts the optimal near and far planes for a scenegraph. More...
#include <Node.hh>


Public Member Functions | |
| NearFarVisitor (Camera camera) | |
| void | apply (gmCore::Object *node) override |
| This method is called for each visited objects. More... | |
| std::optional< std::pair< float, float > > | getNearFar () const |
| Makes positive, expands with epsilon and returns near and far values, iff the near and far values are reasonable. More... | |
Public Member Functions inherited from gramods::gmGraphics::Node::TransformStackVisitor | |
| void | apply (Object *node, const Eigen::Affine3f &transform) |
Public Attributes | |
| const Camera | camera |
| float | near = std::numeric_limits<float>::max() |
| float | far = std::numeric_limits<float>::min() |
Public Attributes inherited from gramods::gmGraphics::Node::TransformStackVisitor | |
| std::vector< Eigen::Affine3f > | stack {Eigen::Affine3f::Identity()} |
Visitor that extracts the optimal near and far planes for a scenegraph.
Example usage:
|
overridevirtual |
This method is called for each visited objects.
Reimplemented from gramods::gmGraphics::Node::TransformStackVisitor.
| std::optional< std::pair< float, float > > gramods::gmGraphics::Node::NearFarVisitor::getNearFar | ( | ) | const |
Makes positive, expands with epsilon and returns near and far values, iff the near and far values are reasonable.