Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

gul::point2 Class Template Reference

#include <gul_types.h>

Inheritance diagram for gul::point2::

gunu::is_uv_point List of all members.

Public Methods

weight () const
 point2 ()
template<class T2>  point2 (const T2 &ax, const T2 &ay)
template<class T2> point2< T > & operator= (const point2< T2 > &a)
point2< T > & operator+= (const point2< T > &a)
point2< T > & operator-= (const point2< T > &a)
point2< T > & operator *= (T &a)
const T & operator[] (size_t i) const
 operator vec4 () const

Static Public Methods

int dim ()
bool hom ()

Public Attributes

x
y

template<class T>
class gul::point2< T >


Constructor & Destructor Documentation

template<class T>
gul::point2< T >::point2   [inline]
 

template<class T>
template<class T2>
gul::point2< T >::point2 const T2 &    ax,
const T2 &    ay
[inline]
 


Member Function Documentation

template<class T>
int gul::point2< T >::dim   [inline, static]
 

Definition at line 818 of file gul_types.h.

00818 { return 2; }

template<class T>
bool gul::point2< T >::hom   [inline, static]
 

Definition at line 819 of file gul_types.h.

00819 { return false; }

template<class T>
point2<T>& gul::point2< T >::operator *= T &    a [inline]
 

Definition at line 845 of file gul_types.h.

References x, and y.

00846   {
00847     x *= a; y *= a;
00848     return *this;
00849   }

template<class T>
gul::point2< T >::operator vec4   const [inline]
 

Definition at line 852 of file gul_types.h.

References x, and y.

00853   {
00854     vec4<T> v;
00855     v[0] = x; v[1] = y; v[2] = 0; v[3] = 1;
00856     return v;
00857   }

template<class T>
point2<T>& gul::point2< T >::operator+= const point2< T > &    a [inline]
 

Definition at line 835 of file gul_types.h.

References x, and y.

00836   {
00837     x += a.x; y += a.y;
00838     return *this;
00839   }

template<class T>
point2<T>& gul::point2< T >::operator-= const point2< T > &    a [inline]
 

Definition at line 840 of file gul_types.h.

References x, and y.

00841   {
00842     x -= a.x; y -= a.y;
00843     return *this;
00844   }

template<class T>
template<class T2>
point2<T>& gul::point2< T >::operator= const point2< T2 > &    a [inline]
 

Definition at line 829 of file gul_types.h.

References x, and y.

00830   { 
00831     x = (T)a.x;
00832     y = (T)a.y; 
00833     return *this;
00834   }

template<class T>
const T& gul::point2< T >::operator[] size_t    i const [inline]
 

Definition at line 850 of file gul_types.h.

References x.

00850 { return (&x)[i]; }

template<class T>
T gul::point2< T >::weight   const [inline]
 

Definition at line 820 of file gul_types.h.

References x, and y.

00820 { return rtr<T>::one(); }


Member Data Documentation

template<class T>
T gul::point2::x
 

Definition at line 816 of file gul_types.h.

Referenced by gugr::DumpPS::dump_point(), operator *=(), operator vec4(), operator+=(), operator-=(), operator=(), operator[](), and weight().

template<class T>
T gul::point2::y
 

Definition at line 817 of file gul_types.h.

Referenced by gugr::DumpPS::dump_point(), operator *=(), operator vec4(), operator+=(), operator-=(), operator=(), and weight().


The documentation for this class was generated from the following file:
Generated on Mon Jan 21 04:18:00 2002 for GUL 0.6 - Geometry Utility Library by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001