SyFi
0.3
|
#include <Ptv.h>
Public Member Functions | |
Ptv (unsigned int size_) | |
Ptv (unsigned int size_, double *v_) | |
Ptv (double x, double y) | |
Ptv (double x, double y, double z) | |
Ptv (const Ptv &p) | |
Ptv () | |
void | redim (unsigned int size_, double *v_) |
void | redim (unsigned int size_) |
void | fill (double *v_) |
virtual | ~Ptv () |
const unsigned int | size () const |
const double & | operator[] (unsigned int i) const |
double & | operator[] (unsigned int i) |
Ptv & | operator= (const Ptv &p) |
bool | less (const Ptv &p) const |
Public Attributes | |
unsigned int | dim |
double * | v |
Static Public Attributes | |
static double | tol = 1.0e-9 |
Ptv::Ptv | ( | unsigned int | size_ | ) |
Ptv::Ptv | ( | unsigned int | size_, |
double * | v_ | ||
) |
Ptv::Ptv | ( | double | x, |
double | y | ||
) |
Ptv::Ptv | ( | double | x, |
double | y, | ||
double | z | ||
) |
Ptv::~Ptv | ( | ) | [virtual] |
void Ptv::fill | ( | double * | v_ | ) |
Definition at line 179 of file Ptv.cpp.
References dim, size(), tol, and v.
Referenced by SyFi::line_contains(), and Ptv_is_less::operator()().
{ if ( dim < p.size() ) return true ; if ( dim > p.size() ) return false; /* for (int i=dim-1; i>= 0; i--) { if ( fabs(v[i] - p[i]) > tol ) { if (v[i] < p[i]) return true; else return false; } } */ for (int i=dim-1; i>= 0; i--) { if ( v[i] + tol >= p[i] - tol && v[i] - tol <= p[i] + tol ) { } else if (v[i] + tol < p[i] - tol ) { return true; } else if ( v[i] - tol > p[i] + tol ) { return false; } } return false; }
const double & Ptv::operator[] | ( | unsigned int | i | ) | const |
double & Ptv::operator[] | ( | unsigned int | i | ) |
void Ptv::redim | ( | unsigned int | size_, |
double * | v_ | ||
) |
Definition at line 106 of file Ptv.cpp.
Referenced by SyFi::add(), SyFi::cross(), and SyFi::sub().
void Ptv::redim | ( | unsigned int | size_ | ) |
const unsigned int Ptv::size | ( | ) | const |
Definition at line 146 of file Ptv.cpp.
References dim.
Referenced by SyFi::add(), SyFi::contains2D(), SyFi::cross(), SyFi::is_equal(), less(), SyFi::mul(), SyFi::norm(), SyFi::normalize(), operator<<(), operator=(), Ptv(), and SyFi::sub().
{ return dim;}
unsigned int Ptv::dim |
double Ptv::tol = 1.0e-9 [static] |
Definition at line 30 of file Ptv.h.
Referenced by SyFi::is_equal(), SyFi::is_inside_triangle(), less(), SyFi::line_contains(), and SyFi::set_tolerance().
double* Ptv::v |
Definition at line 29 of file Ptv.h.
Referenced by fill(), less(), operator=(), operator[](), Ptv(), redim(), and ~Ptv().