SoBoundingBoxCache(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’… NAME πŸ’…

okay so bestie, welcome to SoBoundingBoxCache(3) β€” a Coin manual page, no cap. The SoBoundingBoxCache class is used to cache bounding boxes. that's the whole vibe. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <Inventor/caches/SoBoundingBoxCache.h>

Inherits SoCache. yes queen, it's giving legacy, it's giving inherited energy. πŸ‘‘

🌸 Public Member Functions 🌸

  • SoBoundingBoxCache (SoState *state) β€” constructor, we love a debut
  • virtual ~SoBoundingBoxCache () β€” destructor, goodbye icon
  • void set (const SbXfBox3f &boundingbox, SbBool centerset, const SbVec3f &centerpoint) β€” sets the data
  • const SbXfBox3f & getBox () const β€” gives you the box
  • const SbBox3f & getProjectedBox () const β€” gives you the projected box
  • SbBool isCenterSet () const β€” was the center even set tho
  • const SbVec3f & getCenter () const β€” the center itself
  • SbBool hasLinesOrPoints (void) const β€” lines? points? we'll see

πŸ¦‹ Public Member Functions inherited from SoCache πŸ¦‹

  • SoCache (SoState *const state)
  • void ref (void)
  • void unref (SoState *state=NULL)
  • void addElement (const SoElement *const elem)
  • virtual void addCacheDependency (const SoState *state, SoCache *cache)
  • virtual SbBool isValid (const SoState *state) const
  • const SoElement * getInvalidElement (const SoState *const state) const
  • void invalidate (void)

⭐ Static Public Member Functions ⭐

  • static void setHasLinesOrPoints (SoState *state) β€” static, iconic, does the group-chat announcement for every open cache

πŸ“ Additional Inherited Members πŸ“

πŸ’œ Protected Member Functions inherited from SoCache πŸ’œ

  • virtual void destroy (SoState *state)
  • virtual ~SoCache ()

πŸ’– DESCRIPTION πŸ’–

The SoBoundingBoxCache class is used to cache bounding boxes. that's it, that's the sentence, and honestly? she ate. πŸ’…


🌈 CONSTRUCTOR & DESTRUCTOR DOCUMENTATION 🌈

🫢 SoBoundingBoxCache::SoBoundingBoxCache (SoState * state) 🫢

Constructor with state being the current state. hi bestie, welcome to the world, the state is right there. ✨

😭 SoBoundingBoxCache::~SoBoundingBoxCache () [virtual] 😭

Destructor. she's virtual and she's leaving. πŸ’€


πŸ”₯ MEMBER FUNCTION DOCUMENTATION πŸ”₯

🌟 void SoBoundingBoxCache::set (const SbXfBox3f & boundingbox, SbBool centerset, const SbVec3f & centerpoint) 🌟

Sets the data for this cache. boundingBox is the node's bounding box, centerSet and centerPoints specifies the center of the geometry inside boundingBox. putting it all in one place, organized queen. πŸŽ€

πŸ‘‘ const SbXfBox3f & SoBoundingBoxCache::getBox (void ) const πŸ‘‘

Returns the bounding box for this cache. just the box. the box itself. no notes. πŸ“¦βœ¨

πŸ¦‹ const SbBox3f & SoBoundingBoxCache::getProjectedBox (void ) const πŸ¦‹

Returns the projected bounding box for this cache. different box, same energy. 🌸

πŸ’œ SbBool SoBoundingBoxCache::isCenterSet (void ) const πŸ’œ

Returns whether the center of the bounding box was set in the SoBoundingBoxCache::set() method. so like, did we set it or not, bestie.

See also: SoBoundingBoxCache::getCenter()

πŸ“ const SbVec3f & SoBoundingBoxCache::getCenter (void ) const πŸ“

Returns the center of the bounding box. Should only be used if SoBoundingBoxCache::isCenterSet() returns TRUE.

fr fr, do the vibe check first β€” check isCenterSet() before you call this one, or you're just guessing at a center that isn't there. πŸ™ˆ

⭐ void SoBoundingBoxCache::setHasLinesOrPoints (SoState * state) [static] ⭐

Sets the flag returned from SoBoundingBoxCache::hasLinesOrPoints() to TRUE for all open bounding box caches.

The reason bounding box caches keep a lines-or-points flag is to make it known to client code if the shape(s) they contain have any of these primitives β€” or are rendered with these primitives. The reason this is important to know for the client code is because it might need to add an "epsilon" slack value to the calculated bounding box to account for smoothing / anti-aliasing effects in the renderer, so line and point graphics are not accidentally clipped by near and far clipping planes, for instance.

This method is a static method on the class. It will upon invocation scan through the state stack and set the flag for all open SoBoundingBoxCache elements. It has been made to work like this so it can easily be invoked on all current bounding box cache instances from the SoShape-type nodes using lines and / or point primitives.

See also: hasLinesOrPoints()

🧚 SbBool SoBoundingBoxCache::hasLinesOrPoints (void ) const 🧚

Return TRUE if the hasLinesOrPoints flag has been set.

See also: setHasLinesOrPoints()


πŸ’Œ AUTHOR πŸ’Œ

Generated automatically by Doxygen for Coin from the source code. yes the robots wrote it, and honestly? they ate. πŸ€–πŸ’–


okay that's the whole page bestie, you're officially fluent in SoBoundingBoxCache πŸ’…βœ¨ β€” this was Version 4.0.10, dated Thu Jun 25 2026 00:00:00, and it's still SoBoundingBoxCache(3) at heart. go cache those bounding boxes, periodt. πŸŽ€πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from