#include <deprecated_point.h>
Public Types | |
enum | { Dimension = N } |
typedef VoidType | ParamType |
typedef Point< N, S > | PointType |
typedef S | ScalarType |
Public Member Functions | |
S | Max () const |
returns the biggest component | |
int | MaxI () const |
returns the index of the biggest component | |
S | Min () const |
returns the smallest component | |
int | MinI () const |
returns the index of the smallest component | |
S | operator% (PointType const &p) const |
a % b returns the signed area of the parallelogram inside a and b | |
PointType & | Scale (const PointType &p) |
Per component scaling. | |
S | Sum () const |
the sum of the components | |
void | ToPolar (S &ro, S &tetha, S &fi) const |
Convert to polar coordinates. | |
Data Access. | |
access to data is done by overloading of [] or explicit naming of coords (x,y,z) | |
S & | operator[] (const int i) |
const S & | operator[] (const int i) const |
const S & | X () const |
const S & | Y () const |
const S & | Z () const |
const S & | W () const |
S & | X () |
S & | Y () |
S & | Z () |
S & | W () |
const S * | V () const |
S * | V () |
S & | V (const int i) |
const S & | V (const int i) const |
Linearity for points | |
void | SetZero () |
sets a PointType to Zero | |
PointType | operator+ (PointType const &p) const |
PointType | operator- (PointType const &p) const |
PointType | operator* (const S s) const |
PointType | operator/ (const S s) const |
PointType & | operator+= (PointType const &p) |
PointType & | operator-= (PointType const &p) |
PointType & | operator*= (const S s) |
PointType & | operator/= (const S s) |
PointType | operator- () const |
Dot products (cross product "%" is defined olny for 3D points) | |
S | operator* (PointType const &p) const |
Dot product. | |
S | StableDot (const PointType &p) const |
slower version, more stable (double precision only) | |
Comparison Operators. | |
bool | operator== (PointType const &p) const |
bool | operator!= (PointType const &p) const |
bool | operator< (PointType const &p) const |
bool | operator> (PointType const &p) const |
bool | operator<= (PointType const &p) const |
bool | operator>= (PointType const &p) const |
Glocal to Local and viceversa (provided for uniformity with other spatial classes. trivial for points) | |
PointType | LocalToGlobal (ParamType p) const |
ParamType | GlobalToLocal (PointType) const |
Protected Attributes | |
S | _v [N] |
The only data member. Hidden to user. | |
Standard Constructors and Initializers | |
No casting operators have been introduced to avoid automatic unattended (and costly) conversion between different PointType types | |
Point () | |
S | Ext (const int i) const |
template<int N2, class S2 > | |
void | Import (const Point< N2, S2 > &b) |
importer for points with different scalar type and-or dimensionality | |
template<class S2 > | |
void | ImportHomo (const Point< N-1, S2 > &b) |
importer for homogeneous points | |
template<int N2, class S2 > | |
static PointType | Construct (const Point< N2, S2 > &b) |
constructor for points with different scalar type and-or dimensionality | |
template<int N2, class S2 > | |
static PointType | Construct (const Point< N-1, S2 > &b) |
constructor for homogeneus point. | |
Norms | |
S | Norm () const |
Euclidean norm. | |
S | SquaredNorm () const |
Squared Euclidean norm. | |
PointType & | Normalize () |
Normalization (division by norm) | |
PointType & | HomoNormalize () |
Homogeneous normalization (division by W) | |
S | NormInfinity () const |
norm infinity: largest absolute value of compoenet | |
S | NormOne () const |
norm 1: sum of absolute values of components | |
template<class PT > | |
static S | Norm (const PT &p) |
Euclidean norm, static version. | |
template<class PT > | |
static S | SquaredNorm (const PT &p) |
Squared Euclidean norm, static version. | |
template<class PT > | |
static PointType & | Normalize (const PT &p) |
Normalization (division by norm), static version. |
The templated class for representing a point in R^N space. The class is templated over the ScalarType class that is used to represent coordinates. PointBase provides the interface and the common operators for points of any dimensionality.
Definition at line 80 of file deprecated_point.h.
typedef VoidType vcg::ndim::Point< N, S >::ParamType |
Definition at line 84 of file deprecated_point.h.
typedef Point<N,S> vcg::ndim::Point< N, S >::PointType |
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
Definition at line 85 of file deprecated_point.h.
typedef S vcg::ndim::Point< N, S >::ScalarType |
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
Definition at line 83 of file deprecated_point.h.
anonymous enum |
Definition at line 86 of file deprecated_point.h.
vcg::ndim::Point< N, S >::Point | ( | ) | [inline] |
Definition at line 101 of file deprecated_point.h.
static PointType vcg::ndim::Point< N, S >::Construct | ( | const Point< N2, S2 > & | b | ) | [inline, static] |
constructor for points with different scalar type and-or dimensionality
Definition at line 124 of file deprecated_point.h.
static PointType vcg::ndim::Point< N, S >::Construct | ( | const Point< N-1, S2 > & | b | ) | [inline, static] |
constructor for homogeneus point.
Definition at line 142 of file deprecated_point.h.
S vcg::ndim::Point< N, S >::Ext | ( | const int | i | ) | const [inline] |
Padding function: give a default 0 value to all the elements that are not in the [0..2] range. Useful for managing in a consistent way object that could have point2 / point3 / point4
Definition at line 106 of file deprecated_point.h.
ParamType vcg::ndim::Point< N, S >::GlobalToLocal | ( | PointType | ) | const [inline] |
Definition at line 365 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::HomoNormalize | ( | ) | [inline] |
Homogeneous normalization (division by W)
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
void vcg::ndim::Point< N, S >::Import | ( | const Point< N2, S2 > & | b | ) | [inline] |
importer for points with different scalar type and-or dimensionality
Definition at line 114 of file deprecated_point.h.
void vcg::ndim::Point< N, S >::ImportHomo | ( | const Point< N-1, S2 > & | b | ) | [inline] |
importer for homogeneous points
Definition at line 132 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::LocalToGlobal | ( | ParamType | p | ) | const [inline] |
Definition at line 362 of file deprecated_point.h.
S vcg::ndim::Point< N, S >::Max | ( | ) | const [inline] |
returns the biggest component
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
int vcg::ndim::Point< N, S >::MaxI | ( | ) | const [inline] |
returns the index of the biggest component
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
S vcg::ndim::Point< N, S >::Min | ( | ) | const [inline] |
returns the smallest component
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
int vcg::ndim::Point< N, S >::MinI | ( | ) | const [inline] |
returns the index of the smallest component
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
S vcg::ndim::Point< N, S >::Norm | ( | ) | const [inline] |
Euclidean norm.
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
static S vcg::ndim::Point< N, S >::Norm | ( | const PT & | p | ) | [static] |
Euclidean norm, static version.
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
PointType& vcg::ndim::Point< N, S >::Normalize | ( | ) | [inline] |
Normalization (division by norm)
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
static PointType& vcg::ndim::Point< N, S >::Normalize | ( | const PT & | p | ) | [static] |
Normalization (division by norm), static version.
Reimplemented in vcg::ndim::Point4< S >.
S vcg::ndim::Point< N, S >::NormInfinity | ( | ) | const [inline] |
norm infinity: largest absolute value of compoenet
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
S vcg::ndim::Point< N, S >::NormOne | ( | ) | const [inline] |
norm 1: sum of absolute values of components
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
bool vcg::ndim::Point< N, S >::operator!= | ( | PointType const & | p | ) | const [inline] |
S vcg::ndim::Point< N, S >::operator% | ( | PointType const & | p | ) | const [inline] |
a % b returns the signed area of the parallelogram inside a and b
Signed area operator
PointType vcg::ndim::Point< N, S >::operator* | ( | const S | s | ) | const [inline] |
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
Definition at line 223 of file deprecated_point.h.
S vcg::ndim::Point< N, S >::operator* | ( | PointType const & | p | ) | const [inline] |
Dot product.
PointType& vcg::ndim::Point< N, S >::operator*= | ( | const S | s | ) | [inline] |
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
Definition at line 253 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::operator+ | ( | PointType const & | p | ) | const [inline] |
Definition at line 207 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::operator+= | ( | PointType const & | p | ) | [inline] |
Definition at line 239 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::operator- | ( | PointType const & | p | ) | const [inline] |
Definition at line 215 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::operator- | ( | ) | const [inline] |
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
Definition at line 267 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::operator-= | ( | PointType const & | p | ) | [inline] |
Definition at line 246 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::operator/ | ( | const S | s | ) | const [inline] |
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
Definition at line 231 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::operator/= | ( | const S | s | ) | [inline] |
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
Definition at line 260 of file deprecated_point.h.
bool vcg::ndim::Point< N, S >::operator< | ( | PointType const & | p | ) | const [inline] |
bool vcg::ndim::Point< N, S >::operator<= | ( | PointType const & | p | ) | const [inline] |
bool vcg::ndim::Point< N, S >::operator== | ( | PointType const & | p | ) | const [inline] |
bool vcg::ndim::Point< N, S >::operator> | ( | PointType const & | p | ) | const [inline] |
bool vcg::ndim::Point< N, S >::operator>= | ( | PointType const & | p | ) | const [inline] |
S& vcg::ndim::Point< N, S >::operator[] | ( | const int | i | ) | [inline] |
Definition at line 155 of file deprecated_point.h.
const S& vcg::ndim::Point< N, S >::operator[] | ( | const int | i | ) | const [inline] |
Definition at line 160 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::Scale | ( | const PointType & | p | ) | [inline] |
Per component scaling.
void vcg::ndim::Point< N, S >::SetZero | ( | ) | [inline] |
sets a PointType to Zero
Definition at line 201 of file deprecated_point.h.
S vcg::ndim::Point< N, S >::SquaredNorm | ( | ) | const [inline] |
Squared Euclidean norm.
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
static S vcg::ndim::Point< N, S >::SquaredNorm | ( | const PT & | p | ) | [static] |
Squared Euclidean norm, static version.
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
S vcg::ndim::Point< N, S >::StableDot | ( | const PointType & | p | ) | const [inline] |
slower version, more stable (double precision only)
S vcg::ndim::Point< N, S >::Sum | ( | ) | const [inline] |
the sum of the components
Reimplemented in vcg::ndim::Point4< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point2< S >.
void vcg::ndim::Point< N, S >::ToPolar | ( | S & | ro, |
S & | tetha, | ||
S & | fi | ||
) | const [inline] |
Convert to polar coordinates.
Definition at line 334 of file deprecated_point.h.
const S* vcg::ndim::Point< N, S >::V | ( | ) | const [inline] |
Definition at line 176 of file deprecated_point.h.
S* vcg::ndim::Point< N, S >::V | ( | ) | [inline] |
Definition at line 180 of file deprecated_point.h.
S& vcg::ndim::Point< N, S >::V | ( | const int | i | ) | [inline] |
Definition at line 184 of file deprecated_point.h.
const S& vcg::ndim::Point< N, S >::V | ( | const int | i | ) | const [inline] |
Definition at line 189 of file deprecated_point.h.
const S& vcg::ndim::Point< N, S >::W | ( | ) | const [inline] |
S& vcg::ndim::Point< N, S >::W | ( | ) | [inline] |
Definition at line 175 of file deprecated_point.h.
const S& vcg::ndim::Point< N, S >::X | ( | ) | const [inline] |
Definition at line 165 of file deprecated_point.h.
S& vcg::ndim::Point< N, S >::X | ( | ) | [inline] |
Definition at line 172 of file deprecated_point.h.
const S& vcg::ndim::Point< N, S >::Y | ( | ) | const [inline] |
Definition at line 166 of file deprecated_point.h.
S& vcg::ndim::Point< N, S >::Y | ( | ) | [inline] |
Definition at line 173 of file deprecated_point.h.
const S& vcg::ndim::Point< N, S >::Z | ( | ) | const [inline] |
Definition at line 167 of file deprecated_point.h.
S& vcg::ndim::Point< N, S >::Z | ( | ) | [inline] |
Definition at line 174 of file deprecated_point.h.
S vcg::ndim::Point< N, S >::_v[N] [protected] |
The only data member. Hidden to user.
Definition at line 91 of file deprecated_point.h.