Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Point2F Class Reference

2D floating-point point. More...

`#include <mPoint.h>`

## Public Member Functions
| Point2F ()
| Create uninitialized point. More...
| Point2F (const Point2F &)
| Copy constructor. More...
| Point2F (const F32 _x, const F32 _y)
| Create point from co-ordinates. More...
void | set (const F32 _x, const F32 _y)
| Set point's co-ordinates. More...
void | setMin (const Point2F &)
| Store lesser co-ordinates. More...
void | setMax (const Point2F &)
| Store greater co-ordinates. More...
void | interpolate (const Point2F &a, const Point2F &b, const F32 c)
| operator F32 * ()
| operator F32 * () const
bool | isZero () const
| Check for zero coordinates. (No epsilon.) More...
F32 | len () const
| Get length. More...
F32 | lenSquared () const
| Get squared length (one sqrt less than len()). More...
void | neg ()
| Invert signs of co-ordinates. More...
void | normalize ()
| Normalize vector. More...
void | normalize (F32 val)
| Normalize, scaling by val. More...
void | convolve (const Point2F &)
| Convolve by parameter. More...
void | convolveInverse (const Point2F &)
| Inversely convolute by parameter. (ie, divide) More...
void | round ()
bool | operator== (const Point2F &) const
bool | operator!= (const Point2F &) const
Point2F | operator+ (const Point2F &) const
Point2F | operator- (const Point2F &) const
Point2F & | operator+= (const Point2F &)
Point2F & | operator-= (const Point2F &)
Point2F | operator* (const F32) const
Point2F | operator/ (const F32) const
Point2F & | operator*= (const F32)
Point2F & | operator/= (const F32)
Point2F | operator- () const

## Public Attributes
F32 | x
F32 | y

## Static Public Attributes
static const Point2F | One
static const Point2F | Zero
static const Point2F | Min
static const Point2F | Max

## Detailed Description

2D floating-point point.

## Constructor & Destructor Documentation

Point2F | ( |  | ) |
| inline

Create uninitialized point.

Point2F | ( | const Point2F & | _copy | ) |
| inline

Copy constructor.

Point2F | ( | const F32 | _x,
|  | const F32 | _y
| ) |  |
| inline

Create point from co-ordinates.

## Member Function Documentation

void convolve | ( | const Point2F & | c | ) |
| inline

Convolve by parameter.

void convolveInverse | ( | const Point2F & | c | ) |
| inline

Inversely convolute by parameter. (ie, divide)

void interpolate | ( | const Point2F & | a,
|  | const Point2F & | b,
|  | const F32 | c
| ) |  |
| inline

Interpolate from a to b, based on c.

Parameters

  a | Starting point.
  b | Ending point.
  c | Interpolation factor (0.0 .. 1.0).

bool isZero | ( |  | ) | const
| inline

Check for zero coordinates. (No epsilon.)

F32 len | ( |  | ) | const
| inline

Get length.

F32 lenSquared | ( |  | ) | const
| inline

Get squared length (one sqrt less than len()).

void neg | ( |  | ) |
| inline

Invert signs of co-ordinates.

void normalize | ( |  | ) |
| inline

Normalize vector.

void normalize | ( | F32 | val | ) |
| inline

Normalize, scaling by val.

operator F32 * | ( |  | ) |
| inline

operator F32 * | ( |  | ) | const
| inline

bool operator!= | ( | const Point2F & | _test | ) | const
| inline

Point2F operator* | ( | const F32 | _mul | ) | const
| inline

Point2F & operator*= | ( | const F32 | _mul | ) |
| inline

Point2F operator+ | ( | const Point2F & | _add | ) | const
| inline

Point2F & operator+= | ( | const Point2F & | _add | ) |
| inline

Point2F operator- | ( | const Point2F & | _rSub | ) | const
| inline

Point2F operator- | ( |  | ) | const
| inline

Point2F & operator-= | ( | const Point2F & | _rSub | ) |
| inline

Point2F operator/ | ( | const F32 | _div | ) | const
| inline

Point2F & operator/= | ( | const F32 | _div | ) |
| inline

bool operator== | ( | const Point2F & | _test | ) | const
| inline

void round | ( |  | ) |
| inline

void set | ( | const F32 | _x,
|  | const F32 | _y
| ) |  |
| inline

Set point's co-ordinates.

void setMax | ( | const Point2F & | _test | ) |
| inline

Store greater co-ordinates.

void setMin | ( | const Point2F & | _test | ) |
| inline

Store lesser co-ordinates.

## Member Data Documentation

const Point2F Max
| static

const Point2F Min
| static

const Point2F One
| static

F32 x

F32 y

const Point2F Zero
| static

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

- math/mPoint.h
- math/mPoint.cpp