# Imath::Vec2< T > Class Template Reference

`#include <ImathVec.h>`

List of all members.

## Public Types

typedef T BaseType

## Public Member Functions

T & operator[] (int i)
const T & operator[] (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
T * getValue ()
const T * getValue () 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
dot (const Vec2 &v) const
operator^ (const Vec2 &v) const
cross (const Vec2 &v) const
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
length () const
length2 () const
const Vec2normalize ()
const Vec2normalizeExc () throw (Iex::MathExc)
const Vec2normalizeNonNull ()
Vec2< T > normalized () const
Vec2< T > normalizedExc () const throw (Iex::MathExc)
Vec2< T > normalizedNonNull () const
template<>
short length () const
template<>
const Vec2< short > & normalize ()
template<>
const Vec2< short > & normalizeExc () throw(Iex::MathExc)
template<>
const Vec2< short > & normalizeNonNull ()
template<>
Vec2< short > normalized () const
template<>
Vec2< short > normalizedExc () const throw(Iex::MathExc)
template<>
Vec2< short > normalizedNonNull () const
template<>
int length () const
template<>
const Vec2< int > & normalize ()
template<>
const Vec2< int > & normalizeExc () throw(Iex::MathExc)
template<>
const Vec2< int > & normalizeNonNull ()
template<>
Vec2< int > normalized () const
template<>
Vec2< int > normalizedExc () const throw(Iex::MathExc)
template<>
Vec2< int > normalizedNonNull () const

## Static Public Member Functions

static unsigned int dimensions ()
static T baseTypeMin ()
static T baseTypeMax ()
static T baseTypeSmallest ()
static T baseTypeEpsilon ()

x
y

## Detailed Description

### template<class T> class Imath::Vec2< T >

Definition at line 68 of file ImathVec.h.

## Member Typedef Documentation

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

Definition at line 258 of file ImathVec.h.

## Constructor & Destructor Documentation

template<class T >
 Imath::Vec2< T >::Vec2 ( ) ` [inline]`

Definition at line 867 of file ImathVec.h.

template<class T >
 Imath::Vec2< T >::Vec2 ( T a ) ` [inline, explicit]`

Definition at line 874 of file ImathVec.h.

template<class T >
 Imath::Vec2< T >::Vec2 ( T a, T b ) ` [inline]`

Definition at line 881 of file ImathVec.h.

template<class T >
 Imath::Vec2< T >::Vec2 ( const Vec2< T > & v ) ` [inline]`

Definition at line 889 of file ImathVec.h.

template<class T >
template<class S >
 Imath::Vec2< T >::Vec2 ( const Vec2< S > & v ) ` [inline]`

Definition at line 898 of file ImathVec.h.

## Member Function Documentation

template<class T>
 static T Imath::Vec2< T >::baseTypeEpsilon ( ) ` [inline, static]`

Definition at line 249 of file ImathVec.h.

template<class T>
 static T Imath::Vec2< T >::baseTypeMax ( ) ` [inline, static]`

Definition at line 247 of file ImathVec.h.

template<class T>
 static T Imath::Vec2< T >::baseTypeMin ( ) ` [inline, static]`

Definition at line 246 of file ImathVec.h.

template<class T>
 static T Imath::Vec2< T >::baseTypeSmallest ( ) ` [inline, static]`

Definition at line 248 of file ImathVec.h.

template<class T >
 T Imath::Vec2< T >::cross ( const Vec2< T > & v ) const` [inline]`

Definition at line 1017 of file ImathVec.h.

template<class T>
 static unsigned int Imath::Vec2< T >::dimensions ( ) ` [inline, static]`

Definition at line 239 of file ImathVec.h.

template<class T >
 T Imath::Vec2< T >::dot ( const Vec2< T > & v ) const` [inline]`

Definition at line 1003 of file ImathVec.h.

template<class T >
 bool Imath::Vec2< T >::equalWithAbsError ( const Vec2< T > & v, T e ) const` [inline]`

Definition at line 981 of file ImathVec.h.

template<class T >
 bool Imath::Vec2< T >::equalWithRelError ( const Vec2< T > & v, T e ) const` [inline]`

Definition at line 992 of file ImathVec.h.

template<class T >
 const T * Imath::Vec2< T >::getValue ( ) const` [inline]`

Definition at line 958 of file ImathVec.h.

template<class T >
 T * Imath::Vec2< T >::getValue ( ) ` [inline]`

Definition at line 951 of file ImathVec.h.

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

Definition at line 943 of file ImathVec.h.

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

Definition at line 934 of file ImathVec.h.

template<>
 int Imath::Vec2< int >::length ( ) const` [inline]`

template<>
 short Imath::Vec2< short >::length ( ) const` [inline]`

template<class T >
 T Imath::Vec2< T >::length ( ) const` [inline]`

Definition at line 1171 of file ImathVec.h.

template<class T >
 T Imath::Vec2< T >::length2 ( ) const` [inline]`

Definition at line 1183 of file ImathVec.h.

template<class T >
 const Vec2< T > & Imath::Vec2< T >::negate ( ) ` [inline]`

Definition at line 1071 of file ImathVec.h.

template<>
 const Vec2< int > & Imath::Vec2< int >::normalize ( ) ` [inline]`

template<>
 const Vec2< short > & Imath::Vec2< short >::normalize ( ) ` [inline]`

template<class T >
 const Vec2< T > & Imath::Vec2< T >::normalize ( ) ` [inline]`

Definition at line 1190 of file ImathVec.h.

template<>
 Vec2< int > Imath::Vec2< int >::normalized ( ) const` [inline]`

template<>
 Vec2< short > Imath::Vec2< short >::normalized ( ) const` [inline]`

template<class T >
 Vec2< T > Imath::Vec2< T >::normalized ( ) const` [inline]`

Definition at line 1236 of file ImathVec.h.

template<>
 Vec2< int > Imath::Vec2< int >::normalizedExc ( ) const throw(Iex::MathExc)` [inline]`

template<>
 Vec2< short > Imath::Vec2< short >::normalizedExc ( ) const throw(Iex::MathExc)` [inline]`

template<class T >
 Vec2< T > Imath::Vec2< T >::normalizedExc ( ) const throw (Iex::MathExc)` [inline]`

Definition at line 1248 of file ImathVec.h.

template<>
 Vec2< int > Imath::Vec2< int >::normalizedNonNull ( ) const` [inline]`

template<>
 Vec2< short > Imath::Vec2< short >::normalizedNonNull ( ) const` [inline]`

template<class T >
 Vec2< T > Imath::Vec2< T >::normalizedNonNull ( ) const` [inline]`

Definition at line 1261 of file ImathVec.h.

template<>
 const Vec2< int > & Imath::Vec2< int >::normalizeExc ( ) throw(Iex::MathExc)` [inline]`

template<>
 const Vec2< short > & Imath::Vec2< short >::normalizeExc ( ) throw(Iex::MathExc)` [inline]`

template<class T >
 const Vec2< T > & Imath::Vec2< T >::normalizeExc ( ) throw (Iex::MathExc)` [inline]`

Definition at line 1211 of file ImathVec.h.

template<>
 const Vec2< int > & Imath::Vec2< int >::normalizeNonNull ( ) ` [inline]`

template<>
 const Vec2< short > & Imath::Vec2< short >::normalizeNonNull ( ) ` [inline]`

template<class T >
 const Vec2< T > & Imath::Vec2< T >::normalizeNonNull ( ) ` [inline]`

Definition at line 1226 of file ImathVec.h.

template<class T >
template<class S >
 bool Imath::Vec2< T >::operator!= ( const Vec2< S > & v ) const` [inline]`

Definition at line 974 of file ImathVec.h.

template<class T >
 T Imath::Vec2< T >::operator% ( const Vec2< T > & v ) const` [inline]`

Definition at line 1025 of file ImathVec.h.

template<class T >
 Vec2< T > Imath::Vec2< T >::operator* ( T a ) const` [inline]`

Definition at line 1105 of file ImathVec.h.

template<class T >
 Vec2< T > Imath::Vec2< T >::operator* ( const Vec2< T > & v ) const` [inline]`

Definition at line 1098 of file ImathVec.h.

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

Definition at line 1089 of file ImathVec.h.

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

Definition at line 1080 of file ImathVec.h.

template<class T >
 Vec2< T > Imath::Vec2< T >::operator+ ( const Vec2< T > & v ) const` [inline]`

Definition at line 1041 of file ImathVec.h.

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

Definition at line 1032 of file ImathVec.h.

template<class T >
 Vec2< T > Imath::Vec2< T >::operator- ( ) const` [inline]`

Definition at line 1064 of file ImathVec.h.

template<class T >
 Vec2< T > Imath::Vec2< T >::operator- ( const Vec2< T > & v ) const` [inline]`

Definition at line 1057 of file ImathVec.h.

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

Definition at line 1048 of file ImathVec.h.

template<class T >
 Vec2< T > Imath::Vec2< T >::operator/ ( T a ) const` [inline]`

Definition at line 1137 of file ImathVec.h.

template<class T >
 Vec2< T > Imath::Vec2< T >::operator/ ( const Vec2< T > & v ) const` [inline]`

Definition at line 1130 of file ImathVec.h.

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

Definition at line 1121 of file ImathVec.h.

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

Definition at line 1112 of file ImathVec.h.

template<class T >
 const Vec2< T > & Imath::Vec2< T >::operator= ( const Vec2< T > & v ) ` [inline]`

Definition at line 906 of file ImathVec.h.

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

Definition at line 966 of file ImathVec.h.

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

Definition at line 860 of file ImathVec.h.

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

Definition at line 853 of file ImathVec.h.

template<class T >
 T Imath::Vec2< T >::operator^ ( const Vec2< T > & v ) const` [inline]`

Definition at line 1010 of file ImathVec.h.

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

Definition at line 925 of file ImathVec.h.

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

Definition at line 916 of file ImathVec.h.

## Member Data Documentation

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

Definition at line 76 of file ImathVec.h.

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

Definition at line 76 of file ImathVec.h.

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

Generated on Thu Jan 31 00:34:41 2013 for HDK by  1.5.9