Ptv_tools.h

Go to the documentation of this file.
00001 // Copyright (C) 2006-2009 Kent-Andre Mardal and Simula Research Laboratory.
00002 // Licensed under the GNU GPL Version 2, or (at your option) any later version.
00003 
00004 #ifndef PTV_TOOLS_IS_INCLUDED
00005 #define PTV_TOOLS_IS_INCLUDED
00006 
00007 #include "Ptv.h"
00008 #include <vector>
00009 
00010 using namespace std;
00011 
00012 namespace SyFi
00013 {
00014 
00015         void sort_vector(vector<Ptv>& a);
00016 
00017         void set_tolerance(double tolerance);
00018 
00019         double mul(const Ptv&a, const Ptv& b);
00020 
00021         double norm(const Ptv& a);
00022 
00023         void normalize(Ptv& a);
00024 
00025         void add(const Ptv&a, const Ptv& b, Ptv& c);
00026 
00027         void sub(const Ptv&a, const Ptv& b, Ptv& c);
00028 
00029         void cross(const Ptv& a, const Ptv& b, Ptv& c);
00030 
00031         bool is_equal(Ptv& a, Ptv& b);
00032 
00033         bool line_contains(Ptv& e0, Ptv& e1, Ptv& p);
00034 
00035         bool is_inside_triangle(Ptv& e0, Ptv& e1, Ptv& e2, Ptv& p);
00036 
00037         bool contains2D(Ptv& e0, Ptv& e1, Ptv& p);
00038 
00039         bool contains3D(Ptv& e0, Ptv& e1, Ptv& e2, Ptv& p);
00040 
00041 }                                                                // namespace SyFi
00042 #endif

Generated on Mon Aug 31 16:16:45 2009 for SyFi by  doxygen 1.5.9