SbBox3s(3)

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

πŸ’– SbBox3s πŸ’–

okay so bestie, welcome to the SbBox3s page β€” manual section 3, from the Library Functions Manual. it's giving "tiny 3D box, big feelings", and i am so ready to walk you through it. grab a boba, we're going in πŸ§‹βœ¨


🌸 NAME 🌸

SbBox3s β€” the SbBox3s class is a 3 dimensional box with short integer coordinates. that's it. that's the whole vibe. a box. three dee. shorts. πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/SbBox.h>

πŸŽ€ Public Member Functions

SbBox3s (void)
SbBox3s (short xmin, short ymin, short zmin, short xmax, short ymax,
    short zmax)
SbBox3s (const SbVec3s &minvec, const SbVec3s &maxvec)
SbBox3s (const SbBox3i32 &box)
SbBox3s (const SbBox3f &box)
SbBox3s (const SbBox3d &box)
~SbBox3s (void)
void setBounds (short xmin, short ymin, short zmin, short xmax, short
    ymax, short zmax)
void setBounds (const SbVec3s &minvec, const SbVec3s &maxvec)
SbBox3s & setBounds (const SbBox3i32 &box)
SbBox3s & setBounds (const SbBox3f &box)
SbBox3s & setBounds (const SbBox3d &box)
const SbVec3s & getMin (void) const
SbVec3s & getMin (void)
const SbVec3s & getMax (void) const
SbVec3s & getMax (void)
void extendBy (const SbVec3s &point)
void extendBy (const SbBox3s &box)
void makeEmpty (void)
SbBool isEmpty (void) const
SbBool hasVolume (void) const
int getVolume (void) const
SbBool intersect (const SbVec3s &point) const
SbBool intersect (const SbBox3s &box) const
void getBounds (short &xmin, short &ymin, short &zmin, short &xmax,
    short &ymax, short &zmax) const
void getBounds (SbVec3s &minvec, SbVec3s &maxvec) const
SbVec3f getCenter (void) const
void getOrigin (short &originX, short &originY, short &originZ) const
void getSize (short &sizeX, short &sizeY, short &sizeZ) const

🫢 Friends

int operator== (const SbBox3s &b1, const SbBox3s &b2)
int operator!= (const SbBox3s &b1, const SbBox3s &b2)

πŸ‘‘ Detailed Description πŸ‘‘

The SbBox3s class is a 3 dimensional box with short integer coordinates. no cap. 🌈

this box class is used by other classes in Coin for data exchange. it provides storage for two box corners with short integer coordinates, which is β€” among other things β€” useful for representing screen or canvas areas in absolute window coordinates. like when you need to know exactly which little rectangle of pixels something lives in. iconic behavior honestly. πŸŽ€

See also

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

Since

  • Coin 2.0
  • TGS Inventor ?.?

(it literally says ?.? bestie, i don't make the rules πŸ™ˆ)


🧚 Constructor & Destructor Documentation 🧚

SbBox3s::SbBox3s (void )

the default constructor makes an empty box. nothing in it. a lil void. ethereal. πŸ¦‹

References makeEmpty().

Referenced by extendBy(), intersect(), operator!=, and operator==.


SbBox3s::SbBox3s (short xmin, short ymin, short zmin, short xmax, short ymax, short zmax)

constructs a box with the given corner coordinates. πŸ“¦

xmin should be less than xmax, ymin should be less than ymax, and zmin should be less than zmax if you want to make a valid box.

References setBounds().


SbBox3s::SbBox3s (const SbVec3s & minvec, const SbVec3s & maxvec)

constructs a box with the given corners. 🫢

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

References setBounds().


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

constructs a box with coordinates from box, converting the coordinates to short integers ✨

Since

Coin-2.5

References setBounds().


SbBox3s::SbBox3s (const SbBox3f & box) β€” [inline], [explicit]

constructs a box with coordinates from box, converting the coordinates to short integers ✨

Since

Coin-2.5

References setBounds().


SbBox3s::SbBox3s (const SbBox3d & box) β€” [inline], [explicit]

constructs a box with coordinates from box, converting the coordinates to short integers ✨

Since

Coin-2.5

References setBounds().


SbBox3s::~SbBox3s (void )

destructor does nothing. it just vibes. it simply exists and then does not. main character exit, zero drama. πŸ’€


🌟 Member Function Documentation 🌟

void SbBox3s::setBounds (short xmin, short ymin, short zmin, short xmax, short ymax, short zmax)

reset the boundaries of the box. fresh start, new era, new you. πŸ’…

xmin should be less than xmax, ymin should be less than ymax, and zmin should be less than xmax if you want to make a valid box.

⚠️ yes bestie, the manpage literally says xmax there and not zmax. i'm not touching it, i don't start fights with doxygen.

See also getBounds().

References SoDebugError::postWarning().

Referenced by SbBox3s(), SbBox3s(), SbBox3s(), SbBox3s(), and SbBox3s().


void SbBox3s::setBounds (const SbVec3s & minvec, const SbVec3s & maxvec)

reset the boundaries of the box with the given corners. πŸŽ€

the coordinates of minvec should be less than the coordinates of maxvec if you want to make a valid box.

See also getBounds().

References SoDebugError::postWarning().


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

reset the boundaries to the boundaries of the given box. πŸ”

returns reference to self. it's giving self-love honestly.

See also getBounds().

Since

Coin-2.5

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


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

reset the boundaries to the boundaries of the given box. πŸ”

returns reference to self. πŸ’–

See also getBounds().

Since

Coin-2.5

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


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

reset the boundaries to the boundaries of the given box. πŸ”

returns reference to self. πŸ’–

See also getBounds().

Since

Coin-2.5

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


const SbVec3s & SbBox3s::getMin (void ) const

returns the minimum point. this should usually be the lower left corner point of the box. πŸ“

See also getOrigin(), getMax().

Referenced by extendBy(), intersect(), operator==, SbBox3d::setBounds(), SbBox3f::setBounds(), and SbBox3i32::setBounds().


SbVec3s & SbBox3s::getMin (void ) β€” [inline]

returns the minimum point. this should usually be the lower left corner point of the box. πŸ“

Since

Coin-2.5


const SbVec3s & SbBox3s::getMax (void ) const

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

See also getMin().

Referenced by extendBy(), intersect(), operator==, SbBox3d::setBounds(), SbBox3f::setBounds(), and SbBox3i32::setBounds().


SbVec3s & SbBox3s::getMax (void ) β€” [inline]

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

Since

Coin-2.5


void SbBox3s::extendBy (const SbVec3s & point)

extend the boundaries of the box by the given point β€” i.e. make the point fit inside the box if it isn't already within it. it's the "bestie you can sit with us" of methods. 🫢

References SbVec3s::setValue().

Referenced by extendBy().


void SbBox3s::extendBy (const SbBox3s & box)

extend the boundaries of the box by the given box parameter. this is equal to calling extendBy() twice with the corner points. two for the price of one, slay. ✌️

References extendBy(), getMax(), getMin(), SoDebugError::postWarning(), and SbBox3s().


void SbBox3s::makeEmpty (void )

marks this as an empty box. it's not sad, it's minimalism. πŸ“

See also isEmpty().

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


SbBool SbBox3s::isEmpty (void ) const β€” [inline]

check if this has been marked as an empty box. πŸ•΅οΈβ€β™€οΈ

See also makeEmpty().

Referenced by SbBox3d::setBounds(), SbBox3f::setBounds(), and SbBox3i32::setBounds().


SbBool SbBox3s::hasVolume (void ) const β€” [inline]

check if the box has been correctly specified and by that virtue has volume. if it's built right, it takes up space. periodt. πŸ”₯


int SbBox3s::getVolume (void ) const β€” [inline]

check if the box has "positive" volume β€” i.e. the lower left corner is actually lower and more left than the maximum point. if so, return the volume. πŸ“

References getSize().


SbBool SbBox3s::intersect (const SbVec3s & point) const

check if the given point lies within the boundaries of this box. is it in or is it out? vibe check. ✨


SbBool SbBox3s::intersect (const SbBox3s & box) const

check if box lies wholly or partly within the boundaries of this box. overlap girlies rise up. 🌸

References getMax(), getMin(), and SbBox3s().


void SbBox3s::getBounds (short & xmin, short & ymin, short & zmin, short & xmax, short & ymax, short & zmax) const

returns the box boundary coordinates. 🎁

See also setBounds(), getMin(), getMax().


void SbBox3s::getBounds (SbVec3s & minvec, SbVec3s & maxvec) const

returns the box corner points. πŸ“¦

See also setBounds(), getMin(), getMax().


SbVec3f SbBox3s::getCenter (void ) const β€” [inline]

returns the center point of the box. it's giving balance, it's giving main character energy at the exact middle. πŸŽ€


void SbBox3s::getOrigin (short & originX, short & originY, short & originZ) const

returns the coordinates of the box origin β€” i.e. the lower left corner. 🌱

See also getMin().


void SbBox3s::getSize (short & sizeX, short & sizeY, short & sizeZ) const

returns width and height of box. (and, y'know, the depth too β€” three params, three dims, we been knew 😌)

References SoDebugError::postWarning().

Referenced by getVolume().


int operator== (const SbBox3s & b1, const SbBox3s & b2) β€” [friend]

check b1 and b2 for equality. are they the same box? twin where have you been. πŸ‘―

References getMax(), getMin(), and SbBox3s().


int operator!= (const SbBox3s & b1, const SbBox3s & b2) β€” [friend]

check b1 and b2 for inequality. not twins. different boxes. it happens. πŸ’€

References SbBox3s().


πŸ’œ Author πŸ’œ

generated automatically by Doxygen for Coin from the source code. the robots wrote it, i just put a bow on it πŸŽ€πŸ€–


okay that's the whole page bestie, you ate it, you understood it, you're literally a 3D box expert now πŸ’…βœ¨

and for the cute lil sign-off: this is from Coin, Version 2.5.0, and the page itself is SbBox3s(3). mwah, byeee πŸ¦‹πŸ’–πŸŒΈ

πŸ“¦ where this page comes from