SbBox3i32(3)
π 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) constvoid getBounds (SbVec3i32 &minpoint, SbVec3i32 &maxpoint) constconst SbVec3i32 & getMin (void) constSbVec3i32 & getMin (void)const SbVec3i32 & getMax (void) constSbVec3i32 & 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) constSbBool hasVolume (void) constfloat getVolume (void) constSbBool intersect (const SbVec3i32 &pt) constSbBool intersect (const SbBox3i32 &bb) constSbBool intersect (const SbVec3f &pt) constSbBool outside (const SbMatrix &MVP, int &cullBits) constSbVec3f getClosestPoint (const SbVec3f &pt) constSbVec3f getCenter (void) constvoid getOrigin (int32_t &originX, int32_t &originY, int32_t &originZ) constvoid getSize (int32_t &sizeX, int32_t &sizeY, int32_t sizeZ) constvoid getSpan (const SbVec3f &direction, float &dmin, float &dmax) const
π Protected Attributes π
SbVec3i32 minptSbVec3i32 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
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms