vcg::ndim::Point< N, S > Class Template Reference
[Space]

#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.

Glocal to Local and viceversa (provided for uniformity with other spatial classes. trivial for points)

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)

operator* (PointType const &p) const
 Dot product.
StableDot (const PointType &p) const
 slower version, more stable (double precision only)
Linearity for points

PointType operator* (const S s) const
PointTypeoperator*= (const S s)
PointType operator+ (PointType const &p) const
PointTypeoperator+= (PointType const &p)
PointType operator- () const
PointType operator- (PointType const &p) const
PointTypeoperator-= (PointType const &p)
PointType operator/ (const S s) const
PointTypeoperator/= (const S s)
void SetZero ()
 sets a PointType to Zero
Data Access.

access to data is done by overloading of [] or explicit naming of coords (x,y,z)

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

_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



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



PointTypeHomoNormalize ()
 Homogeneous normalization (division by W).
Norm () const
 Euclidean norm.
PointTypeNormalize ()
 Normalization (division by norm).
NormInfinity () const
 norm infinity: largest absolute value of compoenet
NormOne () const
 norm 1: sum of absolute values of components
SquaredNorm () const
 Squared Euclidean norm.
template<class PT >
static S Norm (const PT &p)
 Euclidean norm, static version.
template<class PT >
static PointTypeNormalize (const PT &p)
 Normalization (division by norm), static version.
template<class PT >
static S SquaredNorm (const PT &p)
 Squared Euclidean 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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< N-1, S2 > &  b  )  [inline, static]

constructor for homogeneus point.

Definition at line 142 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< 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>
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  p  )  const [inline]

Definition at line 361 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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 358 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.

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

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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.

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

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

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

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

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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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>
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  )  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.

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

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

Definition at line 203 of file deprecated_point.h.

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

Definition at line 235 of file deprecated_point.h.

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

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

Definition at line 211 of file deprecated_point.h.

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

Definition at line 242 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.

Definition at line 227 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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< S >.

Definition at line 256 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>
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>
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>
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 197 of file deprecated_point.h.

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

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

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::Point2< S >, vcg::ndim::Point3< S >, and vcg::ndim::Point4< 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 330 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 185 of file deprecated_point.h.

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

Definition at line 180 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 >::W (  )  [inline]

Definition at line 175 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 >::X (  )  [inline]

Definition at line 172 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 >::Y (  )  [inline]

Definition at line 173 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 >::Z (  )  [inline]

Definition at line 174 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.


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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:23:25 2013