MythTV  master
Classes | Macros
v3d.h File Reference
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include "mathtools.h"
Include dependency graph for v3d.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  v3d
 
struct  v2d
 

Macros

#define V3D_TO_V2D(v3, v2, width, height, distance)
 
#define Y_ROTATE_V3D(vi, vf, sina, cosa)
 
#define TRANSLATE_V3D(vsrc, vdest)
 
#define MUL_V3D(lf, v)   {(v).x*=(lf);(v).y*=(lf);(v).z*=(lf);}
 

Macro Definition Documentation

◆ V3D_TO_V2D

#define V3D_TO_V2D (   v3,
  v2,
  width,
  height,
  distance 
)
Value:
{ \
int Xp; \
int Yp; \
if ((v3).z > 2) { \
F2I(((distance) * (v3).x / (v3).z),Xp) ; \
F2I(((distance) * (v3).y / (v3).z),Yp) ; \
(v2).x = Xp + ((width)>>1); \
(v2).y = -Yp + ((height)>>1); \
} \
else (v2).x=(v2).y=-666; \
}

Definition at line 24 of file v3d.h.

◆ Y_ROTATE_V3D

#define Y_ROTATE_V3D (   vi,
  vf,
  sina,
  cosa 
)
Value:
{\
(vf).x = (vi).x * (cosa) - (vi).z * (sina);\
(vf).z = (vi).x * (sina) + (vi).z * (cosa);\
(vf).y = (vi).y;\
}

Definition at line 41 of file v3d.h.

◆ TRANSLATE_V3D

#define TRANSLATE_V3D (   vsrc,
  vdest 
)
Value:
{\
(vdest).x += (vsrc).x;\
(vdest).y += (vsrc).y;\
(vdest).z += (vsrc).z;\
}

Definition at line 51 of file v3d.h.

◆ MUL_V3D

#define MUL_V3D (   lf,
 
)    {(v).x*=(lf);(v).y*=(lf);(v).z*=(lf);}

Definition at line 58 of file v3d.h.