FTGL: FTPoint Class Reference

FTGL 2.4.0

Public Member Functions | Friends
FTPoint Class Reference

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

`#include <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.
FTPoint & | operator+= (const FTPoint &point)
| Operator += In Place Addition.
FTPoint | operator+ (const FTPoint &point) const
| Operator +.
FTPoint & | operator-= (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.

## Detailed Description

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

Definition at line 42 of file FTPoint.h.

## Constructor & Destructor Documentation

## ◆ FTPoint() [1/3]

FTPoint::FTPoint | ( |  | ) |
| inline

Default constructor.

Point is set to zero.

Definition at line 48 of file FTPoint.h.

Referenced by FTBBox::Invalidate(), Normalise(), operator!=, operator*(), operator*, operator*, operator+(), operator+=(), operator-(), operator-=(), operator==, and operator^().

## ◆ FTPoint() [2/3]

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() [3/3]

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

## ◆ Normalise()

FTPoint FTPoint::Normalise | ( |  | ) |

Normalise a point's coordinates.

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

Returns
  A vector of norm one.

References FTPoint().

## ◆ operator const FTGL_DOUBLE *()

FTPoint::operator const FTGL_DOUBLE * | ( |  | ) | const
| inline

Cast to FTGL_DOUBLE*.

Definition at line 240 of file FTPoint.h.

## ◆ operator*()

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 FTPoint().

## ◆ operator+()

FTPoint FTPoint::operator+ | ( | const FTPoint & | point | ) | const
| inline

Operator +.

Parameters

  point |

Returns
  this plus point.

Definition at line 112 of file FTPoint.h.

References FTPoint().

## ◆ operator+=()

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 FTPoint().

## ◆ operator-()

FTPoint FTPoint::operator- | ( | const FTPoint & | point | ) | const
| inline

Operator -.

Parameters

  point |

Returns
  this minus point.

Definition at line 143 of file FTPoint.h.

References FTPoint().

## ◆ operator-=()

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 FTPoint().

## ◆ operator^()

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 FTPoint().

## ◆ X() [1/2]

FTGL_DOUBLE FTPoint::X | ( |  | ) | const
| inline

Getters.

Definition at line 257 of file FTPoint.h.

## ◆ X() [2/2]

void FTPoint::X | ( | FTGL_DOUBLE | x | ) |
| inline

Setters.

Definition at line 249 of file FTPoint.h.

Referenced by FTBBox::operator|=().

## ◆ Xf()

FTGL_FLOAT FTPoint::Xf | ( |  | ) | const
| inline

Definition at line 260 of file FTPoint.h.

Referenced by FTFont::BBox(), and FTFont::BBox().

## ◆ Y() [1/2]

FTGL_DOUBLE FTPoint::Y | ( |  | ) | const
| inline

Definition at line 258 of file FTPoint.h.

## ◆ Y() [2/2]

void FTPoint::Y | ( | FTGL_DOUBLE | y | ) |
| inline

Definition at line 250 of file FTPoint.h.

Referenced by FTBBox::operator|=().

## ◆ Yf()

FTGL_FLOAT FTPoint::Yf | ( |  | ) | const
| inline

Definition at line 261 of file FTPoint.h.

Referenced by FTFont::BBox(), and FTFont::BBox().

## ◆ Z() [1/2]

FTGL_DOUBLE FTPoint::Z | ( |  | ) | const
| inline

Definition at line 259 of file FTPoint.h.

## ◆ Z() [2/2]

void FTPoint::Z | ( | FTGL_DOUBLE | z | ) |
| inline

Definition at line 251 of file FTPoint.h.

Referenced by FTBBox::operator|=().

## ◆ Zf()

FTGL_FLOAT FTPoint::Zf | ( |  | ) | const
| inline

Definition at line 262 of file FTPoint.h.

Referenced by FTFont::BBox(), and FTFont::BBox().

## Friends And Related Symbol Documentation

## ◆ operator!=

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

References FTPoint().

## ◆ operator* [1/2]

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.

References FTPoint().

## ◆ operator* [2/2]

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.

References FTPoint().

## ◆ operator==

bool operator== | ( | const FTPoint & | a,
|  | const FTPoint & | b )
| friend

Operator == Tests for equality.

Parameters

  a |
  b |

Returns
  true if a & b are equal

References FTPoint().

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

- FTPoint.h