1SbXfBox3f(3IV)()                                              SbXfBox3f(3IV)()
2
3
4

NAME

6       SbXfBox3f — 3D box with an associated transformation matrix
7

INHERITS FROM

9       SbBox3f > SbXfBox3f
10

SYNOPSIS

12       #include <Inventor/SbBox.h>
13
14          Methods from class SbXfBox3f:
15
16                         SbXfBox3f()
17                         SbXfBox3f(const SbVec3f &_min, const SbVec3f &_max)
18                         SbXfBox3f(const SbBox3f &box)
19                         ~SbXfBox3f()
20     void                setTransform(const SbMatrix &m)
21     const SbMatrix &    getTransform() const
22     const SbMatrix &    getInverse() const
23     SbVec3f             getCenter() const
24     void                extendBy(const SbVec3f &pt)
25     void                extendBy(const SbBox3f &bb)
26     void                extendBy(const SbXfBox3f &bb)
27     SbBool              intersect(const SbVec3f &pt) const
28     SbBool              intersect(const SbBox3f &bb) const
29     void                setBounds(float  xmin,  float ymin, float zmin, float
30                              xmax, float ymax, float zmax)
31     void                setBounds(const SbVec3f &_min, const SbVec3f &_max)
32     void                getBounds(float  &xmin,  float  &ymin,  float  &zmin,
33                              float &xmax, float &ymax, float &zmax) const
34     void                getBounds(SbVec3f &_min, SbVec3f &_max) const
35     void                getOrigin(float   &originX,   float  &originY,  float
36                              &originZ)
37     void                getSize(float &sizeX, float &sizeY, float &sizeZ)
38     float               getVolume() const
39     void                makeEmpty()
40     SbBool              isEmpty() const
41     SbBool              hasVolume() const
42     void                getSpan(const SbVec3f &direction, float &dMin,  float
43                              &dMax) const
44     void                transform(const SbMatrix &m)
45     SbBox3f             project() const
46     int                 operator ==(const SbXfBox3f &b1, const SbXfBox3f &b2)
47     int                 operator !=(const SbXfBox3f &b1, const SbXfBox3f &b2)
48
49          Methods from class SbBox3f:
50
51     const SbVec3f &     getMin()
52     const SbVec3f &     getMax()
53
54

DESCRIPTION

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

METHODS

64                         SbXfBox3f()
65                         SbXfBox3f(const SbVec3f &_min, const SbVec3f &_max)
66                         SbXfBox3f(const SbBox3f &box)
67                         ~SbXfBox3f()
68          Constructors and destructor.
69
70     void                setTransform(const SbMatrix &m)
71          Sets the transformation on the box.
72
73     const SbMatrix &    getTransform() const
74     const SbMatrix &    getInverse() const
75          Gets the transformation on the box, and its inverse.
76
77     SbVec3f             getCenter() const
78          Returns the center of the box.
79
80     void                extendBy(const SbVec3f &pt)
81          Extends the box (if necessary) to contain the given 3D point. If the
82          box  has  had  a  non-identity transformation applied using the set‐
83          Transform() method, the point is assumed to be  in  the  transformed
84          space.  For example, the following code sequence:
85               SbXfBox3f bbox; bbox.extendBy(SbVec3f(0,0,0));
86               SbMatrix trans; trans.setTranslate(SbVec3f(1,1,1));
87               bbox.setTransform(trans);
88               bbox.extendBy(SbVec3f(0,0,0));
89          will  result  in a bounding box extending from (-1,-1,-1) to (0,0,0)
90          in bbox'es local (untransformed) space.
91
92     void                extendBy(const SbBox3f &bb)
93          Extends the box (if necessary) to contain the given SbBox3f. If  the
94          box  has  had  a  non-identity transformation applied using the set‐
95          Transform() method, the given SbBox3f is assumed to be in the trans‐
96          formed space.
97
98     void                extendBy(const SbXfBox3f &bb)
99          Extends the box (if necessary) to contain the given SbXfBox3f.
100
101     SbBool              intersect(const SbVec3f &pt) const
102          Returns  TRUE  if  intersection  of  given point and this box is not
103          empty.
104
105     SbBool              intersect(const SbBox3f &bb) const
106          Returns TRUE if intersection of given box and this box is not empty.
107
108     void                setBounds(float xmin, float ymin, float  zmin,  float
109                              xmax, float ymax, float zmax)
110     void                setBounds(const SbVec3f &_min, const SbVec3f &_max)
111     void                getBounds(float  &xmin,  float  &ymin,  float  &zmin,
112                              float &xmax, float &ymax, float &zmax) const
113     void                getBounds(SbVec3f &_min, SbVec3f &_max) const
114          Set and get the bounds of the box.
115
116     void                getOrigin(float  &originX,  float   &originY,   float
117                              &originZ)
118          Returns origin (minimum point) of the box.
119
120     void                getSize(float &sizeX, float &sizeY, float &sizeZ)
121          Returns size of the box.
122
123     float               getVolume() const
124          Gives the volume of the box (0 for an empty box).
125
126     void                makeEmpty()
127          Sets the box to contain nothing.
128
129     SbBool              isEmpty() const
130          Checks if the box is empty (degenerate).
131
132     SbBool              hasVolume() const
133          Checks  if the box has volume; i.e., all three dimensions have posi‐
134          tive size.
135
136     void                getSpan(const SbVec3f &direction, float &dMin,  float
137                              &dMax) const
138          Finds the extent of the box along a particular direction.
139
140     void                transform(const SbMatrix &m)
141          Transforms the box by the given matrix.
142
143     SbBox3f             project() const
144          Projects an SbXfBox3f to an SbBox3f
145
146     int                 operator ==(const SbXfBox3f &b1, const SbXfBox3f &b2)
147     int                 operator !=(const SbXfBox3f &b1, const SbXfBox3f &b2)
148          Equality comparisons.
149
150

SEE ALSO

152       SbBox3f,  SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix, SoGet‐
153       BoundingBoxAction
154
155
156
157
158                                                              SbXfBox3f(3IV)()
Impressum