AGX Dynamics  2.37.3.2
agxOSG::TriangleExtractOperatorBase Class Referenceabstract

This class is a base class that implements a functor, with a method triangle that is executed for each triangle visited. More...

#include <TriangleExtractor.h>

Public Member Functions

 TriangleExtractOperatorBase ()
 Constructor. More...
 
virtual ~TriangleExtractOperatorBase ()
 
void operator() (const osg::Vec3 &v1, const osg::Vec3 &v2, const osg::Vec3 &v3, bool)
 

Protected Member Functions

unsigned int numTriangles ()
 Returns the number of triangles processed. More...
 
void reset ()
 Resets the number of triangles back to zero. More...
 
void setMatrix (const osg::Matrix &matrix)
 Stores the accumulated matrix. More...
 
void setMatrix ()
 
virtual void triangle (const osg::Vec3 &v1, const osg::Vec3 &v2, const osg::Vec3 &v3)=0
 

Detailed Description

This class is a base class that implements a functor, with a method triangle that is executed for each triangle visited.

This class is used as a functor class, with its method triangle executed per triangle. Each triangles vertices's is supplied by the TriangleExtractor class. THe vertices will be in world coordinates. That is all the transformations will be accumulated during the traversal.

Definition at line 63 of file TriangleExtractor.h.

Constructor & Destructor Documentation

◆ TriangleExtractOperatorBase()

agxOSG::TriangleExtractOperatorBase::TriangleExtractOperatorBase ( )
inline

Constructor.

Definition at line 70 of file TriangleExtractor.h.

◆ ~TriangleExtractOperatorBase()

virtual agxOSG::TriangleExtractOperatorBase::~TriangleExtractOperatorBase ( )
inlinevirtual

Definition at line 72 of file TriangleExtractor.h.

Member Function Documentation

◆ numTriangles()

unsigned int agxOSG::TriangleExtractOperatorBase::numTriangles ( )
inlineprotected

Returns the number of triangles processed.

Definition at line 92 of file TriangleExtractor.h.

◆ operator()()

void agxOSG::TriangleExtractOperatorBase::operator() ( const osg::Vec3 &  v1,
const osg::Vec3 &  v2,
const osg::Vec3 &  v3,
bool   
)
inline

Definition at line 114 of file TriangleExtractor.h.

◆ reset()

void agxOSG::TriangleExtractOperatorBase::reset ( )
inlineprotected

Resets the number of triangles back to zero.

Definition at line 97 of file TriangleExtractor.h.

◆ setMatrix() [1/2]

void agxOSG::TriangleExtractOperatorBase::setMatrix ( const osg::Matrix &  matrix)
inlineprotected

Stores the accumulated matrix.

Definition at line 84 of file TriangleExtractor.h.

◆ setMatrix() [2/2]

void agxOSG::TriangleExtractOperatorBase::setMatrix ( )
inlineprotected

Definition at line 87 of file TriangleExtractor.h.

◆ triangle()

virtual void agxOSG::TriangleExtractOperatorBase::triangle ( const osg::Vec3 &  v1,
const osg::Vec3 &  v2,
const osg::Vec3 &  v3 
)
protectedpure virtual

This method is a pure virtual method that has to be inherited. This method will be called for each triangle. The vertices are given in world coordinates using the accumulated matrix.


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