SbBox2f — 2D box class
Contents
Description
2D box which has planes parallel to the major axes and is specified by two points (specified as floating
point) 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
SbBox2f
Methods
SbBox2f()SbBox2f(floatxmin,floatymin,floatxmaxfloatymax)SbBox2f(constSbVec2f&min,constSbVec2f&max)void~SbBox2f()
Constructors and destructor for a 2D float 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.
constSbVec2f&getMin()constSbVec2f&getMax()
Returns the minimum and maximum points of the box.
SbVec2fgetCenter()
Returns the center of the box.
voidextendBy(constSbVec2f&point)voidextendBy(constSbBox2f&box)
Extends this box (if necessary) to contain the specified point or other box.
SbBoolintersect(constSbVec2f&point)SbBoolintersect(constSbBox2f&box)
Returns TRUE if the specified point or box intersects this box.
voidsetBounds(floatxmin,floatymin,floatxmax,floatymax)voidsetBounds(constSbVec2f&min,constSbVec2f&max)
Sets the corners of the box.
voidgetBounds(float&xmin,float&ymin,float&xmax,float&ymax)voidgetBounds(SbVec2f&min,SbVec2f&max)
Gets the corners of the box.
voidgetOrigin(float&x0,float&y0)
Gets box origin.
voidgetSize(float&x,float&y)
Gets box size.
floatgetAspectRatio()
Gets box aspect ratio.
voidmakeEmpty()
Makes an empty box.
SbBoolisEmpty()
Returns TRUE if the box is empty, and FALSE otherwise.
SbBoolhasArea()
Returns TRUE if both dimensions of the box have positive size, and FALSE otherwise.
Name
SbBox2f — 2D box class
See Also
SbBox3f,SbXfBox3f,SbBox2s,SbVec3f,SbVec2f,SbVec2s,SbMatrixSbBox2f(3IV)()
Synopsis
#include<Inventor/SbBox.h>
Methods from class SbBox2f:
SbBox2f()SbBox2f(floatxmin,floatymin,floatxmaxfloatymax)SbBox2f(constSbVec2f&min,constSbVec2f&max)void~SbBox2f()constSbVec2f&getMin()constSbVec2f&getMax()SbVec2fgetCenter()voidextendBy(constSbVec2f&point)voidextendBy(constSbBox2f&box)SbBoolintersect(constSbVec2f&point)SbBoolintersect(constSbBox2f&box)voidsetBounds(floatxmin,floatymin,floatxmax,floatymax)voidsetBounds(constSbVec2f&min,constSbVec2f&max)voidgetBounds(float&xmin,float&ymin,float&xmax,float&ymax)voidgetBounds(SbVec2f&min,SbVec2f&max)voidgetOrigin(float&x0,float&y0)voidgetSize(float&x,float&y)floatgetAspectRatio()voidmakeEmpty()SbBoolisEmpty()SbBoolhasArea()