UT/UT_Vector4.h File Reference

#include "UT_API.h"
#include <math.h>
#include <limits>
#include <iostream.h>
#include "UT_Assert.h"
#include "UT_Math.h"
#include <vector>
#include "UT_VectorTypes.h"
#include "UT_Vector3.h"

Go to the source code of this file.

Classes

class  UT_Vector4T< T >
 4D Vector class. More...

Functions

template<typename T , typename S >
UT_Vector4T< T > operator* (const UT_Vector4T< T > &v, const UT_Matrix4T< S > &m)
template<typename T >
UT_Vector4T< T > operator+ (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T >
UT_Vector4T< T > operator- (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T , typename S >
UT_Vector4T< T > operator+ (const UT_Vector4T< T > &v, S scalar)
template<typename T , typename S >
UT_Vector4T< T > operator- (const UT_Vector4T< T > &v, S scalar)
template<typename T , typename S >
UT_Vector4T< T > operator* (const UT_Vector4T< T > &v, S scalar)
template<typename T , typename S >
UT_Vector4T< T > operator/ (const UT_Vector4T< T > &v, S scalar)
template<typename T , typename S >
UT_Vector4T< T > operator+ (S scalar, const UT_Vector4T< T > &v)
template<typename T , typename S >
UT_Vector4T< T > operator- (S scalar, const UT_Vector4T< T > &v)
template<typename T , typename S >
UT_Vector4T< T > operator* (S scalar, const UT_Vector4T< T > &v)
template<typename T , typename S >
UT_Vector4T< T > operator/ (S scalar, const UT_Vector4T< T > &v)
template<typename T >
UT_API UT_Vector3T< T > cross (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T >
UT_API UT_Vector3T< T > cross (const UT_Vector3T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T >
UT_API UT_Vector3T< T > cross (const UT_Vector4T< T > &v1, const UT_Vector3T< T > &v2)
template<typename T >
UT_Vector3T< T > operator+ (const UT_Vector4T< T > &v1, const UT_Vector3T< T > &v2)
template<typename T >
UT_Vector3T< T > operator+ (const UT_Vector3T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T >
UT_Vector3T< T > operator- (const UT_Vector4T< T > &v1, const UT_Vector3T< T > &v2)
template<typename T >
UT_Vector3T< T > operator- (const UT_Vector3T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T >
UT_Vector4T< T > operator* (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T >
UT_Vector4T< T > operator/ (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T >
distance (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
template<typename T >
dot (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
 The dot product between two vectors.
template<typename T >
dot (const UT_Vector4T< T > &v1, const UT_Vector3T< T > &v2)
 The dot product between two vectors.
template<typename T >
dot (const UT_Vector3T< T > &v1, const UT_Vector4T< T > &v2)
 The dot product between two vectors.
template<typename T , typename S >
UT_API UT_Vector4T< T > rowVecMult (const UT_Vector4T< T > &v, const UT_Matrix4T< S > &m)
template<typename T , typename S >
UT_API UT_Vector4T< T > colVecMult (const UT_Matrix4T< S > &m, const UT_Vector4T< T > &v)
template<typename T , typename S >
UT_API UT_Vector4T< T > rowVecMult3 (const UT_Vector4T< T > &v, const UT_Matrix4T< S > &m)
template<typename T , typename S >
UT_API UT_Vector4T< T > colVecMult3 (const UT_Matrix4T< S > &m, const UT_Vector4T< T > &v)
template<typename T >
distance4 (const UT_Vector4T< T > &p1, const UT_Vector4T< T > &p2)
 Compute the distance between two points.
template<typename T >
distance3 (const UT_Vector4T< T > &p1, const UT_Vector4T< T > &p2)
 Compute the distance between two points.
template<typename T >
distance3d (const UT_Vector4T< T > &p1, const UT_Vector4T< T > &p2)
 Compute the distance between two points.
template<typename T >
distance3d (const UT_Vector3T< T > &p1, const UT_Vector4T< T > &p2)
 Compute the distance between two points.
template<typename T >
distance3d (const UT_Vector4T< T > &p1, const UT_Vector3T< T > &p2)
 Compute the distance between two points.


Function Documentation

template<typename T , typename S >
UT_API UT_Vector4T<T> colVecMult ( const UT_Matrix4T< S > &  m,
const UT_Vector4T< T > &  v 
) [inline]

Multiplication of a row or column vector by a matrix (ie. right vs. left multiplication respectively). The operator*() declared above is an alias for rowVecMult().

template<typename T , typename S >
UT_API UT_Vector4T<T> colVecMult3 ( const UT_Matrix4T< S > &  m,
const UT_Vector4T< T > &  v 
) [inline]

Multiplication of a row or column vector by a matrix (ie. right vs. left multiplication respectively). The operator*() declared above is an alias for rowVecMult().

template<typename T >
UT_API UT_Vector3T<T> cross ( const UT_Vector4T< T > &  v1,
const UT_Vector3T< T > &  v2 
) [inline]

template<typename T >
UT_API UT_Vector3T<T> cross ( const UT_Vector3T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

template<typename T >
UT_API UT_Vector3T<T> cross ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

Although the cross product is undefined for 4D vectors, we believe it's useful in practice to define a function that takes two 4D vectors and computes the cross-product of their first 3 components

template<typename T >
T distance ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

Examples:
tetprim/GU_PrimTetra.C, and tetprim/GU_PrimTetra.h.

Definition at line 694 of file UT_Vector4.h.

template<typename T >
T distance3 ( const UT_Vector4T< T > &  p1,
const UT_Vector4T< T > &  p2 
) [inline]

Compute the distance between two points.

Definition at line 703 of file UT_Vector4.h.

template<typename T >
T distance3d ( const UT_Vector4T< T > &  p1,
const UT_Vector3T< T > &  p2 
) [inline]

Compute the distance between two points.

Definition at line 135 of file UT_Vector4.h.

template<typename T >
T distance3d ( const UT_Vector3T< T > &  p1,
const UT_Vector4T< T > &  p2 
) [inline]

Compute the distance between two points.

Definition at line 132 of file UT_Vector4.h.

template<typename T >
T distance3d ( const UT_Vector4T< T > &  p1,
const UT_Vector4T< T > &  p2 
) [inline]

Compute the distance between two points.

Definition at line 129 of file UT_Vector4.h.

template<typename T >
T distance4 ( const UT_Vector4T< T > &  p1,
const UT_Vector4T< T > &  p2 
) [inline]

Compute the distance between two points.

template<typename T >
T dot ( const UT_Vector3T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

The dot product between two vectors.

Definition at line 683 of file UT_Vector4.h.

template<typename T >
T dot ( const UT_Vector4T< T > &  v1,
const UT_Vector3T< T > &  v2 
) [inline]

The dot product between two vectors.

Definition at line 678 of file UT_Vector4.h.

template<typename T >
T dot ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

The dot product between two vectors.

Definition at line 673 of file UT_Vector4.h.

template<typename T >
UT_Vector4T<T> operator* ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

Definition at line 618 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator* ( scalar,
const UT_Vector4T< T > &  v 
) [inline]

Definition at line 655 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator* ( const UT_Vector4T< T > &  v,
scalar 
) [inline]

Definition at line 650 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator* ( const UT_Vector4T< T > &  v,
const UT_Matrix4T< S > &  m 
) [inline]

Definition at line 689 of file UT_Vector4.h.

template<typename T >
UT_Vector3T<T> operator+ ( const UT_Vector3T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

Definition at line 594 of file UT_Vector4.h.

template<typename T >
UT_Vector3T<T> operator+ ( const UT_Vector4T< T > &  v1,
const UT_Vector3T< T > &  v2 
) [inline]

Definition at line 588 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator+ ( scalar,
const UT_Vector4T< T > &  v 
) [inline]

Definition at line 635 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator+ ( const UT_Vector4T< T > &  v,
scalar 
) [inline]

Definition at line 630 of file UT_Vector4.h.

template<typename T >
UT_Vector4T< T > operator+ ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

Definition at line 582 of file UT_Vector4.h.

template<typename T >
UT_Vector3T<T> operator- ( const UT_Vector3T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

Definition at line 612 of file UT_Vector4.h.

template<typename T >
UT_Vector3T<T> operator- ( const UT_Vector4T< T > &  v1,
const UT_Vector3T< T > &  v2 
) [inline]

Definition at line 606 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator- ( scalar,
const UT_Vector4T< T > &  v 
) [inline]

Definition at line 645 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator- ( const UT_Vector4T< T > &  v,
scalar 
) [inline]

Definition at line 640 of file UT_Vector4.h.

template<typename T >
UT_Vector4T< T > operator- ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

Definition at line 600 of file UT_Vector4.h.

template<typename T >
UT_Vector4T<T> operator/ ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
) [inline]

Definition at line 624 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator/ ( scalar,
const UT_Vector4T< T > &  v 
) [inline]

Definition at line 668 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > operator/ ( const UT_Vector4T< T > &  v,
scalar 
) [inline]

Definition at line 660 of file UT_Vector4.h.

template<typename T , typename S >
UT_API UT_Vector4T<T> rowVecMult ( const UT_Vector4T< T > &  v,
const UT_Matrix4T< S > &  m 
) [inline]

Multiplication of a row or column vector by a matrix (ie. right vs. left multiplication respectively). The operator*() declared above is an alias for rowVecMult().

template<typename T , typename S >
UT_API UT_Vector4T<T> rowVecMult3 ( const UT_Vector4T< T > &  v,
const UT_Matrix4T< S > &  m 
) [inline]

Multiplication of a row or column vector by a matrix (ie. right vs. left multiplication respectively). The operator*() declared above is an alias for rowVecMult().


Generated on Thu Jan 31 00:29:17 2013 for HDK by  doxygen 1.5.9