FTPoint Class Reference

#include <FTPoint.h>


Detailed Description

FTPoint class is a basic 3-dimensional point or vector.

Definition at line 42 of file FTPoint.h.


Public Member Functions

 FTPoint ()
 Default constructor.
 FTPoint (const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z=0)
 Constructor.
 FTPoint (const FT_Vector &ft_vector)
 Constructor.
FTPoint Normalise ()
 Normalise a point's coordinates.
FTPointoperator+= (const FTPoint &point)
 Operator += In Place Addition.
FTPoint operator+ (const FTPoint &point) const
 Operator +.
FTPointoperator-= (const FTPoint &point)
 Operator -= In Place Substraction.
FTPoint operator- (const FTPoint &point) const
 Operator -.
FTPoint operator* (double multiplier) const
 Operator * Scalar multiplication.
FTPoint operator^ (const FTPoint &point)
 Operator ^ Vector product.
 operator const FTGL_DOUBLE * () const
 Cast to FTGL_DOUBLE*.
void X (FTGL_DOUBLE x)
 Setters.
void Y (FTGL_DOUBLE y)
void Z (FTGL_DOUBLE z)
FTGL_DOUBLE X () const
 Getters.
FTGL_DOUBLE Y () const
FTGL_DOUBLE Z () const
FTGL_FLOAT Xf () const
FTGL_FLOAT Yf () const
FTGL_FLOAT Zf () const

Friends

FTPoint operator* (double multiplier, FTPoint &point)
 Operator * Scalar multiplication.
double operator* (FTPoint &a, FTPoint &b)
 Operator * Scalar product.
bool operator== (const FTPoint &a, const FTPoint &b)
 Operator == Tests for equality.
bool operator!= (const FTPoint &a, const FTPoint &b)
 Operator != Tests for non equality.

Constructor & Destructor Documentation

FTPoint::FTPoint (  )  [inline]

Default constructor.

Point is set to zero.

Definition at line 48 of file FTPoint.h.

FTPoint::FTPoint ( const FTGL_DOUBLE  x,
const FTGL_DOUBLE  y,
const FTGL_DOUBLE  z = 0 
) [inline]

Constructor.

Z coordinate is set to zero if unspecified.

Parameters:
x First component
y Second component
z Third component

Definition at line 62 of file FTPoint.h.

FTPoint::FTPoint ( const FT_Vector &  ft_vector  )  [inline]

Constructor.

This converts an FT_Vector to an FTPoint

Parameters:
ft_vector A freetype vector

Definition at line 75 of file FTPoint.h.


Member Function Documentation

FTPoint FTPoint::Normalise (  ) 

Normalise a point's coordinates.

If the coordinates are zero, the point is left untouched.

Returns:
A vector of norm one.

FTPoint& FTPoint::operator+= ( const FTPoint point  )  [inline]

Operator += In Place Addition.

Parameters:
point 
Returns:
this plus point.

Definition at line 97 of file FTPoint.h.

References values.

FTPoint FTPoint::operator+ ( const FTPoint point  )  const [inline]

Operator +.

Parameters:
point 
Returns:
this plus point.

Definition at line 112 of file FTPoint.h.

References values.

FTPoint& FTPoint::operator-= ( const FTPoint point  )  [inline]

Operator -= In Place Substraction.

Parameters:
point 
Returns:
this minus point.

Definition at line 128 of file FTPoint.h.

References values.

FTPoint FTPoint::operator- ( const FTPoint point  )  const [inline]

Operator -.

Parameters:
point 
Returns:
this minus point.

Definition at line 143 of file FTPoint.h.

References values.

FTPoint FTPoint::operator* ( double  multiplier  )  const [inline]

Operator * Scalar multiplication.

Parameters:
multiplier 
Returns:
this multiplied by multiplier.

Definition at line 159 of file FTPoint.h.

References values.

FTPoint FTPoint::operator^ ( const FTPoint point  )  [inline]

Operator ^ Vector product.

Parameters:
point Second point
Returns:
this vector point.

Definition at line 204 of file FTPoint.h.

References values.

FTPoint::operator const FTGL_DOUBLE * (  )  const [inline]

Cast to FTGL_DOUBLE*.

Definition at line 240 of file FTPoint.h.

void FTPoint::X ( FTGL_DOUBLE  x  )  [inline]

Setters.

Definition at line 249 of file FTPoint.h.

Referenced by FTBBox::operator|=().

void FTPoint::Y ( FTGL_DOUBLE  y  )  [inline]

Definition at line 250 of file FTPoint.h.

Referenced by FTBBox::operator|=().

void FTPoint::Z ( FTGL_DOUBLE  z  )  [inline]

Definition at line 251 of file FTPoint.h.

Referenced by FTBBox::operator|=().

FTGL_DOUBLE FTPoint::X (  )  const [inline]

Getters.

Definition at line 257 of file FTPoint.h.

FTGL_DOUBLE FTPoint::Y (  )  const [inline]

Definition at line 258 of file FTPoint.h.

FTGL_DOUBLE FTPoint::Z (  )  const [inline]

Definition at line 259 of file FTPoint.h.

FTGL_FLOAT FTPoint::Xf (  )  const [inline]

Definition at line 260 of file FTPoint.h.

Referenced by FTFont::BBox().

FTGL_FLOAT FTPoint::Yf (  )  const [inline]

Definition at line 261 of file FTPoint.h.

Referenced by FTFont::BBox().

FTGL_FLOAT FTPoint::Zf (  )  const [inline]

Definition at line 262 of file FTPoint.h.

Referenced by FTFont::BBox().


Friends And Related Function Documentation

FTPoint operator* ( double  multiplier,
FTPoint point 
) [friend]

Operator * Scalar multiplication.

Parameters:
point 
multiplier 
Returns:
multiplier multiplied by point.

Definition at line 177 of file FTPoint.h.

double operator* ( FTPoint a,
FTPoint b 
) [friend]

Operator * Scalar product.

Parameters:
a First vector.
b Second vector.
Returns:
a.b scalar product.

Definition at line 190 of file FTPoint.h.

bool operator== ( const FTPoint a,
const FTPoint b 
) [friend]

Operator == Tests for equality.

Parameters:
a 
b 
Returns:
true if a & b are equal

bool operator!= ( const FTPoint a,
const FTPoint b 
) [friend]

Operator != Tests for non equality.

Parameters:
a 
b 
Returns:
true if a & b are not equal


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

Generated on Thu Jun 12 14:45:04 2008 for FTGL by  doxygen 1.5.6