Itasca C++ Interface
|
A Class representing a cartesian extent in 3D. More...
#include <extent3.h>
Public Member Functions | |
Extent3 () | |
Default constructor, no data initialization. | |
Extent3 (const T &x1, const T &x2, const T &y1, const T &y2, const T &z1, const T &z2) | |
Explicit constructor, by providing all six cartesian extents. | |
Extent3 (const Vector3< T > &v111, const Vector3< T > &v222) | |
Explicit constructor, by providing the lower-bound and upper-bound as two Vector3. | |
Extent3 (const Extent3< T > &r) | |
Copy constructor. | |
constexpr const Extent3 & | operator= (const Extent3 &e) |
Extent3 (const Extent2< T > &r) | |
Explicit contructor, from a Extent2. The z extent is set to (0,1). | |
const T & | x1 () const |
Returns the lower bound of the extent in the x-direction. | |
const T & | x2 () const |
Returns the upper bound of the extent in the x-direction. | |
const T & | y1 () const |
Returns the lower bound of the extent in the y-direction. | |
const T & | y2 () const |
Returns the upper bound of the extent in the y-direction. | |
const T & | z1 () const |
Returns the lower bound of the extent in the y-direction. | |
const T & | z2 () const |
Returns the upper bound of the extent in the y-direction. | |
const T & | dof1 (uint32 u) const |
Returns the lower bound of degree-of-freedom dof. | |
const T & | dof2 (uint32 u) const |
Returns the upper bound of degree-of-freedom dof. | |
T | width () const |
Returns the size of the extent in the x-direction. | |
T | height () const |
Returns the size of the extent in the y-direction. | |
T | depth () const |
Returns the size of the extent in the z-direction. | |
Vector3< T > | centroid () const |
Returns the geometric center of the extent as a Vector3. | |
T | volume () const |
Returns the volume of the extent ( width() * height() * depth() ). | |
T | diagonal () const |
Returns the diagonal length of the extent, or the distance from the lower bound corner to the upper bound. | |
Vector3< T > | corner (uint32 x, uint32 y, uint32 z) const |
Vector3< T > | c111 () const |
Returns one of the eith corners that characterize the extent. | |
Vector3< T > | c121 () const |
Returns one of the eith corners that characterize the extent. | |
Vector3< T > | c211 () const |
Returns one of the eith corners that characterize the extent. | |
Vector3< T > | c221 () const |
Returns one of the eith corners that characterize the extent. | |
Vector3< T > | c112 () const |
Returns one of the eith corners that characterize the extent. | |
Vector3< T > | c122 () const |
Returns one of the eith corners that characterize the extent. | |
Vector3< T > | c212 () const |
Returns one of the eith corners that characterize the extent. | |
Vector3< T > | c222 () const |
Returns one of the eith corners that characterize the extent. | |
Vector3< T > | lowerBound () const |
Returns the lower bounding corner of the extent, minimum value of x,y, and z. | |
Vector3< T > | upperBound () const |
Returns the upper bounding corner of the extent, maximum value of x,y, and z. | |
Vector3< T > | size () const |
Returns the size of the extent as a Vector3(width(),height(),depth()). | |
bool | isEmpty () const |
Returns true if the region is "inside out" in any of its three coordinates. | |
bool | tolIsEmpty (const double &tol=limits< double >::epsilon() *100) const |
Returns true if the region is "inside out" with a tolerance in any of its three coordinates. | |
bool | operator== (const Extent3< T > &c) const |
Comparison operator. | |
bool | operator!= (const Extent3< T > &r) const |
Comparison operator. | |
bool | operator< (const Extent3< T > &c) const |
Comparison operator, based on volume. | |
bool | operator> (const Extent3< T > &c) const |
Comparison operator, based on volume. | |
bool | isIn (const Vector3< T > &v) const |
Returns true if Vector3 v is "inside" the extent, inclusive. | |
bool | isIn (const Extent3< T > &c) const |
Returns true if the Extent3 c falls completely inside (inclusive) the extent. | |
bool | tolIsIn (const Vector3< T > &v, const T &tol) const |
Returns true if Vector3 v is "inside" the extent, inclusive with an added tolerance factor. | |
bool | tolIsIn (const Extent3< T > &c, const T &tol) const |
Returns true if the Extent3 c falls completely inside (inclusive) the extent with an added tolerance factor. | |
bool | intersects (const Extent3< T > &c) const |
Returns true if the Extent3 C intersects (inclusive) this extent in any way. | |
bool | tolIntersects (const Extent3< T > &c, const T &tol) const |
Returns true if the Extent3 C intersects (inclusive) this extent in any way with an added tolerance factor. | |
T & | rx1 () |
Reference access to the minimum x extent. | |
T & | rx2 () |
Reference access to the maximum x extent. | |
T & | ry1 () |
Reference access to the minimum y extent. | |
T & | ry2 () |
Reference access to the maximum y extent. | |
T & | rz1 () |
Reference access to the minimum z extent. | |
T & | rz2 () |
T & | rdof1 (uint32 u) |
Reference access to lower bound of degree-of-freedom dof. | |
T & | rdof2 (uint32 u) |
Reference access to lower bound of degree-of-freedom dof. | |
void | width (const T &t) |
Sets the width of the extent by moving the maximum x extent, keeping the minimum constant. | |
void | height (const T &t) |
Sets the height of the extent by moving the maximum y extent, keeping the minimum constant. | |
void | depth (const T &t) |
Sets the depth of the extent by moving the maximum z extent, keeping the minimum constant. | |
void | c111 (const Vector3< T > &v) |
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant. | |
void | c121 (const Vector3< T > &v) |
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant. | |
void | c211 (const Vector3< T > &v) |
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant. | |
void | c221 (const Vector3< T > &v) |
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant. | |
void | c112 (const Vector3< T > &v) |
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant. | |
void | c122 (const Vector3< T > &v) |
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant. | |
void | c212 (const Vector3< T > &v) |
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant. | |
void | c222 (const Vector3< T > &v) |
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant. | |
void | lowerBound (const Vector3< T > &v) |
Sets the lower bound of the exetnt, keeping the upper bound constant. Synonym to c111(). | |
void | upperBound (const Vector3< T > &v) |
Sets the upper bound of the exetnt, keeping the lower bound constant. Synonym to c222(). | |
void | size (const Vector3< T > &v) |
Specifies the size of the extent by moving the upper bound, keeping the lower bound constant. | |
Vector3< T > | bound (const Vector3< T > &v) const |
const Extent3< T > & | operator+= (const Vector3< T > &v) |
Adds v to all extent boundaries, effectively translating it. | |
const Extent3< T > & | operator-= (const Vector3< T > &v) |
Subtracts v from all extent boundaries, effectively translating it. | |
Extent3< T > | operator+ (const Vector3< T > &v) const |
Returns the extent created ty translating this one v units. | |
Extent3< T > | operator- (const Vector3< T > &v) const |
Returns the extent created ty translating this one -v units. | |
Extent3< T > | intersectedWith (const Extent3< T > &r) const |
Returns the extent formed by the intersections of the two extents. May end up empty. | |
const Extent3< T > & | expandToInclude (const Extent3< T > &r) |
Enlarges the extent to include both its original extent and r. | |
const Extent3< T > & | expandToInclude (const Vector3< T > &v) |
Enlarges the extent to contain v. | |
const Extent3< T > & | expandToInclude (const T &x, const T &y, const T &z) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Extent3< T > | expandedToInclude (const Extent3< T > &r) const |
Returns an extent large enough to contain this one and r. | |
Extent3< T > | expandedToInclude (const Vector3< T > &v) const |
Returns an extent large enough to contain this one and the point v. | |
Extent3< T > | expandedToInclude (const T &x, const T &y, const T &z) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const Extent3< T > & | expand (const T &tol) |
Extent3< T > | expanded (const T &tol) const |
Extent3< T > | biggerBy (const T &fact) const |
const Extent3< T > & | center (const Vector3< T > &v) |
Centers this Extent2 about point v. | |
Extent3< T > | center (const Vector3< T > &v) const |
Returns a Extent2 centered about point v. | |
Static Public Member Functions | |
static constexpr Extent3< T > | nothing () |
Returns an Extent3 with maximum negative size. Useful for calculating bounds. | |
Related Symbols | |
(Note that these are not member symbols.) | |
typedef Extent3< double > | DExtent3 |
typedef Extent3< float > | FExtent3 |
typedef Extent3< int32 > | IExtent3 |
typedef Extent3< uint32 > | UExtent3 |
typedef Extent3< int64 > | I64Extent3 |
typedef Extent3< uint64 > | U64Extent3 |
A Class representing a cartesian extent in 3D.
Essentially a 3D version of Extent2. Some effort has been made to keep the API the same for Extent3 and Extent2, to enable better 2D/3D compilation.
Returns an extent expanded by a factor of fact in all directions. The centroid will remain constant.
Constrains the point v to fall inside the extent. Any coordinate outside the extent is moved to the minimum or maximum boundary.
This function retrieves the coordinates of the 8 different vertices. x,y,z are either zero or non-zero.
The extent is made bigger by 2*tol in all directions. In other words, each extent component is moved tol units away from the center. The centroid will remain constant.
Returns an extent that is bigger by 2*tol in all directions. In other words, each extent component is moved tol units away from the center. The centroid will remain constant.
|
inline |
Reference access to the maximum z extent.