CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
mathSSE::Vec2< T > Union Template Reference

#include <SSEVec.h>

Public Member Functions

template<int N>
Vec2 get1 () const
 
Toperator[] (unsigned int n)
 
T operator[] (unsigned int n) const
 
void set (T f1, T f2)
 
 Vec2 ()
 
 Vec2 (T f1, T f2)
 
 Vec2 (T f1)
 
template<typename U >
 Vec2 (Vec2< U > v)
 
 Vec2 (Vec4< T > v4)
 

Public Attributes

T arr [2]
 

Detailed Description

template<typename T>
union mathSSE::Vec2< T >

Definition at line 124 of file SSEVec.h.

Constructor & Destructor Documentation

◆ Vec2() [1/5]

template<typename T>
mathSSE::Vec2< T >::Vec2 ( )
inline

Definition at line 125 of file SSEVec.h.

Referenced by mathSSE::Vec2< float >::get1().

125  {
126  arr[0] = 0;
127  arr[1] = 0;
128  }
T arr[2]
Definition: SSEVec.h:166

◆ Vec2() [2/5]

template<typename T>
mathSSE::Vec2< T >::Vec2 ( T  f1,
T  f2 
)
inline

Definition at line 129 of file SSEVec.h.

129  {
130  arr[0] = f1;
131  arr[1] = f2;
132  }
T arr[2]
Definition: SSEVec.h:166

◆ Vec2() [3/5]

template<typename T>
mathSSE::Vec2< T >::Vec2 ( T  f1)
inlineexplicit

Definition at line 133 of file SSEVec.h.

133  {
134  arr[0] = f1;
135  arr[1] = f1;
136  }
T arr[2]
Definition: SSEVec.h:166

◆ Vec2() [4/5]

template<typename T>
template<typename U >
mathSSE::Vec2< T >::Vec2 ( Vec2< U >  v)
inline

Definition at line 155 of file SSEVec.h.

155  {
156  arr[0] = v[0];
157  arr[1] = v[1];
158  }
T arr[2]
Definition: SSEVec.h:166

◆ Vec2() [5/5]

template<typename T>
mathSSE::Vec2< T >::Vec2 ( Vec4< T v4)
inline

Definition at line 214 of file SSEVec.h.

214  {
215  arr[0] = v4[0];
216  arr[1] = v4[1];
217  }
T arr[2]
Definition: SSEVec.h:166

Member Function Documentation

◆ get1()

template<typename T>
template<int N>
Vec2 mathSSE::Vec2< T >::get1 ( ) const
inline

Definition at line 144 of file SSEVec.h.

144  {
145  return Vec2(arr[N], arr[N]);
146  }
T arr[2]
Definition: SSEVec.h:166
#define N
Definition: blowfish.cc:9

◆ operator[]() [1/2]

template<typename T>
T& mathSSE::Vec2< T >::operator[] ( unsigned int  n)
inline

Definition at line 162 of file SSEVec.h.

162 { return arr[n]; }
T arr[2]
Definition: SSEVec.h:166

◆ operator[]() [2/2]

template<typename T>
T mathSSE::Vec2< T >::operator[] ( unsigned int  n) const
inline

Definition at line 164 of file SSEVec.h.

164 { return arr[n]; }
T arr[2]
Definition: SSEVec.h:166

◆ set()

template<typename T>
void mathSSE::Vec2< T >::set ( T  f1,
T  f2 
)
inline

Definition at line 138 of file SSEVec.h.

138  {
139  arr[0] = f1;
140  arr[1] = f2;
141  }
T arr[2]
Definition: SSEVec.h:166

Member Data Documentation

◆ arr

template<typename T>
T mathSSE::Vec2< T >::arr[2]