SbBox3f(3)
π SbBox3f π
okay so bestie, welcome to SbBox3f(3) β this is the Library Functions Manual, and we are about to get so cozy with a 3D box. yes. a box. it's giving "why is a rectangle this deep" and yet here we are, and honestly? iconic. π
β¨ NAME β¨
SbBox3f</purgle> β the SbBox3f class is an abstraction for an axis aligned 3 dimensional box.
(that's the whole name section. short, sweet, slays. π )
β¨ SYNOPSIS β¨
#include <Inventor/SbBox.h>
Inherited by SbXfBox3f. bestie has a child. we love a legacy. π
πΈ Public Member Functions πΈ
SbBox3f (void)
SbBox3f (const float minx, const float miny, const float minz, const
float maxx, const float maxy, const float maxz)
SbBox3f (const SbVec3f &min, const SbVec3f &max)
SbBox3f (const SbBox3d &box)
SbBox3f (const SbBox3s &box)
SbBox3f (const SbBox3i32 &box)
~SbBox3f ()
void setBounds (const float minx, const float miny, const float minz,
const float maxx, const float maxy, const float maxz)
void setBounds (const SbVec3f &min, const SbVec3f &max)
SbBox3f & setBounds (const SbBox3d &box)
SbBox3f & setBounds (const SbBox3s &box)
SbBox3f & setBounds (const SbBox3i32 &box)
void getBounds (float &minx, float &miny, float &minz, float &maxx,
float &maxy, float &maxz) const
void getBounds (SbVec3f &min, SbVec3f &max) const
const SbVec3f & getMin (void) const
SbVec3f & getMin (void)
const SbVec3f & getMax (void) const
SbVec3f & getMax (void)
void extendBy (const SbVec3f &point)
void extendBy (const SbBox3f &box)
void transform (const SbMatrix &matrix)
void makeEmpty (void)
SbBool isEmpty (void) const
SbBool hasVolume (void) const
float getVolume (void) const
SbBool intersect (const SbVec3f &point) const
SbBool intersect (const SbBox3f &box) const
SbVec3f getClosestPoint (const SbVec3f &point) const
SbBool outside (const SbMatrix &mvp, int &cullbits) const
SbVec3f getCenter (void) const
void getOrigin (float &x0, float &y0, float &z0) const
void getSize (float &dx, float &dy, float &dz) const
void getSpan (const SbVec3f &dir, float &dmin, float &dmax) const
void print (FILE *file) const
π¦ Friends π¦
int operator== (const SbBox3f &b1, const SbBox3f &b2)
int operator!= (const SbBox3f &b1, const SbBox3f &b2)
β¨ Detailed Description β¨
SbBox3f is an abstraction for an axis aligned 3 dimensional box. say it with me: axis. aligned. no tilting, no chaos, just a box that knows its lane. π«Ά
this box abstraction class is used by other entities in the Coin library for data exchange and storage. it's basically the group chat of geometry β everybody passes it around. it provides a representation of the defining corners of a box in 3D space, with the sides aligned with the 3 principal axes. lowkey elegant, ngl.
See also π SbBox2d, SbBox2f, SbBox2i32, SbBox2s, SbBox3d, SbBox3i32, SbBox3s, SbXfBox3d, SbXfBox3f
π Constructor & Destructor Documentation π
π SbBox3f::SbBox3f (void )
the default constructor makes an empty box. that's it, that's the vibe β a box with nothing in it, which is honestly a mood. π³οΈβ¨
References makeEmpty().
Referenced by extendBy(), SbXfBox3f::extendBy(), SbXfBox3f::extendBy(), intersect(), SbXfBox3f::intersect(), SbXfBox3f::intersect(), operator!=, operator==, SbXfBox3f::project(), SbXfBox3f::SbXfBox3f(), SbXfBox3f::SbXfBox3f(), and transform().
π SbBox3f::SbBox3f (const float minx, const float miny, const float minz, const float maxx, const float maxy, const float maxz)
constructs a box with the given corners. π
bestie listen:minxshould be less thanmaxx,minyshould be less thanmaxyandminzshould be less thanmaxzif you want to make a valid box. no cap. flip them and it's not a valid box anymore, and we don't do that here. π
References setBounds().
π SbBox3f::SbBox3f (const SbVec3f & minval, const SbVec3f & maxval)
constructs a box with the given corners. β¨
again for the people in the back: the coordinates of min should be less than the coordinates of max if you want to make a valid box. periodt. π
π SbBox3f::SbBox3f (const SbBox3d & box) β [inline], [explicit]
constructs a box with coordinates from box, converting the coordinates to floating point precision values. glow-up arc fr fr. π¦
Since Coin-2.5
References setBounds().
π SbBox3f::SbBox3f (const SbBox3s & box) β [inline], [explicit]
constructs a box with coordinates from box, converting the coordinates to floating point precision values. same energy, different input type. π«
Since Coin-2.5
References setBounds().
π SbBox3f::SbBox3f (const SbBox3i32 & box) β [inline], [explicit]
constructs a box with coordinates from box, converting the coordinates to floating point precision values. third sibling, equally valid, equally iconic. π
Since Coin-2.5
References setBounds().
π SbBox3f::~SbBox3f (void )
default destructor does nothing. it simply β¨ exists β¨ and then leaves. no drama, no cleanup, no main character exit. π
more to come bestie, don't go anywhere π«Ά
β¨ MEMBER FUNCTION DOCUMENTATION β¨
void SbBox3f::setBounds(const float minx, const float miny, const float minz, const float maxx, const float maxy, const float maxz)
okay bestie, this one resets the boundaries of the box π
. and listen β 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. that's the vibe check, fr fr.
- See also:
getBounds() - References:
SoDebugError::postWarning() - Referenced by:
SoAsciiText::computeBBox(),SoCone::computeBBox(),SoCube::computeBBox(),SoCylinder::computeBBox(),SoSphere::computeBBox(),SoText3::computeBBox(),SoVRMLBox::computeBBox(),SoVRMLCone::computeBBox(),SoVRMLCylinder::computeBBox(),SoVRMLElevationGrid::computeBBox(),SoVRMLSphere::computeBBox(),SoVRMLText::computeBBox(),extendBy(),SbXfBox3f::extendBy(),SbBox3f(),SbBox3f(),SbBox3f(),SbBox3f(), andtransform()
void SbBox3f::setBounds(const SbVec3f & minval, const SbVec3f & maxval)
resets the boundaries of the box using the given corners π. the coordinates of min should be less than the coordinates of max if you want to make a valid box β no shortcuts, she's strict like that.
- See also:
getBounds() - References:
SoDebugError::postWarning()
SbBox3f & SbBox3f::setBounds(const SbBox3d & box)
resets the boundaries to the boundaries of the given box β¨. returns a reference to self (she's handing you back herself, iconic).
- See also:
getBounds() - Since:
Coin-2.5 - References:
SbBox3d::getMax(),SbBox3d::getMin(),SbBox3d::isEmpty(), andmakeEmpty()
SbBox3f & SbBox3f::setBounds(const SbBox3s & box)
same energy, different type π¦ β resets the boundaries to the boundaries of the given box. returns a reference to self.
- See also:
getBounds() - Since:
Coin-2.5 - References:
SbBox3s::getMax(),SbBox3s::getMin(),SbBox3s::isEmpty(), andmakeEmpty()
SbBox3f & SbBox3i32 & ... wait, no β SbBox3f & SbBox3f::setBounds(const SbBox3i32 & box)`
resets the boundaries to the boundaries of the given box π. returns a reference to self.
- See also:
getBounds() - Since:
Coin-2.5 - References:
SbBox3i32::getMax(),SbBox3i32::getMin(),SbBox3i32::isEmpty(), andmakeEmpty()
void SbBox3f::getBounds(float & minx, float & miny, float & minz, float & maxx, float & maxy, float & maxz) const
returns the box boundaries πΈ β she's giving you all six floats, no gatekeeping.
- See also:
setBounds() - Referenced by:
SoShape::getScreenSize(),print(), andSbXfBox3f::print()
void SbBox3f::getBounds(SbVec3f & minobj, SbVec3f & maxobj) const
returns the box corner points π. two vectors, that's the whole deal.
- See also:
setBounds()
const SbVec3f & SbBox3f::getMin(void) const
returns the minimum point β¨. this should usually be the lower left corner point of the box, lowkey the origin of the whole situation.
- See also:
getOrigin(),getMax() - Referenced by:
SoAsciiText::computeBBox(),SoText3::computeBBox(),SoVRMLText::computeBBox(),SbXfBox3f::extendBy(),SbXfBox3f::extendBy(),SoShape::GLRenderBoundingBox(),SbViewVolume::intersect(),SbXfBox3f::intersect(),SoRayPickAction::intersect(),operator==,SbXfBox3f::project(),SbBox3d::setBounds(),SbBox3i32::setBounds(),SbBox3s::setBounds(), andSoCamera::viewAll()
SbVec3f & SbBox3f::getMin(void)
returns a modifiable reference the minimum point π . yes you can touch it. go off.
const SbVec3f & SbBox3f::getMax(void) const
returns the maximum point π₯. this should usually be the upper right corner point of the box.
- See also:
getMin() - Referenced by:
SoText3::computeBBox(),SbXfBox3f::extendBy(),SbXfBox3f::extendBy(),SoShape::GLRenderBoundingBox(),SbViewVolume::intersect(),SbXfBox3f::intersect(),SoRayPickAction::intersect(),operator==,SbXfBox3f::project(),SbBox3d::setBounds(),SbBox3i32::setBounds(),SbBox3s::setBounds(), andSoCamera::viewAll()
SbVec3f & SbBox3f::getMax(void)
returns a modifiable reference the maximum point β¨. same deal, but the top corner.
void SbBox3f::extendBy(const SbVec3f & point)
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. she's making room, that's growth bestie.
- References:
isEmpty(), andsetBounds() - Referenced by:
SoWWWInline::addBoundingBoxChild(),SoAsciiText::computeBBox(),SoImage::computeBBox(),SoIndexedNurbsCurve::computeBBox(),SoIndexedNurbsSurface::computeBBox(),SoIndexedShape::computeBBox(),SoNurbsCurve::computeBBox(),SoNurbsSurface::computeBBox(),SoText3::computeBBox(),SoVRMLExtrusion::computeBBox(),SoVRMLIndexedLine::computeBBox(),SoVRMLIndexedShape::computeBBox(),SoVRMLText::computeBBox(),SoVRMLVertexPoint::computeBBox(),SoNonIndexedShape::computeCoordBBox(),extendBy(),SbXfBox3f::extendBy(),SbXfBox3f::extendBy(),SbViewVolume::intersect(), andtransform()
void SbBox3f::extendBy(const SbBox3f & box)
extends the boundaries of the box by the given box parameter π. this is equal to calling extendBy() twice with the corner points β so basically the same move, but doubled.
- References:
extendBy(),isEmpty(),SoDebugError::postWarning(), andSbBox3f()
void SbBox3f::transform(const SbMatrix & matrix)
transforms the box by the matrix, and changes its boundaries to contain the transformed box π¦. and listen β it doesn't touch illegal/empty boxes. she's got boundaries, literally.
- References:
extendBy(),isEmpty(),SbMatrix::multVecMatrix(),SoDebugError::postWarning(),SbBox3f(),setBounds(), andSbVec3f::setValue() - Referenced by:
SbProjector::findVanishingDistance(), andSbXfBox3f::project()
void SbBox3f::makeEmpty(void)
marks this as an empty box π. that's it. that's the whole function.
- See also:
isEmpty() - Referenced by:
SoImage::computeBBox(),SoIndexedNurbsCurve::computeBBox(),SoIndexedNurbsSurface::computeBBox(),SoNurbsCurve::computeBBox(),SoNurbsSurface::computeBBox(),SoVRMLExtrusion::computeBBox(),SoVRMLIndexedLine::computeBBox(),SoVRMLIndexedShape::computeBBox(),SoVRMLVertexPoint::computeBBox(),SoArray::getBoundingBox(),SoLevelOfDetail::getBoundingBox(),SoMultipleCopy::getBoundingBox(),SoResetTransform::getBoundingBox(),SoSeparator::getBoundingBox(),SoVRMLGroup::getBoundingBox(),SbBox3f(),setBounds(),setBounds(), andsetBounds()
SbBool SbBox3f::isEmpty(void) const
check if this has been marked as an empty box π. vibe check for emptiness.
- See also:
makeEmpty() - Referenced by:
SbSphere::circumscribe(),SoAsciiText::computeBBox(),SoIndexedShape::computeBBox(),SoVRMLExtrusion::computeBBox(),SoVRMLIndexedLine::computeBBox(),SoVRMLIndexedShape::computeBBox(),SoVRMLVertexPoint::computeBBox(),SoSeparator::cullTest(),SoVRMLGroup::cullTest(),extendBy(),extendBy(),SbXfBox3f::extendBy(),SbXfBox3f::extendBy(),SbXfBox3f::extendBy(),SoGetBoundingBoxAction::extendBy(),SoGetBoundingBoxAction::extendBy(),SoArray::getBoundingBox(),SoLevelOfDetail::getBoundingBox(),SoMultipleCopy::getBoundingBox(),SoSeparator::getBoundingBox(),SoShape::getBoundingBox(),SoVRMLGroup::getBoundingBox(),SoVRMLInline::getBoundingBox(),getCenter(),getSize(),SbXfBox3f::intersect(),SbXfBox3f::project(),SbBox3d::setBounds(),SbBox3i32::setBounds(),SbBox3s::setBounds(),transform(),SoSurroundScale::updateMySurroundParams(),SoCamera::viewAll(),SoCamera::viewAll(),SoFrustumCamera::viewBoundingBox(),SoOrthographicCamera::viewBoundingBox(), andSoPerspectiveCamera::viewBoundingBox()
SbBool SbBox3f::hasVolume(void) const
check if the box has been correctly specified and by that virtue has volume π. is she real? does she take up space? we find out.
- Referenced by:
getVolume(), andSbXfBox3f::getVolume()
float SbBox3f::getVolume(void) const
check if the box has "positive" volume, i.e. the lower left corner is actually lower and more left than the maximum point πΈ. like, is the geometry actually going somewhere, or are we just pretending.
- References:
hasVolume() - Referenced by:
SbXfBox3f::extendBy(), andSbXfBox3f::getVolume()
SbBool SbBox3f::intersect(const SbVec3f & point) const
check if the given point lies within the boundaries of this box β. is the point in the box? that's it, that's the question.
- Referenced by:
SoVRMLProximitySensor::doAction(),SbXfBox3f::intersect(), andSbXfBox3f::intersect()
SbBool SbBox3f::intersect(const SbBox3f & box) const
check if the given box lies wholly or partly within the boundaries of this box π. overlap arc, bestie.
- References:
SbBox3f()
SbVec3f SbBox3f::getClosestPoint(const SbVec3f & point) const
return the point on the box closest to the given point π. she's finding her nearest self to you.
- References:
getCenter()
SbBool SbBox3f::outside(const SbMatrix & mvp, int & cullbits) const
check 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. periodt.
- References:
SbMatrix::multVecMatrix()
SbVec3f SbBox3f::getCenter(void) const
returns the center point of the box π. the main character of the bounding box, honestly.
- References:
isEmpty(), andSoDebugError::postWarning() - Referenced by:
SoWWWInline::addBoundingBoxChild(),SbSphere::circumscribe(),SoAsciiText::computeBBox(),SoImage::computeBBox(),SoText3::computeBBox(),SoVRMLElevationGrid::computeBBox(),SoVRMLExtrusion::computeBBox(),SoVRMLIndexedLine::computeBBox(),SoVRMLIndexedShape::computeBBox(),SoVRMLText::computeBBox(),SoVRMLVertexPoint::computeBBox(),SbXfBox3f::getCenter(),getClosestPoint(),SoClipPlaneManip::setValue(),SoSurroundScale::updateMySurroundParams(),SoFrustumCamera::viewBoundingBox(),SoOrthographicCamera::viewBoundingBox(), andSoPerspectiveCamera::viewBoundingBox()
void SbBox3f::getOrigin(float & x0, float & y0, float & z0) const
returns the coordinates of the box origin (i.e. the lower left corner) β¨. where it all started, fr.
- See also:
getMin() - References:
SbVec3f::getValue() - Referenced by:
SbXfBox3f::print()
void SbBox3f::getSize(float & dx, float & dy, float & dz) const
returns width, height and depth of box π¦. the measurements, the dimensions, the whole glow-up stats.
- References:
isEmpty(), andSoDebugError::postWarning() - Referenced by:
SoWWWInline::addBoundingBoxChild(),SbSphere::circumscribe(),SbXfBox3f::print(),SoClipPlaneManip::setValue(), andSoSurroundScale::updateMySurroundParams()
void SbBox3f::getSpan(const SbVec3f & dir, float & dmin, float & dmax) const
find 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. math girlies rise up π .
- References:
SbVec3f::dot(),SbVec3f::normalize(),SoDebugError::postWarning(), andSbVec3f::setValue() - Referenced by:
SbXfBox3f::getSpan()
void SbBox3f::print(FILE * fp) const
dump the state of this object to the file stream π₯. only works in debug version of library, method does nothing in an optimized compile β so ngl, don't count on her in release mode.
- References:
getBounds(), andSbVec3f::print() - Referenced by:
SbXfBox3f::print()
π Friends And Related Symbol Documentation π
Okay bestie, this is the part where we meet the friends β and no, not the sitcom, these are the little non-member functions that SbBox3f lets into the group chat. They're not methods, they're buddies. Chosen family, if you will. π«Ά
β¨ operator== β the "are y'all the same?" check β¨
int operator== (const SbBox3f & b1, const SbBox3f & b2) [friend]β this absolute sweetie takes two boxes,b1andb2, and checks them for equality. Do they match? Same vibe, same coordinates? That's the question. It returns anint, so like, do with that what you will. π
Under the hood it's nosy in the best way β it references getMax(), getMin(), and SbBox3f(). It's literally peeking at both boxes' corners to compare. Iconic behavior, honestly.
Not me being a friend function so I can see all your private corners π β that's the energy.
πΈ operator!= β the "nope, different" check πΈ
int operator!= (const SbBox3f & b1, const SbBox3f & b2) [friend]β same duo,b1andb2, but this one checks them for inequality. Are they not the same? Then this one's your girl. Also returns anint.
It references SbBox3f(). That's it, that's the whole note. Simple. Clean. Ate. β¨
π A lil' moment of appreciation π
So yeah β two friends, two operators, one for "same" and one for "not same". Together they're giving very much complementary energy, which is the whole point. If you ever forget which is which, just remember: == is the hug, != is the "no thank you". π
π Author π
Generated automatically by Doxygen for Coin from the source code.
Translation: no human sat down and lovingly hand-wrote this, bestie. A robot did it, from the actual source, and honestly? The robot ate. π€β¨
π And that's the whole page, fr fr π
That's a wrap on SbBox3f(3) β every last friend documented, no cap. This one ships with Coin, Version 2.5.0, and you can find it filed under SbBox3f(3) in your friendly neighborhood manual. Go forth and compare boxes responsibly. π¦π
Bye bestie, mwah π
π¦ 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