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

#include <CullingSet.h>

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

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)
 
CullingSetoperator= (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)
 
PolytopegetFrustum ()
 
const PolytopegetFrustum () const
 
void addStateFrustum (StateSet *stateset, Polytope &polytope)
 
void getStateFrustumList (StateFrustumList &sfl)
 
StateFrustumListgetStateFrustumList ()
 
void addOccluder (ShadowVolumeOccluder &cv)
 
void setPixelSizeVector (const Vec4 &v)
 
Vec4getPixelSizeVector ()
 
const Vec4getPixelSizeVector () 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 &)
 
Referencedoperator= (const Referenced &)
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () 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::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

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.

Definition at line 29 of file CullingSet.h.

Member Typedef Documentation

typedef int osg::CullingSet::Mask

Definition at line 123 of file CullingSet.h.

Definition at line 121 of file CullingSet.h.

Definition at line 35 of file CullingSet.h.

Definition at line 34 of file CullingSet.h.

Member Enumeration Documentation

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 

Definition at line 125 of file CullingSet.h.

Constructor & Destructor Documentation

osg::CullingSet::CullingSet ( )
osg::CullingSet::CullingSet ( const CullingSet cs)
inline

Definition at line 39 of file CullingSet.h.

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

Definition at line 50 of file CullingSet.h.

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

Member Function Documentation

void osg::CullingSet::addOccluder ( ShadowVolumeOccluder cv)
inline

Definition at line 157 of file CullingSet.h.

void osg::CullingSet::addStateFrustum ( StateSet stateset,
Polytope polytope 
)
inline

Definition at line 152 of file CullingSet.h.

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.

Definition at line 180 of file CullingSet.h.

float osg::CullingSet::clampedPixelSize ( const BoundingSphere bs) const
inline

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

Definition at line 183 of file CullingSet.h.

static osg::Vec4 osg::CullingSet::computePixelSizeVector ( const Viewport W,
const Matrix P,
const Matrix M 
)
static
void osg::CullingSet::disableAndPushOccludersCurrentMask ( NodePath nodePath)
Mask osg::CullingSet::getCullingMask ( ) const
inline

Definition at line 145 of file CullingSet.h.

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

Definition at line 149 of file CullingSet.h.

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

Definition at line 150 of file CullingSet.h.

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

Definition at line 161 of file CullingSet.h.

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

Definition at line 162 of file CullingSet.h.

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

Definition at line 168 of file CullingSet.h.

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

Definition at line 170 of file CullingSet.h.

void osg::CullingSet::getStateFrustumList ( StateFrustumList sfl)
inline

Definition at line 154 of file CullingSet.h.

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

Definition at line 155 of file CullingSet.h.

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

Definition at line 186 of file CullingSet.h.

bool osg::CullingSet::isCulled ( const BoundingBox bb)
inline

Definition at line 215 of file CullingSet.h.

bool osg::CullingSet::isCulled ( const BoundingSphere bs)
inline

Definition at line 244 of file CullingSet.h.

Here is the call graph for this function:

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

Definition at line 67 of file CullingSet.h.

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

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

Definition at line 174 of file CullingSet.h.

float osg::CullingSet::pixelSize ( const BoundingSphere bs) const
inline

Compute the pixel of a bounding sphere.

Definition at line 177 of file CullingSet.h.

Here is the call graph for this function:

void osg::CullingSet::popCurrentMask ( )
inline

Definition at line 309 of file CullingSet.h.

void osg::CullingSet::popOccludersCurrentMask ( NodePath nodePath)
void osg::CullingSet::pushCurrentMask ( )
inline

Definition at line 281 of file CullingSet.h.

void osg::CullingSet::resetCullingMask ( )
inline

Definition at line 336 of file CullingSet.h.

void osg::CullingSet::set ( const CullingSet cs)
inline

Definition at line 82 of file CullingSet.h.

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

Definition at line 92 of file CullingSet.h.

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

Definition at line 144 of file CullingSet.h.

void osg::CullingSet::setFrustum ( Polytope cv)
inline

Definition at line 147 of file CullingSet.h.

void osg::CullingSet::setPixelSizeVector ( const Vec4 v)
inline

Definition at line 159 of file CullingSet.h.

void osg::CullingSet::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 166 of file CullingSet.h.

Member Data Documentation

Polytope osg::CullingSet::_frustum
protected

Definition at line 354 of file CullingSet.h.

Mask osg::CullingSet::_mask
protected

Definition at line 353 of file CullingSet.h.

OccluderList osg::CullingSet::_occluderList
protected

Definition at line 356 of file CullingSet.h.

Vec4 osg::CullingSet::_pixelSizeVector
protected

Definition at line 357 of file CullingSet.h.

float osg::CullingSet::_smallFeatureCullingPixelSize
protected

Definition at line 358 of file CullingSet.h.

StateFrustumList osg::CullingSet::_stateFrustumList
protected

Definition at line 355 of file CullingSet.h.


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