|
|
constexpr | Box3 () |
| | default constructor: the box content is undefined.
|
| |
|
constexpr | Box3 (const T minx, const T maxx, const T miny, const T maxy, const T minz, const T maxz) |
| | Constructor with explicit dimensions.
|
| |
|
constexpr | Box3 (const Vec3< T > &v) |
| | Construct a box representing a single point.
|
| |
|
| Box3 (const Box3< T > &B)=default |
| | default copy constructor.
|
| |
|
Box3< T > & | operator= (const Box3< T > &B)=default |
| | default assignement operator.
|
| |
|
template<typename U > |
| | operator Box3< U > () |
| | Explicit conversion to another box type.
|
| |
|
| operator Box3< typename DefaultFPType< T >::fptype > () |
| | Implicit conversion to floating-point type.
|
| |
|
constexpr bool | isEmpty () const |
| | Return true if the box is empty.
|
| |
|
void | empty () |
| | Make the box empty.
|
| |
| T | lx () const |
| | Return the box width. More...
|
| |
| T | ly () const |
| | Return the box height. More...
|
| |
| T | lz () const |
| | Return the box depth. More...
|
| |
| bool | equals (const Box3< T > &B) const |
| | Return true if the boxes are equal. More...
|
| |
| bool | operator== (const Box3< T > &B) const |
| | Return true if the boxes are equal. More...
|
| |
|
bool | contains (const Vec3< T > &v) const |
| | Return true if the box contains the point v.
|
| |
| bool | contains (const Box3< T > &B) const |
| | Return true if B is included in this box. More...
|
| |
| bool | operator>= (const Box3< T > &B) const |
| | Return true if B is included in this box. More...
|
| |
| bool | operator<= (const Box3< T > &B) const |
| | Return true if this box is included in B. More...
|
| |
| bool | operator> (const Box3< T > &B) const |
| | Return true if B is strictly included in this box (i.e. More...
|
| |
| bool | operator< (const Box3< T > &B) const |
| | Return true if this box is strictly included inside B (i.e. More...
|
| |
| Box3< T > | operator& (const Box3< T > &B) const |
| | Return the intersection of this box and B. More...
|
| |
| void | operator&= (const Box3< T > &B) |
| | Intersect this box with box B. More...
|
| |
|
Box3< T > | operator| (const Box3< T > &B) const |
| | Return the smallest box containing both this box and B.
|
| |
|
void | operator|= (const Box3< T > &B) |
| | Enlarge this box in order to contain B.
|
| |
|
Box3< T > | operator| (const Vec3< T > &v) const |
| | Return the smallest box containing this box and point v.
|
| |
|
void | operator|= (const Vec3< T > &v) |
| | Enlarge this box in order to contain point v.
|
| |
|
void | operator+= (const Vec3< T > &V) |
| | Translate this box by a given vector.
|
| |
|
Box3< T > | operator+ (const Vec3< T > &V) const |
| | Return this box translated by v.
|
| |
|
void | operator-= (const Vec3< T > &V) |
| | Translate the box by a given vector (substracted)
|
| |
|
Box3< T > | operator- (const Vec3< T > &V) const |
| | Return this box translated by v (substracted).
|
| |
|
Vec3< T > | center () const |
| | Return the position of the box center as a 3 dimensional vector.
|
| |
| void | zoomOut () |
| | Zoom outside the box (ie increase its size by 1/10th). More...
|
| |
| void | zoomIn () |
| | Zoom inside the box (ie decrease its size by 1/8th). More...
|
| |
| void | left () |
| | Move the box to the left by 1/10th of its width. More...
|
| |
| void | right () |
| | Move the box to the right by 1/10th of its width. More...
|
| |
| void | up () |
| | Move the box up by 1/10th of its height. More...
|
| |
| void | down () |
| | Move the box down by 1/10th of its height. More...
|
| |
| void | front () |
| | Move the box front by 1/10th of its height. More...
|
| |
| void | back () |
| | Move the box back by 1/10th of its height. More...
|
| |
template<typename T>
struct tgx::Box3< T >
Generic 3D Box [specializations iBox3, fBox3, dBox3].
The class encapsulates of 6 public variables: minX, maxX, minY, maxY, minZ, maxZ which delimit the 3 dimensional closed box: [minX, maxX] x [minY, maxY] x [minZ, maxZ]
The box is empty if maxX < minX or if maxY < minY or if maxZ < minZ.
- Warning
- Some methods compute things differently depending whether T is an integral or a floating point value type.
- Template Parameters
-
| T | arithmetic type of the box (int, float...) |
- See also
iBox3,fBox3,dBox3