SbBox3i32(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸ’– SbBox3i32 πŸ’–

okay bestie, so this is the manual page for SbBox3i32, straight out of the Coin library's section 3 (that's the "library functions" section, iykyk) πŸ’…. It's a 3D integer bounding box and it is literally the moment.

It lives in #include <Inventor/SbBox.h> and everything below is exactly what it says on the tin. No cap.


✨ NAME ✨

SbBox3i32 β€” your 3D axis-aligned bounding box, but make it int32_t πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Inventor/SbBox.h>

🌸 Public Member Functions 🌸

the whole roster, no skips:

  • SbBox3i32 (void)
  • SbBox3i32 (int32_t xmin, int32_t ymin, int32_t zmin, int32_t xmax, int32_t ymax, int32_t zmax)
  • SbBox3i32 (const SbVec3i32 &minpoint, const SbVec3i32 &maxpoint)
  • SbBox3i32 (const SbBox3s &box)
  • SbBox3i32 (const SbBox3f &box)
  • SbBox3i32 (const SbBox3d &box)
  • SbBox3i32 & setBounds (int32_t xmin, int32_t ymin, int32_t zmin, int32_t xmax, int32_t ymax, int32_t zmax)
  • SbBox3i32 & setBounds (const SbVec3i32 &minpoint, const SbVec3i32 &maxpoint)
  • SbBox3i32 & setBounds (const SbBox3s &box)
  • SbBox3i32 & setBounds (const SbBox3f &box)
  • SbBox3i32 & setBounds (const SbBox3d &box)
  • void getBounds (int32_t &xmin, int32_t &ymin, int32_t &zmin, int32_t &xmax, int32_t &ymax, int32_t &zmax) const
  • void getBounds (SbVec3i32 &minpoint, SbVec3i32 &maxpoint) const
  • const SbVec3i32 & getMin (void) const
  • SbVec3i32 & getMin (void)
  • const SbVec3i32 & getMax (void) const
  • SbVec3i32 & getMax (void)
  • void extendBy (const SbVec3i32 &pt)
  • void extendBy (const SbBox3i32 &bb)
  • void extendBy (const SbVec3f &pt)
  • void transform (const SbMatrix &m)
  • void makeEmpty (void)
  • SbBool isEmpty (void) const
  • SbBool hasVolume (void) const
  • float getVolume (void) const
  • SbBool intersect (const SbVec3i32 &pt) const
  • SbBool intersect (const SbBox3i32 &bb) const
  • SbBool intersect (const SbVec3f &pt) const
  • SbBool outside (const SbMatrix &MVP, int &cullBits) const
  • SbVec3f getClosestPoint (const SbVec3f &pt) const
  • SbVec3f getCenter (void) const
  • void getOrigin (int32_t &originX, int32_t &originY, int32_t &originZ) const
  • void getSize (int32_t &sizeX, int32_t &sizeY, int32_t sizeZ) const
  • void getSpan (const SbVec3f &direction, float &dmin, float &dmax) const

πŸŽ€ Protected Attributes πŸŽ€

  • SbVec3i32 minpt
  • SbVec3i32 maxpt

πŸ‘‘ Detailed Description πŸ‘‘

🌈 See also 🌈

SbBox2d, SbBox2f, SbBox2i32, SbBox2s, SbBox3d, SbBox3f, SbBox3s, SbXfBox3d, SbXfBox3f

the whole box family reunion, obsessed 🫢

⭐ Since ⭐

Coin-2.5


🧚 Constructor & Destructor Documentation 🧚

SbBox3i32::SbBox3i32 (void ) [inline]

the default constructor, and it does exactly what you'd hope: it makes an empty box. empty. blank. a fresh start ✨

References makeEmpty().

Referenced by extendBy(), intersect(), setBounds(), setBounds(), and transform().

SbBox3i32::SbBox3i32 (int32_t xmin, int32_t ymin, int32_t zmin, int32_t xmax, int32_t ymax, int32_t zmax) [inline]

builds you a box with the given corners 🎁

heads up tho: minx should be less than maxx, miny should be less than maxy and minz should be less than maxz if you want to make a valid box. yes bestie, the ordering is the whole vibe check.

SbBox3i32::SbBox3i32 (const SbVec3i32 & minpoint, const SbVec3i32 & maxpoint) [inline]

also builds a box with the given corners πŸ’«

same deal: the coordinates of min should be less than the coordinates of max if you want to make a valid box.

SbBox3i32::SbBox3i32 (const SbBox3s & box) [inline], [explicit]

constructs a box with the values from the box, converting the values to 32-bit integers πŸ”„

References setBounds().

SbBox3i32::SbBox3i32 (const SbBox3f & box) [inline], [explicit]

constructs a box with the values from the box, converting the values to 32-bit integers πŸ”„

References setBounds().

SbBox3i32::SbBox3i32 (const SbBox3d & box) [inline], [explicit]

constructs a box with the values from the box, converting the values to 32-bit integers πŸ”„

References setBounds().


πŸ’… Member Function Documentation πŸ’…

SbBox3i32 & SbBox3i32::setBounds (int32_t xmin, int32_t ymin, int32_t zmin, int32_t xmax, int32_t ymax, int32_t zmax) [inline]

resets the boundaries to the boundaries given. returns a reference to self, because it's generous like that πŸ’–

See also getBounds()

References SbBox3i32().

Referenced by SbBox3i32(), SbBox3i32(), SbBox3i32(), and transform().

SbBox3i32 & SbBox3i32::setBounds (const SbVec3i32 & minpoint, const SbVec3i32 & maxpoint) [inline]

resets the boundaries to the boundaries given. returns a reference to self 🫢

See also getBounds()

References SbBox3i32().

SbBox3i32 & SbBox3i32::setBounds (const SbBox3s & box)

resets the boundaries to the boundaries of the given box.

returns a reference to self.

See also getBounds()

References SbBox3s::getMax(), SbBox3s::getMin(), SbBox3s::isEmpty(), and makeEmpty().

SbBox3i32 & SbBox3i32::setBounds (const SbBox3f & box)

resets the boundaries to the boundaries of the given box.

returns a reference to self.

See also getBounds()

References SbBox3f::getMax(), SbBox3f::getMin(), SbBox3f::isEmpty(), and makeEmpty().

SbBox3i32 & SbBox3i32::setBounds (const SbBox3d & box)

resets the boundaries to the boundaries of the given box.

returns a reference to self.

See also getBounds()

References SbBox3d::getMax(), SbBox3d::getMin(), SbBox3d::isEmpty(), and makeEmpty().

void SbBox3i32::getBounds (int32_t & xmin, int32_t & ymin, int32_t & zmin, int32_t & xmax, int32_t & ymax, int32_t & zmax) const [inline]

hands you back the boundaries of the box πŸ“¦

void SbBox3i32::getBounds (SbVec3i32 & minpoint, SbVec3i32 & maxpoint) const [inline]

hands you back the boundaries of the box πŸ“¦

const SbVec3i32 & SbBox3i32::getMin (void ) const [inline]

returns the minimum point. this should usually be the lower left corner point of the box, which is giving very much "bottom-left energy" πŸ’œ

See also getOrigin(), getMax().

Referenced by extendBy(), SbBox3d::setBounds(), SbBox3f::setBounds(), and SbBox3s::setBounds().

SbVec3i32 & SbBox3i32::getMin (void ) [inline]

returns the minimum point. this should usually be the lower left corner point of the box.

See also getOrigin(), getMax().

const SbVec3i32 & SbBox3i32::getMax (void ) const [inline]

returns the maximum point. this should usually be the upper right corner point of the box, aka the top-right main character πŸ‘‘

See also getMin().

Referenced by extendBy(), SbBox3d::setBounds(), SbBox3f::setBounds(), and SbBox3s::setBounds().

SbVec3i32 & SbBox3i32::getMax (void ) [inline]

returns the maximum point. this should usually be the upper right corner point of the box.

See also getMin().

void SbBox3i32::extendBy (const SbVec3i32 & pt)

extends the boundaries of the box by the given point β€” i.e. it makes the point fit inside the box if it isn't already so. the box literally grows to accommodate 🫢

References isEmpty().

Referenced by extendBy(), extendBy(), and transform().

void SbBox3i32::extendBy (const SbBox3i32 & bb)

extends the boundaries of the box by the given box parameter. this is equal to calling extendBy() twice with the corner points. two-for-one, we love a shortcut ✨

References extendBy(), getMax(), getMin(), isEmpty(), and SbBox3i32().

void SbBox3i32::extendBy (const SbVec3f & pt)

extends the boundaries of the box by the given point β€” i.e. it makes the point fit inside the box if it isn't already so.

References extendBy().

void SbBox3i32::transform (const SbMatrix & m)

transforms the box by the matrix, and changes its boundaries to contain the transformed box.

doesn't touch illegal/empty boxes. they get left alone, no questions asked πŸ™ˆ

References extendBy(), isEmpty(), SbMatrix::multVecMatrix(), SoDebugError::postWarning(), SbBox3i32(), setBounds(), and SbVec3f::setValue().

void SbBox3i32::makeEmpty (void )

marks this as an empty box. clearing the slate, the emotional reset of the box world 😭

See also isEmpty()

Referenced by SbBox3i32(), setBounds(), setBounds(), and setBounds().

SbBool SbBox3i32::isEmpty (void ) const [inline]

checks if this has been marked as an empty box. returns an SbBool, so you get a real answer πŸ’€

Referenced by extendBy(), extendBy(), getSize(), SbBox3d::setBounds(), SbBox3f::setBounds(), SbBox3s::setBounds(), and transform().

SbBool SbBox3i32::hasVolume (void ) const [inline]

checks if the box has been correctly specified and by that virtue has volume. valid box = has volume, that's the deal ✨

float SbBox3i32::getVolume (void ) const [inline]

checks if the box has "positive" volume, i.e. the lower left corner is actually lower and more left than the maximum point. if your corners are swapped, that's not it bestie 😭

References getSize().

SbBool SbBox3i32::intersect (const SbVec3i32 & pt) const

checks if the given point lies within the boundaries of this box. are you in or are you out πŸ‘€

SbBool SbBox3i32::intersect (const SbBox3i32 & bb) const

checks if the given box lies wholly or partly within the boundaries of this box. partial counts! it's not an all-or-nothing situation πŸ’…

References SbBox3i32().

SbBool SbBox3i32::intersect (const SbVec3f & pt) const

checks if the given point lies within the boundaries of this box.

SbBool SbBox3i32::outside (const SbMatrix & MVP, int & cullbits) const

checks if the box is outside the view volume defined by the mvp matrix. sets cullbits according to which planes we're inside or outside. 🎯

  • Bit 0 (0x1) is cleared when box is completely inside left and right clipping planes.
  • Bit 1 (0x2) is cleared when box is inside top and bottom clipping planes.
  • Bit 2 (0x4) is cleared when box is inside near and far clipping planes.

returns TRUE if box is completely outside one of the clipping planes. FALSE otherwise.

References SbMatrix::multVecMatrix().

SbVec3f SbBox3i32::getClosestPoint (const SbVec3f & pt) const

returns the point on the box closest to the given point. it will find you, bestie 🧲

References getCenter().

SbVec3f SbBox3i32::getCenter (void ) const [inline]

returns the center point of the box. dead center, the middle child of coordinates 🌸

Referenced by getClosestPoint().

void SbBox3i32::getOrigin (int32_t & originX, int32_t & originY, int32_t & originZ) const [inline]

returns the coordinates of the box origin (i.e. the lower left corner).

See also getMin()

void SbBox3i32::getSize (int32_t & sizeX, int32_t & sizeY, int32_t sizeZ) const [inline]

returns width, height and depth of box. the three dimensions, the trio, the full picture πŸ“

References isEmpty().

Referenced by getVolume().

void SbBox3i32::getSpan (const SbVec3f & dir, float & dmin, float & dmax) const

finds the span of the box in the given direction (i.e. how much room in the given direction the box needs). the distance is returned as the minimum and maximum distance from origo to the closest and furthest plane defined by the direction vector and each of the box' corners. the difference between these values gives the span. πŸ¦‹

References SbVec3f::dot(), SbVec3f::normalize(), SoDebugError::postWarning(), and SbVec3f::setValue().


πŸŽ€ Author πŸŽ€

generated automatically by Doxygen for Coin from the source code. (not me writing fanfic, the machine did it πŸ€–)


πŸ’Œ Sign-off πŸ’Œ

and that's the whole page, bestie! this beauty is from Coin, Version 2.5.0, manual page SbBox3i32(3) β€” go build something iconic with it. periodt πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from