xine-lib: xine-lib-1.2.13/src/post/goom/v3d.h File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions
v3d.h File Reference
`#include <math.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include "mathtools.h"`

Go to the source code of this file.

## Data Structures
struct | v3d
struct | v2d
struct | v2g

## 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;}

## Functions
void | v3d_to_v2d (v3d *src, int nbvertex, int width, int height, float distance, v2d *v2_array)

## Macro Definition Documentation

## ◆ MUL_V3D

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

## ◆ TRANSLATE_V3D

#define TRANSLATE_V3D | ( |  | vsrc,
|  |  | vdest )

Value:
{\
vdest.x += vsrc.x;\
vdest.y += vsrc.y;\
vdest.z += vsrc.z;\
}

Referenced by grid3d_update(), and surf3d_translate().

## ◆ V3D_TO_V2D

#define V3D_TO_V2D | ( |  | v3,
|  |  | v2,
|  |  | width,
|  |  | height,
|  |  | distance )

Value:
{ \
int Xp, 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; \
}
height
unsigned int height
Definition gfontrle.c:5
width
unsigned int width
Definition gfontrle.c:4

## ◆ 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;\
}

Referenced by grid3d_update(), and surf3d_rotate().

## Function Documentation

## ◆ v3d_to_v2d()

void v3d_to_v2d | ( | v3d * | src,
|  | int | nbvertex,
|  | int | width,
|  | int | height,
|  | float | distance,
|  | v2d * | v2_array )

References F2I, height, width, v2d::x, v2d::y, and z.

Referenced by grid3d_draw().