OpenSceneGraph 3.6.5
|
A CullingSet class which contains a frustum and a list of occluders. More...
#include <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) |
Threshold at which small features are culled. | |
float & | getSmallFeatureCullingPixelSize () |
float | getSmallFeatureCullingPixelSize () const |
float | pixelSize (const Vec3 &v, float radius) const |
Compute the pixel of an object at position v, with specified radius. | |
float | pixelSize (const BoundingSphere &bs) const |
Compute the pixel of a bounding sphere. | |
float | clampedPixelSize (const Vec3 &v, float radius) const |
Compute the pixel of an object at position v, with specified radius. | |
float | clampedPixelSize (const BoundingSphere &bs) const |
Compute the pixel of a bounding sphere. | |
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) | |
Deprecated, Referenced is now always uses thread safe ref/unref, use default Referenced() constructor instead. | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
virtual void | setThreadSafeRefUnref (bool) |
Deprecated, Referenced is always theadsafe so there method now has no effect and does not need to be called. | |
bool | getThreadSafeRefUnref () const |
Get whether a mutex is used to ensure ref() and unref() are thread safe. | |
OpenThreads::Mutex * | getRefMutex () const |
Get the mutex used to ensure thread safety of ref()/unref(). | |
int | ref () const |
Increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
int | unref () const |
Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. | |
int | unref_nodelete () const |
Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. | |
int | referenceCount () const |
Return the number of pointers currently referencing this object. | |
ObserverSet * | getObserverSet () const |
Get the ObserverSet if one is attached, otherwise return NULL. | |
ObserverSet * | getOrCreateObserverSet () const |
Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet. | |
void | addObserver (Observer *observer) const |
Add a Observer that is observing this object, notify the Observer when this object gets deleted. | |
void | removeObserver (Observer *observer) const |
Remove Observer that is observing this object. |
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 () |
Get the optional global Referenced mutex, this can be shared between all osg::Referenced. | |
static void | setDeleteHandler (DeleteHandler *handler) |
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated. | |
static DeleteHandler * | getDeleteHandler () |
Get a DeleteHandler. |
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 |
A CullingSet class which contains a frustum and a list of occluders.
typedef int osg::CullingSet::Mask |
typedef std::vector<ShadowVolumeOccluder> osg::CullingSet::OccluderList |
typedef std::vector< StateFrustumPair > osg::CullingSet::StateFrustumList |
typedef std::pair< osg::ref_ptr<osg::StateSet>, osg::Polytope > osg::CullingSet::StateFrustumPair |
osg::CullingSet::CullingSet | ( | ) |
Referenced by CullingSet(), CullingSet(), operator=(), set(), and set().
|
inline |
|
inline |
References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, and CullingSet().
|
virtual |
|
inline |
References _occluderList.
References _stateFrustumList.
|
inline |
|
inline |
Compute the pixel of an object at position v, with specified radius.
fabs()ed to always be positive.
References pixelSize().
|
static |
void osg::CullingSet::disableAndPushOccludersCurrentMask | ( | NodePath & | nodePath | ) |
|
inline |
References _pixelSizeVector.
|
inline |
References _pixelSizeVector.
|
inline |
References _smallFeatureCullingPixelSize.
|
inline |
References _smallFeatureCullingPixelSize.
|
inline |
References _stateFrustumList.
|
inline |
References _stateFrustumList.
|
inline |
References _frustum, _mask, _occluderList, SHADOW_OCCLUSION_CULLING, SMALL_FEATURE_CULLING, and VIEW_FRUSTUM_CULLING.
|
inline |
|
inline |
References _frustum, _mask, _occluderList, SHADOW_OCCLUSION_CULLING, SMALL_FEATURE_CULLING, and VIEW_FRUSTUM_CULLING.
|
inline |
References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, and CullingSet().
|
inline |
Compute the pixel of a bounding sphere.
References _pixelSizeVector, osg::BoundingSphereImpl< VT >::center(), and osg::BoundingSphereImpl< VT >::radius().
|
inline |
Compute the pixel of an object at position v, with specified radius.
References _pixelSizeVector.
Referenced by clampedPixelSize(), and clampedPixelSize().
|
inline |
References _frustum, _occluderList, and _stateFrustumList.
void osg::CullingSet::popOccludersCurrentMask | ( | NodePath & | nodePath | ) |
|
inline |
References _frustum, _occluderList, and _stateFrustumList.
|
inline |
References _frustum.
|
inline |
References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, and CullingSet().
|
inline |
References _frustum, _mask, _occluderList, _pixelSizeVector, _smallFeatureCullingPixelSize, _stateFrustumList, and CullingSet().
|
inline |
References _pixelSizeVector.
|
inline |
Threshold at which small features are culled.
value | Bounding volume size in screen space. Default is 2.0. |
References _smallFeatureCullingPixelSize.
|
protected |
Referenced by CullingSet(), CullingSet(), getFrustum(), getFrustum(), isCulled(), isCulled(), isCulled(), operator=(), popCurrentMask(), pushCurrentMask(), resetCullingMask(), set(), set(), and setFrustum().
|
protected |
Referenced by CullingSet(), CullingSet(), getCullingMask(), isCulled(), isCulled(), isCulled(), operator=(), set(), set(), and setCullingMask().
|
protected |
Referenced by addOccluder(), CullingSet(), CullingSet(), isCulled(), isCulled(), isCulled(), operator=(), popCurrentMask(), pushCurrentMask(), set(), and set().
|
protected |
Referenced by CullingSet(), CullingSet(), getPixelSizeVector(), getPixelSizeVector(), isCulled(), operator=(), pixelSize(), pixelSize(), set(), set(), and setPixelSizeVector().
|
protected |
|
protected |
Referenced by addStateFrustum(), CullingSet(), CullingSet(), getStateFrustumList(), getStateFrustumList(), operator=(), popCurrentMask(), pushCurrentMask(), set(), and set().
![]() | Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0. |