25#ifndef __SO3_POINT_H__
26#define __SO3_POINT_H__
36template <
typename NUMERIC_TYPE>
class SPoint
63 inline explicit SPoint<NUMERIC_TYPE>(
const NUMERIC_TYPE& scaler) :
x(scaler),
y(scaler)
67 inline explicit SPoint<NUMERIC_TYPE>(
const NUMERIC_TYPE afCoordinate[2]) :
x(afCoordinate[0]),
y(afCoordinate[1])
71 inline explicit SPoint<NUMERIC_TYPE>(NUMERIC_TYPE*
const r) :
x(r[0]),
y(r[1])
90 inline NUMERIC_TYPE*
ptr()
98 inline const NUMERIC_TYPE*
ptr()
const
123 return (
x == copyPoint.
x &&
y == copyPoint.
y);
128 return (
x != copyPoint.
x ||
y != copyPoint.
y);
154 float fInv = 1.0 / fScalar;
247 assert(fScalar != 0.0);
248 float fInv = 1.0 / fScalar;
266 if(
x < rhs.
x &&
y < rhs.
y )
277 if(
x > rhs.
x &&
y > rhs.
y )
SPoint< NUMERIC_TYPE > & operator=(const SPoint< NUMERIC_TYPE > ©Point)
float operator[](const size_t &i) const
friend SPoint< NUMERIC_TYPE > operator*(const NUMERIC_TYPE &fScalar, const SPoint< NUMERIC_TYPE > ©Point)
const NUMERIC_TYPE * ptr() const
SPoint< NUMERIC_TYPE > operator-() const
static const SPoint NEGATIVE_UNIT_X
const SPoint< NUMERIC_TYPE > & operator+() const
SPoint< NUMERIC_TYPE > & operator-=(const SPoint< NUMERIC_TYPE > ©Point)
SPoint< NUMERIC_TYPE > & operator*=(const NUMERIC_TYPE &fScalar)
static const SPoint UNIT_SCALE
bool operator<(const SPoint< NUMERIC_TYPE > &rhs) const
static const SPoint UNIT_X
static const SPoint UNIT_Y
SPoint< NUMERIC_TYPE > & operator/=(const NUMERIC_TYPE &fScalar)
bool operator>(const SPoint< NUMERIC_TYPE > &rhs) const
bool operator!=(const SPoint< NUMERIC_TYPE > ©Point) const
friend SPoint< NUMERIC_TYPE > operator/(const NUMERIC_TYPE &fScalar, const SPoint< NUMERIC_TYPE > ©Point)
bool operator==(const SPoint< NUMERIC_TYPE > ©Point) const
static const SPoint NEGATIVE_UNIT_Y
SPoint< NUMERIC_TYPE > & operator+=(const SPoint< NUMERIC_TYPE > ©Point)
SPoint< double > SPointDouble
SPoint< float > SPointFloat
SPoint< long > SPointLong
SPoint< unsigned int > SPointUInt
SPoint< unsigned long > SPointULong
SPoint< unsigned short > SPointUShort
SPoint< short > SPointShort