logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SbXfBox3f — 3D box with an associated transformation matrix

Description

       A  3D  box  with an arbitrary transformation applied. This class is useful when a box will be transformed
       frequently; if an SbBox3f is used for this purpose it will expand each time it is transformed in order to
       keep itself axis-aligned. Transformations can be accumulated on an SbXfBox3f without expanding  the  box,
       and  after  all  transformations  have  been  done,  the  box  can  be expanded to an axis-aligned box if
       necessary.

Inherits From

       SbBox3f > SbXfBox3f

Methods

SbXfBox3f()SbXfBox3f(constSbVec3f&_min,constSbVec3f&_max)SbXfBox3f(constSbBox3f&box)~SbXfBox3f()
          Constructors and destructor.

     voidsetTransform(constSbMatrix&m)
          Sets the transformation on the box.

     constSbMatrix&getTransform()constconstSbMatrix&getInverse()const
          Gets the transformation on the box, and its inverse.

     SbVec3fgetCenter()const
          Returns the center of the box.

     voidextendBy(constSbVec3f&pt)
          Extends the box (if necessary) to contain the given 3D point.  If  the  box  has  had  a  non-identity
          transformation  applied using the setTransform() method, the point is assumed to be in the transformed
          space.  For example, the following code sequence:
               SbXfBox3fbbox;bbox.extendBy(SbVec3f(0,0,0));SbMatrixtrans;trans.setTranslate(SbVec3f(1,1,1));bbox.setTransform(trans);bbox.extendBy(SbVec3f(0,0,0));
          will result in a bounding box extending from (-1,-1,-1) to (0,0,0) in  bbox'es  local  (untransformed)
          space.

     voidextendBy(constSbBox3f&bb)
          Extends  the  box  (if  necessary)  to  contain  the  given SbBox3f. If the box has had a non-identity
          transformation applied using the setTransform() method, the given SbBox3f is  assumed  to  be  in  the
          transformed space.

     voidextendBy(constSbXfBox3f&bb)
          Extends the box (if necessary) to contain the given SbXfBox3f.

     SbBoolintersect(constSbVec3f&pt)const
          Returns TRUE if intersection of given point and this box is not empty.

     SbBoolintersect(constSbBox3f&bb)const
          Returns TRUE if intersection of given box and this box is not empty.

     voidsetBounds(floatxmin,floatymin,floatzmin,floatxmax,floatymax,floatzmax)voidsetBounds(constSbVec3f&_min,constSbVec3f&_max)voidgetBounds(float&xmin,float&ymin,float&zmin,float&xmax,float&ymax,float&zmax)constvoidgetBounds(SbVec3f&_min,SbVec3f&_max)const
          Set and get the bounds of the box.

     voidgetOrigin(float&originX,float&originY,float&originZ)
          Returns origin (minimum point) of the box.

     voidgetSize(float&sizeX,float&sizeY,float&sizeZ)
          Returns size of the box.

     floatgetVolume()const
          Gives the volume of the box (0 for an empty box).

     voidmakeEmpty()
          Sets the box to contain nothing.

     SbBoolisEmpty()const
          Checks if the box is empty (degenerate).

     SbBoolhasVolume()const
          Checks if the box has volume; i.e., all three dimensions have positive size.

     voidgetSpan(constSbVec3f&direction,float&dMin,float&dMax)const
          Finds the extent of the box along a particular direction.

     voidtransform(constSbMatrix&m)
          Transforms the box by the given matrix.

     SbBox3fproject()const
          Projects an SbXfBox3f to an SbBox3fintoperator==(constSbXfBox3f&b1,constSbXfBox3f&b2)intoperator!=(constSbXfBox3f&b1,constSbXfBox3f&b2)
          Equality comparisons.

Name

       SbXfBox3f — 3D box with an associated transformation matrix

See Also

SbBox3f,SbBox2f,SbBox2s,SbVec3f,SbVec2f,SbVec2s,SbMatrix,SoGetBoundingBoxActionSbXfBox3f(3IV)()

Synopsis

#include<Inventor/SbBox.h>

          Methods from class SbXfBox3f:

                         SbXfBox3f()SbXfBox3f(constSbVec3f&_min,constSbVec3f&_max)SbXfBox3f(constSbBox3f&box)~SbXfBox3f()voidsetTransform(constSbMatrix&m)constSbMatrix&getTransform()constconstSbMatrix&getInverse()constSbVec3fgetCenter()constvoidextendBy(constSbVec3f&pt)voidextendBy(constSbBox3f&bb)voidextendBy(constSbXfBox3f&bb)SbBoolintersect(constSbVec3f&pt)constSbBoolintersect(constSbBox3f&bb)constvoidsetBounds(floatxmin,floatymin,floatzmin,floatxmax,floatymax,floatzmax)voidsetBounds(constSbVec3f&_min,constSbVec3f&_max)voidgetBounds(float&xmin,float&ymin,float&zmin,float&xmax,float&ymax,float&zmax)constvoidgetBounds(SbVec3f&_min,SbVec3f&_max)constvoidgetOrigin(float&originX,float&originY,float&originZ)voidgetSize(float&sizeX,float&sizeY,float&sizeZ)floatgetVolume()constvoidmakeEmpty()SbBoolisEmpty()constSbBoolhasVolume()constvoidgetSpan(constSbVec3f&direction,float&dMin,float&dMax)constvoidtransform(constSbMatrix&m)SbBox3fproject()constintoperator==(constSbXfBox3f&b1,constSbXfBox3f&b2)intoperator!=(constSbXfBox3f&b1,constSbXfBox3f&b2)

          Methods from class SbBox3f:

     constSbVec3f&getMin()constSbVec3f&getMax()

See Also