Merge branch 'master' of someserver.de:/home/seba/projects/libsegl
This commit is contained in:
commit
07b852c718
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "catmullromspline.h"
|
#include "catmullromspline.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __CATMULLROMSPLINE_H
|
#ifndef __CATMULLROMSPLINE_H
|
||||||
#define __CATMULLROMSPLINE_H
|
#define __CATMULLROMSPLINE_H
|
||||||
|
|
||||||
|
|
22
color.cpp
22
color.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
color.h
22
color.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __COLOR_H
|
#ifndef __COLOR_H
|
||||||
#define __COLOR_H
|
#define __COLOR_H
|
||||||
|
|
||||||
|
|
22
emath.cpp
22
emath.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "emath.h"
|
#include "emath.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
23
emath.h
23
emath.h
|
@ -1,8 +1,31 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __EMATH_H
|
#ifndef __EMATH_H
|
||||||
#define __EMATH_H
|
#define __EMATH_H
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <SDL_opengl.h>
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "emath_opengl.h"
|
#include "emath_opengl.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __EMATH_OPENGL
|
#ifndef __EMATH_OPENGL
|
||||||
#define __EMATH_OPENGL
|
#define __EMATH_OPENGL
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "extstring.h"
|
#include "extstring.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
extstring.h
22
extstring.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __EXTSTRING_H
|
#ifndef __EXTSTRING_H
|
||||||
#define __EXTSTRING_H
|
#define __EXTSTRING_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "fpsmanager.h"
|
#include "fpsmanager.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
fpsmanager.h
22
fpsmanager.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __FPSMANAGER_H
|
#ifndef __FPSMANAGER_H
|
||||||
#define __FPSMANAGER_H
|
#define __FPSMANAGER_H
|
||||||
|
|
||||||
|
|
43
geotypes.cpp
43
geotypes.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "geotypes.h"
|
#include "geotypes.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
@ -21,14 +43,7 @@ bool Sphere::collision(const Sphere &s) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sphere::collision(const Ray &r) const {
|
bool Sphere::collision(const Ray &r) const {
|
||||||
/*
|
return true;
|
||||||
// way more complex (i think), maybe usefull to calc the collpoints
|
|
||||||
const float bsum = r.dir.x + r.dir.y + r.dir.z;
|
|
||||||
float p = (2.0f*(r.pos*r.dir)-pos*r.dir) / bsum;
|
|
||||||
float q = (r.pos*r.pos-2.0f*r.pos*pos+pos*pos-radius*radius) / bsum;
|
|
||||||
return (p*p/4.0f-q >= 0.0f);
|
|
||||||
*/
|
|
||||||
return (r.dist(pos)<=radius);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sphere::collision(const Box & b) const {
|
bool Sphere::collision(const Box & b) const {
|
||||||
|
@ -36,7 +51,7 @@ bool Sphere::collision(const Box & b) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sphere::collision(const Plane &p) const {
|
bool Sphere::collision(const Plane &p) const {
|
||||||
return (p.dist(pos)<=radius);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sphere::inSphere(Punkt3D p) const {
|
bool Sphere::inSphere(Punkt3D p) const {
|
||||||
|
@ -60,12 +75,12 @@ void Ray::set(Punkt3D _pos, Punkt3D _dir) {
|
||||||
dir = _dir;
|
dir = _dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
Punkt3D Ray::get(float x) const {
|
Punkt3D Ray::get(float x) {
|
||||||
return pos + dir*x;
|
return pos + dir*x;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Heavy Testing
|
// TODO: Heavy Testing
|
||||||
bool Ray::onRay(Punkt3D p, int rnd) const {
|
bool Ray::onRay(Punkt3D p, int rnd) {
|
||||||
float r1 = 0.0f, r2 = 0.0f, r3 = 0.0f;
|
float r1 = 0.0f, r2 = 0.0f, r3 = 0.0f;
|
||||||
short fcount = 0;
|
short fcount = 0;
|
||||||
bool g1=true, g2=true, g3=true;
|
bool g1=true, g2=true, g3=true;
|
||||||
|
@ -112,14 +127,14 @@ bool Ray::onRay(Punkt3D p, int rnd) const {
|
||||||
else if(g3)
|
else if(g3)
|
||||||
return (r1 == r2);
|
return (r1 == r2);
|
||||||
else
|
else
|
||||||
return (r1 == r2 && r1 == r3);
|
return (r1 == r2 == r3);
|
||||||
}
|
}
|
||||||
|
|
||||||
float Ray::dist(Punkt3D p) const {
|
float Ray::dist(Punkt3D p) {
|
||||||
return abs(p - get( getParam(p) ));
|
return abs(p - get( getParam(p) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
float Ray::getParam(Punkt3D p, bool onray) const {
|
float Ray::getParam(Punkt3D p, bool onray) {
|
||||||
if(onray) {
|
if(onray) {
|
||||||
if(!onRay(p))
|
if(!onRay(p))
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
|
31
geotypes.h
31
geotypes.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __GEOTYPES_H
|
#ifndef __GEOTYPES_H
|
||||||
#define __GEOTYPES_H
|
#define __GEOTYPES_H
|
||||||
|
|
||||||
|
@ -5,7 +27,6 @@
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
||||||
class Sphere;
|
|
||||||
class Ray;
|
class Ray;
|
||||||
class Box;
|
class Box;
|
||||||
class Plane;
|
class Plane;
|
||||||
|
@ -39,10 +60,10 @@ class Ray {
|
||||||
Ray(Punkt3D _pos, Punkt3D _dir);
|
Ray(Punkt3D _pos, Punkt3D _dir);
|
||||||
|
|
||||||
void set(Punkt3D _pos, Punkt3D _dir);
|
void set(Punkt3D _pos, Punkt3D _dir);
|
||||||
Punkt3D get(float x) const;
|
Punkt3D get(float x);
|
||||||
bool onRay(Punkt3D p, int rnd=-1) const;
|
bool onRay(Punkt3D p, int rnd=-1);
|
||||||
float dist(Punkt3D p) const;
|
float dist(Punkt3D p);
|
||||||
float getParam(Punkt3D p, bool onray=false) const;
|
float getParam(Punkt3D p, bool onray=false);
|
||||||
|
|
||||||
bool collision(const Sphere &s) const;
|
bool collision(const Sphere &s) const;
|
||||||
bool collision(const Ray &r) const;
|
bool collision(const Ray &r) const;
|
||||||
|
|
22
glcamera.cpp
22
glcamera.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "glcamera.h"
|
#include "glcamera.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
glcamera.h
22
glcamera.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __GLCAMERA_H
|
#ifndef __GLCAMERA_H
|
||||||
#define __GLCAMERA_H
|
#define __GLCAMERA_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "gldrawhelper.h"
|
#include "gldrawhelper.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __GLDRAWHELPER_H
|
#ifndef __GLDRAWHELPER_H
|
||||||
#define __GLDRAWHELPER_H
|
#define __GLDRAWHELPER_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "glfontengine.h"
|
#include "glfontengine.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __GLFONTENGINE_H
|
#ifndef __GLFONTENGINE_H
|
||||||
#define __GLFONTENGINE_H
|
#define __GLFONTENGINE_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "glsdlscreen.h"
|
#include "glsdlscreen.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __GLSDLSCREEN_H
|
#ifndef __GLSDLSCREEN_H
|
||||||
#define __GLSDLSCREEN_H
|
#define __GLSDLSCREEN_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "gltexture.h"
|
#include "gltexture.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
gltexture.h
22
gltexture.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __GLTEXTUR_H
|
#ifndef __GLTEXTUR_H
|
||||||
#define __GLTEXTUR_H
|
#define __GLTEXTUR_H
|
||||||
|
|
||||||
|
|
22
matrix.cpp
22
matrix.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
matrix.h
22
matrix.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __MATRIX_H
|
#ifndef __MATRIX_H
|
||||||
#define __MATRIX_H
|
#define __MATRIX_H
|
||||||
|
|
||||||
|
|
22
punkt2d.cpp
22
punkt2d.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "punkt2d.h"
|
#include "punkt2d.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
26
punkt2d.h
26
punkt2d.h
|
@ -1,9 +1,30 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __PUNKT3D_H
|
#ifndef __PUNKT3D_H
|
||||||
#define __PUNKT3D_H
|
#define __PUNKT3D_H
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <SDL_opengl.h>
|
|
||||||
#include "emath.h"
|
#include "emath.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
@ -54,13 +75,12 @@ class Punkt2D {
|
||||||
|
|
||||||
} // namespace segl
|
} // namespace segl
|
||||||
|
|
||||||
// #ifdef GLAPI
|
|
||||||
void glTexCoord2f(segl::Punkt2D);
|
void glTexCoord2f(segl::Punkt2D);
|
||||||
float abs(segl::Punkt2D);
|
float abs(segl::Punkt2D);
|
||||||
|
|
||||||
// Fixed Headers
|
// Fixed Headers
|
||||||
void glTexCoordP2D(segl::Punkt2D p);
|
void glTexCoordP2D(segl::Punkt2D p);
|
||||||
// #endif /* GLAPI */
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
22
punkt3d.cpp
22
punkt3d.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "punkt3d.h"
|
#include "punkt3d.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
27
punkt3d.h
27
punkt3d.h
|
@ -1,9 +1,30 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __PUNKT3D_h
|
#ifndef __PUNKT3D_h
|
||||||
#define __PUNKT3D_h
|
#define __PUNKT3D_h
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <SDL_opengl.h>
|
|
||||||
#include "emath.h"
|
#include "emath.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
@ -63,7 +84,7 @@ class Punkt3D {
|
||||||
float abs(const segl::Punkt3D&);
|
float abs(const segl::Punkt3D&);
|
||||||
|
|
||||||
// OpenGL-Functions for Punkt3D
|
// OpenGL-Functions for Punkt3D
|
||||||
// #ifdef GLAPI
|
|
||||||
void glVertex3f(const segl::Punkt3D&);
|
void glVertex3f(const segl::Punkt3D&);
|
||||||
void glTranslatef(const segl::Punkt3D&);
|
void glTranslatef(const segl::Punkt3D&);
|
||||||
void glNormal3f(const segl::Punkt3D&);
|
void glNormal3f(const segl::Punkt3D&);
|
||||||
|
@ -77,5 +98,5 @@ void glNormalP3D(const segl::Punkt3D&);
|
||||||
|
|
||||||
void glRotateP3D(const float&, const segl::Punkt3D&);
|
void glRotateP3D(const float&, const segl::Punkt3D&);
|
||||||
void gluLookAt(const segl::Punkt3D &pos, const segl::Punkt3D &viewport, const segl::Punkt3D &normal);
|
void gluLookAt(const segl::Punkt3D &pos, const segl::Punkt3D &viewport, const segl::Punkt3D &normal);
|
||||||
// #endif /* GLAPI */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
22
quader.cpp
22
quader.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "quader.h"
|
#include "quader.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
quader.h
22
quader.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __QUADER_H
|
#ifndef __QUADER_H
|
||||||
#define __QUADER_H
|
#define __QUADER_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "quaternion.h"
|
#include "quaternion.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
quaternion.h
22
quaternion.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __QUATERNION_H
|
#ifndef __QUATERNION_H
|
||||||
#define __QUATERNION_H
|
#define __QUATERNION_H
|
||||||
|
|
||||||
|
|
22
rect.cpp
22
rect.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "rect.h"
|
#include "rect.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
rect.h
22
rect.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __RECT_H
|
#ifndef __RECT_H
|
||||||
#define __RECT_H
|
#define __RECT_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "rotationsmatrix.h"
|
#include "rotationsmatrix.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __ROTATIONSMATRIX_H
|
#ifndef __ROTATIONSMATRIX_H
|
||||||
#define __ROTATIONSMATRIX_H
|
#define __ROTATIONSMATRIX_H
|
||||||
|
|
||||||
|
|
22
sdlfuncs.cpp
22
sdlfuncs.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "sdlfuncs.h"
|
#include "sdlfuncs.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
sdlfuncs.h
22
sdlfuncs.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __SDLFUNCS_H
|
#ifndef __SDLFUNCS_H
|
||||||
#define __SDLFUNCS_H
|
#define __SDLFUNCS_H
|
||||||
|
|
||||||
|
|
22
segl.cpp
22
segl.cpp
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "segl.h"
|
#include "segl.h"
|
||||||
|
|
||||||
namespace segl {
|
namespace segl {
|
||||||
|
|
22
segl.h
22
segl.h
|
@ -1,3 +1,25 @@
|
||||||
|
/* libsegl - Sebas Extended GL Library
|
||||||
|
* Collection of Opengl/3D-Math helpers
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
||||||
|
* http://www.seba-geek.de
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __LIBSEGL_H
|
#ifndef __LIBSEGL_H
|
||||||
#define __LIBSEGL_H
|
#define __LIBSEGL_H
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue