UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Static Public Member Functions | Static Public Attributes | List of all members
U3dMath Class Reference

#include <u3d_math.hpp>

Static Public Member Functions

static double compositionMul (const U3dPoint &p1, const U3dPoint &p2, const U3dPoint &p3)
 
static double scalarMul (const U3dPoint &p1, const U3dPoint &p2)
 
static void matrix4x4Mul (const double(&m1)[4][4], const double(&m2)[4][4], double(&m3)[4][4], bool tr1=false, bool tr2=false)
 
static void matrix2vec4x4Mul (const double(&m)[4][4], const double(&u)[4], double(&v)[4], bool tr=false)
 
static void vec2matrix4x4Mul (const double(&u)[4], const double(&m)[4][4], double(&v)[4], bool tr=false)
 
static void getLineCoeffs (double x1, double y1, double x2, double y2, double &k, double &b)
 
static int solveSquareEq (double a, double b, double c, double &x1, double &x2)
 

Static Public Attributes

static double m_d_prec
 

Detailed Description

Some mathematics for different calculations

Member Function Documentation

static double U3dMath::compositionMul ( const U3dPoint p1,
const U3dPoint p2,
const U3dPoint p3 
)
static

Compositional 3d vector multiplication. This is determinant of constructed from vectors components matrix.

static void U3dMath::getLineCoeffs ( double  x1,
double  y1,
double  x2,
double  y2,
double &  k,
double &  b 
)
static

Get coefficients of line y=kx+b from (x1,y1) and (x2,y2) line points. Points should not be the same.

static void U3dMath::matrix2vec4x4Mul ( const double(&)  m[4][4],
const double(&)  u[4],
double(&)  v[4],
bool  tr = false 
)
static

Calculate vector to matrix multiplication. Dimension is 4. tr = true if matrix is transposed

static void U3dMath::matrix4x4Mul ( const double(&)  m1[4][4],
const double(&)  m2[4][4],
double(&)  m3[4][4],
bool  tr1 = false,
bool  tr2 = false 
)
static

Multiplication of two 4x4 matricies. tr1 = true if m1 should be transpose and tr2 = true if m2 should be transpose

static double U3dMath::scalarMul ( const U3dPoint p1,
const U3dPoint p2 
)
static

Scalar 3d vectors multiplication

static int U3dMath::solveSquareEq ( double  a,
double  b,
double  c,
double &  x1,
double &  x2 
)
static

Solve square equation ax^2 + bx + c = 0 (real form). Return number of roots

static void U3dMath::vec2matrix4x4Mul ( const double(&)  u[4],
const double(&)  m[4][4],
double(&)  v[4],
bool  tr = false 
)
static

Calculate vector to matrix multiplication. Dimension is 4. tr = true if matrix is transposed

Member Data Documentation

double U3dMath::m_d_prec
static

Numerical precision


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