MeshTex  3.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
MeshVisitor Class Reference

Visitor that will invoke Execute with a MeshEntity argument if the visited node is a valid mesh. More...

#include <MeshVisitor.h>

Inheritance diagram for MeshVisitor:
RefCounted GeneralFunctionDialog::GeneralFunctionVisitor GetInfoDialog::GetInfoVisitor MainMenu::PresetFuncVisitor SetScaleDialog::SetScaleVisitor

List of all members.

Public Member Functions

 MeshVisitor ()
 Default constructor.
virtual ~MeshVisitor ()
 Virtual destructor.
void ResetVisitedCount ()
 Reset the visited count to zero.
unsigned GetVisitedCount ()
 Get the visited count.
void visit (scene::Instance &instance) const
 Visit a specified scene graph node.
- Public Member Functions inherited from RefCounted
 RefCounted ()
 Default constructor.
virtual ~RefCounted ()
 Virtual destructor.
void IncRef ()
 Increment reference count.
void DecRef ()
 Decrement reference count, and self-delete if count is <= 0.

Protected Member Functions

virtual bool Execute (MeshEntity &meshEntity) const
 Execute function performed for visited meshes.

Private Attributes

unsigned _visitedCount
 Track the number of Execute invocations.

Static Private Attributes

Callbacks to use when constructing the MeshEntity
static const
MeshEntity::MessageCallback 
_infoReportCallback
 Use GenericPluginUI::InfoReportDialog as MeshEntity info callback.
static const
MeshEntity::MessageCallback 
_warningReportCallback
 Use GenericPluginUI::WarningReportDialog as MeshEntity warning callback.
static const
MeshEntity::MessageCallback 
_errorReportCallback
 Use GenericPluginUI::ErrorReportDialog as MeshEntity error callback.

Detailed Description

Visitor that will invoke Execute with a MeshEntity argument if the visited node is a valid mesh.

Subclasses should override Execute to perform operations on the MeshEntity.


Member Function Documentation

bool MeshVisitor::Execute ( MeshEntity meshEntity) const
protectedvirtual

Execute function performed for visited meshes.

This implementation does nothing; subclasses should override it.

Parameters:
meshEntityThe MeshEntity.
Returns:
true if the mesh was successfully visited; always the case in this skeleton implementation.

Reimplemented in SetScaleDialog::SetScaleVisitor, GetInfoDialog::GetInfoVisitor, GeneralFunctionDialog::GeneralFunctionVisitor, and MainMenu::PresetFuncVisitor.

unsigned MeshVisitor::GetVisitedCount ( )

Get the visited count.

This is the number of times Execute has been invoked since visitor construction or the most recent reset of the count.

Returns:
The visited count.
void MeshVisitor::visit ( scene::Instance &  instance) const

Visit a specified scene graph node.

Parameters:
[in,out]instanceThe scene graph node.

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