#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. | |
ParamType | GlobalToLocal (PointType p) const |
PointType | LocalToGlobal (ParamType p) const |
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 |
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) | |
Linearity for points | |
PointType | operator* (const S s) const |
PointType & | operator*= (const S s) |
PointType | operator+ (PointType const &p) const |
PointType & | operator+= (PointType const &p) |
PointType | operator- () const |
PointType | operator- (PointType const &p) const |
PointType & | operator-= (PointType const &p) |
PointType | operator/ (const S s) const |
PointType & | operator/= (const S s) |
void | SetZero () |
sets a PointType to Zero | |
Data Access. | |
const S & | operator[] (const int i) const |
S & | operator[] (const int i) |
const S & | V (const int i) const |
S & | V (const int i) |
const S * | V () const |
S & | W () |
const S & | W () const |
S & | X () |
const S & | X () const |
S & | Y () |
const S & | Y () const |
S & | Z () |
const S & | Z () 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 | |
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 | |
Point () | |
template<int N2, class S2 > | |
static PointType | Construct (const Point< N-1, S2 > &b) |
constructor for homogeneus point. | |
template<int N2, class S2 > | |
static PointType | Construct (const Point< N2, S2 > &b) |
constructor for points with different scalar type and-or dimensionality | |
Norms | |
| |
PointType & | HomoNormalize () |
Homogeneous normalization (division by W). | |
S | Norm () const |
Euclidean norm. | |
PointType & | Normalize () |
Normalization (division by norm). | |
S | NormInfinity () const |
norm infinity: largest absolute value of compoenet | |
S | NormOne () const |
norm 1: sum of absolute values of components | |
S | SquaredNorm () const |
Squared Euclidean norm. | |
template<class PT > | |
static S | Norm (const PT &p) |
Euclidean norm, static version. | |
template<class PT > | |
static PointType & | Normalize (const PT &p) |
Normalization (division by norm), static version. | |
template<class PT > | |
static S | SquaredNorm (const PT &p) |
Squared Euclidean 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
Definition at line 85 of file deprecated_point.h.
typedef S vcg::ndim::Point< N, S >::ScalarType |
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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< N-1, S2 > & | b | ) | [inline, static] |
constructor for homogeneus point.
Definition at line 142 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.
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 | p | ) | const [inline] |
Definition at line 361 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::HomoNormalize | ( | ) | [inline] |
Homogeneous normalization (division by W).
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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 358 of file deprecated_point.h.
S vcg::ndim::Point< N, S >::Max | ( | ) | const [inline] |
returns the biggest component
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
int vcg::ndim::Point< N, S >::MaxI | ( | ) | const [inline] |
returns the index of the biggest component
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
S vcg::ndim::Point< N, S >::Min | ( | ) | const [inline] |
returns the smallest component
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
int vcg::ndim::Point< N, S >::MinI | ( | ) | const [inline] |
returns the index of the smallest component
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
static S vcg::ndim::Point< N, S >::Norm | ( | const PT & | p | ) | [inline, static] |
Euclidean norm, static version.
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
S vcg::ndim::Point< N, S >::Norm | ( | ) | const [inline] |
Euclidean norm.
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
static PointType& vcg::ndim::Point< N, S >::Normalize | ( | const PT & | p | ) | [inline, static] |
Normalization (division by norm), static version.
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
PointType& vcg::ndim::Point< N, S >::Normalize | ( | ) | [inline] |
Normalization (division by norm).
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
S vcg::ndim::Point< N, S >::NormInfinity | ( | ) | const [inline] |
norm infinity: largest absolute value of compoenet
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
S vcg::ndim::Point< N, S >::NormOne | ( | ) | const [inline] |
norm 1: sum of absolute values of components
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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
S vcg::ndim::Point< N, S >::operator* | ( | PointType const & | p | ) | const [inline] |
Dot product.
PointType vcg::ndim::Point< N, S >::operator* | ( | const S | s | ) | const [inline] |
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
Definition at line 219 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::operator*= | ( | const S | s | ) | [inline] |
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
Definition at line 249 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::operator+ | ( | PointType const & | p | ) | const [inline] |
Definition at line 203 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::operator+= | ( | PointType const & | p | ) | [inline] |
Definition at line 235 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::operator- | ( | ) | const [inline] |
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
Definition at line 263 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::operator- | ( | PointType const & | p | ) | const [inline] |
Definition at line 211 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::operator-= | ( | PointType const & | p | ) | [inline] |
Definition at line 242 of file deprecated_point.h.
PointType vcg::ndim::Point< N, S >::operator/ | ( | const S | s | ) | const [inline] |
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
Definition at line 227 of file deprecated_point.h.
PointType& vcg::ndim::Point< N, S >::operator/= | ( | const S | s | ) | [inline] |
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
Definition at line 256 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] |
const S& vcg::ndim::Point< N, S >::operator[] | ( | const int | i | ) | const [inline] |
Definition at line 160 of file deprecated_point.h.
S& vcg::ndim::Point< N, S >::operator[] | ( | const int | i | ) | [inline] |
Definition at line 155 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 197 of file deprecated_point.h.
static S vcg::ndim::Point< N, S >::SquaredNorm | ( | const PT & | p | ) | [inline, static] |
Squared Euclidean norm, static version.
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
S vcg::ndim::Point< N, S >::SquaredNorm | ( | ) | const [inline] |
Squared Euclidean norm.
Reimplemented in vcg::ndim::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.
void vcg::ndim::Point< N, S >::ToPolar | ( | S & | ro, | |
S & | tetha, | |||
S & | fi | |||
) | const [inline] |
Convert to polar coordinates.
Definition at line 330 of file deprecated_point.h.
const S& vcg::ndim::Point< N, S >::V | ( | const int | i | ) | const [inline] |
Definition at line 185 of file deprecated_point.h.
S& vcg::ndim::Point< N, S >::V | ( | const int | i | ) | [inline] |
Definition at line 180 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 >::W | ( | ) | [inline] |
Definition at line 175 of file deprecated_point.h.
const S& vcg::ndim::Point< N, S >::W | ( | ) | const [inline] |
S& vcg::ndim::Point< N, S >::X | ( | ) | [inline] |
Definition at line 172 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 >::Y | ( | ) | [inline] |
Definition at line 173 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 >::Z | ( | ) | [inline] |
Definition at line 174 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 >::_v[N] [protected] |
The only data member. Hidden to user.
Definition at line 91 of file deprecated_point.h.