osg::CullingSet Class Reference

`#include <CullingSet>`

Inheritance diagram for osg::CullingSet:

## Public Types

enum | MaskValues { 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 , DEFAULT_CULLING , ENABLE_ALL_CULLING }
typedef std::pair< osg::ref_ptr< osg::StateSet >, osg::Polytope > | StateFrustumPair
typedef std::vector< StateFrustumPair > | StateFrustumList
typedef std::vector< ShadowVolumeOccluder > | OccluderList
typedef int | Mask

## Public Member Functions

| CullingSet ()
| CullingSet (const CullingSet &cs)
| CullingSet (const CullingSet &cs, const Matrix &matrix, const Vec4 &pixelSizeVector)
CullingSet & | operator= (const CullingSet &cs)
void | set (const CullingSet &cs)
void | set (const CullingSet &cs, const Matrix &matrix, const Vec4 &pixelSizeVector)
void | setCullingMask (Mask mask)
Mask | getCullingMask () const
void | setFrustum (Polytope &cv)
Polytope & | getFrustum ()
const Polytope & | getFrustum () const
void | addStateFrustum (StateSet *stateset, Polytope &polytope)
void | getStateFrustumList (StateFrustumList &sfl)
StateFrustumList & | getStateFrustumList ()
void | addOccluder (ShadowVolumeOccluder &cv)
void | setPixelSizeVector (const Vec4 &v)
Vec4 & | getPixelSizeVector ()
const Vec4 & | getPixelSizeVector () const
void | setSmallFeatureCullingPixelSize (float value)
float & | getSmallFeatureCullingPixelSize ()
float | getSmallFeatureCullingPixelSize () const
float | pixelSize (const Vec3 &v, float radius) const
float | pixelSize (const BoundingSphere &bs) const
float | clampedPixelSize (const Vec3 &v, float radius) const
float | clampedPixelSize (const BoundingSphere &bs) const
bool | isCulled (const std::vector< Vec3 > &vertices)
bool | isCulled (const BoundingBox &bb)
bool | isCulled (const BoundingSphere &bs)
void | pushCurrentMask ()
void | popCurrentMask ()
void | resetCullingMask ()
void | disableAndPushOccludersCurrentMask (NodePath &nodePath)
void | popOccludersCurrentMask (NodePath &nodePath)
virtual | ~CullingSet ()
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
virtual void | setThreadSafeRefUnref (bool)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Static Public Member Functions

static osg::Vec4 | computePixelSizeVector (const Viewport &W, const Matrix &P, const Matrix &M)
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Protected Attributes

Mask | _mask
Polytope | _frustum
StateFrustumList | _stateFrustumList
OccluderList | _occluderList
Vec4 | _pixelSizeVector
float | _smallFeatureCullingPixelSize
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Additional Inherited Members

Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Detailed Description

A CullingSet class which contains a frustum and a list of occluders.

## Member Typedef Documentation

## Mask

typedef int osg::CullingSet::Mask

## OccluderList

typedef std::vector<ShadowVolumeOccluder> osg::CullingSet::OccluderList

## StateFrustumList

typedef std::vector< StateFrustumPair > osg::CullingSet::StateFrustumList

## StateFrustumPair

typedef std::pair< osg::ref_ptr<osg::StateSet>, osg::Polytope > osg::CullingSet::StateFrustumPair

## Member Enumeration Documentation

## MaskValues

enum osg::CullingSet::MaskValues

Enumerator
NO_CULLING |
VIEW_FRUSTUM_SIDES_CULLING |
NEAR_PLANE_CULLING |
FAR_PLANE_CULLING |
VIEW_FRUSTUM_CULLING |
SMALL_FEATURE_CULLING |
SHADOW_OCCLUSION_CULLING |
DEFAULT_CULLING |
ENABLE_ALL_CULLING |

## Constructor & Destructor Documentation

## CullingSet() [1/3]

osg::CullingSet::CullingSet | ( |  | ) |

Referenced by CullingSet(), CullingSet(), operator=(), set(), and set().

## CullingSet() [2/3]

osg::CullingSet::CullingSet | ( | const CullingSet & | cs | ) |

inline

References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, CullingSet(), and osg::Referenced::Referenced().

## CullingSet() [3/3]

osg::CullingSet::CullingSet | ( | const CullingSet & | cs,
|  | const Matrix & | matrix,
|  | const Vec4 & | pixelSizeVector )

inline

References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, and CullingSet().

## ~CullingSet()

virtual osg::CullingSet::~CullingSet | ( |  | ) |

virtual

## Member Function Documentation

## addOccluder()

void osg::CullingSet::addOccluder | ( | ShadowVolumeOccluder & | cv | ) |

inline

References _occluderList.

## addStateFrustum()

void osg::CullingSet::addStateFrustum | ( | StateSet * | stateset,
|  | Polytope & | polytope )

inline

References _stateFrustumList.

## clampedPixelSize() [1/2]

float osg::CullingSet::clampedPixelSize | ( | const BoundingSphere & | bs | ) | const

inline

Compute the pixel of a bounding sphere. fabs()ed to always be positive.

References pixelSize().

## clampedPixelSize() [2/2]

float osg::CullingSet::clampedPixelSize | ( | const Vec3 & | v,
|  | float | radius ) const

inline

Compute the pixel of an object at position v, with specified radius. fabs()ed to always be positive.

References pixelSize().

## computePixelSizeVector()

osg::Vec4 osg::CullingSet::computePixelSizeVector | ( | const Viewport & | W,
|  | const Matrix & | P,
|  | const Matrix & | M )

static

## disableAndPushOccludersCurrentMask()

void osg::CullingSet::disableAndPushOccludersCurrentMask | ( | NodePath & | nodePath | ) |

## getCullingMask()

Mask osg::CullingSet::getCullingMask | ( |  | ) | const

inline

References _mask.

## getFrustum() [1/2]

Polytope & osg::CullingSet::getFrustum | ( |  | ) |

inline

References _frustum.

## getFrustum() [2/2]

const Polytope & osg::CullingSet::getFrustum | ( |  | ) | const

inline

References _frustum.

## getPixelSizeVector() [1/2]

Vec4 & osg::CullingSet::getPixelSizeVector | ( |  | ) |

inline

References _pixelSizeVector.

## getPixelSizeVector() [2/2]

const Vec4 & osg::CullingSet::getPixelSizeVector | ( |  | ) | const

inline

References _pixelSizeVector.

## getSmallFeatureCullingPixelSize() [1/2]

float & osg::CullingSet::getSmallFeatureCullingPixelSize | ( |  | ) |

inline

References _smallFeatureCullingPixelSize.

## getSmallFeatureCullingPixelSize() [2/2]

float osg::CullingSet::getSmallFeatureCullingPixelSize | ( |  | ) | const

inline

References _smallFeatureCullingPixelSize.

## getStateFrustumList() [1/2]

StateFrustumList & osg::CullingSet::getStateFrustumList | ( |  | ) |

inline

References _stateFrustumList.

## getStateFrustumList() [2/2]

void osg::CullingSet::getStateFrustumList | ( | StateFrustumList & | sfl | ) |

inline

References _stateFrustumList.

## isCulled() [1/3]

bool osg::CullingSet::isCulled | ( | const BoundingBox & | bb | ) |

inline

References _frustum, _mask, _occluderList, SHADOW_OCCLUSION_CULLING, SMALL_FEATURE_CULLING, and VIEW_FRUSTUM_CULLING.

## isCulled() [2/3]

bool osg::CullingSet::isCulled | ( | const BoundingSphere & | bs | ) |

inline

References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, osg::BoundingSphereImpl< VT >::center(), osg::BoundingSphereImpl< VT >::radius(), SHADOW_OCCLUSION_CULLING, SMALL_FEATURE_CULLING, and VIEW_FRUSTUM_CULLING.

## isCulled() [3/3]

bool osg::CullingSet::isCulled | ( | const std::vector< Vec3 > & | vertices | ) |

inline

References _frustum, _mask, _occluderList, SHADOW_OCCLUSION_CULLING, SMALL_FEATURE_CULLING, and VIEW_FRUSTUM_CULLING.

## operator=()

CullingSet & osg::CullingSet::operator= | ( | const CullingSet & | cs | ) |

inline

References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, and CullingSet().

## pixelSize() [1/2]

float osg::CullingSet::pixelSize | ( | const BoundingSphere & | bs | ) | const

inline

Compute the pixel of a bounding sphere.

References _pixelSizeVector, osg::BoundingSphereImpl< VT >::center(), and osg::BoundingSphereImpl< VT >::radius().

## pixelSize() [2/2]

float osg::CullingSet::pixelSize | ( | const Vec3 & | v,
|  | float | radius ) const

inline

Compute the pixel of an object at position v, with specified radius.

References _pixelSizeVector.

Referenced by clampedPixelSize(), and clampedPixelSize().

## popCurrentMask()

void osg::CullingSet::popCurrentMask | ( |  | ) |

inline

References _frustum, _occluderList, and _stateFrustumList.

## popOccludersCurrentMask()

void osg::CullingSet::popOccludersCurrentMask | ( | NodePath & | nodePath | ) |

## pushCurrentMask()

void osg::CullingSet::pushCurrentMask | ( |  | ) |

inline

References _frustum, _occluderList, and _stateFrustumList.

## resetCullingMask()

void osg::CullingSet::resetCullingMask | ( |  | ) |

inline

References _frustum.

## set() [1/2]

void osg::CullingSet::set | ( | const CullingSet & | cs | ) |

inline

References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, and CullingSet().

## set() [2/2]

void osg::CullingSet::set | ( | const CullingSet & | cs,
|  | const Matrix & | matrix,
|  | const Vec4 & | pixelSizeVector )

inline

References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, and CullingSet().

## setCullingMask()

void osg::CullingSet::setCullingMask | ( | Mask | mask | ) |

inline

References _mask.

## setFrustum()

void osg::CullingSet::setFrustum | ( | Polytope & | cv | ) |

inline

References _frustum.

## setPixelSizeVector()

void osg::CullingSet::setPixelSizeVector | ( | const Vec4 & | v | ) |

inline

References _pixelSizeVector.

## setSmallFeatureCullingPixelSize()

void osg::CullingSet::setSmallFeatureCullingPixelSize | ( | float | value | ) |

inline

Threshold at which small features are culled.

Parameters

  value | Bounding volume size in screen space. Default is 2.0.

References _smallFeatureCullingPixelSize.

## Member Data Documentation

## _frustum

Polytope osg::CullingSet::_frustum

protected

Referenced by CullingSet(), CullingSet(), getFrustum(), getFrustum(), isCulled(), isCulled(), isCulled(), operator=(), popCurrentMask(), pushCurrentMask(), resetCullingMask(), set(), set(), and setFrustum().

## _mask

Mask osg::CullingSet::_mask

protected

Referenced by CullingSet(), CullingSet(), getCullingMask(), isCulled(), isCulled(), isCulled(), operator=(), set(), set(), and setCullingMask().

## _occluderList

OccluderList osg::CullingSet::_occluderList

protected

Referenced by addOccluder(), CullingSet(), CullingSet(), isCulled(), isCulled(), isCulled(), operator=(), popCurrentMask(), pushCurrentMask(), set(), and set().

## _pixelSizeVector

Vec4 osg::CullingSet::_pixelSizeVector

protected

Referenced by CullingSet(), CullingSet(), getPixelSizeVector(), getPixelSizeVector(), isCulled(), operator=(), pixelSize(), pixelSize(), set(), set(), and setPixelSizeVector().

## _smallFeatureCullingPixelSize

float osg::CullingSet::_smallFeatureCullingPixelSize

protected

Referenced by CullingSet(), CullingSet(), getSmallFeatureCullingPixelSize(), getSmallFeatureCullingPixelSize(), isCulled(), operator=(), set(), set(), and setSmallFeatureCullingPixelSize().

## _stateFrustumList

StateFrustumList osg::CullingSet::_stateFrustumList

protected

Referenced by addStateFrustum(), CullingSet(), CullingSet(), getStateFrustumList(), getStateFrustumList(), operator=(), popCurrentMask(), pushCurrentMask(), set(), and set().

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

- CullingSet