Public Types | Public Member Functions | Protected Attributes
vcg::ndim::Point< N, S > Class Template Reference

#include <deprecated_point.h>

Inheritance diagram for vcg::ndim::Point< N, S >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { Dimension = N }
typedef VoidType ParamType
typedef Point< N, S > PointType
typedef S ScalarType

Public Member Functions

Max () const
 returns the biggest component
int MaxI () const
 returns the index of the biggest component
Min () const
 returns the smallest component
int MinI () const
 returns the index of the smallest component
operator% (PointType const &p) const
 a % b returns the signed area of the parallelogram inside a and b
PointTypeScale (const PointType &p)
 Per component scaling.
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
PointTypeoperator+= (PointType const &p)
PointTypeoperator-= (PointType const &p)
PointTypeoperator*= (const S s)
PointTypeoperator/= (const S s)
PointType operator- () const
Dot products (cross product "%" is defined olny for 3D points)
operator* (PointType const &p) const
 Dot product.
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

_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 ()
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

Norm () const
 Euclidean norm.
SquaredNorm () const
 Squared Euclidean norm.
PointTypeNormalize ()
 Normalization (division by norm)
PointTypeHomoNormalize ()
 Homogeneous normalization (division by W)
NormInfinity () const
 norm infinity: largest absolute value of compoenet
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 PointTypeNormalize (const PT &p)
 Normalization (division by norm), static version.

Detailed Description

template<int N, class S>
class vcg::ndim::Point< N, S >

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.


Member Typedef Documentation

template<int N, class S>
typedef VoidType vcg::ndim::Point< N, S >::ParamType

Definition at line 84 of file deprecated_point.h.

template<int N, class S>
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.

template<int N, class S>
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.


Member Enumeration Documentation

template<int N, class S>
anonymous enum
Enumerator:
Dimension 

Definition at line 86 of file deprecated_point.h.


Constructor & Destructor Documentation

template<int N, class S>
vcg::ndim::Point< N, S >::Point ( ) [inline]

Definition at line 101 of file deprecated_point.h.


Member Function Documentation

template<int N, class S>
template<int N2, class S2 >
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.

template<int N, class S>
template<int N2, class S2 >
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.

template<int N, class S>
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.

template<int N, class S>
ParamType vcg::ndim::Point< N, S >::GlobalToLocal ( PointType  ) const [inline]

Definition at line 365 of file deprecated_point.h.

template<int N, class S>
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 >.

template<int N, class S>
template<int N2, class S2 >
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.

template<int N, class S>
template<class S2 >
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.

template<int N, class S>
PointType vcg::ndim::Point< N, S >::LocalToGlobal ( ParamType  p) const [inline]

Definition at line 362 of file deprecated_point.h.

template<int N, class S>
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 >.

template<int N, class 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 >.

template<int N, class 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 >.

template<int N, class 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 >.

template<int N, class 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 >.

template<int N, class S>
template<class PT >
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 >.

template<int N, class 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 >.

template<int N, class S>
template<class PT >
static PointType& vcg::ndim::Point< N, S >::Normalize ( const PT &  p) [static]

Normalization (division by norm), static version.

Reimplemented in vcg::ndim::Point4< S >.

template<int N, class 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 >.

template<int N, class 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 >.

template<int N, class S>
bool vcg::ndim::Point< N, S >::operator!= ( PointType const &  p) const [inline]
template<int N, class S>
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

template<int N, class S>
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.

template<int N, class S>
S vcg::ndim::Point< N, S >::operator* ( PointType const &  p) const [inline]

Dot product.

template<int N, class S>
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.

template<int N, class S>
PointType vcg::ndim::Point< N, S >::operator+ ( PointType const &  p) const [inline]

Definition at line 207 of file deprecated_point.h.

template<int N, class S>
PointType& vcg::ndim::Point< N, S >::operator+= ( PointType const &  p) [inline]

Definition at line 239 of file deprecated_point.h.

template<int N, class S>
PointType vcg::ndim::Point< N, S >::operator- ( PointType const &  p) const [inline]

Definition at line 215 of file deprecated_point.h.

template<int N, class S>
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.

template<int N, class S>
PointType& vcg::ndim::Point< N, S >::operator-= ( PointType const &  p) [inline]

Definition at line 246 of file deprecated_point.h.

template<int N, class S>
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.

template<int N, class S>
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.

template<int N, class S>
bool vcg::ndim::Point< N, S >::operator< ( PointType const &  p) const [inline]
template<int N, class S>
bool vcg::ndim::Point< N, S >::operator<= ( PointType const &  p) const [inline]
template<int N, class S>
bool vcg::ndim::Point< N, S >::operator== ( PointType const &  p) const [inline]
template<int N, class S>
bool vcg::ndim::Point< N, S >::operator> ( PointType const &  p) const [inline]
template<int N, class S>
bool vcg::ndim::Point< N, S >::operator>= ( PointType const &  p) const [inline]
template<int N, class S>
S& vcg::ndim::Point< N, S >::operator[] ( const int  i) [inline]

Definition at line 155 of file deprecated_point.h.

template<int N, class S>
const S& vcg::ndim::Point< N, S >::operator[] ( const int  i) const [inline]

Definition at line 160 of file deprecated_point.h.

template<int N, class S>
PointType& vcg::ndim::Point< N, S >::Scale ( const PointType p) [inline]

Per component scaling.

template<int N, class S>
void vcg::ndim::Point< N, S >::SetZero ( ) [inline]

sets a PointType to Zero

Definition at line 201 of file deprecated_point.h.

template<int N, class S>
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 >.

template<int N, class S>
template<class PT >
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 >.

template<int N, class S>
S vcg::ndim::Point< N, S >::StableDot ( const PointType p) const [inline]

slower version, more stable (double precision only)

template<int N, class S>
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 >.

template<int N, class 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.

template<int N, class S>
const S* vcg::ndim::Point< N, S >::V ( ) const [inline]

Definition at line 176 of file deprecated_point.h.

template<int N, class S>
S* vcg::ndim::Point< N, S >::V ( ) [inline]

Definition at line 180 of file deprecated_point.h.

template<int N, class S>
S& vcg::ndim::Point< N, S >::V ( const int  i) [inline]

Definition at line 184 of file deprecated_point.h.

template<int N, class S>
const S& vcg::ndim::Point< N, S >::V ( const int  i) const [inline]

Definition at line 189 of file deprecated_point.h.

template<int N, class S>
const S& vcg::ndim::Point< N, S >::W ( ) const [inline]

W is in any case the last coordinate. (in a 2D point, W() == Y(). In a 3D point, W()==Z() in a 4D point, W() is a separate component)

Definition at line 171 of file deprecated_point.h.

template<int N, class S>
S& vcg::ndim::Point< N, S >::W ( ) [inline]

Definition at line 175 of file deprecated_point.h.

template<int N, class S>
const S& vcg::ndim::Point< N, S >::X ( ) const [inline]

Definition at line 165 of file deprecated_point.h.

template<int N, class S>
S& vcg::ndim::Point< N, S >::X ( ) [inline]

Definition at line 172 of file deprecated_point.h.

template<int N, class S>
const S& vcg::ndim::Point< N, S >::Y ( ) const [inline]

Definition at line 166 of file deprecated_point.h.

template<int N, class S>
S& vcg::ndim::Point< N, S >::Y ( ) [inline]

Definition at line 173 of file deprecated_point.h.

template<int N, class S>
const S& vcg::ndim::Point< N, S >::Z ( ) const [inline]

Definition at line 167 of file deprecated_point.h.

template<int N, class S>
S& vcg::ndim::Point< N, S >::Z ( ) [inline]

Definition at line 174 of file deprecated_point.h.


Member Data Documentation

template<int N, class S>
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.


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


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:50