SbBox2i32 Class Reference
[Basics]

2D box class. More...

#include <Inventor/SbBox.h>

List of all members.

Public Member Functions

 SbBox2i32 ()
 SbBox2i32 (int xmin, int ymin, int xmax, int ymax)
 SbBox2i32 (const SbVec2i32 &_min, const SbVec2i32 &_max)
 ~SbBox2i32 ()
const SbVec2i32getMin () const
const SbVec2i32getMax () const
void extendBy (const SbVec2i32 &pt)
void extendBy (const SbBox2i32 &r)
SbBool intersect (const SbVec2i32 &pt) const
SbBool intersect (const SbBox2i32 &bb) const
SbBox2i32 intersection (const SbBox2i32 &box) const
void setBounds (int xmin, int ymin, int xmax, int ymax)
void setBounds (const SbVec2i32 &_min, const SbVec2i32 &_max)
void getBounds (int &xmin, int &ymin, int &xmax, int &ymax) const
void getBounds (SbVec2i32 &_min, SbVec2i32 &_max) const
void getOrigin (int &originX, int &originY) const
void getSize (int &sizeX, int &sizeY) const
SbVec2i32 getSize () const
float getAspectRatio () const
void makeEmpty ()

Friends

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

Detailed Description

2D box class.

2D box which has planes parallel to the major axes and is specified by two points (specified with 32 bits integers) on a diagonal. This class is part of the standard Open Inventor datatype classes and is used as input and output to geometry operations.

SEE ALSO

SbBox3f, SbXfBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2i32, SbMatrix


Constructor & Destructor Documentation

SbBox2i32::SbBox2i32 (  )  [inline]

Constructor for a 2D integer box.

The box is initially empty.

SbBox2i32::SbBox2i32 ( int  xmin,
int  ymin,
int  xmax,
int  ymax 
) [inline]

Constructor for a 2D integer box.

xmin , ymin , xmax , and ymax are the bounds of the box.

SbBox2i32::SbBox2i32 ( const SbVec2i32 _min,
const SbVec2i32 _max 
) [inline]

Constructor for a 2D integer box.

m_min and m_max are the corners of the diagonal that defines the box.

SbBox2i32::~SbBox2i32 (  )  [inline]

Destructor.


Member Function Documentation

void SbBox2i32::extendBy ( const SbBox2i32 r  ) 

Extends this box (if necessary) to contain the specified box.

void SbBox2i32::extendBy ( const SbVec2i32 pt  ) 

Extends this box (if necessary) to contain the specified point.

float SbBox2i32::getAspectRatio (  )  const [inline]

Returns aspect ratio (ratio of width to height) of box.

void SbBox2i32::getBounds ( SbVec2i32 _min,
SbVec2i32 _max 
) const [inline]

Gets the corners of the box.

void SbBox2i32::getBounds ( int &  xmin,
int &  ymin,
int &  xmax,
int &  ymax 
) const [inline]

Gets the corners of the box.

const SbVec2i32& SbBox2i32::getMax (  )  const [inline]

Returns the maximum point of the box.

const SbVec2i32& SbBox2i32::getMin (  )  const [inline]

Returns the minimum point of the box.

void SbBox2i32::getOrigin ( int &  originX,
int &  originY 
) const [inline]

Returns origin (minimum point) of box.

SbVec2i32 SbBox2i32::getSize ( void   )  const [inline]

Return box size.

void SbBox2i32::getSize ( int &  sizeX,
int &  sizeY 
) const [inline]

Returns box size.

SbBool SbBox2i32::intersect ( const SbBox2i32 bb  )  const

Returns TRUE if the specified box intersects this box.

SbBool SbBox2i32::intersect ( const SbVec2i32 pt  )  const

Returns TRUE if the specified point intersects this box.

SbBox2i32 SbBox2i32::intersection ( const SbBox2i32 box  )  const

Returns the intersection of the specified box with this box.

Returned box is empty if there is no intersection.

void SbBox2i32::makeEmpty (  ) 

Makes an empty box.

void SbBox2i32::setBounds ( const SbVec2i32 _min,
const SbVec2i32 _max 
) [inline]

Sets the corners of the box.

void SbBox2i32::setBounds ( int  xmin,
int  ymin,
int  xmax,
int  ymax 
) [inline]

Sets the corners of the box.


Friends And Related Function Documentation

int operator!= ( const SbBox2i32 b1,
const SbBox2i32 b2 
) [friend]

Inequality comparison.

int operator== ( const SbBox2i32 b1,
const SbBox2i32 b2 
) [friend]

Equality comparison.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/