24#ifndef PXR_BASE_GF_BBOX3D_H
25#define PXR_BASE_GF_BBOX3D_H
33#include "pxr/base/gf/api.h"
37PXR_NAMESPACE_OPEN_SCOPE
94 _isDegenerate =
false;
95 _hasZeroAreaPrimitives =
false;
103 _isDegenerate =
false;
104 _hasZeroAreaPrimitives =
false;
110 _hasZeroAreaPrimitives =
false;
116 _SetMatrices(matrix);
122 _SetMatrices(matrix);
156 _hasZeroAreaPrimitives = hasThem;
162 return _hasZeroAreaPrimitives;
173 _SetMatrices(_matrix * matrix);
215 return (_box == b._box &&
216 _matrix == b._matrix);
224 return !(*
this == that);
237 bool _hasZeroAreaPrimitives;
258PXR_NAMESPACE_CLOSE_SCOPE
Basic type: arbitrarily oriented 3D bounding box.
void SetHasZeroAreaPrimitives(bool hasThem)
Sets the zero-area primitives flag to the given value.
bool HasZeroAreaPrimitives() const
Returns the current state of the zero-areaprimitives flag".
GfBBox3d(const GfRange3d &box, const GfMatrix4d &matrix)
This constructor takes a box and a transformation matrix.
void SetMatrix(const GfMatrix4d &matrix)
Sets the transformation matrix only.
void Transform(const GfMatrix4d &matrix)
Transforms the bounding box by the given matrix, which is assumed to be a global transformation to ap...
GF_API double GetVolume() const
Returns the volume of the box (0 for an empty box).
const GfMatrix4d & GetMatrix() const
Returns the transformation matrix.
void Set(const GfRange3d &box, const GfMatrix4d &matrix)
Sets the axis-aligned box and transformation matrix.
const GfRange3d & GetBox() const
Returns the range of the axis-aligned untransformed box.
GF_API GfVec3d ComputeCentroid() const
Returns the centroid of the bounding box.
GfBBox3d()
The default constructor leaves the box empty, the transformation matrix identity, and the zero-areapr...
const GfRange3d & GetRange() const
Returns the range of the axis-aligned untransformed box.
void SetRange(const GfRange3d &box)
Sets the range of the axis-aligned box only.
bool operator!=(const GfBBox3d &that) const
Component-wise inequality test.
GfRange3d ComputeAlignedBox() const
Returns the axis-aligned range (as a GfRange3d) that results from applying the transformation matrix ...
const GfMatrix4d & GetInverseMatrix() const
Returns the inverse of the transformation matrix.
friend size_t hash_value(const GfBBox3d &b)
Hash.
static GF_API GfBBox3d Combine(const GfBBox3d &b1, const GfBBox3d &b2)
Combines two bboxes, returning a new bbox that contains both.
GF_API GfRange3d ComputeAlignedRange() const
Returns the axis-aligned range (as a GfRange3d) that results from applying the transformation matrix ...
GfBBox3d(const GfRange3d &box)
This constructor takes a box and sets the matrix to identity.
bool operator==(const GfBBox3d &b) const
Component-wise equality test.
Stores a 4x4 matrix of double elements.
GfMatrix4d & SetIdentity()
Sets the matrix to the identity matrix.
Basic type: 3-dimensional floating point range.
Basic type for a vector of 3 double components.
static size_t Combine(Args &&... args)
Produce a hash code by combining the hash codes of several objects.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].