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
Point2D Class Reference

`#include <mPoint.h>`

## Public Member Functions
| Point2D ()
| Create uninitialized point. More...
| Point2D (const Point2D &)
| Copy constructor. More...
| Point2D (const F64 _x, const F64 _y)
| Create point from coordinates. More...
void | set (const F64 _x, const F64 _y)
| Set point's coordinates. More...
void | setMin (const Point2D &)
| Store lesser co-ordinates. More...
void | setMax (const Point2D &)
| Store greater co-ordinates. More...
void | interpolate (const Point2D &a, const Point2D &b, const F64 c)
| operator F64 * ()
| operator F64 * () const
bool | isZero () const
F64 | len () const
F64 | lenSquared () const
void | neg ()
void | normalize ()
void | normalize (F64 val)
void | convolve (const Point2D &)
void | convolveInverse (const Point2D &)
bool | operator== (const Point2D &) const
bool | operator!= (const Point2D &) const
Point2D | operator+ (const Point2D &) const
Point2D | operator- (const Point2D &) const
Point2D & | operator+= (const Point2D &)
Point2D & | operator-= (const Point2D &)
Point2D | operator* (const F64) const
Point2D | operator/ (const F64) const
Point2D & | operator*= (const F64)
Point2D & | operator/= (const F64)
Point2D | operator- () const

## Public Attributes
F64 | x
| X co-ordinate. More...
F64 | y
| Y co-ordinate. More...

## Static Public Attributes
static const Point2D | One
static const Point2D | Zero

## Detailed Description

2D high-precision point.

Uses F64 internally.

## Constructor & Destructor Documentation

Point2D | ( |  | ) |
| inline

Create uninitialized point.

Point2D | ( | const Point2D & | _copy | ) |
| inline

Copy constructor.

Point2D | ( | const F64 | _x,
|  | const F64 | _y
| ) |  |
| inline

Create point from coordinates.

## Member Function Documentation

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

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

void interpolate | ( | const Point2D & | a,
|  | const Point2D & | b,
|  | const F64 | 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

F64 len | ( |  | ) | const
| inline

F64 lenSquared | ( |  | ) | const
| inline

void neg | ( |  | ) |
| inline

void normalize | ( |  | ) |
| inline

void normalize | ( | F64 | val | ) |
| inline

operator F64 * | ( |  | ) |
| inline

operator F64 * | ( |  | ) | const
| inline

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

Point2D operator* | ( | const F64 | _mul | ) | const
| inline

Point2D & operator*= | ( | const F64 | _mul | ) |
| inline

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

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

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

Point2D operator- | ( |  | ) | const
| inline

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

Point2D operator/ | ( | const F64 | _div | ) | const
| inline

Point2D & operator/= | ( | const F64 | _div | ) |
| inline

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

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

Set point's coordinates.

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

Store greater co-ordinates.

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

Store lesser co-ordinates.

## Member Data Documentation

const Point2D One
| static

F64 x

X co-ordinate.

F64 y

Y co-ordinate.

const Point2D Zero
| static

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

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