osgUtil::Optimizer Class Reference

List of all members.

Public Types

 FLATTEN_STATIC_TRANSFORMS = 0x001
 REMOVE_REDUNDANT_NODES = 0x002
 REMOVE_LOADED_PROXY_NODES = 0x004
 COMBINE_ADJACENT_LODS = 0x008
 SHARE_DUPLICATE_STATE = 0x010
 MERGE_GEOMETRY = 0x020
 CHECK_GEOMETRY = 0x040
 SPATIALIZE_GROUPS = 0x080
 COPY_SHARED_NODES = 0x100
 TRISTRIP_GEOMETRY = 0x200
 TESSELATE_GEOMETRY = 0x400
 OPTIMIZE_TEXTURE_SETTINGS = 0x800
 MERGE_GEODES = 0x1000
 FLATTEN_BILLBOARDS = 0x2000
 TEXTURE_ATLAS_BUILDER = 0x4000
 DEFAULT_OPTIMIZATIONS
 ALL_OPTIMIZATIONS
enum  OptimizationOptions {
  FLATTEN_STATIC_TRANSFORMS = 0x001, REMOVE_REDUNDANT_NODES = 0x002, REMOVE_LOADED_PROXY_NODES = 0x004, COMBINE_ADJACENT_LODS = 0x008,
  SHARE_DUPLICATE_STATE = 0x010, MERGE_GEOMETRY = 0x020, CHECK_GEOMETRY = 0x040, SPATIALIZE_GROUPS = 0x080,
  COPY_SHARED_NODES = 0x100, TRISTRIP_GEOMETRY = 0x200, TESSELATE_GEOMETRY = 0x400, OPTIMIZE_TEXTURE_SETTINGS = 0x800,
  MERGE_GEODES = 0x1000, FLATTEN_BILLBOARDS = 0x2000, TEXTURE_ATLAS_BUILDER = 0x4000, DEFAULT_OPTIMIZATIONS,
  ALL_OPTIMIZATIONS
}

Public Member Functions

 Optimizer ()
virtual ~Optimizer ()
void reset ()
void optimize (osg::Node *node)
virtual void optimize (osg::Node *node, unsigned int options)
void setIsOperationPermissibleForObjectCallback (IsOperationPermissibleForObjectCallback *callback)
IsOperationPermissibleForObjectCallbackgetIsOperationPermissibleForObjectCallback ()
const IsOperationPermissibleForObjectCallbackgetIsOperationPermissibleForObjectCallback () const
void setPermissibleOptimizationsForObject (const osg::Object *object, unsigned int options)
unsigned int getPermissibleOptimizationsForObject (const osg::Object *object) const
bool isOperationPermissibleForObject (const osg::StateSet *object, unsigned int option) const
bool isOperationPermissibleForObject (const osg::StateAttribute *object, unsigned int option) const
bool isOperationPermissibleForObject (const osg::Drawable *object, unsigned int option) const
bool isOperationPermissibleForObject (const osg::Node *object, unsigned int option) const
bool isOperationPermissibleForObjectImplementation (const osg::StateSet *stateset, unsigned int option) const
bool isOperationPermissibleForObjectImplementation (const osg::StateAttribute *attribute, unsigned int option) const
bool isOperationPermissibleForObjectImplementation (const osg::Drawable *drawable, unsigned int option) const
bool isOperationPermissibleForObjectImplementation (const osg::Node *node, unsigned int option) const

Protected Types

typedef std::map< const osg::Object *,
unsigned int > 
PermissibleOptimizationsMap

Protected Attributes

osg::ref_ptr< IsOperationPermissibleForObjectCallback_isOperationPermissibleForObjectCallback
PermissibleOptimizationsMap _permissibleOptimizationsMap

Classes

class  CheckGeometryVisitor
class  CombineLODsVisitor
class  CombineStaticTransformsVisitor
class  CopySharedSubgraphsVisitor
class  FlattenBillboardVisitor
class  FlattenStaticTransformsVisitor
struct  IsOperationPermissibleForObjectCallback
class  MergeGeodesVisitor
class  MergeGeometryVisitor
class  RemoveEmptyNodesVisitor
class  RemoveLoadedProxyNodesVisitor
class  RemoveRedundantNodesVisitor
class  SpatializeGroupsVisitor
class  StateVisitor
class  TesselateVisitor
class  TextureAtlasBuilder
class  TextureAtlasVisitor
class  TextureVisitor

Detailed Description

Traverses scene graph to improve efficiency. See OptimizationOptions. For example of usage see examples/osgimpostor or osgviewer.


Member Typedef Documentation

typedef std::map<const osg::Object*,unsigned int> osgUtil::Optimizer::PermissibleOptimizationsMap [protected]


Member Enumeration Documentation

enum osgUtil::Optimizer::OptimizationOptions

Enumerator:
FLATTEN_STATIC_TRANSFORMS 
REMOVE_REDUNDANT_NODES 
REMOVE_LOADED_PROXY_NODES 
COMBINE_ADJACENT_LODS 
SHARE_DUPLICATE_STATE 
MERGE_GEOMETRY 
CHECK_GEOMETRY 
SPATIALIZE_GROUPS 
COPY_SHARED_NODES 
TRISTRIP_GEOMETRY 
TESSELATE_GEOMETRY 
OPTIMIZE_TEXTURE_SETTINGS 
MERGE_GEODES 
FLATTEN_BILLBOARDS 
TEXTURE_ATLAS_BUILDER 
DEFAULT_OPTIMIZATIONS 
ALL_OPTIMIZATIONS 


Constructor & Destructor Documentation

osgUtil::Optimizer::Optimizer (  )  [inline]

virtual osgUtil::Optimizer::~Optimizer (  )  [inline, virtual]


Member Function Documentation

const IsOperationPermissibleForObjectCallback* osgUtil::Optimizer::getIsOperationPermissibleForObjectCallback (  )  const [inline]

Get the callback for customizing what operations are permitted on objects in the scene graph.

IsOperationPermissibleForObjectCallback* osgUtil::Optimizer::getIsOperationPermissibleForObjectCallback (  )  [inline]

Get the callback for customizing what operations are permitted on objects in the scene graph.

unsigned int osgUtil::Optimizer::getPermissibleOptimizationsForObject ( const osg::Object object  )  const [inline]

bool osgUtil::Optimizer::isOperationPermissibleForObject ( const osg::Node object,
unsigned int  option 
) const [inline]

bool osgUtil::Optimizer::isOperationPermissibleForObject ( const osg::Drawable object,
unsigned int  option 
) const [inline]

bool osgUtil::Optimizer::isOperationPermissibleForObject ( const osg::StateAttribute object,
unsigned int  option 
) const [inline]

bool osgUtil::Optimizer::isOperationPermissibleForObject ( const osg::StateSet object,
unsigned int  option 
) const [inline]

bool osgUtil::Optimizer::isOperationPermissibleForObjectImplementation ( const osg::Node node,
unsigned int  option 
) const [inline]

bool osgUtil::Optimizer::isOperationPermissibleForObjectImplementation ( const osg::Drawable drawable,
unsigned int  option 
) const [inline]

bool osgUtil::Optimizer::isOperationPermissibleForObjectImplementation ( const osg::StateAttribute attribute,
unsigned int  option 
) const [inline]

bool osgUtil::Optimizer::isOperationPermissibleForObjectImplementation ( const osg::StateSet stateset,
unsigned int  option 
) const [inline]

virtual void osgUtil::Optimizer::optimize ( osg::Node node,
unsigned int  options 
) [virtual]

Traverse the node and its subgraph with a series of optimization visitors, specified by the OptimizationOptions.

void osgUtil::Optimizer::optimize ( osg::Node node  ) 

Traverse the node and its subgraph with a series of optimization visitors, specified by the OptimizationOptions.

void osgUtil::Optimizer::reset (  ) 

Reset internal data to initial state - the getPermissibleOptionsMap is cleared.

void osgUtil::Optimizer::setIsOperationPermissibleForObjectCallback ( IsOperationPermissibleForObjectCallback callback  )  [inline]

Set the callback for customizing what operations are permitted on objects in the scene graph.

void osgUtil::Optimizer::setPermissibleOptimizationsForObject ( const osg::Object object,
unsigned int  options 
) [inline]


Member Data Documentation

osg::ref_ptr<IsOperationPermissibleForObjectCallback> osgUtil::Optimizer::_isOperationPermissibleForObjectCallback [protected]

PermissibleOptimizationsMap osgUtil::Optimizer::_permissibleOptimizationsMap [protected]


The documentation for this class was generated from the following file:
Generated on Sun Oct 1 13:17:14 2006 for openscenegraph by  doxygen 1.4.7