osg::CullSettings Class Reference

Inheritance diagram for osg::CullSettings:

Inheritance graph
[legend]
List of all members.

Public Types

typedef unsigned int CullingMode
 COMPUTE_NEAR_FAR_MODE = 0x0001
 CULLING_MODE = 0x0002
 LOD_SCALE = 0x0004
 SMALL_FEATURE_CULLING_PIXEL_SIZE = 0x0008
 CLAMP_PROJECTION_MATRIX_CALLBACK = 0x0010
 NEAR_FAR_RATIO = 0x0020
 IMPOSTOR_ACTIVE = 0x0040
 DEPTH_SORT_IMPOSTOR_SPRITES = 0x0080
 IMPOSTOR_PIXEL_ERROR_THRESHOLD = 0x0100
 NUM_FRAMES_TO_KEEP_IMPOSTORS_SPRITES = 0x0200
 CULL_MASK = 0x0400
 CULL_MASK_LEFT = 0x0800
 CULL_MASK_RIGHT = 0x1000
 CLEAR_COLOR = 0x2000
 LIGHTING_MODE = 0x4000
 LIGHT = 0x8000
 NO_VARIABLES = 0x0000
 ALL_VARIABLES = 0xFFFF
 DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT
 DO_NOT_MODIFY_INHERITANCE_MASK
 DO_NOT_COMPUTE_NEAR_FAR = 0
 COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES
 COMPUTE_NEAR_FAR_USING_PRIMITIVES
 NO_CULLING = 0x0
 VIEW_FRUSTUM_SIDES_CULLING = 0x1
 NEAR_PLANE_CULLING = 0x2
 FAR_PLANE_CULLING = 0x4
 VIEW_FRUSTUM_CULLING
 SMALL_FEATURE_CULLING = 0x8
 SHADOW_OCCLUSION_CULLING = 0x10
 CLUSTER_CULLING = 0x20
 DEFAULT_CULLING
 ENABLE_ALL_CULLING
enum  VariablesMask {
  COMPUTE_NEAR_FAR_MODE = 0x0001, CULLING_MODE = 0x0002, LOD_SCALE = 0x0004, SMALL_FEATURE_CULLING_PIXEL_SIZE = 0x0008,
  CLAMP_PROJECTION_MATRIX_CALLBACK = 0x0010, NEAR_FAR_RATIO = 0x0020, IMPOSTOR_ACTIVE = 0x0040, DEPTH_SORT_IMPOSTOR_SPRITES = 0x0080,
  IMPOSTOR_PIXEL_ERROR_THRESHOLD = 0x0100, NUM_FRAMES_TO_KEEP_IMPOSTORS_SPRITES = 0x0200, CULL_MASK = 0x0400, CULL_MASK_LEFT = 0x0800,
  CULL_MASK_RIGHT = 0x1000, CLEAR_COLOR = 0x2000, LIGHTING_MODE = 0x4000, LIGHT = 0x8000,
  NO_VARIABLES = 0x0000, ALL_VARIABLES = 0xFFFF
}
enum  InheritanceMaskActionOnAttributeSetting { DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT, DO_NOT_MODIFY_INHERITANCE_MASK }
enum  ComputeNearFarMode { DO_NOT_COMPUTE_NEAR_FAR = 0, COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES, COMPUTE_NEAR_FAR_USING_PRIMITIVES }
enum  CullingModeValues {
  NO_CULLING = 0x0, VIEW_FRUSTUM_SIDES_CULLING = 0x1, NEAR_PLANE_CULLING = 0x2, FAR_PLANE_CULLING = 0x4,
  VIEW_FRUSTUM_CULLING, SMALL_FEATURE_CULLING = 0x8, SHADOW_OCCLUSION_CULLING = 0x10, CLUSTER_CULLING = 0x20,
  DEFAULT_CULLING, ENABLE_ALL_CULLING
}

Public Member Functions

 CullSettings ()
 CullSettings (ArgumentParser &arguments)
 CullSettings (const CullSettings &cs)
virtual ~CullSettings ()
CullSettingsoperator= (const CullSettings &settings)
virtual void setDefaults ()
void setInheritanceMask (unsigned int mask)
 Set the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.
unsigned int getInheritanceMask () const
 Get the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.
void setCullSettings (const CullSettings &settings)
 Set the local cull settings values from specified CullSettings object.
virtual void inheritCullSettings (const CullSettings &settings)
 Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.
virtual void inheritCullSettings (const CullSettings &settings, unsigned int inheritanceMask)
 Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.
void readEnvironmentalVariables ()
 read the environmental variables.
void readCommandLine (ArgumentParser &arguments)
 read the commandline arguments.
void setInheritanceMaskActionOnAttributeSetting (InheritanceMaskActionOnAttributeSetting action)
InheritanceMaskActionOnAttributeSetting getInheritanceMaskActionOnAttributeSetting () const
void applyMaskAction (unsigned int maskBit)
 Apply the action, specified by the InheritanceMaskActionOnAttributeSetting, to apply to the inheritance bit mask.
void setImpostorsActive (bool active)
 Switch the creation of Impostors on or off.
bool getImpostorsActive () const
 Get whether impostors are active or not.
void setImpostorPixelErrorThreshold (float numPixels)
 Set the impostor error threshold.
float getImpostorPixelErrorThreshold () const
 Get the impostor error threshold.
void setDepthSortImpostorSprites (bool doDepthSort)
 Set whether ImpostorSprite's should be placed in a depth sorted bin for rendering.
bool getDepthSortImpostorSprites () const
 Get whether ImpostorSprite's are depth sorted bin for rendering.
void setNumberOfFrameToKeepImpostorSprites (int numFrames)
 Set the number of frames that an ImpostorSprite is kept whilst not being beyond, before being recycled.
int getNumberOfFrameToKeepImpostorSprites () const
 Get the number of frames that an ImpostorSprite is kept whilst not being beyond, before being recycled.
void setComputeNearFarMode (ComputeNearFarMode cnfm)
ComputeNearFarMode getComputeNearFarMode () const
void setNearFarRatio (double ratio)
double getNearFarRatio () const
void setCullingMode (CullingMode mode)
 Set the culling mode for the CullVisitor to use.
CullingMode getCullingMode () const
 Returns the current CullingMode.
void setCullMask (osg::Node::NodeMask nm)
osg::Node::NodeMask getCullMask () const
void setCullMaskLeft (osg::Node::NodeMask nm)
osg::Node::NodeMask getCullMaskLeft () const
void setCullMaskRight (osg::Node::NodeMask nm)
osg::Node::NodeMask getCullMaskRight () const
void setLODScale (float scale)
 Set the LOD bias for the CullVisitor to use.
float getLODScale () const
 Get the LOD bias.
void setSmallFeatureCullingPixelSize (float value)
 Set the Small Feature Culling Pixel Size.
float getSmallFeatureCullingPixelSize () const
 Get the Small Feature Culling Pixel Size.
void setClampProjectionMatrixCallback (ClampProjectionMatrixCallback *cpmc)
 set the ClampProjectionMatrixCallback.
ClampProjectionMatrixCallbackgetClampProjectionMatrixCallback ()
 get the non const ClampProjectionMatrixCallback.
const ClampProjectionMatrixCallbackgetClampProjectionMatrixCallback () const
 get the const ClampProjectionMatrixCallback.
void write (std::ostream &out)
 Write out internal settings of CullSettings.

Protected Attributes

unsigned int _inheritanceMask
InheritanceMaskActionOnAttributeSetting _inheritanceMaskActionOnAttributeSetting
ComputeNearFarMode _computeNearFar
CullingMode _cullingMode
float _LODScale
float _smallFeatureCullingPixelSize
ref_ptr< ClampProjectionMatrixCallback_clampProjectionMatrixCallback
double _nearFarRatio
bool _impostorActive
bool _depthSortImpostorSprites
float _impostorPixelErrorThreshold
int _numFramesToKeepImpostorSprites
Node::NodeMask _cullMask
Node::NodeMask _cullMaskLeft
Node::NodeMask _cullMaskRight

Classes

struct  ClampProjectionMatrixCallback
 Callback for overriding the CullVisitor's default clamping of the projection matrix to computed near and far values. More...

Member Typedef Documentation

typedef unsigned int osg::CullSettings::CullingMode


Member Enumeration Documentation

enum osg::CullSettings::ComputeNearFarMode

Enumerator:
DO_NOT_COMPUTE_NEAR_FAR 
COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES 
COMPUTE_NEAR_FAR_USING_PRIMITIVES 

enum osg::CullSettings::CullingModeValues

Enumerator:
NO_CULLING 
VIEW_FRUSTUM_SIDES_CULLING 
NEAR_PLANE_CULLING 
FAR_PLANE_CULLING 
VIEW_FRUSTUM_CULLING 
SMALL_FEATURE_CULLING 
SHADOW_OCCLUSION_CULLING 
CLUSTER_CULLING 
DEFAULT_CULLING 
ENABLE_ALL_CULLING 

enum osg::CullSettings::InheritanceMaskActionOnAttributeSetting

Enumerator:
DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT 
DO_NOT_MODIFY_INHERITANCE_MASK 

enum osg::CullSettings::VariablesMask

Enumerator:
COMPUTE_NEAR_FAR_MODE 
CULLING_MODE 
LOD_SCALE 
SMALL_FEATURE_CULLING_PIXEL_SIZE 
CLAMP_PROJECTION_MATRIX_CALLBACK 
NEAR_FAR_RATIO 
IMPOSTOR_ACTIVE 
DEPTH_SORT_IMPOSTOR_SPRITES 
IMPOSTOR_PIXEL_ERROR_THRESHOLD 
NUM_FRAMES_TO_KEEP_IMPOSTORS_SPRITES 
CULL_MASK 
CULL_MASK_LEFT 
CULL_MASK_RIGHT 
CLEAR_COLOR 
LIGHTING_MODE 
LIGHT 
NO_VARIABLES 
ALL_VARIABLES 


Constructor & Destructor Documentation

osg::CullSettings::CullSettings (  )  [inline]

osg::CullSettings::CullSettings ( ArgumentParser arguments  )  [inline]

osg::CullSettings::CullSettings ( const CullSettings cs  ) 

virtual osg::CullSettings::~CullSettings (  )  [inline, virtual]


Member Function Documentation

void osg::CullSettings::applyMaskAction ( unsigned int  maskBit  )  [inline]

Apply the action, specified by the InheritanceMaskActionOnAttributeSetting, to apply to the inheritance bit mask.

This method is called by CullSettings::set*() parameter methods to ensure that CullSettings inheritance mechanisms doesn't overwrite the local parameter settings.

const ClampProjectionMatrixCallback* osg::CullSettings::getClampProjectionMatrixCallback (  )  const [inline]

get the const ClampProjectionMatrixCallback.

ClampProjectionMatrixCallback* osg::CullSettings::getClampProjectionMatrixCallback (  )  [inline]

get the non const ClampProjectionMatrixCallback.

ComputeNearFarMode osg::CullSettings::getComputeNearFarMode (  )  const [inline]

CullingMode osg::CullSettings::getCullingMode (  )  const [inline]

Returns the current CullingMode.

osg::Node::NodeMask osg::CullSettings::getCullMask (  )  const [inline]

osg::Node::NodeMask osg::CullSettings::getCullMaskLeft (  )  const [inline]

osg::Node::NodeMask osg::CullSettings::getCullMaskRight (  )  const [inline]

bool osg::CullSettings::getDepthSortImpostorSprites (  )  const [inline]

Get whether ImpostorSprite's are depth sorted bin for rendering.

float osg::CullSettings::getImpostorPixelErrorThreshold (  )  const [inline]

Get the impostor error threshold.

bool osg::CullSettings::getImpostorsActive (  )  const [inline]

Get whether impostors are active or not.

unsigned int osg::CullSettings::getInheritanceMask (  )  const [inline]

Get the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.

InheritanceMaskActionOnAttributeSetting osg::CullSettings::getInheritanceMaskActionOnAttributeSetting (  )  const [inline]

float osg::CullSettings::getLODScale (  )  const [inline]

Get the LOD bias.

double osg::CullSettings::getNearFarRatio (  )  const [inline]

int osg::CullSettings::getNumberOfFrameToKeepImpostorSprites (  )  const [inline]

Get the number of frames that an ImpostorSprite is kept whilst not being beyond, before being recycled.

float osg::CullSettings::getSmallFeatureCullingPixelSize (  )  const [inline]

Get the Small Feature Culling Pixel Size.

virtual void osg::CullSettings::inheritCullSettings ( const CullSettings settings,
unsigned int  inheritanceMask 
) [virtual]

Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.

Reimplemented in osg::Camera, and osgUtil::SceneView.

virtual void osg::CullSettings::inheritCullSettings ( const CullSettings settings  )  [inline, virtual]

Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.

Reimplemented in osgUtil::SceneView.

CullSettings& osg::CullSettings::operator= ( const CullSettings settings  )  [inline]

void osg::CullSettings::readCommandLine ( ArgumentParser arguments  ) 

read the commandline arguments.

void osg::CullSettings::readEnvironmentalVariables (  ) 

read the environmental variables.

void osg::CullSettings::setClampProjectionMatrixCallback ( ClampProjectionMatrixCallback cpmc  )  [inline]

set the ClampProjectionMatrixCallback.

void osg::CullSettings::setComputeNearFarMode ( ComputeNearFarMode  cnfm  )  [inline]

void osg::CullSettings::setCullingMode ( CullingMode  mode  )  [inline]

Set the culling mode for the CullVisitor to use.

void osg::CullSettings::setCullMask ( osg::Node::NodeMask  nm  )  [inline]

void osg::CullSettings::setCullMaskLeft ( osg::Node::NodeMask  nm  )  [inline]

void osg::CullSettings::setCullMaskRight ( osg::Node::NodeMask  nm  )  [inline]

void osg::CullSettings::setCullSettings ( const CullSettings settings  ) 

Set the local cull settings values from specified CullSettings object.

virtual void osg::CullSettings::setDefaults (  )  [virtual]

Reimplemented in osgUtil::SceneView.

void osg::CullSettings::setDepthSortImpostorSprites ( bool  doDepthSort  )  [inline]

Set whether ImpostorSprite's should be placed in a depth sorted bin for rendering.

void osg::CullSettings::setImpostorPixelErrorThreshold ( float  numPixels  )  [inline]

Set the impostor error threshold.

Used in calculation of whether impostors remain valid.

void osg::CullSettings::setImpostorsActive ( bool  active  )  [inline]

Switch the creation of Impostors on or off.

Setting active to false forces the CullVisitor to use the Impostor LOD children for rendering. Setting active to true forces the CullVisitor to create the appropriate pre-rendering stages which render to the ImpostorSprite's texture.

void osg::CullSettings::setInheritanceMask ( unsigned int  mask  )  [inline]

Set the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.

void osg::CullSettings::setInheritanceMaskActionOnAttributeSetting ( InheritanceMaskActionOnAttributeSetting  action  )  [inline]

void osg::CullSettings::setLODScale ( float  scale  )  [inline]

Set the LOD bias for the CullVisitor to use.

void osg::CullSettings::setNearFarRatio ( double  ratio  )  [inline]

void osg::CullSettings::setNumberOfFrameToKeepImpostorSprites ( int  numFrames  )  [inline]

Set the number of frames that an ImpostorSprite is kept whilst not being beyond, before being recycled.

void osg::CullSettings::setSmallFeatureCullingPixelSize ( float  value  )  [inline]

Set the Small Feature Culling Pixel Size.

void osg::CullSettings::write ( std::ostream &  out  ) 

Write out internal settings of CullSettings.


Member Data Documentation

ref_ptr<ClampProjectionMatrixCallback> osg::CullSettings::_clampProjectionMatrixCallback [protected]

ComputeNearFarMode osg::CullSettings::_computeNearFar [protected]

CullingMode osg::CullSettings::_cullingMode [protected]

Node::NodeMask osg::CullSettings::_cullMask [protected]

Node::NodeMask osg::CullSettings::_cullMaskLeft [protected]

Node::NodeMask osg::CullSettings::_cullMaskRight [protected]

bool osg::CullSettings::_depthSortImpostorSprites [protected]

bool osg::CullSettings::_impostorActive [protected]

float osg::CullSettings::_impostorPixelErrorThreshold [protected]

unsigned int osg::CullSettings::_inheritanceMask [protected]

InheritanceMaskActionOnAttributeSetting osg::CullSettings::_inheritanceMaskActionOnAttributeSetting [protected]

float osg::CullSettings::_LODScale [protected]

double osg::CullSettings::_nearFarRatio [protected]

int osg::CullSettings::_numFramesToKeepImpostorSprites [protected]

float osg::CullSettings::_smallFeatureCullingPixelSize [protected]


The documentation for this class was generated from the following file:
Generated at Tue Aug 5 20:31:53 2008 for the OpenSceneGraph by doxygen 1.4.7.