HDK
Vec2< T > Class Template Reference

`#include <ImathForward.h>`

## Public Types

typedef T BaseType

## Public Member Functions

Toperator[] (int i)

const Toperator[] (int i) const

Vec2 ()

Vec2 (T a)

Vec2 (T a, T b)

Vec2 (const Vec2 &v)

template<class S >
Vec2 (const Vec2< S > &v)

const Vec2operator= (const Vec2 &v)

template<class S >
void setValue (S a, S b)

template<class S >
void setValue (const Vec2< S > &v)

template<class S >
void getValue (S &a, S &b) const

template<class S >
void getValue (Vec2< S > &v) const

TgetValue ()

const TgetValue () const

template<class S >
bool operator== (const Vec2< S > &v) const

template<class S >
bool operator!= (const Vec2< S > &v) const

bool equalWithAbsError (const Vec2< T > &v, T e) const

bool equalWithRelError (const Vec2< T > &v, T e) const

T dot (const Vec2 &v) const

T operator^ (const Vec2 &v) const

T cross (const Vec2 &v) const

T operator% (const Vec2 &v) const

const Vec2operator+= (const Vec2 &v)

Vec2 operator+ (const Vec2 &v) const

const Vec2operator-= (const Vec2 &v)

Vec2 operator- (const Vec2 &v) const

Vec2 operator- () const

const Vec2negate ()

const Vec2operator*= (const Vec2 &v)

const Vec2operator*= (T a)

Vec2 operator* (const Vec2 &v) const

Vec2 operator* (T a) const

const Vec2operator/= (const Vec2 &v)

const Vec2operator/= (T a)

Vec2 operator/ (const Vec2 &v) const

Vec2 operator/ (T a) const

T length () const

T length2 () const

const Vec2normalize ()

const Vec2normalizeExc ()

const Vec2normalizeNonNull ()

Vec2< Tnormalized () const

Vec2< TnormalizedExc () const

Vec2< TnormalizedNonNull () const

template<>
short length () const

template<>
const Vec2< short > & normalize ()

template<>
const Vec2< short > & normalizeExc ()

template<>
const Vec2< short > & normalizeNonNull ()

template<>
Vec2< short > normalized () const

template<>
Vec2< short > normalizedExc () const

template<>
Vec2< short > normalizedNonNull () const

template<>
int length () const

template<>
const Vec2< int > & normalize ()

template<>
const Vec2< int > & normalizeExc ()

template<>
const Vec2< int > & normalizeNonNull ()

template<>
Vec2< intnormalized () const

template<>
Vec2< intnormalizedExc () const

template<>
Vec2< intnormalizedNonNull () const

## Static Public Member Functions

static unsigned int dimensions ()

static T baseTypeMin ()

static T baseTypeMax ()

static T baseTypeSmallest ()

static T baseTypeEpsilon ()

T x

T y

## Detailed Description

### template<class T> class Vec2< T >

Definition at line 63 of file ImathForward.h.

## Member Typedef Documentation

template<class T>
 typedef T Vec2< T >::BaseType

Definition at line 259 of file ImathVec.h.

## Constructor & Destructor Documentation

template<class T >
 Vec2< T >::Vec2 ( )
inline

Definition at line 868 of file ImathVec.h.

template<class T>
 Vec2< T >::Vec2 ( T a )
inlineexplicit

Definition at line 875 of file ImathVec.h.

template<class T>
 Vec2< T >::Vec2 ( T a, T b )
inline

Definition at line 882 of file ImathVec.h.

template<class T>
 Vec2< T >::Vec2 ( const Vec2< T > & v )
inline

Definition at line 890 of file ImathVec.h.

template<class T >
template<class S >
 Vec2< T >::Vec2 ( const Vec2< S > & v )
inline

Definition at line 899 of file ImathVec.h.

## Member Function Documentation

template<class T>
 static T Vec2< T >::baseTypeEpsilon ( )
inlinestatic

Definition at line 250 of file ImathVec.h.

template<class T>
 static T Vec2< T >::baseTypeMax ( )
inlinestatic

Definition at line 248 of file ImathVec.h.

template<class T>
 static T Vec2< T >::baseTypeMin ( )
inlinestatic

Definition at line 247 of file ImathVec.h.

template<class T>
 static T Vec2< T >::baseTypeSmallest ( )
inlinestatic

Definition at line 249 of file ImathVec.h.

template<class T >
 T Vec2< T >::cross ( const Vec2< T > & v ) const
inline

Definition at line 1018 of file ImathVec.h.

template<class T>
 static unsigned int Vec2< T >::dimensions ( )
inlinestatic

Definition at line 240 of file ImathVec.h.

template<class T >
 T Vec2< T >::dot ( const Vec2< T > & v ) const
inline

Definition at line 1004 of file ImathVec.h.

template<class T>
 bool Vec2< T >::equalWithAbsError ( const Vec2< T > & v, T e ) const

Definition at line 982 of file ImathVec.h.

template<class T>
 bool Vec2< T >::equalWithRelError ( const Vec2< T > & v, T e ) const

Definition at line 993 of file ImathVec.h.

template<class T >
template<class S >
 void Vec2< T >::getValue ( S & a, S & b ) const
inline

Definition at line 935 of file ImathVec.h.

template<class T >
template<class S >
 void Vec2< T >::getValue ( Vec2< S > & v ) const
inline

Definition at line 944 of file ImathVec.h.

template<class T >
 T * Vec2< T >::getValue ( )
inline

Definition at line 952 of file ImathVec.h.

template<class T >
 const T * Vec2< T >::getValue ( ) const
inline

Definition at line 959 of file ImathVec.h.

template<class T >
 T Vec2< T >::length ( void ) const
inline

Definition at line 1172 of file ImathVec.h.

template<>
 short Vec2< short >::length ( ) const
template<>
 int Vec2< int >::length ( ) const
template<class T >
 T Vec2< T >::length2 ( ) const
inline

Definition at line 1184 of file ImathVec.h.

template<class T >
 const Vec2< T > & Vec2< T >::negate ( )
inline

Definition at line 1072 of file ImathVec.h.

template<class T >
 const Vec2< T > & Vec2< T >::normalize ( )

Definition at line 1191 of file ImathVec.h.

template<>
 const Vec2< short > & Vec2< short >::normalize ( )
template<>
 const Vec2< int > & Vec2< int >::normalize ( )
template<class T >
 Vec2< T > Vec2< T >::normalized ( ) const

Definition at line 1237 of file ImathVec.h.

template<>
 Vec2< short > Vec2< short >::normalized ( ) const
template<>
 Vec2< int > Vec2< int >::normalized ( ) const
template<class T >
 Vec2< T > Vec2< T >::normalizedExc ( ) const

Definition at line 1249 of file ImathVec.h.

template<>
 Vec2< short > Vec2< short >::normalizedExc ( ) const
template<>
 Vec2< int > Vec2< int >::normalizedExc ( ) const
template<class T >
 Vec2< T > Vec2< T >::normalizedNonNull ( ) const
inline

Definition at line 1262 of file ImathVec.h.

template<>
 Vec2< short > Vec2< short >::normalizedNonNull ( ) const
template<>
 Vec2< int > Vec2< int >::normalizedNonNull ( ) const
template<class T >
 const Vec2< T > & Vec2< T >::normalizeExc ( )

Definition at line 1212 of file ImathVec.h.

template<>
 const Vec2< short > & Vec2< short >::normalizeExc ( )
template<>
 const Vec2< int > & Vec2< int >::normalizeExc ( )
template<class T >
 const Vec2< T > & Vec2< T >::normalizeNonNull ( )
inline

Definition at line 1227 of file ImathVec.h.

template<>
 const Vec2< short > & Vec2< short >::normalizeNonNull ( )
template<>
 const Vec2< int > & Vec2< int >::normalizeNonNull ( )
template<class T >
template<class S >
 bool Vec2< T >::operator!= ( const Vec2< S > & v ) const
inline

Definition at line 975 of file ImathVec.h.

template<class T >
 T Vec2< T >::operator% ( const Vec2< T > & v ) const
inline

Definition at line 1026 of file ImathVec.h.

template<class T >
 Vec2< T > Vec2< T >::operator* ( const Vec2< T > & v ) const
inline

Definition at line 1099 of file ImathVec.h.

template<class T>
 Vec2< T > Vec2< T >::operator* ( T a ) const
inline

Definition at line 1106 of file ImathVec.h.

template<class T >
 const Vec2< T > & Vec2< T >::operator*= ( const Vec2< T > & v )
inline

Definition at line 1081 of file ImathVec.h.

template<class T>
 const Vec2< T > & Vec2< T >::operator*= ( T a )
inline

Definition at line 1090 of file ImathVec.h.

template<class T >
 Vec2< T > Vec2< T >::operator+ ( const Vec2< T > & v ) const
inline

Definition at line 1042 of file ImathVec.h.

template<class T >
 const Vec2< T > & Vec2< T >::operator+= ( const Vec2< T > & v )
inline

Definition at line 1033 of file ImathVec.h.

template<class T >
 Vec2< T > Vec2< T >::operator- ( const Vec2< T > & v ) const
inline

Definition at line 1058 of file ImathVec.h.

template<class T >
 Vec2< T > Vec2< T >::operator- ( ) const
inline

Definition at line 1065 of file ImathVec.h.

template<class T >
 const Vec2< T > & Vec2< T >::operator-= ( const Vec2< T > & v )
inline

Definition at line 1049 of file ImathVec.h.

template<class T >
 Vec2< T > Vec2< T >::operator/ ( const Vec2< T > & v ) const
inline

Definition at line 1131 of file ImathVec.h.

template<class T>
 Vec2< T > Vec2< T >::operator/ ( T a ) const
inline

Definition at line 1138 of file ImathVec.h.

template<class T >
 const Vec2< T > & Vec2< T >::operator/= ( const Vec2< T > & v )
inline

Definition at line 1113 of file ImathVec.h.

template<class T>
 const Vec2< T > & Vec2< T >::operator/= ( T a )
inline

Definition at line 1122 of file ImathVec.h.

template<class T >
 const Vec2< T > & Vec2< T >::operator= ( const Vec2< T > & v )
inline

Definition at line 907 of file ImathVec.h.

template<class T >
template<class S >
 bool Vec2< T >::operator== ( const Vec2< S > & v ) const
inline

Definition at line 967 of file ImathVec.h.

template<class T >
 T & Vec2< T >::operator[] ( int i )
inline

Definition at line 854 of file ImathVec.h.

template<class T >
 const T & Vec2< T >::operator[] ( int i ) const
inline

Definition at line 861 of file ImathVec.h.

template<class T >
 T Vec2< T >::operator^ ( const Vec2< T > & v ) const
inline

Definition at line 1011 of file ImathVec.h.

template<class T >
template<class S >
 void Vec2< T >::setValue ( S a, S b )
inline

Definition at line 917 of file ImathVec.h.

template<class T >
template<class S >
 void Vec2< T >::setValue ( const Vec2< S > & v )
inline

Definition at line 926 of file ImathVec.h.

## Member Data Documentation

template<class T>
 T Vec2< T >::x

Definition at line 77 of file ImathVec.h.

template<class T>
 T Vec2< T >::y

Definition at line 77 of file ImathVec.h.

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