Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Extent< T > Class Template Reference

A Extent2<T> in 2D, and a Extent3<T> in 2D. More...

#include <dim.h>

Inheritance diagram for Extent< T >:
Extent3< T >

Public Member Functions

 Extent ()
 Default constructor, not data initialization.
 
 Extent (const Vector< T > &v11, const Vector< T > &v22)
 Explicit constructor, given the lower and upper bound as two Vector.
 
 Extent (const Extent &r)
 Copy constructor.
 
 Extent (const Extent3< T > &r)
 Copy constructor.
 
- Public Member Functions inherited from Extent3< T >
 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 Extent3operator= (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.
 
width () const
 Returns the size of the extent in the x-direction.
 
height () const
 Returns the size of the extent in the y-direction.
 
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.
 
volume () const
 Returns the volume of the extent ( width() * height() * depth() ).
 
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.
 

Additional Inherited Members

- Static Public Member Functions inherited from Extent3< T >
static constexpr Extent3< T > nothing ()
 Returns an Extent3 with maximum negative size. Useful for calculating bounds.
 

Detailed Description

template<class T>
class Extent< T >

A Extent2<T> in 2D, and a Extent3<T> in 2D.


The documentation for this class was generated from the following file: