Open Inventor Reference
SoCache Class Reference

#include <Inventor/caches/SoCache.h>

Inheritance diagram for SoCache:
SoBoundingBoxCache SoGLRenderCache SoNormalCache

Public Member Functions

 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.
 

Protected Member Functions

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

Detailed Description

Definition at line 83 of file SoCache.h.

Constructor & Destructor Documentation

◆ SoCache()

SoCache::SoCache ( SoState * state)

Takes the state in effect when the cache is used; it is assumed that the state is pushed before the cache is created.

Referenced by addCacheDependency().

◆ ~SoCache()

virtual SoCache::~SoCache ( )
protectedvirtual

Member Function Documentation

◆ addCacheDependency()

virtual void SoCache::addCacheDependency ( const SoState * state,
SoCache * cache )
virtual

The default method takes care of adding dependencies from the child cache.

References SoCache().

◆ addElement()

void SoCache::addElement ( const SoElement * elt)

◆ destroy()

virtual void SoCache::destroy ( SoState * state)
protectedvirtual

Render caches use this to free display lists. Note that the state will be NULL if the cache is no deleted during the application of an action.

Reimplemented in SoGLRenderCache.

◆ getInvalidElement()

const SoElement * SoCache::getInvalidElement ( const SoState * state) const

Returns NULL if the cache is not invalid because of an element or if the cache is valid.

◆ invalidate()

void SoCache::invalidate ( )

◆ isValid()

virtual bool SoCache::isValid ( const SoState * state) const
virtual

Reimplemented in SoGLRenderCache.

◆ ref()

void SoCache::ref ( )

◆ unref()

void SoCache::unref ( SoState * state = NULL)

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