OpenSceneGraph
|
A CullStack class which accumulates the current project, modelview matrices and the CullingSet. More...
Public Types | |
typedef std::vector< ShadowVolumeOccluder > | OccluderList |
typedef std::vector< CullingSet > | CullingStack |
![]() | |
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 | |
CullStack (const CullStack &cs) | |
void | reset () |
void | pushCullingSet () |
void | popCullingSet () |
void | setOccluderList (const ShadowVolumeOccluderList &svol) |
ShadowVolumeOccluderList & | getOccluderList () |
const ShadowVolumeOccluderList & | getOccluderList () const |
void | pushViewport (osg::Viewport *viewport) |
void | popViewport () |
void | pushProjectionMatrix (osg::RefMatrix *matrix) |
void | popProjectionMatrix () |
void | pushModelViewMatrix (osg::RefMatrix *matrix, Transform::ReferenceFrame referenceFrame) |
void | popModelViewMatrix () |
float | getFrustumVolume () |
float | pixelSize (const Vec3 &v, float radius) const |
Compute the pixel size of an object at position v, with specified radius. More... | |
float | pixelSize (const BoundingSphere &bs) const |
Compute the pixel size of the bounding sphere. More... | |
float | clampedPixelSize (const Vec3 &v, float radius) const |
Compute the pixel size of an object at position v, with specified radius. More... | |
float | clampedPixelSize (const BoundingSphere &bs) const |
Compute the pixel size of the bounding sphere. More... | |
void | disableAndPushOccludersCurrentMask (NodePath &nodePath) |
void | popOccludersCurrentMask (NodePath &nodePath) |
bool | isCulled (const std::vector< Vec3 > &vertices) |
bool | isCulled (const BoundingBox &bb) |
bool | isCulled (const BoundingSphere &bs) |
bool | isCulled (const osg::Node &node) |
void | pushCurrentMask () |
void | popCurrentMask () |
CullingStack & | getClipSpaceCullingStack () |
CullingStack & | getProjectionCullingStack () |
CullingStack & | getModelViewCullingStack () |
CullingSet & | getCurrentCullingSet () |
const CullingSet & | getCurrentCullingSet () const |
osg::Viewport * | getViewport () |
osg::RefMatrix * | getModelViewMatrix () |
osg::RefMatrix * | getProjectionMatrix () |
osg::Matrix | getWindowMatrix () |
const osg::RefMatrix * | getMVPW () |
const osg::Vec3 & | getReferenceViewPoint () const |
void | pushReferenceViewPoint (const osg::Vec3 &viewPoint) |
void | popReferenceViewPoint () |
const osg::Vec3 & | getEyeLocal () const |
const osg::Vec3 & | getViewPointLocal () const |
const osg::Vec3 | getUpLocal () const |
const osg::Vec3 | getLookVectorLocal () const |
![]() | |
CullSettings (ArgumentParser &arguments) | |
CullSettings (const CullSettings &cs) | |
CullSettings & | operator= (const CullSettings &settings) |
virtual void | setDefaults () |
void | setInheritanceMask (InheritanceMask mask) |
Set the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object. More... | |
InheritanceMask | getInheritanceMask () const |
Get the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object. More... | |
void | setCullSettings (const CullSettings &settings) |
Set the local cull settings values from specified CullSettings object. More... | |
virtual void | inheritCullSettings (const CullSettings &settings) |
Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask. More... | |
virtual void | inheritCullSettings (const CullSettings &settings, unsigned int inheritanceMask) |
Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask. More... | |
void | readEnvironmentalVariables () |
read the environmental variables. More... | |
void | readCommandLine (ArgumentParser &arguments) |
read the commandline arguments. More... | |
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. More... | |
void | setImpostorsActive (bool active) |
Switch the creation of Impostors on or off. More... | |
bool | getImpostorsActive () const |
Get whether impostors are active or not. More... | |
void | setImpostorPixelErrorThreshold (float numPixels) |
Set the impostor error threshold. More... | |
float | getImpostorPixelErrorThreshold () const |
Get the impostor error threshold. More... | |
void | setDepthSortImpostorSprites (bool doDepthSort) |
Set whether ImpostorSprite's should be placed in a depth sorted bin for rendering. More... | |
bool | getDepthSortImpostorSprites () const |
Get whether ImpostorSprite's are depth sorted bin for rendering. More... | |
void | setNumberOfFrameToKeepImpostorSprites (int numFrames) |
Set the number of frames that an ImpostorSprite is kept whilst not being beyond, before being recycled. More... | |
int | getNumberOfFrameToKeepImpostorSprites () const |
Get the number of frames that an ImpostorSprite is kept whilst not being beyond, before being recycled. More... | |
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. More... | |
CullingMode | getCullingMode () const |
Returns the current CullingMode. More... | |
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. More... | |
float | getLODScale () const |
Get the LOD bias. More... | |
void | setSmallFeatureCullingPixelSize (float value) |
Threshold at which small features are culled. More... | |
float | getSmallFeatureCullingPixelSize () const |
Get the Small Feature Culling Pixel Size. More... | |
void | setClampProjectionMatrixCallback (ClampProjectionMatrixCallback *cpmc) |
set the ClampProjectionMatrixCallback. More... | |
ClampProjectionMatrixCallback * | getClampProjectionMatrixCallback () |
get the non const ClampProjectionMatrixCallback. More... | |
const ClampProjectionMatrixCallback * | getClampProjectionMatrixCallback () const |
get the const ClampProjectionMatrixCallback. More... | |
void | write (std::ostream &out) |
Write out internal settings of CullSettings. More... | |
Protected Types | |
typedef fast_back_stack< ref_ptr< RefMatrix > > | MatrixStack |
typedef fast_back_stack< ref_ptr< Viewport > > | ViewportStack |
typedef fast_back_stack< Vec3 > | EyePointStack |
typedef std::vector< osg::ref_ptr< osg::RefMatrix > > | MatrixList |
Protected Member Functions | |
void | computeFrustumVolume () |
osg::RefMatrix * | createOrReuseMatrix (const osg::Matrix &value) |
Protected Attributes | |
ShadowVolumeOccluderList | _occluderList |
MatrixStack | _projectionStack |
MatrixStack | _modelviewStack |
MatrixStack | _MVPW_Stack |
ViewportStack | _viewportStack |
EyePointStack | _referenceViewPoints |
EyePointStack | _eyePointStack |
EyePointStack | _viewPointStack |
CullingStack | _clipspaceCullingStack |
CullingStack | _projectionCullingStack |
CullingStack | _modelviewCullingStack |
unsigned int | _index_modelviewCullingStack |
CullingSet * | _back_modelviewCullingStack |
float | _frustumVolume |
unsigned int | _bbCornerNear |
unsigned int | _bbCornerFar |
ref_ptr< osg::RefMatrix > | _identity |
MatrixList | _reuseMatrixList |
unsigned int | _currentReuseMatrixIndex |
![]() | |
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 |
A CullStack class which accumulates the current project, modelview matrices and the CullingSet.
Compute the pixel size of an object at position v, with specified radius.
fabs()ed to always be positive.
|
inline |
Compute the pixel size of the bounding sphere.
fabs()ed to always be positive.
Compute the pixel size of an object at position v, with specified radius.
|
inline |
Compute the pixel size of the bounding sphere.