|
|

Public Member Functions | |
| AxisAlignedBox () | |
| Default constructor. | |
| AxisAlignedBox (const Vector3 &minPoint, const Vector3 &maxPoint) | |
| Constructor for minimum and maximum points. | |
| AxisAlignedBox (const Point< 3 > ¢er, const Vector3 &extents) | |
| Constructor for center point and extents vector. | |
| void | Set (const Vector3 &minPoint, const Vector3 &maxPoint) |
| Sets the minimum and maximum points of this box. | |
| void | Set (const Point< 3 > ¢er, const Vector3 &extents) |
| Sets the center point and extents of the box. | |
| void | SetMinPoint (const Vector3 &minPoint) |
| Sets the minimum point of this box. | |
| void | SetMaxPoint (const Vector3 &maxPoint) |
| Sets the maximum point of this box. | |
| void | SetCenter (const Vector3 ¢er) |
| Sets the box's center point. | |
| void | SetExtents (const Vector3 &extents) |
| Sets the box's extents along each axis. | |
| const Vector3 & | GetMinPoint () const |
| Returns the minimum point of this box. | |
| const Vector3 & | GetMaxPoint () const |
| Returns the maximum point of this box. | |
| Vector3 | GetCenter () const |
| Returns the center of the box. | |
| Vector3 | GetExtents () const |
| Returns the box's extents along each axis. | |
| template<typename OutputIteratorT> | |
| void | GetCornerVertices (OutputIteratorT it) const |
| Returns the 8 corner vertices of this box. | |
| Vector3 | GetCornerVertex (size_t index) const |
| Returns one of the 8 corner vertices of this box. | |
| template<typename OutputIteratorT> | |
| void | GetPlanes (OutputIteratorT it) const |
| Returns the 6 planes of this box. | |
| Plane | GetPlane (size_t index) const |
| Returns one of the 6 planes of this box. | |
| template<typename OutputIteratorT> | |
| void | GetRectangles (OutputIteratorT it) const |
| Returns the 6 rectangles that make up this box. | |
| Rectangle< 3 > | GetRectangle (size_t index) const |
| Returns one of the 6 rectangles of this box. | |
| std::pair< Vector3, Vector3 > | GetFarPoints (const Plane &plane) const |
| Returns the positive and negative far points of this box in relation to the given plane. | |
| bool | operator== (const AxisAlignedBox &b) const |
| Equality operator. | |
| bool | operator!= (const AxisAlignedBox &b) const |
| Inequality operator. | |
| virtual void | Transform (const Matrix4x4 &m) |
| Transforms this object by the given matrix. | |
| virtual void | Transform (const Math::Transform &m) |
| Transforms this object by the given affine transform. | |
| virtual real | GetVolume () const |
| Returns the volume of this object. | |
| virtual bool | Contains (const Point< 3 > &point) const |
| Returns true if this volume contains the given point. | |
| template<typename InputIteratorT> | |
| void | SetBound (InputIteratorT itBegin, InputIteratorT itEnd) |
| Sets this volume so that it bounds all the vertices specified by the given Vector3 iterators. | |
| virtual void | SetBound (const AxisAlignedBox &box) |
| Sets this volume to bound the given axis-aligned box. | |
| virtual void | SetBound (const Box &box) |
| Sets this volume to bound the given box. | |
| virtual void | SetBound (const Sphere &sphere) |
| Sets this volume to bound the given sphere. | |
| virtual void | SetBound (const Frustum &frustum) |
| Sets this volume to bound the given frustum. | |
| virtual void | Merge (const AxisAlignedBox &box) |
| Grows this volume so that it also bounds the given axis-aligned box. | |
| virtual void | Merge (const Box &box) |
| Grows this volume so that it also contains the given box. | |
| virtual void | Merge (const Sphere &sphere) |
| Grows this volume so that it also contains the given sphere. | |
Static Public Member Functions | |
| static std::pair< size_t, size_t > | GetFarPointIndices (const Plane &plane) |
| Returns the indices of the positive and negative far points of an axis-aligned box in relation to the given plane. | |
|
|
Default constructor.
|
|
||||||||||||
|
Constructor for minimum and maximum points. |
|
||||||||||||
|
Constructor that creates an axis-aligned box with the given center and extents. The first parameter is changed to Point<3> to distinguish this constructor from the minimum, maximum point constructor. |
|
|
Returns true if this volume contains the given point. Implements Volume. |
|
|
Returns the center of the box. |
|
|
Returns one of the 8 corner vertices of this box. The given index corresponds to the vertices of the box as follows:
|
|
|
Returns the 8 corner vertices of this box using the given Vector3 output iterator. The vertices will be inserted in the following order:
|
|
|
Returns the box's extents along each axis. |
|
|
Returns the indices of the positive and negative far points (in that order) of an axis-aligned box in relation to the given plane. The positive far point is that corner point of the box which occupies the same octant as the plane's normal. The negative far point is the corner point of the exactly opposite octant where the plane's negative normal points to. The returned indices correspond to the 8 vertices of the box in the following way:
|
|
|
Returns the positive and negative far points (in that order) of this box in relation to the given plane. The positive far point is that corner point of the box which occupies the same octant as the plane's normal. The negative far point is the corner point of the exactly opposite octant where the plane's negative normal points to. |
|
|
Returns the maximum point of this box. |
|
|
Returns the minimum point of this box. |
|
|
Returns one of the 6 planes of this box. The indices correspond to the planes in the following order:
The plane normals will point away from the interior of the box. Or in other words, the normals are positive on the outside of the box. |
|
|
Returns the 6 planes of this box using the given Plane output iterator. The planes will be inserted in the following order:
The plane normals will point away from the interior of the box. Or in other words, the normals are positive on the outside of the box. |
|
|
Returns one of the 6 rectangles of this box. The indices correspond to the rectangles in the following way:
The rectangle normals will point away from the interior of the box. Or in other words, the normals are positive on the outside of the box. |
|
|
Returns the 6 rectangles that make up this box using the given Recangle<3> output iterator. The rectangles will be inserted in the following order:
The rectangle normals will point away from the interior of the box. Or in other words, the normals are positive on the outside of the box. |
|
|
Returns the volume of this object. Implements Volume. |
|
|
Grows this volume so that it also contains the given sphere. The function first creates an axis-aligned box that bounds the given sphere and then merges the two axis-aligned boxes. Implements BoundingVolume. |
|
|
Grows this volume so that it also contains the given box. The function first creates an axis-aligned box that bounds the given oriented box and then merges the two axis-aligned boxes. Implements BoundingVolume. |
|
|
Grows this volume so that it also bounds the given axis-aligned box. Implements BoundingVolume. |
|
|
Inequality operator. |
|
|
Equality operator. |
|
||||||||||||
|
Sets this object to represent a new box with the given center point and given extents. |
|
||||||||||||
|
Sets the minimum and maximum points of this box. |
|
|
Sets this volume to bound the given frustum. Implements BoundingVolume. |
|
|
Sets this axis-aligned box to bound the given sphere. Implements BoundingVolume. |
|
|
Sets this axis-aligned box to bound the given box. This is done by determining the eight corner vertices of the given oriented box and then determining the minimum and maximum coordinates along each coordinate axis. This results in a minimum and maximum point that span the axis-aligned box. Implements BoundingVolume. |
|
|
Sets this axis-aligned box to bound the given axis-aligned box. In other word, sets this box to the given box. Implements BoundingVolume. |
|
||||||||||||
|
Sets this volume so that it bounds all the vertices specified by the given Vector3 iterators. |
|
|
Sets the box's center point. The extents of the box remain the same. Therefore this translates the box to the new center point. |
|
|
Sets the box's extents along each axis. |
|
|
Sets the maximum point of this box. |
|
|
Sets the minimum point of this box. |
|
|
Transforms this object by the given affine transform. Reimplemented from GeometricObject3. |
|
|
Transforms this object by the given matrix. Implements GeometricObject3. |
|
Copyright © by Martin Ecker |