#include <deprecated_point2.h>
Public Types | |
enum | { Dimension = 2 } |
typedef P2ScalarType | ScalarType |
the scalar type | |
Public Member Functions | |
ScalarType | Angle () const |
returns the angle with X axis (radiants, in [-PI, +PI] ) | |
Point2 & | Cartesian2Polar () |
transform the point in cartesian coords into polar coords | |
ScalarType | Distance (Point2 const &p) const |
returns the distance to another point p | |
ScalarType | dot (const Point2 &p) const |
ScalarType | Ext (const int i) const |
template<class T > | |
void | Import (const Point2< T > &b) |
imports from 2D points of different types | |
ScalarType | Norm (void) const |
returns the norm (Euclidian) | |
Point2 & | Normalize (void) |
normalizes, and returns itself as result | |
bool | operator!= (Point2 const &p) const |
disparity between points | |
ScalarType | operator* (Point2 const &p) const |
dot product | |
bool | operator< (Point2 const &p) const |
lexical ordering | |
bool | operator<= (Point2 const &p) const |
lexical ordering | |
Point2 & | operator= (Point2 const &p) |
copy | |
bool | operator== (Point2 const &p) const |
points equality | |
bool | operator> (Point2 const &p) const |
lexical ordering | |
bool | operator>= (Point2 const &p) const |
lexical ordering | |
ScalarType | operator^ (Point2 const &p) const |
cross product | |
Point2 (Point2 const &p) | |
copy constructor | |
Point2 (const ScalarType nx, const ScalarType ny) | |
x,y constructor | |
Point2 () | |
empty constructor (does nothing) | |
Point2 & | Polar2Cartesian () |
transform the point in polar coords into cartesian coords | |
Point2 & | Rotate (const ScalarType rad) |
rotates the point of an angle (radiants, counterclockwise) | |
Point2 & | Scale (const ScalarType sx, const ScalarType sy) |
void | SetZero () |
sets the point to (0,0) | |
ScalarType | SquaredDistance (Point2 const &p) const |
returns the suqared distance to another point p | |
ScalarType | SquaredNorm (void) const |
returns the squared norm (Euclidian) | |
Linearity for 2d points (operators +, -, *, /, *= ...) | |
Point2 | operator* (const ScalarType s) const |
Point2 & | operator*= (const ScalarType s) |
Point2 | operator+ (Point2 const &p) const |
Point2 & | operator+= (Point2 const &p) |
Point2 | operator- (Point2 const &p) const |
Point2 & | operator-= (Point2 const &p) |
Point2 | operator/ (const ScalarType s) const |
Point2 & | operator/= (const ScalarType s) |
Access to Coords. | |
ScalarType & | operator[] (const int i) |
const ScalarType & | operator[] (const int i) const |
const ScalarType & | V (const int i) const |
ScalarType & | V (const int i) |
ScalarType * | V () |
const ScalarType * | V () const |
ScalarType & | X () |
const ScalarType & | X () const |
ScalarType & | Y () |
const ScalarType & | Y () const |
Static Public Member Functions | |
template<class T > | |
static Point2 | Construct (const Point2< T > &b) |
constructs a 2D points from an existing one of different type | |
Protected Attributes | |
P2ScalarType | _v [2] |
The only data member. Hidden to user. |
The templated class for representing a point in 2D space. The class is templated over the ScalarType class that is used to represent coordinates. All the usual operator overloading (* + - ...) is present.
Definition at line 73 of file deprecated_point2.h.
typedef P2ScalarType vcg::Point2< P2ScalarType >::ScalarType |
the scalar type
Definition at line 80 of file deprecated_point2.h.
anonymous enum |
Definition at line 81 of file deprecated_point2.h.
vcg::Point2< P2ScalarType >::Point2 | ( | ) | [inline] |
empty constructor (does nothing)
Definition at line 122 of file deprecated_point2.h.
vcg::Point2< P2ScalarType >::Point2 | ( | const ScalarType | nx, | |
const ScalarType | ny | |||
) | [inline] |
x,y constructor
Definition at line 124 of file deprecated_point2.h.
vcg::Point2< P2ScalarType >::Point2 | ( | Point2< P2ScalarType > const & | p | ) | [inline] |
copy constructor
Definition at line 129 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::Angle | ( | ) | const [inline] |
returns the angle with X axis (radiants, in [-PI, +PI] )
Definition at line 260 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::Cartesian2Polar | ( | ) | [inline] |
transform the point in cartesian coords into polar coords
Definition at line 264 of file deprecated_point2.h.
static Point2 vcg::Point2< P2ScalarType >::Construct | ( | const Point2< T > & | b | ) | [inline, static] |
constructs a 2D points from an existing one of different type
Definition at line 307 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::Distance | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
returns the distance to another point p
Definition at line 250 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::dot | ( | const Point2< P2ScalarType > & | p | ) | const [inline] |
Definition at line 147 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::Ext | ( | const int | i | ) | const [inline] |
Questa funzione estende il vettore ad un qualsiasi numero di dimensioni paddando gli elementi estesi con zeri
Definition at line 294 of file deprecated_point2.h.
void vcg::Point2< P2ScalarType >::Import | ( | const Point2< T > & | b | ) | [inline] |
imports from 2D points of different types
Definition at line 301 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::Norm | ( | void | ) | const [inline] |
returns the norm (Euclidian)
Definition at line 193 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::Normalize | ( | void | ) | [inline] |
normalizes, and returns itself as result
Definition at line 209 of file deprecated_point2.h.
bool vcg::Point2< P2ScalarType >::operator!= | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
disparity between points
Definition at line 221 of file deprecated_point2.h.
Point2 vcg::Point2< P2ScalarType >::operator* | ( | const ScalarType | s | ) | const [inline] |
Definition at line 163 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::operator* | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
dot product
Definition at line 143 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::operator*= | ( | const ScalarType | s | ) | [inline] |
Definition at line 181 of file deprecated_point2.h.
Point2 vcg::Point2< P2ScalarType >::operator+ | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
Definition at line 155 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::operator+= | ( | Point2< P2ScalarType > const & | p | ) | [inline] |
Definition at line 171 of file deprecated_point2.h.
Point2 vcg::Point2< P2ScalarType >::operator- | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
Definition at line 159 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::operator-= | ( | Point2< P2ScalarType > const & | p | ) | [inline] |
Definition at line 176 of file deprecated_point2.h.
Point2 vcg::Point2< P2ScalarType >::operator/ | ( | const ScalarType | s | ) | const [inline] |
Definition at line 167 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::operator/= | ( | const ScalarType | s | ) | [inline] |
Definition at line 186 of file deprecated_point2.h.
bool vcg::Point2< P2ScalarType >::operator< | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
lexical ordering
Definition at line 226 of file deprecated_point2.h.
bool vcg::Point2< P2ScalarType >::operator<= | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
lexical ordering
Definition at line 238 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::operator= | ( | Point2< P2ScalarType > const & | p | ) | [inline] |
copy
Definition at line 134 of file deprecated_point2.h.
bool vcg::Point2< P2ScalarType >::operator== | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
points equality
Definition at line 216 of file deprecated_point2.h.
bool vcg::Point2< P2ScalarType >::operator> | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
lexical ordering
Definition at line 232 of file deprecated_point2.h.
bool vcg::Point2< P2ScalarType >::operator>= | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
lexical ordering
Definition at line 244 of file deprecated_point2.h.
ScalarType& vcg::Point2< P2ScalarType >::operator[] | ( | const int | i | ) | [inline] |
Definition at line 115 of file deprecated_point2.h.
const ScalarType& vcg::Point2< P2ScalarType >::operator[] | ( | const int | i | ) | const [inline] |
Definition at line 110 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::operator^ | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
cross product
Definition at line 149 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::Polar2Cartesian | ( | ) | [inline] |
transform the point in polar coords into cartesian coords
Definition at line 272 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::Rotate | ( | const ScalarType | rad | ) | [inline] |
rotates the point of an angle (radiants, counterclockwise)
Definition at line 280 of file deprecated_point2.h.
Point2& vcg::Point2< P2ScalarType >::Scale | ( | const ScalarType | sx, | |
const ScalarType | sy | |||
) | [inline] |
Definition at line 202 of file deprecated_point2.h.
void vcg::Point2< P2ScalarType >::SetZero | ( | ) | [inline] |
sets the point to (0,0)
Definition at line 140 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::SquaredDistance | ( | Point2< P2ScalarType > const & | p | ) | const [inline] |
returns the suqared distance to another point p
Definition at line 255 of file deprecated_point2.h.
ScalarType vcg::Point2< P2ScalarType >::SquaredNorm | ( | void | ) | const [inline] |
returns the squared norm (Euclidian)
Definition at line 198 of file deprecated_point2.h.
const ScalarType& vcg::Point2< P2ScalarType >::V | ( | const int | i | ) | const [inline] |
Definition at line 105 of file deprecated_point2.h.
ScalarType& vcg::Point2< P2ScalarType >::V | ( | const int | i | ) | [inline] |
Definition at line 100 of file deprecated_point2.h.
ScalarType* vcg::Point2< P2ScalarType >::V | ( | ) | [inline] |
Definition at line 96 of file deprecated_point2.h.
const ScalarType* vcg::Point2< P2ScalarType >::V | ( | ) | const [inline] |
Definition at line 92 of file deprecated_point2.h.
ScalarType& vcg::Point2< P2ScalarType >::X | ( | ) | [inline] |
Definition at line 90 of file deprecated_point2.h.
const ScalarType& vcg::Point2< P2ScalarType >::X | ( | ) | const [inline] |
Definition at line 88 of file deprecated_point2.h.
ScalarType& vcg::Point2< P2ScalarType >::Y | ( | ) | [inline] |
Definition at line 91 of file deprecated_point2.h.
const ScalarType& vcg::Point2< P2ScalarType >::Y | ( | ) | const [inline] |
Definition at line 89 of file deprecated_point2.h.
P2ScalarType vcg::Point2< P2ScalarType >::_v[2] [protected] |
The only data member. Hidden to user.
Definition at line 77 of file deprecated_point2.h.