|
Itasca C++ Interface
|
3D vector utility class. More...
#include <vect.h>
Public Member Functions | |
| Vector3 () | |
| Default constructor - no data initialization. | |
| Vector3 (const Vector3< T > &v) | |
| Copy constructor. | |
| Vector3 (const T &x, const T &y, const T &z=0) | |
| Explicit constructor, by the three components of the vector. | |
| Vector3 (const T &t) | |
| Explicit constructor, all three components are inintialized to t. | |
| const T & | x () const |
| The x-component of the vector. | |
| const T & | y () const |
| The y-component of the vector. | |
| const T & | z () const |
| The z-component of the vector. | |
| const T & | dof (unsigned u) const |
| The degree-of-freedom u (0-2) component. | |
| T & | rx () |
| Reference access to the x-component of the vector. | |
| T & | ry () |
| Reference access to the y-component of the vector. | |
| T & | rz () |
| Reference access to the z-component of the vector. | |
| T & | rdof (unsigned u) |
| Reference access to degree-of-freedom u (0-2) of the vector. | |
| const T & | operator[] (unsigned u) const |
| Allows array like access to degrees-of-freedom. | |
| T & | operator[] (unsigned u) |
| Allows array like access to degrees-of-freedom. | |
| template<std::size_t N> | |
| T | get () const |
| T | fsum () const |
| Manhattan norm. | |
| T | sum () const |
| Sum of components. | |
| T | mag2 () const |
| Square of the magnitude, or the vector dotted with itself. | |
| T | mag () const |
| The vector magnitude. | |
| T | volume () const |
| Volume of region represented by x*y*z - can be negative. | |
| Vector3< T > | unit () const |
| Unit vector - be sure vector is nonzero. | |
| Vector3< T > | abs () const |
| Returns vector of absolute values of components. | |
| void | fill (const T &d) |
| Fills all three components with value d. | |
| T | maxComp () const |
| Returns the maximum component. | |
| T | minComp () const |
| Returns the minimum component. | |
| unsigned | maxCompIndex () const |
| Returns the max component index. | |
| unsigned | minCompIndex () const |
| Returns the min component index. | |
| const Vector3< T > & | safeDivE (const Vector3< T > &v) |
| "Safe" division operation - checks for zero and overflow. | |
| const Vector3< T > | safeDiv (const Vector3< T > &v) |
| "Safe" division operation - checks for zero and overflow. | |
| bool | operator== (const Vector3< T > &v) const |
| Comparison operator - no tolerance is used. | |
| bool | operator!= (const Vector3< T > &v) const |
| Comparison operator - no tolerance is used. | |
| bool | operator< (const Vector3< T > &v) const |
| Comparison operator, compare each DOF in order. | |
| bool | operator> (const Vector3< T > &v) const |
| Comparison operator, compare each DOF in order. | |
| const Vector3< T > & | operator+= (const Vector3< T > &v) |
| In-place mathematical operators – * and / are done on a component basis. | |
| const Vector3< T > & | operator-= (const Vector3< T > &v) |
| In-place mathematical operators – * and / are done on a component basis. More... | |
| const Vector3< T > & | operator *= (const Vector3< T > &v) |
| In-place mathematical operators – * and / are done on a component basis. More... | |
| const Vector3< T > & | operator *= (const T &t) |
| In-place mathematical operators – * and / are done on a component basis. More... | |
| const Vector3< T > & | operator/= (const Vector3< T > &v) |
| In-place mathematical operators – * and / are done on a component basis. More... | |
| const Vector3< T > & | operator/= (const T &t) |
| In-place mathematical operators – * and / are done on a component basis. More... | |
| Vector3< T > | operator+ (const Vector3< T > &v) const |
| Binary mathematical operators – * and / are done on a component basis. | |
| Vector3< T > | operator- (const Vector3< T > &v) const |
| Binary mathematical operators – * and / are done on a component basis. More... | |
| Vector3< T > | operator * (const Vector3< T > &v) const |
| Binary mathematical operators – * and / are done on a component basis. More... | |
| Vector3< T > | operator * (const T &t) const |
| Binary mathematical operators – * and / are done on a component basis. More... | |
| Vector3< T > | operator/ (const Vector3< T > &v) const |
| Binary mathematical operators – * and / are done on a component basis. More... | |
| Vector3< T > | operator/ (const T &t) const |
| Binary mathematical operators – * and / are done on a component basis. More... | |
| Vector3< T > | operator & (const Vector3< T > &v) const |
| Cross Product. | |
| T | operator| (const Vector3< T > &v) const |
| Dot Product. | |
Related Functions | |
(Note that these are not member functions.) | |
| typedef Vector3< Double > | DVect3 |
| typedef Vector3< Float > | FVect3 |
| typedef Vector3< Int > | IVect3 |
| typedef Vector3< UInt > | UVect3 |
| typedef Vector3< Long > | LVect3 |
| typedef Vector3< ULong > | ULVect3 |
| template<class T > | |
| DVect3 | toDVect3 (const Vector3< T > &v) |
| template<class T > | |
| FVect3 | toFVect3 (const Vector3< T > &v) |
| template<class T > | |
| IVect3 | toIVect3 (const Vector3< T > &v) |
| template<class T > | |
| UVect3 | toUVect3 (const Vector3< T > &v) |
| template<class T > | |
| Vector3< T > | vmax (const Vector3< T > &v1, const Vector3< T > &v2) |
| template<class T > | |
| Vector3< T > | vmin (const Vector3< T > &v1, const Vector3< T > &v2) |
| template<class T > | |
| Vector3< T > | vsign (const Vector3< T > &v1, const Vector3< T > &v2) |
| template<class T > | |
| Vector3< T > | vceil (const Vector3< T > &v) |
| template<class T > | |
| Vector3< T > | vfloor (const Vector3< T > &v) |
| template<class T > | |
| IVect3 | vround (const Vector3< T > &v) |
3D vector utility class.
Binary mathematical operators – * and / are done on a component basis.
Binary mathematical operators – * and / are done on a component basis.
In-place mathematical operators – * and / are done on a component basis.
In-place mathematical operators – * and / are done on a component basis.
Binary mathematical operators – * and / are done on a component basis.
In-place mathematical operators – * and / are done on a component basis.
Binary mathematical operators – * and / are done on a component basis.
Binary mathematical operators – * and / are done on a component basis.
In-place mathematical operators – * and / are done on a component basis.
In-place mathematical operators – * and / are done on a component basis.
1.8.15