Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Vector4< T > Class Template Reference

#include <vecmath.h>

Inheritance diagram for Vector4< T >:

Inheritance graph
Collaboration diagram for Vector4< T >:

Collaboration graph
List of all members.

Public Member Functions

Vector4operator *= (T)
Vector4 operator+ () const
Vector4operator+= (const Vector4 &)
Vector4 operator- () const
Vector4operator-= (const Vector4 &)
T & operator[] (int) const
 Vector4 (T, T, T, T)
 Vector4 ()

Public Attributes

w
x
y
z

template<class T>
class Vector4< T >


Constructor & Destructor Documentation

template<class T>
Vector4< T >::Vector4  )  [inline]
 

Definition at line 481 of file vecmath.h.

00481                                       : x(0), y(0), z(0), w(0)
00482 {
00483 }

template<class T>
Vector4< T >::Vector4 ,
,
,
[inline]
 

Definition at line 485 of file vecmath.h.

00485                                                             :
00486     x(_x), y(_y), z(_z), w(_w)
00487 {
00488 }


Member Function Documentation

template<class T>
Vector4< T > & Vector4< T >::operator *=  )  [inline]
 

Definition at line 522 of file vecmath.h.

References Vector4< T >::w, Vector4< T >::x, Vector4< T >::y, and Vector4< T >::z.

00523 {
00524     x *= s; y *= s; z *= s; w *= s;
00525     return *this;
00526 }

template<class T>
Vector4< T > Vector4< T >::operator+  )  const [inline]
 

Definition at line 533 of file vecmath.h.

00534 {
00535     return *this;
00536 }

template<class T>
Vector4< T > & Vector4< T >::operator+= const Vector4< T > &   )  [inline]
 

Definition at line 510 of file vecmath.h.

References Vector4< T >::w, Vector4< T >::x, Vector4< T >::y, and Vector4< T >::z.

00511 {
00512     x += a.x; y += a.y; z += a.z; w += a.w;
00513     return *this;
00514 }

template<class T>
Vector4< T > Vector4< T >::operator-  )  const [inline]
 

Definition at line 528 of file vecmath.h.

References Vector4< T >::w, Vector4< T >::x, Vector4< T >::y, and Vector4< T >::z.

00529 {
00530     return Vector4<T>(-x, -y, -z, -w);
00531 }

template<class T>
Vector4< T > & Vector4< T >::operator-= const Vector4< T > &   )  [inline]
 

Definition at line 516 of file vecmath.h.

References Vector4< T >::w, Vector4< T >::x, Vector4< T >::y, and Vector4< T >::z.

00517 {
00518     x -= a.x; y -= a.y; z -= a.z; w -= a.w;
00519     return *this;
00520 }

template<class T>
T & Vector4< T >::operator[] int   )  const [inline]
 

Definition at line 493 of file vecmath.h.

00494 {
00495     // Not portable--I'll write a new version when I try to compile on a
00496     // platform where it bombs.
00497     return ((T*) this)[n];
00498 }


Member Data Documentation

template<class T>
T Vector4< T >::w
 

Definition at line 101 of file vecmath.h.

Referenced by operator *(), Vector4< T >::operator *=(), Vector4< T >::operator+=(), Vector4< T >::operator-(), and Vector4< T >::operator-=().

template<class T>
T Vector4< T >::x
 

Definition at line 101 of file vecmath.h.

Referenced by glAmbientLightColor(), glLightColor(), glLightDirection(), glLightPosition(), operator *(), Vector4< T >::operator *=(), Vector4< T >::operator+=(), Vector4< T >::operator-(), and Vector4< T >::operator-=().

template<class T>
T Vector4< T >::y
 

Definition at line 101 of file vecmath.h.

Referenced by operator *(), Vector4< T >::operator *=(), Vector4< T >::operator+=(), Vector4< T >::operator-(), and Vector4< T >::operator-=().

template<class T>
T Vector4< T >::z
 

Definition at line 101 of file vecmath.h.

Referenced by operator *(), Vector4< T >::operator *=(), Vector4< T >::operator+=(), Vector4< T >::operator-(), and Vector4< T >::operator-=().


The documentation for this class was generated from the following file:
Generated on Sat Jan 14 22:33:41 2006 for Celestia by  doxygen 1.4.1