Open Inventor Reference
SoBoundingBoxCache Class Reference

Class SoBoundingBoxCache: More...

#include <Inventor/caches/SoBoundingBoxCache.h>

Inheritance diagram for SoBoundingBoxCache:
SoCache

Public Member Functions

 SoBoundingBoxCache (SoState *state)
 Constructor and destructor.
 
 ~SoBoundingBoxCache ()
 
void set (const SbXfBox3f &boundingBox, bool centerSet, const SbVec3f &centerPoint)
 Stores a bounding box and center point in the cache.
 
const SbXfBox3fgetBox () const
 
const SbBox3fgetProjectedBox () const
 
bool isCenterSet () const
 Returns TRUE if the center is valid.
 
const SbVec3fgetCenter () const
 Returns the center (in object space)
 
bool hasLinesOrPoints () const
 Returns the hasLinesOrPoints flag.
 
- Public Member Functions inherited from SoCache
 SoCache (SoState *state)
 Constructor.
 
void ref ()
 Reference/unreference.
 
void unref (SoState *state=NULL)
 
void addElement (const SoElement *elt)
 Adds an element to elements-used list if not already there.
 
virtual void addCacheDependency (const SoState *state, SoCache *cache)
 Adds a dependency of this instance on another cache instance.
 
virtual bool isValid (const SoState *state) const
 Returns TRUE if cache is valid with respect to the given state.
 
const SoElementgetInvalidElement (const SoState *state) const
 Assuming isValid() returns FALSE, this will return the first element that is invalid (auto-caching uses this in its heuristic).
 
void invalidate ()
 Make this cache invalid.
 

Static Public Member Functions

static void setHasLinesOrPoints (SoState *state)
 Sets the hasLinesOrPoints flag to TRUE in all open bounding box caches in the given state.
 

Additional Inherited Members

- Protected Member Functions inherited from SoCache
virtual void destroy (SoState *state)
 Subclasses can use this to clean up just before they are deleted.
 
virtual ~SoCache ()
 Destructor.
 

Detailed Description

A bounding box cache stores a bounding box and center point. It also stores a flag indicating whether the box contains any line or point objects, meaning that intersection tests with the box should use a little extra leeway.

Definition at line 74 of file SoBoundingBoxCache.h.

Constructor & Destructor Documentation

◆ SoBoundingBoxCache()

SoBoundingBoxCache::SoBoundingBoxCache ( SoState state)

◆ ~SoBoundingBoxCache()

SoBoundingBoxCache::~SoBoundingBoxCache ( )

Member Function Documentation

◆ getBox()

const SbXfBox3f & SoBoundingBoxCache::getBox ( ) const
inline

Definition at line 86 of file SoBoundingBoxCache.h.

◆ getCenter()

const SbVec3f & SoBoundingBoxCache::getCenter ( ) const
inline

Definition at line 95 of file SoBoundingBoxCache.h.

◆ getProjectedBox()

const SbBox3f & SoBoundingBoxCache::getProjectedBox ( ) const
inline

Definition at line 88 of file SoBoundingBoxCache.h.

◆ hasLinesOrPoints()

bool SoBoundingBoxCache::hasLinesOrPoints ( ) const
inline

Definition at line 102 of file SoBoundingBoxCache.h.

◆ isCenterSet()

bool SoBoundingBoxCache::isCenterSet ( ) const
inline

Definition at line 91 of file SoBoundingBoxCache.h.

◆ set()

void SoBoundingBoxCache::set ( const SbXfBox3f boundingBox,
bool  centerSet,
const SbVec3f centerPoint 
)

◆ setHasLinesOrPoints()

static void SoBoundingBoxCache::setHasLinesOrPoints ( SoState state)
static

(The flag is FALSE by default.)


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