SbBox2s — 2D box class
Contents
Description
2D box which has planes parallel to the major axes and is specified by two points (specified with short
integers) on a diagonal. This class is part of the standard Inventor datatype classes and is used as
input and output to geometry operations.
Inherits From
SbBox2s
Methods
SbBox2s()SbBox2s(shortxmin,shortymin,shortxmax,shortymax)SbBox2s(constSbVec2s&_min,constSbVec2s&_max)void~SbBox2s()
Constructors and destructor for a 2D integer box. xmin, ymin, xmax, and ymax are the bounds of the
box. min and max are the corners of the diagonal that define the box.
constSbVec2s&getMin()constconstSbVec2s&getMax()const
Returns the minimum and maximum points of the box.
voidextendBy(constSbVec2s&point)voidextendBy(constSbBox2s&box)
Extends this box (if necessary) to contain the specified point or other box.
SbBoolintersect(constSbVec2s&point)constSbBoolintersect(constSbBox2s&box)const
Returns TRUE if the specified point or box intersects this box.
voidsetBounds(shortxmin,shortymin,shortxmax,shortymax)voidsetBounds(constSbVec2s&_min,constSbVec2s&_max)
Sets the corners of the box.
voidgetBounds(short&xmin,short&ymin,short&xmax,short&ymax)constvoidgetBounds(SbVec2s&_min,SbVec2s&_max)const
Gets the corners of the box.
voidgetOrigin(short&originX,short&originY)const
Returns origin (minimum point) of box.
voidgetSize(short&sizeX,short&sizeY)const
Returns box size.
floatgetAspectRatio()const
Returns aspect ratio (ratio of width to height) of box.
voidmakeEmpty()
Makes an empty box.
intoperator==(constSbBox2s&b1,constSbBox2s&b2)intoperator!=(constSbBox2s&b1,constSbBox2s&b2)
Equality comparisons.
Name
SbBox2s — 2D box class
See Also
SbBox3f,SbXfBox3f,SbBox2f,SbVec3f,SbVec2f,SbVec2s,SbMatrixSbBox2s(3IV)()
Synopsis
#include<Inventor/SbBox.h>
Methods from class SbBox2s:
SbBox2s()SbBox2s(shortxmin,shortymin,shortxmax,shortymax)SbBox2s(constSbVec2s&_min,constSbVec2s&_max)void~SbBox2s()constSbVec2s&getMin()constconstSbVec2s&getMax()constvoidextendBy(constSbVec2s&point)voidextendBy(constSbBox2s&box)SbBoolintersect(constSbVec2s&point)constSbBoolintersect(constSbBox2s&box)constvoidsetBounds(shortxmin,shortymin,shortxmax,shortymax)voidsetBounds(constSbVec2s&_min,constSbVec2s&_max)voidgetBounds(short&xmin,short&ymin,short&xmax,short&ymax)constvoidgetBounds(SbVec2s&_min,SbVec2s&_max)constvoidgetOrigin(short&originX,short&originY)constvoidgetSize(short&sizeX,short&sizeY)constfloatgetAspectRatio()constvoidmakeEmpty()intoperator==(constSbBox2s&b1,constSbBox2s&b2)intoperator!=(constSbBox2s&b1,constSbBox2s&b2)