HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_Vector4.h File Reference
#include "UT_API.h"
#include "UT_Assert.h"
#include "UT_FixedVector.h"
#include "UT_VectorTypes.h"
#include <SYS/SYS_Deprecated.h>
#include <SYS/SYS_Inline.h>
#include <SYS/SYS_Math.h>
#include <iosfwd>
#include <limits>
#include <vector>
#include "UT_Vector3.h"
+ Include dependency graph for UT_Vector4.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Macros

#define __UT_Vector4_h__
 

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_Vector4T< T > SYSmin (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
 Componentwise min and maximum. More...
 
template<typename T >
UT_Vector4T< T > SYSmax (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
 
template<typename T , typename S >
UT_Vector4T< T > SYSlerp (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2, S t)
 Componentwise linear interpolation. More...
 
template<typename T , typename S >
UT_Vector4T< T > SYSbilerp (const UT_Vector4T< T > &u0v0, const UT_Vector4T< T > &u1v0, const UT_Vector4T< T > &u0v1, const UT_Vector4T< T > &u1v1, S u, S v)
 
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 >
size_t hash_value (const UT_Vector4T< T > &val)
 
template<typename T >
UT_API size_t format (char *buffer, size_t buffer_size, const UT_Vector4T< T > &v)
 
template<typename T >
dot (const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
 The dot product between two vectors. More...
 
template<typename T >
dot (const UT_Vector4T< T > &v1, const UT_Vector3T< T > &v2)
 The dot product between two vectors. More...
 
template<typename T >
dot (const UT_Vector3T< T > &v1, const UT_Vector4T< T > &v2)
 The dot product between two vectors. More...
 
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. More...
 
template<typename T >
distance3 (const UT_Vector4T< T > &p1, const UT_Vector4T< T > &p2)
 Compute the distance between two points. More...
 
template<typename T >
distance3d (const UT_Vector4T< T > &p1, const UT_Vector4T< T > &p2)
 Compute the distance between two points. More...
 
template<typename T >
distance3d (const UT_Vector3T< T > &p1, const UT_Vector4T< T > &p2)
 Compute the distance between two points. More...
 
template<typename T >
distance3d (const UT_Vector4T< T > &p1, const UT_Vector3T< T > &p2)
 Compute the distance between two points. More...
 

Macro Definition Documentation

#define __UT_Vector4_h__

Definition at line 21 of file UT_Vector4.h.

Function Documentation

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

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 
)

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_Vector4T< T > &  v2 
)

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 >
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 >
T distance ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
)
inline
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 643 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 140 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 143 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 146 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_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
)
inline

The dot product between two vectors.

Definition at line 578 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 583 of file UT_Vector4.h.

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 588 of file UT_Vector4.h.

template<typename T >
UT_API size_t format ( char *  buffer,
size_t  buffer_size,
const UT_Vector4T< T > &  v 
)
template<typename T >
size_t hash_value ( const UT_Vector4T< T > &  val)
inline

Definition at line 652 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 629 of file UT_Vector4.h.

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

Definition at line 555 of file UT_Vector4.h.

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

Definition at line 560 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 523 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 487 of file UT_Vector4.h.

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

Definition at line 535 of file UT_Vector4.h.

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

Definition at line 540 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 493 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 499 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 505 of file UT_Vector4.h.

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

Definition at line 545 of file UT_Vector4.h.

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

Definition at line 550 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 511 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 517 of file UT_Vector4.h.

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

Definition at line 565 of file UT_Vector4.h.

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

Definition at line 573 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 529 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 
)

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 
)

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_Vector4T<T> SYSbilerp ( const UT_Vector4T< T > &  u0v0,
const UT_Vector4T< T > &  u1v0,
const UT_Vector4T< T > &  u0v1,
const UT_Vector4T< T > &  u1v1,
u,
v 
)
inline

Definition at line 99 of file UT_Vector4.h.

template<typename T , typename S >
UT_Vector4T< T > SYSlerp ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2,
t 
)
inline

Componentwise linear interpolation.

Definition at line 618 of file UT_Vector4.h.

template<typename T >
UT_Vector4T< T > SYSmax ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
)
inline

Definition at line 606 of file UT_Vector4.h.

template<typename T >
UT_Vector4T< T > SYSmin ( const UT_Vector4T< T > &  v1,
const UT_Vector4T< T > &  v2 
)
inline

Componentwise min and maximum.

Definition at line 594 of file UT_Vector4.h.