vertex< C, N, V > Class Template Reference

#include <vertex.hpp>

Inheritance diagram for vertex< C, N, V >:
point< C, N, V > SHAPE_OFV

List of all members.

Public Types

Public Member Functions


Detailed Description

template<class C, int N, class V>
class mmx::shape::vertex< C, N, V >

Definition at line 34 of file vertex.hpp.


Member Typedef Documentation

typedef point<C,N,V> Point

Definition at line 38 of file vertex.hpp.

typedef C Scalar

Reimplemented from point< C, N, V >.

Definition at line 37 of file vertex.hpp.


Constructor & Destructor Documentation

vertex ( void   )  [inline]

Definition at line 62 of file vertex.hpp.

00062                  : Point(), m_idx(IDX), m_nf(-1)
00063 {
00064 }

vertex ( Scalar  x,
Scalar  y,
Scalar  z,
int  idx = -1 
) [inline]

Definition at line 67 of file vertex.hpp.

00067                                                   :Point(x,y,z), m_idx(IDX), m_nf(idx)
00068 {
00069 }

vertex ( const Point p  ) 
vertex ( const vertex< C, N, V > &  p  )  [inline]

Definition at line 72 of file vertex.hpp.

00072                                : Point(other), m_idx(other.index()),  m_nf(other.nface())
00073 {
00074 }


Member Function Documentation

point< C, N, V > cross ( const point< C, N, V > &  v  )  const [inline, inherited]

Definition at line 251 of file point.hpp.

References SELF.

00252 {
00253         SELF res;
00254         res.x() = (m_y * v.z()) - (m_z * v.y());
00255         res.y() = (m_z * v.x()) - (m_x * v.z());
00256         res.z() = (m_x * v.y()) - (m_y * v.x());
00257         return res;
00258 }

point< C, N, V >::Scalar dist2 ( point< C, N, V >  v2  )  const [inline, inherited]

Definition at line 273 of file point.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::insert_regular().

00274 {
00275   return (m_x - v2.x())*(m_x - v2.x())
00276     +(m_y - v2.y())*(m_y - v2.y())
00277     +(m_z - v2.z())*(m_z - v2.z());
00278 }

point< C, N, V >::Scalar dot ( point< C, N, V >  v2  )  const [inline, inherited]

Definition at line 267 of file point.hpp.

Referenced by point< C, N, V >::norm().

00268 {
00269   return (m_x * v2.x())+(m_y * v2.y())+(m_z * v2.z());
00270 }

int index (  )  const [inline]
int nface (  )  const [inline]

Definition at line 55 of file vertex.hpp.

00055 {return m_nf;}

point< C, N, V >::Scalar norm (  )  const [inline, inherited]

Definition at line 286 of file point.hpp.

References point< C, N, V >::dot(), and mmx::sqrt().

Referenced by Qsc_curve< K >::nmiddle(), Qsc_curve< K >::Qsc_curve(), and Rsc_curve< K >::Rsc_curve().

00287 {
00288   return std::sqrt( this->dot(*this) );
00289 }

bool operator!= ( const vertex< C, N, V > &  other  )  const [inline]

Reimplemented from point< C, N, V >.

Definition at line 95 of file vertex.hpp.

References point< C, N, V >::x(), point< C, N, V >::y(), and point< C, N, V >::z().

00095                                            {
00096   return ((this->x() != other.x()) || (this->y() != other.y()) || (this->z() != other.z())) ;
00097 }

point< C, N, V > operator* ( const point< C, N, V > &  v  )  const [inline, inherited]

Definition at line 240 of file point.hpp.

References SELF.

00241 {
00242         SELF res;
00243         res.x() = m_x * v.x();
00244         res.y() = m_y * v.y();
00245         res.z() = m_z * v.z();
00246         return res;
00247 }

point< C, N, V > operator* ( const Scalar k  )  const [inline, inherited]

Definition at line 214 of file point.hpp.

References SELF.

00215 {
00216         SELF res;
00217         res.x() = k * m_x;
00218         res.y() = k * m_y;
00219         res.z() = k * m_z;
00220         return res;
00221 }

point operator*= ( const point< C, N, V > &  v  )  const [inline, inherited]

Definition at line 95 of file point.hpp.

00096   {return *this*v; };

point operator*= ( const Scalar k  )  const [inline, inherited]

Definition at line 93 of file point.hpp.

00094   {return *this*k; };

point< C, N, V > operator+ ( const point< C, N, V > &  v  )  const [inline, inherited]

Definition at line 194 of file point.hpp.

References SELF.

00195 {
00196         SELF res;
00197         res.x() = m_x + v.x();
00198         res.y() = m_y + v.y();
00199         res.z() = m_z + v.z();
00200         return res;
00201 }

point operator+= ( const point< C, N, V > &  v  )  const [inline, inherited]

Definition at line 89 of file point.hpp.

00090   {return *this+v; };

point< C, N, V > operator- (  )  const [inline, inherited]

Definition at line 230 of file point.hpp.

References SELF.

00231 {
00232         SELF res;
00233         res.x() = -m_x;
00234         res.y() = -m_y;
00235         res.z() = -m_z;
00236         return res;
00237 }

point< C, N, V > operator- ( const point< C, N, V > &  v  )  const [inline, inherited]

Definition at line 204 of file point.hpp.

References SELF.

00205 {
00206         SELF res;
00207         res.x() = m_x - v.x();
00208         res.y() = m_y - v.y();
00209         res.z() = m_z - v.z();
00210         return res;
00211 }

point operator-= ( const point< C, N, V > &  v  )  const [inline, inherited]

Definition at line 91 of file point.hpp.

00092   {return *this-v; };

point operator/ ( const Scalar k  )  const [inline, inherited]

Definition at line 85 of file point.hpp.

00086   { return *this*( Scalar(1)/k); };     //Division by Scalar

vertex< C, N, V > & operator= ( const vertex< C, N, V > &  other  )  [inline]

Reimplemented from point< C, N, V >.

Definition at line 77 of file vertex.hpp.

References point< C, N, V >::x(), point< C, N, V >::y(), and point< C, N, V >::z().

00078 {
00079   if(this == &other)
00080     return *this ;
00081   
00082   this->x() = other.x() ;
00083   this->y() = other.y() ;
00084   this->z() = other.z() ;
00085   
00086   return * this ;
00087 }

bool operator== ( const vertex< C, N, V > &  other  )  const [inline]

Reimplemented from point< C, N, V >.

Definition at line 90 of file vertex.hpp.

References point< C, N, V >::x(), point< C, N, V >::y(), and point< C, N, V >::z().

00090                                            {
00091   return ((this->x() == other.x()) && (this->y() == other.y()) && (this->z() == other.z())) ;
00092 }

point< C, N, V >::Scalar & operator[] ( const int &  i  )  [inline, inherited]

Definition at line 156 of file point.hpp.

00156                                                            {
00157   switch(i) {
00158   case 0:
00159     return m_x ; 
00160     break ;
00161   case 1:
00162     return m_y ;
00163         break ;
00164   case 2:
00165     return m_z ;
00166     break ;
00167   default:
00168         break ;
00169   }
00170   
00171   return *(new Scalar(0)) ;
00172 }

point< C, N, V >::Scalar operator[] ( const int &  i  )  const [inline, inherited]

Definition at line 175 of file point.hpp.

00175                                       {
00176   switch(i) {
00177   case 0:
00178     return m_x ; 
00179     break ;
00180   case 1:
00181     return m_y ;
00182         break ;
00183   case 2:
00184     return m_z ;
00185     break ;
00186     default:
00187       break ;
00188   }
00189   
00190   return (Scalar)0 ;
00191 }

int set_index ( int  i  )  [inline]

Definition at line 53 of file vertex.hpp.

Referenced by tpl3d< C, V >::insert(), and use< vertex_def, V >::point_insertor().

00053 {m_idx=i;return m_idx;}

void setx ( Scalar  x  )  [inline, inherited]

Definition at line 73 of file point.hpp.

00073 { this->m_x = x ; }

void sety ( Scalar  y  )  [inline, inherited]

Definition at line 74 of file point.hpp.

00074 { this->m_y = y ; }

void setz ( Scalar  z  )  [inline, inherited]

Definition at line 75 of file point.hpp.

00075 { this->m_z = z ; }

typedef SHAPE_OF (  )  [inherited]
Scalar& x ( void   )  [inline, inherited]

Definition at line 64 of file point.hpp.

00064 { return m_x ; }

Scalar x ( void   )  const [inline, inherited]
Scalar& y ( void   )  [inline, inherited]

Definition at line 66 of file point.hpp.

00066 { return m_y ; }

Scalar y ( void   )  const [inline, inherited]
Scalar& z ( void   )  [inline, inherited]

Definition at line 68 of file point.hpp.

00068 { return m_z ; }

Scalar z ( void   )  const [inline, inherited]

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

Generated on 6 Dec 2012 for shape by  doxygen 1.6.1