AGX Dynamics  2.37.3.2
agxOSG::TriangleExtractor Class Reference

This class traverses a subgraph, accumulates transformations and execute a functor (TriangleExtractOperator per triangle. More...

#include <TriangleExtractor.h>

+ Inheritance diagram for agxOSG::TriangleExtractor:

Public Member Functions

 TriangleExtractor (TriangleExtractOperator &op)
 
virtual ~TriangleExtractor ()
 Destructor. More...
 
void extract (osg::Node &node)
 
void extract (osg::Geode &node)
 
void extract (osg::MatrixTransform &node)
 

Protected Member Functions

virtual void apply (osg::Node &)
 
virtual void apply (osg::Geode &node)
 
virtual void apply (osg::Billboard &node)
 
virtual void apply (osg::Group &node)
 
virtual void apply (osg::MatrixTransform &node)
 
virtual void apply (osg::Switch &node)
 
virtual void apply (osg::LOD &node)
 
void apply (osg::Geometry &geom)
 
void popMatrix ()
 
void pushMatrix (const osg::Matrix &matrix)
 

Protected Attributes

TriangleExtractOperator & m_tri_op
 

Detailed Description

This class traverses a subgraph, accumulates transformations and execute a functor (TriangleExtractOperator per triangle.

The functor which is a descendant from TriangleExtractOperator has a method triangle, which will be executed per triangle. The triangle will have the coordinates in world coordinates, that is the matrix which is accumulated during the path through the scene graph to the triangle.

Definition at line 148 of file TriangleExtractor.h.

Constructor & Destructor Documentation

◆ TriangleExtractor()

agxOSG::TriangleExtractor::TriangleExtractor ( TriangleExtractOperator &  op)

Constructor.

Parameters
op- Is the functor operator which triangle method will be executed for each triangle found during traversal.

◆ ~TriangleExtractor()

virtual agxOSG::TriangleExtractor::~TriangleExtractor ( )
inlinevirtual

Destructor.

Definition at line 159 of file TriangleExtractor.h.

Member Function Documentation

◆ apply() [1/8]

virtual void agxOSG::TriangleExtractor::apply ( osg::Node &  )
protectedvirtual

◆ apply() [2/8]

virtual void agxOSG::TriangleExtractor::apply ( osg::Geode &  node)
protectedvirtual

◆ apply() [3/8]

virtual void agxOSG::TriangleExtractor::apply ( osg::Billboard &  node)
protectedvirtual

◆ apply() [4/8]

virtual void agxOSG::TriangleExtractor::apply ( osg::Group &  node)
protectedvirtual

◆ apply() [5/8]

virtual void agxOSG::TriangleExtractor::apply ( osg::MatrixTransform &  node)
protectedvirtual

◆ apply() [6/8]

virtual void agxOSG::TriangleExtractor::apply ( osg::Switch &  node)
protectedvirtual

◆ apply() [7/8]

virtual void agxOSG::TriangleExtractor::apply ( osg::LOD &  node)
protectedvirtual

◆ apply() [8/8]

void agxOSG::TriangleExtractor::apply ( osg::Geometry &  geom)
protected

◆ extract() [1/3]

void agxOSG::TriangleExtractor::extract ( osg::Node &  node)

Begins the triangle extraction on the subgraph node.

Parameters
node- The subgraph from which the triangles will be extracted.

◆ extract() [2/3]

void agxOSG::TriangleExtractor::extract ( osg::Geode &  node)
inline

Begins the triangle extraction on the subgraph node which is a geode

Parameters
node- The subgraph from which the triangles will be extracted.

Definition at line 169 of file TriangleExtractor.h.

◆ extract() [3/3]

void agxOSG::TriangleExtractor::extract ( osg::MatrixTransform &  node)
inline

Begins the triangle extraction on the subgraph node.

Parameters
node- The subgraph from which the triangles will be extracted.

Definition at line 176 of file TriangleExtractor.h.

◆ popMatrix()

void agxOSG::TriangleExtractor::popMatrix ( )
protected

◆ pushMatrix()

void agxOSG::TriangleExtractor::pushMatrix ( const osg::Matrix &  matrix)
protected

Member Data Documentation

◆ m_tri_op

TriangleExtractOperator& agxOSG::TriangleExtractor::m_tri_op
protected

Definition at line 196 of file TriangleExtractor.h.


The documentation for this class was generated from the following file: