Point2F

Engine/source/math/mPoint2.h

2D floating-point point.

More...

Public Attributes

Public Functions

Create uninitialized point.

Copy constructor.

Point2F(F32 _x, F32 _y)

Create point from co-ordinates.

Convolve by parameter.

Inversely convolute by parameter. (ie, divide)

bool
equal(const Point2F & compare)

Is compare within POINT_EPSILON of all of the component of this point.

Return a perpendicular vector to this one.

Interpolate from a to b, based on c.

bool

Check for zero coordinates. (No epsilon.)

len()

Get length.

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

neg()

Invert signs of co-ordinates.

Normalize vector.

Normalize, scaling by val.

rotate(F32 radians)

Rotate vector around origin.

set(F32 _x, F32 _y)

Set point's co-ordinates.

Store greater co-ordinates.

Store lesser co-ordinates.

zero()

Zero all values.

Detailed Description

2D floating-point point.

Public Attributes

F32 x 
F32 y 

Public Static Attributes

const Point2F Max 
const Point2F Min 
const Point2F One 
const Point2F Zero 

Public Functions

Point2F()

Create uninitialized point.

Point2F(const Point2F & )

Copy constructor.

Point2F(F32 _x, F32 _y)

Create point from co-ordinates.

convolve(const Point2F & )

Convolve by parameter.

convolveInverse(const Point2F & )

Inversely convolute by parameter. (ie, divide)

equal(const Point2F & compare)

Is compare within POINT_EPSILON of all of the component of this point.

getPerpendicular()

Return a perpendicular vector to this one.

The result is equivalent to rotating the vector 90 degrees clockwise around the origin.

interpolate(const Point2F & a, const Point2F & b, const F32 c)

Interpolate from a to b, based on c.

Parameters:

a

Starting point.

b

Ending point.

c

Interpolation factor (0.0 .. 1.0).

isZero()

Check for zero coordinates. (No epsilon.)

len()

Get length.

lenSquared()

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

magnitudeSafe()

neg()

Invert signs of co-ordinates.

normalize()

Normalize vector.

normalize(F32 val)

Normalize, scaling by val.

normalizeSafe()

operator const F32*()

operator F32*()

operator!=(const Point2F & )

operator*(const Point2F & )

operator*(F32 )

operator*=(const Point2F & )

operator*=(F32 )

operator+(const Point2F & )

operator+=(const Point2F & )

operator-()

operator-(const Point2F & )

operator-=(const Point2F & )

operator/(const Point2F & )

operator/(F32 )

operator/=(const Point2F & )

operator/=(F32 )

operator==(const Point2F & )

rotate(F32 radians)

Rotate vector around origin.

set(F32 _x, F32 _y)

Set point's co-ordinates.

setMax(const Point2F & )

Store greater co-ordinates.

setMin(const Point2F & )

Store lesser co-ordinates.

zero()

Zero all values.