Open CASCADE Technology  6.9.1
Data Structures | Macros | Functions
OpenGl_telem_util.hxx File Reference
#include <InterfaceGraphic_telem.hxx>
#include <cmath>

Data Structures

struct  Tmatrix3Struct
 

Macros

#define shortreallast()    (3.e+38)
 
#define shortrealfirst()    (-3.e+38)
 
#define square(a)    ((a)*(a))
 
#define vecadd(a, b, c)
 
#define vecsub(a, b, c)
 
#define vecdot(a, b)    ((a)[0]*(b)[0]+(a)[1]*(b)[1]+(a)[2]*(b)[2])
 
#define veccrs(a, b, c)
 
#define vecscl(a, b)    { (b)[0] *= (a); (b)[1] *= (a); (b)[2] *= (a); }
 
#define vecmg2(a)    (square((a)[0])+square((a)[1])+square((a)[2]))
 
#define vecmag(a)    (std::sqrt((double)vecmg2(a)))
 
#define vecnrmd(a, d)
 
#define vecnrm(a)    { Tfloat d; vecnrmd(a,d); }
 
#define vecang(a, b, d)
 
#define vecgnd(a, b, c, d)
 
#define veccpy(a, b)    ((a)[0]=(b)[0],(a)[1]=(b)[1],(a)[2]=(b)[2])
 
#define matcpy(d, s)   { *((Tmatrix3Struct*)(d)) = *((Tmatrix3Struct*)(s)); }
 
#define matdump(m)
 

Functions

int TelGetPolygonNormal (tel_point, Tint *, Tint, Tfloat *)
 
int TelGetNormal (Tfloat *, Tfloat *, Tfloat *, Tfloat *)
 
void TelMultiplymat3 (Tmatrix3, Tmatrix3, Tmatrix3)
 

Macro Definition Documentation

#define matcpy (   d,
 
)    { *((Tmatrix3Struct*)(d)) = *((Tmatrix3Struct*)(s)); }
#define matdump (   m)
Value:
{ \
int i, j; \
for (i=0; i<4; i++) {\
printf ("\t"); \
for (j=0; j<4; j++) \
printf ("%f ", m[i][j]); \
printf ("\n"); \
} \
}
#define shortrealfirst ( )    (-3.e+38)
#define shortreallast ( )    (3.e+38)
#define square (   a)    ((a)*(a))
#define vecadd (   a,
  b,
 
)
Value:
{ (a)[0]=(b)[0]+(c)[0]; \
(a)[1]=(b)[1]+(c)[1]; \
(a)[2]=(b)[2]+(c)[2]; }
#define vecang (   a,
  b,
 
)
Value:
{ d = (Tfloat)(vecmag(a)*vecmag(b)); \
d = vecdot(a,b)/d; \
d = d < -1.0F ? -1.0F : d > 1.0F ? 1.0F : d; \
d = ( Tfloat )acos(d); }
#define vecdot(a, b)
Definition: OpenGl_telem_util.hxx:64
float Tfloat
Definition: InterfaceGraphic_tgl_all.hxx:19
#define vecmag(a)
Definition: OpenGl_telem_util.hxx:81
#define veccpy (   a,
 
)    ((a)[0]=(b)[0],(a)[1]=(b)[1],(a)[2]=(b)[2])
#define veccrs (   a,
  b,
 
)
Value:
{ Tfloat x, y, z; \
x = (b)[1]*(c)[2] - (b)[2]*(c)[1]; \
y = (b)[2]*(c)[0] - (b)[0]*(c)[2]; \
z = (b)[0]*(c)[1] - (b)[1]*(c)[0]; \
(a)[0] = x; \
(a)[1] = y; \
(a)[2] = z; }
float Tfloat
Definition: InterfaceGraphic_tgl_all.hxx:19
#define vecdot (   a,
 
)    ((a)[0]*(b)[0]+(a)[1]*(b)[1]+(a)[2]*(b)[2])
#define vecgnd (   a,
  b,
  c,
 
)
Value:
{ Tfloat w; w = d/vecmag(c); \
(a)[0] = (b)[0]+(c)[0]*w; \
(a)[1] = (b)[1]+(c)[1]*w; \
(a)[2] = (b)[2]+(c)[2]*w; }
float Tfloat
Definition: InterfaceGraphic_tgl_all.hxx:19
#define vecmag(a)
Definition: OpenGl_telem_util.hxx:81
#define vecmag (   a)    (std::sqrt((double)vecmg2(a)))
#define vecmg2 (   a)    (square((a)[0])+square((a)[1])+square((a)[2]))
#define vecnrm (   a)    { Tfloat d; vecnrmd(a,d); }
#define vecnrmd (   a,
 
)
Value:
( d = (Tfloat)vecmag(a), \
( d > 1e-10 ? (a[0] /= d, a[1] /= d, a[2] /= d, d) : (Tfloat)0. ) )
float Tfloat
Definition: InterfaceGraphic_tgl_all.hxx:19
#define vecmag(a)
Definition: OpenGl_telem_util.hxx:81
#define vecscl (   a,
 
)    { (b)[0] *= (a); (b)[1] *= (a); (b)[2] *= (a); }
#define vecsub (   a,
  b,
 
)
Value:
{ (a)[0]=(b)[0]-(c)[0]; \
(a)[1]=(b)[1]-(c)[1]; \
(a)[2]=(b)[2]-(c)[2]; }

Function Documentation

int TelGetNormal ( Tfloat ,
Tfloat ,
Tfloat ,
Tfloat  
)
int TelGetPolygonNormal ( tel_point  ,
Tint ,
Tint  ,
Tfloat  
)
void TelMultiplymat3 ( Tmatrix3  ,
Tmatrix3  ,
Tmatrix3   
)