Quaderupdate

INterface fuer extra boundingbox
This commit is contained in:
seba 2008-06-20 04:09:23 +02:00
parent 1c613ca59c
commit c65e215a5a
5 changed files with 35 additions and 2 deletions

View File

@ -1,6 +1,6 @@
CC = g++ CC = g++
AR = ar AR = ar
OBJECTS = punkt3d.o punkt2d.o emath.o emath_opengl.o glcolor.o gldrawhelper.o glfontengine.o glrect.o gltexture.o matrix.o quaternion.o rotationsmatrix.o glsdlscreen.o sdlfuncs.o fpsmanager.o glcamera.o catmullromspline.o extstring.o OBJECTS = punkt3d.o punkt2d.o emath.o emath_opengl.o glcolor.o gldrawhelper.o glfontengine.o glrect.o gltexture.o matrix.o quaternion.o rotationsmatrix.o glsdlscreen.o sdlfuncs.o fpsmanager.o glcamera.o catmullromspline.o extstring.o quader.o
OBJOPT = -Wall -c `sdl-config --cflags` OBJOPT = -Wall -c `sdl-config --cflags`
SUBDIRS = glgui glmenu model SUBDIRS = glgui glmenu model
SUBDIROBJECTS = glgui/*.o glmenu/*.o model/*.o SUBDIROBJECTS = glgui/*.o glmenu/*.o model/*.o

View File

@ -151,3 +151,8 @@ void Model::render() {
Model::~Model() { Model::~Model() {
unload(); unload();
} }
const Punkt3D* Model::getMeshData(unsigned int *meshanz) {
*meshanz = meshdataanz;
return (const Punkt3D*)meshdata;
}

View File

@ -84,6 +84,8 @@ class Model {
Quader getBoundingBox() { return boundingbox; } Quader getBoundingBox() { return boundingbox; }
float getBoundingRadius() { return boundingrad; } float getBoundingRadius() { return boundingrad; }
const Punkt3D* getMeshData(unsigned int *meshanz);
}; };
#endif #endif

View File

@ -11,6 +11,7 @@ class Modelloader {
std::string filename; std::string filename;
public: public:
Modelloader(std::string _filename); Modelloader(std::string _filename);
virtual ~Modelloader() { };
virtual bool load(Model *m)=0; virtual bool load(Model *m)=0;
}; };

View File

@ -6,5 +6,30 @@ void Quader::clean() {
} }
void Quader::render() { void Quader::render() {
glB glBegin(GL_LINES);
glVertexP3D(a);
glVertexP3D(b);
glVertexP3D(b);
glVertexP3D(c);
glVertexP3D(c);
glVertexP3D(d);
glVertexP3D(d);
glVertexP3D(a);
glVertexP3D(e);
glVertexP3D(f);
glVertexP3D(f);
glVertexP3D(g);
glVertexP3D(g);
glVertexP3D(h);
glVertexP3D(h);
glVertexP3D(e);
glVertexP3D(a);
glVertexP3D(e);
glVertexP3D(b);
glVertexP3D(f);
glVertexP3D(c);
glVertexP3D(g);
glVertexP3D(d);
glVertexP3D(h);
glEnd();
} }