a ver son 2 headers, cada 1 con su estrctura:
objetos.h
#include "Bounding.h"
struct Objeto{
struct Bounding bounding;
float x, y, z;
int modelo;
float t_x, t_y, t_z;
float r;
int ang_x;
bool g, c, usado;
void Nuevo(int vmodelo, float vx,float vy,float vz,int vang_x,float vt_x,float vt_y,float vt_z, bool vg, bool vc) {
modelo = vmodelo;
ang_x = vang_x;
x = vx; t_x = vt_x;
y = vy; t_y = vt_y;
z = vz; t_z = vt_z;
r = (t_x+t_y+t_z)/6;
g = vg; c = vc;
usado = true;
ObjetosTotales++;
}
void PintarBoundingSphere(){
GLUquadricObj *q;
q=gluNewQuadric();
gluQuadricDrawStyle(q, GLU_SILHOUETTE);
gluQuadricNormals(q, GLU_SMOOTH);
gluQuadricTexture(q, GL_FALSE);
gluSphere(q,r+r/2,16,16);
gluDeleteQuadric(q);
}
};
y la Bounding.h
#include "idobjeto.h"
struct Bounding {
int Tipo; // 1 -> Esfera // 2 -> Box alineada a los ejes // 3 -> Box alineada al objeto
float xmax, xmin;
float ymax, ymin;
float zmax, zmin;
float r;
float vx[8], vy[8], vz[8];
void Crear(int tipo, GLuint objeto);
};
eso es no más