GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SBXFBOX3F (3)

NAME

SbXfBox3f — 3D box with an associated transformation matrix

CONTENTS

Inherits From
Synopsis
Description
Methods
File Format/defaults
See Also

INHERITS FROM

SbBox3f > SbXfBox3f

SYNOPSIS

#include <Inventor/SbBox.h>

Methods from class SbXfBox3f:

       
                    
                     SbXfBox3f()    
   
                    
                     SbXfBox3f(const SbVec3f &_min, const SbVec3f &_max)    
   
                    
                     SbXfBox3f(const SbBox3f &box)    
   
                    
                     ~SbXfBox3f()    
void    
                    
void                 setTransform(const SbMatrix &m)    
const SbMatrix &    
                    
const SbMatrix &     getTransform() const    
const SbMatrix &    
                    
const SbMatrix &     getInverse() const    
SbVec3f    
                    
SbVec3f              getCenter() const    
void    
                    
void                 extendBy(const SbVec3f &pt)    
void    
                    
void                 extendBy(const SbBox3f &bb)    
void    
                    
void                 extendBy(const SbXfBox3f &bb)    
SbBool    
                    
SbBool               intersect(const SbVec3f &pt) const    
SbBool    
                    
SbBool               intersect(const SbBox3f &bb) const    
void    
                    
void                 setBounds(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)    
void    
                    
void                 setBounds(const SbVec3f &_min, const SbVec3f &_max)    
void    
                    
void                 getBounds(float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const    
void    
                    
void                 getBounds(SbVec3f &_min, SbVec3f &_max) const    
void    
                    
void                 getOrigin(float &originX, float &originY, float &originZ)    
void    
                    
void                 getSize(float &sizeX, float &sizeY, float &sizeZ)    
float    
                    
float                getVolume() const    
void    
                    
void                 makeEmpty()    
SbBool    
                    
SbBool               isEmpty() const    
SbBool    
                    
SbBool               hasVolume() const    
void    
                    
void                 getSpan(const SbVec3f &direction, float &dMin, float &dMax) const    
void    
                    
void                 transform(const SbMatrix &m)    
SbBox3f    
                    
SbBox3f              project() const    
int    
                    
int                  operator ==(const SbXfBox3f &b1, const SbXfBox3f &b2)    
int    
                    
int                  operator !=(const SbXfBox3f &b1, const SbXfBox3f &b2)

Methods from class SbBox3f:

    const SbVec3f &    
                    
const SbVec3f &      getMin()    
const SbVec3f &    
                    
const SbVec3f &      getMax()

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.

METHODS

       
                    
                     SbXfBox3f()    
   
                    
                     SbXfBox3f(const SbVec3f &_min, const SbVec3f &_max)    
   
                    
                     SbXfBox3f(const SbBox3f &box)    
   
                    
                     ~SbXfBox3f()
Constructors and destructor.

    void    
                    
void                 setTransform(const SbMatrix &m)
Sets the transformation on the box.

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

    SbVec3f    
                    
SbVec3f              getCenter() const
Returns the center of the box.

    void    
                    
void                 extendBy(const SbVec3f &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:




SbXfBox3f bbox; bbox.extendBy(SbVec3f(0,0,0));
SbMatrix trans; 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.

    void    
                    
void                 extendBy(const SbBox3f &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.

    void    
                    
void                 extendBy(const SbXfBox3f &bb)
Extends the box (if necessary) to contain the given SbXfBox3f.

    SbBool    
                    
SbBool               intersect(const SbVec3f &pt) const
Returns TRUE if intersection of given point and this box is not empty.

    SbBool    
                    
SbBool               intersect(const SbBox3f &bb) const
Returns TRUE if intersection of given box and this box is not empty.

    void    
                    
void                 setBounds(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)    
void    
                    
void                 setBounds(const SbVec3f &_min, const SbVec3f &_max)    
void    
                    
void                 getBounds(float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const    
void    
                    
void                 getBounds(SbVec3f &_min, SbVec3f &_max) const
Set and get the bounds of the box.

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

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

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

    void    
                    
void                 makeEmpty()
Sets the box to contain nothing.

    SbBool    
                    
SbBool               isEmpty() const
Checks if the box is empty (degenerate).

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

    void    
                    
void                 getSpan(const SbVec3f &direction, float &dMin, float &dMax) const
Finds the extent of the box along a particular direction.

    void    
                    
void                 transform(const SbMatrix &m)
Transforms the box by the given matrix.

    SbBox3f    
                    
SbBox3f              project() const
Projects an SbXfBox3f to an SbBox3f

    int    
                    
int                  operator ==(const SbXfBox3f &b1, const SbXfBox3f &b2)    
int    
                    
int                  operator !=(const SbXfBox3f &b1, const SbXfBox3f &b2)
Equality comparisons.

FILE FORMAT/DEFAULTS

SEE ALSO

SbBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix, SoGetBoundingBoxAction

Search for    or go to Top of page |  Section 3 |  Main Index


SBXFBOX3F(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.