OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
osg::CullSettings Class Reference

#include <CullSettings.h>

Inheritance diagram for osg::CullSettings:
Inheritance graph
[legend]
Collaboration diagram for osg::CullSettings:
Collaboration graph
[legend]

Classes

struct  ClampProjectionMatrixCallback
 

Public Types

enum  VariablesMask {
  COMPUTE_NEAR_FAR_MODE = (0x1 << 0), CULLING_MODE = (0x1 << 1), LOD_SCALE = (0x1 << 2), SMALL_FEATURE_CULLING_PIXEL_SIZE = (0x1 << 3),
  CLAMP_PROJECTION_MATRIX_CALLBACK = (0x1 << 4), NEAR_FAR_RATIO = (0x1 << 5), IMPOSTOR_ACTIVE = (0x1 << 6), DEPTH_SORT_IMPOSTOR_SPRITES = (0x1 << 7),
  IMPOSTOR_PIXEL_ERROR_THRESHOLD = (0x1 << 8), NUM_FRAMES_TO_KEEP_IMPOSTORS_SPRITES = (0x1 << 9), CULL_MASK = (0x1 << 10), CULL_MASK_LEFT = (0x1 << 11),
  CULL_MASK_RIGHT = (0x1 << 12), CLEAR_COLOR = (0x1 << 13), CLEAR_MASK = (0x1 << 14), LIGHTING_MODE = (0x1 << 15),
  LIGHT = (0x1 << 16), DRAW_BUFFER = (0x1 << 17), READ_BUFFER = (0x1 << 18), NO_VARIABLES = 0x00000000,
  ALL_VARIABLES = 0x7FFFFFFF
}
 
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, COMPUTE_NEAR_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
}
 
typedef int InheritanceMask
 
typedef int CullingMode
 

Public Member Functions

 CullSettings ()
 
 CullSettings (ArgumentParser &arguments)
 
 CullSettings (const CullSettings &cs)
 
virtual ~CullSettings ()
 
CullSettingsoperator= (const CullSettings &settings)
 
virtual void setDefaults ()
 
void setInheritanceMask (InheritanceMask mask)
 
InheritanceMask getInheritanceMask () const
 
void setCullSettings (const CullSettings &settings)
 
virtual void inheritCullSettings (const CullSettings &settings)
 
virtual void inheritCullSettings (const CullSettings &settings, unsigned int inheritanceMask)
 
void readEnvironmentalVariables ()
 
void readCommandLine (ArgumentParser &arguments)
 
void setInheritanceMaskActionOnAttributeSetting (InheritanceMaskActionOnAttributeSetting action)
 
InheritanceMaskActionOnAttributeSetting getInheritanceMaskActionOnAttributeSetting () const
 
void applyMaskAction (unsigned int maskBit)
 
void setImpostorsActive (bool active)
 
bool getImpostorsActive () const
 
void setImpostorPixelErrorThreshold (float numPixels)
 
float getImpostorPixelErrorThreshold () const
 
void setDepthSortImpostorSprites (bool doDepthSort)
 
bool getDepthSortImpostorSprites () const
 
void setNumberOfFrameToKeepImpostorSprites (int numFrames)
 
int getNumberOfFrameToKeepImpostorSprites () const
 
void setComputeNearFarMode (ComputeNearFarMode cnfm)
 
ComputeNearFarMode getComputeNearFarMode () const
 
void setNearFarRatio (double ratio)
 
double getNearFarRatio () const
 
void setCullingMode (CullingMode mode)
 
CullingMode getCullingMode () const
 
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)
 
float getLODScale () const
 
void setSmallFeatureCullingPixelSize (float value)
 
float getSmallFeatureCullingPixelSize () const
 
void setClampProjectionMatrixCallback (ClampProjectionMatrixCallback *cpmc)
 
ClampProjectionMatrixCallbackgetClampProjectionMatrixCallback ()
 
const
ClampProjectionMatrixCallback
getClampProjectionMatrixCallback () const
 
void write (std::ostream &out)
 

Protected Attributes

InheritanceMask _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
 

Detailed Description

Definition at line 27 of file CullSettings.h.

Member Typedef Documentation

Definition at line 196 of file CullSettings.h.

Definition at line 85 of file CullSettings.h.

Member Enumeration Documentation

Enumerator
DO_NOT_COMPUTE_NEAR_FAR 
COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES 
COMPUTE_NEAR_FAR_USING_PRIMITIVES 
COMPUTE_NEAR_USING_PRIMITIVES 

Definition at line 160 of file CullSettings.h.

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 

Definition at line 174 of file CullSettings.h.

Enumerator
DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT 
DO_NOT_MODIFY_INHERITANCE_MASK 

Definition at line 109 of file CullSettings.h.

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 
CLEAR_MASK 
LIGHTING_MODE 
LIGHT 
DRAW_BUFFER 
READ_BUFFER 
NO_VARIABLES 
ALL_VARIABLES 

Definition at line 59 of file CullSettings.h.

Constructor & Destructor Documentation

osg::CullSettings::CullSettings ( )
inline

Definition at line 31 of file CullSettings.h.

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

Definition at line 37 of file CullSettings.h.

Here is the call graph for this function:

osg::CullSettings::CullSettings ( const CullSettings cs)
virtual osg::CullSettings::~CullSettings ( )
inlinevirtual

Definition at line 46 of file CullSettings.h.

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.

Definition at line 120 of file CullSettings.h.

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

get the non const ClampProjectionMatrixCallback.

Definition at line 241 of file CullSettings.h.

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

get the const ClampProjectionMatrixCallback.

Definition at line 243 of file CullSettings.h.

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

Definition at line 169 of file CullSettings.h.

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

Returns the current CullingMode.

Definition at line 202 of file CullSettings.h.

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

Definition at line 206 of file CullSettings.h.

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

Definition at line 209 of file CullSettings.h.

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

Definition at line 212 of file CullSettings.h.

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

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

Definition at line 150 of file CullSettings.h.

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

Get the impostor error threshold.

Definition at line 144 of file CullSettings.h.

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

Get whether impostors are active or not.

Definition at line 137 of file CullSettings.h.

InheritanceMask osg::CullSettings::getInheritanceMask ( ) const
inline

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

Definition at line 91 of file CullSettings.h.

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

Definition at line 116 of file CullSettings.h.

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

Get the LOD bias.

Definition at line 218 of file CullSettings.h.

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

Definition at line 172 of file CullSettings.h.

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

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

Definition at line 158 of file CullSettings.h.

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

Get the Small Feature Culling Pixel Size.

Definition at line 225 of file CullSettings.h.

virtual void osg::CullSettings::inheritCullSettings ( const CullSettings settings)
inlinevirtual

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

Reimplemented in osgUtil::SceneView.

Definition at line 97 of file CullSettings.h.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

Definition at line 48 of file CullSettings.h.

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.

Definition at line 239 of file CullSettings.h.

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

Definition at line 168 of file CullSettings.h.

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

Set the culling mode for the CullVisitor to use.

Definition at line 199 of file CullSettings.h.

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

Definition at line 205 of file CullSettings.h.

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

Definition at line 208 of file CullSettings.h.

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

Definition at line 211 of file CullSettings.h.

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.

Definition at line 147 of file CullSettings.h.

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

Set the impostor error threshold. Used in calculation of whether impostors remain valid.

Definition at line 141 of file CullSettings.h.

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.

Definition at line 134 of file CullSettings.h.

void osg::CullSettings::setInheritanceMask ( InheritanceMask  mask)
inline

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

Definition at line 88 of file CullSettings.h.

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

Definition at line 115 of file CullSettings.h.

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

Set the LOD bias for the CullVisitor to use.

Definition at line 215 of file CullSettings.h.

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

Definition at line 171 of file CullSettings.h.

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

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

Definition at line 154 of file CullSettings.h.

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

Threshold at which small features are culled.

Parameters
valueBounding volume size in screen space. Default is 2.0.

Definition at line 222 of file CullSettings.h.

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

Write out internal settings of CullSettings.

Member Data Documentation

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

Definition at line 259 of file CullSettings.h.

ComputeNearFarMode osg::CullSettings::_computeNearFar
protected

Definition at line 254 of file CullSettings.h.

CullingMode osg::CullSettings::_cullingMode
protected

Definition at line 255 of file CullSettings.h.

Node::NodeMask osg::CullSettings::_cullMask
protected

Definition at line 266 of file CullSettings.h.

Node::NodeMask osg::CullSettings::_cullMaskLeft
protected

Definition at line 267 of file CullSettings.h.

Node::NodeMask osg::CullSettings::_cullMaskRight
protected

Definition at line 268 of file CullSettings.h.

bool osg::CullSettings::_depthSortImpostorSprites
protected

Definition at line 262 of file CullSettings.h.

bool osg::CullSettings::_impostorActive
protected

Definition at line 261 of file CullSettings.h.

float osg::CullSettings::_impostorPixelErrorThreshold
protected

Definition at line 263 of file CullSettings.h.

InheritanceMask osg::CullSettings::_inheritanceMask
protected

Definition at line 251 of file CullSettings.h.

InheritanceMaskActionOnAttributeSetting osg::CullSettings::_inheritanceMaskActionOnAttributeSetting
protected

Definition at line 252 of file CullSettings.h.

float osg::CullSettings::_LODScale
protected

Definition at line 256 of file CullSettings.h.

double osg::CullSettings::_nearFarRatio
protected

Definition at line 260 of file CullSettings.h.

int osg::CullSettings::_numFramesToKeepImpostorSprites
protected

Definition at line 264 of file CullSettings.h.

float osg::CullSettings::_smallFeatureCullingPixelSize
protected

Definition at line 257 of file CullSettings.h.


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