Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Public Attributes | List of all members
Point2I Class Reference

#include <mPoint.h>

Public Member Functions

 Point2I ()
 Create an uninitialized point. More...
 
 Point2I (const Point2I &)
 Copy constructor. More...
 
 Point2I (const S32 in_x, const S32 in_y)
 Create point from two co-ordinates. More...
 
void set (const S32 in_x, const S32 in_y)
 Set (x,y) position. More...
 
void setMin (const Point2I &)
 Store lesser co-ordinates from parameter in this point. More...
 
void setMax (const Point2I &)
 Store greater co-ordinates from parameter in this point. More...
 
void neg ()
 Invert sign of point's co-ordinates. More...
 
void convolve (const Point2I &)
 Convolve this point by parameter. More...
 
bool isZero () const
 Is this point at the origin? (No epsilon used) More...
 
F32 len () const
 Get the length of the point. More...
 
bool operator== (const Point2I &) const
 
bool operator!= (const Point2I &) const
 
Point2I operator+ (const Point2I &) const
 
Point2I operator- (const Point2I &) const
 
Point2Ioperator+= (const Point2I &)
 
Point2Ioperator-= (const Point2I &)
 
Point2I operator* (const S32) const
 
Point2Ioperator*= (const S32)
 
Point2I operator/ (const S32) const
 
Point2Ioperator/= (const S32)
 
Point2I operator- () const
 

Public Attributes

S32 x
 X position. More...
 
S32 y
 Y position. More...
 

Detailed Description

2D integer point

Uses S32 internally.

Constructor & Destructor Documentation

Point2I ( )
inline

Create an uninitialized point.

Point2I ( const Point2I _copy)
inline

Copy constructor.

Point2I ( const S32  in_x,
const S32  in_y 
)
inline

Create point from two co-ordinates.

Member Function Documentation

void convolve ( const Point2I c)
inline

Convolve this point by parameter.

bool isZero ( ) const
inline

Is this point at the origin? (No epsilon used)

F32 len ( ) const
inline

Get the length of the point.

void neg ( )
inline

Invert sign of point's co-ordinates.

bool operator!= ( const Point2I _test) const
inline
Point2I operator* ( const S32  mul) const
inline
Point2I & operator*= ( const S32  mul)
inline
Point2I operator+ ( const Point2I _add) const
inline
Point2I & operator+= ( const Point2I _add)
inline
Point2I operator- ( const Point2I _rSub) const
inline
Point2I operator- ( ) const
inline
Point2I & operator-= ( const Point2I _rSub)
inline
Point2I operator/ ( const S32  div) const
inline
Point2I & operator/= ( const S32  div)
inline
bool operator== ( const Point2I _test) const
inline
void set ( const S32  in_x,
const S32  in_y 
)
inline

Set (x,y) position.

void setMax ( const Point2I _test)
inline

Store greater co-ordinates from parameter in this point.

void setMin ( const Point2I _test)
inline

Store lesser co-ordinates from parameter in this point.

Member Data Documentation

S32 x

X position.

S32 y

Y position.


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