| void | 
Description
Things that ease your work with MinSG . Most important are the standard visitors to traverse the scene graph.
Namespaces
| namespace | MinSG::NodeAttributeModifier | 
| namespace | MinSG::Transformations | 
| namespace | MinSG::DataDirectory MinSG ‘s data directory. | 
| namespace | MinSG::DistanceCalculators | 
| namespace | MinSG::GraphVizOutput | 
| namespace | MinSG::TextAnnotation Display of text annotation. | 
| namespace | MinSG::VisibilityTester Execution of multiple visibility tests. | 
Classes
| class | MinSG::NodeVisitor | 
| struct | MinSG::_GenericDistancePriorityQueue Simple queue for sorting Elements by their distance to a given point. | 
| class | MinSG::_DistanceCompare | 
| struct | MinSG::DistanceSetB2F | 
| struct | MinSG::DistanceSetF2B | 
| class | MinSG::NodeRendererRegistrationHolder Holder of a NodeRenderer registration. | 
Typedefs
| typedef _GenericDistancePriorityQueue< Node *, DistanceCalculators::NodeDistanceCalculator, std::less > | NodeDistancePriorityQueue_F2B | 
| typedef _GenericDistancePriorityQueue< Node *, DistanceCalculators::NodeDistanceCalculator, std::greater > | NodeDistancePriorityQueue_B2F | 
| typedef uint8_t | renderingLayerMask_t | 
Variables
| const unsigned | MESH_AUTO_CENTER | 
| const unsigned | MESH_AUTO_SCALE | 
| const unsigned | MESH_AUTO_CENTER_BOTTOM | 
Functions
| bool | conditionalFrustumTest(const Geometry::Frustum & frustum, const Geometry::Box & box, const RenderParam & rp) | 
| void | changeParentKeepTransformation( Util::Reference < Node > child, GroupNode * newParent) | 
| Geometry::Box | combineNodesWorldBBs(const std::vector< Node * > & nodes) | 
| void | destroy(Node * rootNode) Destroys the given subtree by calling doDestroy() on every node. | 
| template< class node_type_t > | |
| node_type_t * | getOriginalNode(node_type_t * node) | 
| void | initShaderState(ShaderState * shaderState, const std::vector< std::string > & vsFiles, const std::vector< std::string > & gsFiles, const std::vector< std::string > & fsFiles, uint32_t usageType, const Util::FileLocator & locator) | 
| Node * | loadModel(const Util::FileName & filename, unsigned flags, Geometry::Matrix4x4 * transMat) | 
| Node * | loadModel(const Util::FileName & filename, unsigned flags, Geometry::Matrix4x4 * transMat, const Util::FileLocator & locator) | 
| template< typename _T > | |
| void | forEachNodeTopDown(Node * root, const std::function< void(_T *)> & func) Execute a function top-down for nodes in a subtree. | 
| template< > | |
| void | forEachNodeTopDown< Node >(Node * root, const std::function< void(Node *)> & func) | 
| void | forEachNodeTopDown(Node * root, const std::function< void(Node *)> & func) | 
| template< typename _T > | |
| void | forEachNodeBottomUp(Node * root, const std::function< void(_T *)> & func) Execute a function bottom-up for nodes in a subtree. | 
| template< typename _T > | |
| void | traverseTopDown(Node * root, std::function< NodeVisitor::status(_T *)> func) Execute a function top-down for nodes in a subtree. | 
| template< > | |
| void | traverseTopDown< Node >(Node * root, std::function< NodeVisitor::status(Node *)> func) | 
| void | traverseTopDown(Node * root, const std::function< NodeVisitor::status(Node *)> & func) | 
| std::deque< Node * > | collectClosedNodes(Node * root) | 
| std::deque< Node * > | collectClosedNodesAtPosition(Node * root, const Geometry::Vec3 & position) | 
| std::deque< Node * > | collectClosedNodesIntersectingBox(Node * root, const Geometry::Box & box) | 
| std::deque< GeometryNode * > | collectGeoNodesAtPosition(Node * root, const Geometry::Vec3 & position) | 
| std::deque< GeometryNode * > | collectGeoNodesIntersectingBox(Node * root, const Geometry::Box & box) | 
| std::deque< GeometryNode * > | collectGeoNodesIntersectingSphere(Node * root, const Geometry::Vec3 & pos, float radius) | 
| std::deque< GeometryNode * > | collectGeoNodesIntersectingRay(Node * node, const Geometry::Vec3 & pos, const Geometry::Vec3 & dir) | 
| std::deque< Node * > | collectInstances(Node * root, const Node * prototype) | 
| template< typename _T > | |
| std::deque< _T * > | collectNodes(const Node * root) Collect all nodes in subtree with rootrootof type _T. | 
| std::deque< Node * > | collectNodesWithAttribute(Node * root,  Util::StringIdentifier  attrName) Collect all nodes in the given subtree which have a node attribute with the given name (. | 
| std::deque< Node * > | collectNodesReferencingAttribute(Node * root,  Util::StringIdentifier  attrName) Collect all nodes in the given subtree which reference a node attribute with the given name (. | 
| std::deque< Node * > | collectNextNodesReferencingAttribute(Node * root,  Util::StringIdentifier  attrName) Collect nodes below root that reference the given attribute; the traversal of a subtree is stopped if the subtree root is collected. (. | 
| template< typename _T > | |
| std::deque< _T * > | collectNodesInFrustum(Node * root, const Geometry::Frustum & frustum, bool includeIntersectingNodes) Collect all nodes in subtree with rootrootof type _T, that intersect with the given frustum of cameracam. | 
| template< class State_t > | |
| std::set< State_t * > | collectStates(Node * root) Get all states of a specific type used in the subtree. | 
| template< class State_t > | |
| std::deque< State_t * > | collectStatesUpwards(Node * node) | 
| std::vector< GeometryNode * > | collectVisibleNodes(Node * root, FrameContext & context, float maxDistance, bool fillDepthBuffer, renderingLayerMask_t layers) | 
| uint32_t | countTriangles(Node * root) Sum up the number of triangles of all geometry nodes in the subtree starting with root. | 
| uint32_t | countTrianglesInFrustum(Node * root, const Geometry::Frustum & frustum) | 
| std::deque< Node * > | getChildNodes(Node * node) | 
| std::vector< uint32_t > | countNodesInLevels(Node * rootNode) | 
| void | moveTransformationsIntoClosedNodes(Node * root) moves all transformations into closed nodes, subtrees of closed nodes are not processed. | 
| void | moveTransformationsIntoLeaves(Node * root) moves all transformations into leaves | 
| void | moveStatesIntoClosedNodes(Node * root) moves all statis into closed nodes, subtrees of closed nodes are not processed. | 
| void | moveStatesIntoLeaves(Node * root) moves all statis into leaves | 
| uint32_t | getNodeLevel(Node * rootNode, Node * node) | 
| uint32_t | getTreeDepth(Node * rootNode) | 
Documentation
typedef
 NodeDistancePriorityQueue_F2B
| public | 
| typedef _GenericDistancePriorityQueue< Node *, DistanceCalculators::NodeDistanceCalculator, std::less > NodeDistancePriorityQueue_F2B | 
Defined in MinSG/Helper/DistanceSorting.h:69
typedef
 NodeDistancePriorityQueue_B2F
| public | 
| typedef _GenericDistancePriorityQueue< Node *, DistanceCalculators::NodeDistanceCalculator, std::greater > NodeDistancePriorityQueue_B2F | 
Defined in MinSG/Helper/DistanceSorting.h:70
typedef
 renderingLayerMask_t
| public | 
| typedef uint8_t renderingLayerMask_t | 
See also: RenderParam.h
Defined in MinSG/Core/Nodes/Node.h:42
variable
 MESH_AUTO_CENTER
| public | static | 
| const unsigned MESH_AUTO_CENTER | 
Defined in MinSG/Helper/Helper.h:92
variable
 MESH_AUTO_SCALE
| public | static | 
| const unsigned MESH_AUTO_SCALE | 
Defined in MinSG/Helper/Helper.h:93
variable
 MESH_AUTO_CENTER_BOTTOM
| public | static | 
| const unsigned MESH_AUTO_CENTER_BOTTOM | 
Defined in MinSG/Helper/Helper.h:94
function
 conditionalFrustumTest
| public | inline | 
| bool conditionalFrustumTest( | const Geometry::Frustum & | frustum, | 
| const Geometry::Box & | box, | |
| const RenderParam & | rp | |
| ) | 
Perform a test if a box intersects a frustum, if frustum culling is enabled.
Parameters
- frustum
- Frustum that the box is tested against
- box
- Box to be tested
- rp
- Rendering parameters that decide if frustum culling is enabled
Parameters
- true
- if frustum culling is disabled or the box intersects the frustum
- false
- if frustum culling is enabled and the box does not intersect the frustum
Defined in MinSG/Helper/FrustumTest.h:30
function
 changeParentKeepTransformation
| public | 
| void changeParentKeepTransformation( | Util::Reference < Node > | child, | 
| GroupNode * | newParent | |
| ) | 
removes a child from its present parent (if exists) and adds it to the given new Parent (if exists) such that the world matrix of the child does not change
Parameters
- child
- the child that shall be move to a new parent
- newParent
- the parent to which the child shall be added
Note: child->getParent() and newParent may be nullptr
Defined in MinSG/Helper/Helper.h:60
function
 combineNodesWorldBBs
| public | 
| Geometry::Box combineNodesWorldBBs( | const std::vector< Node * > & | nodes ) | 
Returns the combined world bounding boxes of the given nodes.
Defined in MinSG/Helper/Helper.h:63
function
 destroy
| public | 
| void destroy( | Node * | rootNode ) | 
Destroys the given subtree by calling doDestroy() on every node.
Defined in MinSG/Helper/Helper.h:66
function
 getOriginalNode
| public | 
| template< class node_type_t > | ||
| node_type_t * getOriginalNode( | node_type_t * | node ) | 
Return the node itself or the prototype of the node if and only if the node is an instance.
Parameters
- node
- Node for which the original is requested
Returns
Original node (node itself or prototype)
Defined in MinSG/Helper/Helper.h:76
function
 initShaderState
| public | 
| void initShaderState( | ShaderState * | shaderState, | 
| const std::vector< std::string > & | vsFiles, | |
| const std::vector< std::string > & | gsFiles, | |
| const std::vector< std::string > & | fsFiles, | |
| uint32_t | usageType, | |
| const Util::FileLocator & | locator | |
| ) | 
Init the given shaderState with a new Shader loaded from the given filenames. The metadata of the State is set accordingly.
Defined in MinSG/Helper/Helper.h:85
function
 loadModel
| public | 
| Node * loadModel( | const Util::FileName & | filename, | 
| unsigned | flags, | |
| Geometry::Matrix4x4 * | transMat | |
| ) | 
Load a Meshes from a file.
Parameters
- loader
- GenericLoader that reads the mesh-data (may not be nullptr!).
- flags
- Mesh modification flags (defined in MeshUtils).
- transMat
- Transformation matrix applied to the mesh.
- metaData
Defined in MinSG/Helper/Helper.h:103
function
 loadModel
| public | 
| Node * loadModel( | const Util::FileName & | filename, | 
| unsigned | flags, | |
| Geometry::Matrix4x4 * | transMat, | |
| const Util::FileLocator & | locator | |
| ) | 
Defined in MinSG/Helper/Helper.h:104
function
 forEachNodeTopDown
| public | 
| template< typename _T = Node > | ||
| void forEachNodeTopDown( | Node * | root, | 
| const std::function< void(_T *)> & | func | |
| ) | 
Execute a function top-down for nodes in a subtree.
Execute the given functionfuncfor all nodes of type_Tin the subtree specified by its root noderoot. A depth-first, pre-order tree walk is performed on the subtree.
Parameters
- _T
- The type of the nodes for which the function will be executed
Parameters
- root
- The root node of the subtree that will be traversed
- func
- The function that will be executed for each node
Author: Benjamin Eikel
Date: 2012-07-31
Defined in MinSG/Helper/StdNodeVisitors.h:49
function
 forEachNodeTopDown< Node >
| public | 
| template< > | ||
| void forEachNodeTopDown< Node >( | Node * | root, | 
| const std::function< void(Node *)> & | func | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:70
function
 forEachNodeTopDown
| public | inline | 
| void forEachNodeTopDown( | Node * | root, | 
| const std::function< void(Node *)> & | func | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:71
function
 forEachNodeBottomUp
| public | 
| template< typename _T = Node > | ||
| void forEachNodeBottomUp( | Node * | root, | 
| const std::function< void(_T *)> & | func | |
| ) | 
Execute a function bottom-up for nodes in a subtree.
Execute the given functionfuncfor all nodes of type_Tin the subtree specified by its root noderoot. A depth-first, post-order tree walk is performed on the subtree.
Parameters
- _T
- The type of the nodes for which the function will be executed
Parameters
- root
- The root node of the subtree that will be traversed
- func
- The function that will be executed for each node
Author: Benjamin Eikel
Date: 2012-07-31
Defined in MinSG/Helper/StdNodeVisitors.h:89
function
 traverseTopDown
| public | 
| template< typename _T = Node > | ||
| void traverseTopDown( | Node * | root, | 
| std::function< NodeVisitor::status(_T *)> | func | |
| ) | 
Execute a function top-down for nodes in a subtree.
Execute the given functionfuncfor all nodes of type_Tin the subtree specified by its root noderoot. A depth-first, pre-order tree walk is performed on the subtree.
Parameters
- _T
- (optional) The type of the nodes for which the function will be executed
Parameters
- root
- The root node of the subtree that will be traversed
- func
- The function that will be executed for each node (
See also: NodeVisitor::status for the result)
Defined in MinSG/Helper/StdNodeVisitors.h:121
function
 traverseTopDown< Node >
| public | 
| template< > | ||
| void traverseTopDown< Node >( | Node * | root, | 
| std::function< NodeVisitor::status(Node *)> | func | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:138
function
 traverseTopDown
| public | inline | 
| void traverseTopDown( | Node * | root, | 
| const std::function< NodeVisitor::status(Node *)> & | func | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:139
function
 collectClosedNodes
| public | 
| std::deque< Node * > collectClosedNodes( | Node * | root ) | 
collects all closed nodes reachable from the specified scene root to a vector
Parameters
- root
- : root of the scene graph
- nodes
- : vector to which the closed nodes are collected (pointers to the closed nodes)
Defined in MinSG/Helper/StdNodeVisitors.h:150
function
 collectClosedNodesAtPosition
| public | 
| std::deque< Node * > collectClosedNodesAtPosition( | Node * | root, | 
| const Geometry::Vec3 & | position | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:151
function
 collectClosedNodesIntersectingBox
| public | 
| std::deque< Node * > collectClosedNodesIntersectingBox( | Node * | root, | 
| const Geometry::Box & | box | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:152
function
 collectGeoNodesAtPosition
| public | 
| std::deque< GeometryNode * > collectGeoNodesAtPosition( | Node * | root, | 
| const Geometry::Vec3 & | position | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:154
function
 collectGeoNodesIntersectingBox
| public | 
| std::deque< GeometryNode * > collectGeoNodesIntersectingBox( | Node * | root, | 
| const Geometry::Box & | box | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:155
function
 collectGeoNodesIntersectingSphere
| public | 
| std::deque< GeometryNode * > collectGeoNodesIntersectingSphere( | Node * | root, | 
| const Geometry::Vec3 & | pos, | |
| float | radius | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:156
function
 collectGeoNodesIntersectingRay
| public | 
| std::deque< GeometryNode * > collectGeoNodesIntersectingRay( | Node * | node, | 
| const Geometry::Vec3 & | pos, | |
| const Geometry::Vec3 & | dir | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:157
function
 collectInstances
| public | 
| std::deque< Node * > collectInstances( | Node * | root, | 
| const Node * | prototype | |
| ) | 
Defined in MinSG/Helper/StdNodeVisitors.h:159
function
 collectNodes
| public | 
| template< typename _T = Node > | ||
| std::deque< _T * > collectNodes( | const Node * | root ) | 
Collect all nodes in subtree with rootrootof type_T.
Defined in MinSG/Helper/StdNodeVisitors.h:163
function
 collectNodesWithAttribute
| public | 
| std::deque< Node * > collectNodesWithAttribute( | Node * | root, | 
| Util::StringIdentifier | attrName | |
| ) | 
Collect all nodes in the given subtree which have a node attribute with the given name (.
See also: Node::getAttribute (…)).
Defined in MinSG/Helper/StdNodeVisitors.h:171
function
 collectNodesReferencingAttribute
| public | 
| std::deque< Node * > collectNodesReferencingAttribute( | Node * | root, | 
| Util::StringIdentifier | attrName | |
| ) | 
Collect all nodes in the given subtree which reference a node attribute with the given name (.
See also: Node::findAttribute (…)).
Defined in MinSG/Helper/StdNodeVisitors.h:174
function
 collectNextNodesReferencingAttribute
| public | 
| std::deque< Node * > collectNextNodesReferencingAttribute( | Node * | root, | 
| Util::StringIdentifier | attrName | |
| ) | 
Collect nodes below root that reference the given attribute; the traversal of a subtree is stopped if the subtree root is collected. (.
See also: collectNodesReferencingAttribute (…)).
Defined in MinSG/Helper/StdNodeVisitors.h:177
function
 collectNodesInFrustum
| public | 
| template< typename _T > | ||
| std::deque< _T * > collectNodesInFrustum( | Node * | root, | 
| const Geometry::Frustum & | frustum, | |
| bool | includeIntersectingNodes | |
| ) | 
Collect all nodes in subtree with rootrootof type_T, that intersect with the given frustum of cameracam.
Defined in MinSG/Helper/StdNodeVisitors.h:181
function
 collectStates
| public | 
| template< class State_t > | ||
| std::set< State_t * > collectStates( | Node * | root ) | 
Get all states of a specific type used in the subtree.
Defined in MinSG/Helper/StdNodeVisitors.h:231
function
 collectStatesUpwards
| public | 
| template< class State_t > | ||
| std::deque< State_t * > collectStatesUpwards( | Node * | node ) | 
Collect all states of the type requested on a specific path. The path begins at the given node and ends at the root node. If a node on the path (excluding the given node, but including the root node) contains appropriate states, they are added to the resulting array.
Parameters
- State_t
- Type of the states to collect
Parameters
- node
- Start of the path; the end is the root node
Returns
Array containing the collected states (excluding states of the given node)
Author: Benjamin Eikel
Date: 2012-02-29
Defined in MinSG/Helper/StdNodeVisitors.h:257
function
 collectVisibleNodes
| public | 
| std::vector< GeometryNode * > collectVisibleNodes( | Node * | root, | 
| FrameContext & | context, | |
| float | maxDistance, | |
| bool | fillDepthBuffer, | |
| renderingLayerMask_t | layers | |
| ) | 
See also: RenderingLayer.h Warning: may be slow! Collects visible Objects in Frustum (with occ-extension)
Parameters
- root
- Root node
- context
- Frame context to use (contains the used camera)
- maxDistance
- (optional) only collect nodes up to a certain distance (not exact, used for speeding up queries)
- fillDepthBuffer
- (optional) iff true, the screen is cleared and the potential visible nodes are rendered to the depth buffer.
- layers
- (optional) Only test nodes with this rendering layers (default=1).
Returns
Container of visible objects
Note: - Scene has to be rendered before execution (or fillDepthBuffer must be true)
- Scene has to be rendered with flag Node::USE_WORLD_MATRIX
Defined in MinSG/Helper/StdNodeVisitors.h:286
function
 countTriangles
| public | 
| uint32_t countTriangles( | Node * | root ) | 
Sum up the number of triangles of all geometry nodes in the subtree starting with root.
Defined in MinSG/Helper/StdNodeVisitors.h:291
function
 countTrianglesInFrustum
| public | 
| uint32_t countTrianglesInFrustum( | Node * | root, | 
| const Geometry::Frustum & | frustum | |
| ) | 
Sum up the number of triangles of the geometry nodes in the subtree starting with root, where the bounding box intersects with the given frustum.
Parameters
- root
- Root node of the subtree
- frustum
- Frustum that is used for intersection tests
Returns
Number of triangles
Defined in MinSG/Helper/StdNodeVisitors.h:301
function
 getChildNodes
| public | 
| std::deque< Node * > getChildNodes( | Node * | node ) | 
Returns
Direct child nodes of the givennode
Defined in MinSG/Helper/StdNodeVisitors.h:306
function
 countNodesInLevels
| public | 
| std::vector< uint32_t > countNodesInLevels( | Node * | rootNode ) | 
Count the number of nodes in the levels of the scene graph. The root node has level zero.
Parameters
- rootNode
- Root node of a MinSG subgraph
Returns
Array containing the number of nodes in leveliat indexi
Defined in MinSG/Helper/StdNodeVisitors.h:315
function
 moveTransformationsIntoClosedNodes
| public | 
| void moveTransformationsIntoClosedNodes( | Node * | root ) | 
moves all transformations into closed nodes, subtrees of closed nodes are not processed.
Defined in MinSG/Helper/StdNodeVisitors.h:320
function
 moveTransformationsIntoLeaves
| public | 
| void moveTransformationsIntoLeaves( | Node * | root ) | 
moves all transformations into leaves
Defined in MinSG/Helper/StdNodeVisitors.h:323
function
 moveStatesIntoClosedNodes
| public | 
| void moveStatesIntoClosedNodes( | Node * | root ) | 
moves all statis into closed nodes, subtrees of closed nodes are not processed.
Defined in MinSG/Helper/StdNodeVisitors.h:326
function
 moveStatesIntoLeaves
| public | 
| void moveStatesIntoLeaves( | Node * | root ) | 
moves all statis into leaves
Defined in MinSG/Helper/StdNodeVisitors.h:329
function
 getNodeLevel
| public | 
| uint32_t getNodeLevel( | Node * | rootNode, | 
| Node * | node | |
| ) | 
gets the level of a node relative to the given root node. gives a warning if the node is not a child of the root node and returns the max. Integer
Parameters
Returns
The level of the node or 0xffffffffU (max. of uint32_t)
Defined in MinSG/Helper/StdNodeVisitors.h:342
function
 getTreeDepth
| public | 
| uint32_t getTreeDepth( | Node * | rootNode ) | 
gets the of the given subtree.
Parameters
- rootNode
- Root node of a MinSG subgraph
Returns
The depth of the given subtree
Defined in MinSG/Helper/StdNodeVisitors.h:351