mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
6eb6d5b9ac
Original commit message from CVS: * gst/goom/Makefile.am: * gst/goom/README: * gst/goom/config_param.c: * gst/goom/convolve_fx.c: * gst/goom/drawmethods.c: * gst/goom/drawmethods.h: * gst/goom/filters.c: * gst/goom/filters_mmx.s: * gst/goom/flying_stars_fx.c: * gst/goom/goom.h: * gst/goom/goom_config.h: * gst/goom/goom_config_param.h: * gst/goom/goom_core.c: * gst/goom/goom_filters.h: * gst/goom/goom_fx.h: * gst/goom/goom_graphic.h: * gst/goom/goom_plugin_info.h: * gst/goom/goom_tools.c: * gst/goom/goom_tools.h: * gst/goom/goom_typedefs.h: * gst/goom/goom_visual_fx.h: * gst/goom/graphic.c: * gst/goom/ifs.c: * gst/goom/ifs.h: * gst/goom/lines.c: * gst/goom/lines.h: * gst/goom/mathtools.c: * gst/goom/mathtools.h: * gst/goom/mmx.c: * gst/goom/motif_goom1.h: * gst/goom/motif_goom2.h: * gst/goom/plugin_info.c: * gst/goom/ppc_drawings.h: * gst/goom/ppc_zoom_ultimate.h: * gst/goom/sound_tester.c: * gst/goom/sound_tester.h: * gst/goom/surf3d.c: * gst/goom/surf3d.h: * gst/goom/tentacle3d.c: * gst/goom/tentacle3d.h: * gst/goom/v3d.c: * gst/goom/v3d.h: * gst/goom/xmmx.c: Add license headers in all source files. Remove filter.c from EXTRA_DIST, as its in SOURCES already. Mention the files in the REDME which are not used right now. Fixes #557709.
83 lines
1.9 KiB
C
83 lines
1.9 KiB
C
/* Goom Project
|
|
* Copyright (C) <2003> iOS-Software
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
#ifndef _V3D_H
|
|
#define _V3D_H
|
|
|
|
#include <math.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
#include "mathtools.h"
|
|
|
|
typedef struct {
|
|
float x,y,z;
|
|
} v3d;
|
|
|
|
typedef struct {
|
|
int x,y;
|
|
} v2d;
|
|
|
|
typedef struct {
|
|
double x,y;
|
|
} v2g;
|
|
|
|
/*
|
|
* projete le vertex 3D sur le plan d'affichage
|
|
* retourne (0,0) si le point ne doit pas etre affiche.
|
|
*
|
|
* bonne valeur pour distance : 256
|
|
*/
|
|
#define V3D_TO_V2D(v3,v2,width,height,distance) \
|
|
{ \
|
|
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; \
|
|
}
|
|
|
|
void v3d_to_v2d(v3d *src, int nbvertex, int width, int height, float distance, v2d *v2_array);
|
|
|
|
/*
|
|
* rotation selon Y du v3d vi d'angle a (cosa=cos(a), sina=sin(a))
|
|
* centerz = centre de rotation en z
|
|
*/
|
|
#define Y_ROTATE_V3D(vi,vf,sina,cosa)\
|
|
{\
|
|
vf.x = vi.x * cosa - vi.z * sina;\
|
|
vf.z = vi.x * sina + vi.z * cosa;\
|
|
vf.y = vi.y;\
|
|
}
|
|
|
|
/*
|
|
* translation
|
|
*/
|
|
#define TRANSLATE_V3D(vsrc,vdest)\
|
|
{\
|
|
vdest.x += vsrc.x;\
|
|
vdest.y += vsrc.y;\
|
|
vdest.z += vsrc.z;\
|
|
}
|
|
|
|
#define MUL_V3D(lf,v) {v.x*=lf;v.y*=lf;v.z*=lf;}
|
|
|
|
#endif
|