UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_math.hpp
1 // u3d_math.hpp
2 // $Id: u3d_math.hpp,v 1.9 2007/08/22 10:13:58 guser1 Exp $
3 #ifndef __u3d_math_hpp
4 #define __u3d_math_hpp
5 
6 #include <u3d_point.hpp>
7 
9 typedef std::vector<double> U3dMathDArray;
10 
12 typedef std::vector<U3dMathDArray> U3dMathDMatrix;
13 
15 class U3dMath
16 {
17 public:
20  static double compositionMul(const U3dPoint &p1, const U3dPoint &p2, const U3dPoint &p3);
21 
23  static double scalarMul(const U3dPoint &p1, const U3dPoint &p2);
24 
27  static void matrix4x4Mul(const double (&m1)[4][4], const double (&m2)[4][4], double (&m3)[4][4],
28  bool tr1 = false, bool tr2 = false);
29 
31  static void matrix2vec4x4Mul(const double (&m)[4][4], const double (&u)[4], double (&v)[4],
32  bool tr = false);
33 
35  static void vec2matrix4x4Mul(const double (&u)[4], const double (&m)[4][4], double (&v)[4],
36  bool tr = false);
37 
40  static void getLineCoeffs(double x1, double y1, double x2, double y2,
41  double &k, double &b);
42 
44  static int solveSquareEq(double a, double b, double c, double &x1, double &x2);
45 
47  static double m_d_prec;
48 };
49 
50 #endif //__u3d_math_hpp
Definition: u3d_math.hpp:15
static int solveSquareEq(double a, double b, double c, double &x1, double &x2)
static void vec2matrix4x4Mul(const double(&u)[4], const double(&m)[4][4], double(&v)[4], bool tr=false)
static double compositionMul(const U3dPoint &p1, const U3dPoint &p2, const U3dPoint &p3)
Definition: u3d_point.hpp:16
static void matrix2vec4x4Mul(const double(&m)[4][4], const double(&u)[4], double(&v)[4], bool tr=false)
static double scalarMul(const U3dPoint &p1, const U3dPoint &p2)
static void getLineCoeffs(double x1, double y1, double x2, double y2, double &k, double &b)
static double m_d_prec
Definition: u3d_math.hpp:47
static void matrix4x4Mul(const double(&m1)[4][4], const double(&m2)[4][4], double(&m3)[4][4], bool tr1=false, bool tr2=false)