SBBOX2S(3iv)
SbBox2s π
okay bestie, welcome to the 2D box class page from the 3IV manual β yes the title is literally SbBox2s(3IV)(), and we're gonna have a whole moment with it. pull up a chair, hydrate, and let's talk rectangles. β¨
β¨ INHERITS FROM β¨
SbBox2s
(yes. it inherits from itself. iconique behavior honestly, we don't question it π )
πΈ SYNOPSIS πΈ
#include <Inventor/SbBox.h>
Methods from class SbBox2s:
SbBox2s()
SbBox2s(short xmin, short ymin, short xmax, short
ymax)
SbBox2s(const SbVec2s &_min, const SbVec2s &_max)
void ~SbBox2s()
const SbVec2s & getMin() const
const SbVec2s & getMax() const
void extendBy(const SbVec2s &point)
void extendBy(const SbBox2s &box)
SbBool intersect(const SbVec2s &point) const
SbBool intersect(const SbBox2s &box) const
void setBounds(short xmin, short ymin, short xmax, short
ymax)
void setBounds(const SbVec2s &_min, const SbVec2s &_max)
void getBounds(short &xmin, short &ymin, short &xmax, short
&ymax) const
void getBounds(SbVec2s &_min, SbVec2s &_max) const
void getOrigin(short &originX, short &originY) const
void getSize(short &sizeX, short &sizeY) const
float getAspectRatio() const
void makeEmpty()
int operator ==(const SbBox2s &b1, const SbBox2s &b2)
int operator !=(const SbBox2s &b1, const SbBox2s &b2)
π¦ DESCRIPTION π¦
so picture this: it's a 2D box, right, and all its planes are parallel to the major axes. you define it with two points on a diagonal β and those points are specified with short integers, no cap. π
this class is part of the standard Inventor datatype classes and it gets used as input and output to geometry operations. she's a workhorse, she's everywhere, she's booked and busy. π
π METHODS π
π Constructors & destructor
SbBox2s()
SbBox2s(short xmin, short ymin, short xmax, short
ymax)
SbBox2s(const SbVec2s &_min, const SbVec2s &_max)
void ~SbBox2s()
Constructors and destructor for a 2D integer box, bestie. xmin, ymin, xmax, and ymax are the bounds of the box. min and max are the corners of the diagonal that define the box. π«Ά
π Getting the corners
const SbVec2s & getMin() const
const SbVec2s & getMax() const
Returns the minimum and maximum points of the box. the little corner and the big corner, a duo, a dynamic. β
π₯ Growing the box
void extendBy(const SbVec2s &point)
void extendBy(const SbBox2s &box)
Extends this box (if necessary) to contain the specified point or other box. she's expanding her horizons, we love a glow-up. β¨
π Overlap check
SbBool intersect(const SbVec2s &point) const
SbBool intersect(const SbBox2s &box) const
Returns TRUE if the specified point or box intersects this box. vibe check: passed or not passed. π
π§ Setting the corners
void setBounds(short xmin, short ymin, short xmax, short
ymax)
void setBounds(const SbVec2s &_min, const SbVec2s &_max)
Sets the corners of the box. tell her who she is. π
π Getting the corners (the other way)
void getBounds(short &xmin, short &ymin, short &xmax, short
&ymax) const
void getBounds(SbVec2s &_min, SbVec2s &_max) const
Gets the corners of the box. same energy, different signature. π¦
πΈ Origin
void getOrigin(short &originX, short &originY) const
Returns origin (minimum point) of box. her humble beginnings. π₯Ί
β Size
void getSize(short &sizeX, short &sizeY) const
Returns box size. how big is she? now you know. π
π Aspect ratio
float getAspectRatio() const
Returns aspect ratio (ratio of width to height) of box. math but make it fashion. π₯
π Empty box
void makeEmpty()
Makes an empty box. sometimes you just gotta clear the cache, bestie. π
β¨ Equality comparisons
int operator ==(const SbBox2s &b1, const SbBox2s &b2)
int operator !=(const SbBox2s &b1, const SbBox2s &b2)
Equality comparisons. are they the same? are they not? the drama. π
π SEE ALSO π
SbBox3f, SbXfBox3f, SbBox2f, SbVec3f, SbVec2f, SbVec2s, SbMatrix
go read those too, they're all in the same friend group. π
okay and that's the whole page!! this one's the SbBox2s(3IV)() manual, sourced straight from SbBox2s(3IV)(), so that's the version-and-date energy we're closing out with. go forth and box, queen. π«Άβ¨π
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms