/*
Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
-Lugaru is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
+Lugaru is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
-This program is distributed in the hope that it will be useful,
+Lugaru 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 General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MODELS_H_
//
// Textures List
//
-typedef struct {
- long xsz, ysz;
- GLubyte *txt;
+typedef struct {
+ long xsz, ysz;
+ GLubyte *txt;
} ModelTexture;
//
class TexturedTriangle
{
public:
- short vertex[3];
+ short vertex[3];
float gx[3], gy[3];
};
class Model
{
public:
- short vertexNum, TriangleNum;
+ short vertexNum, TriangleNum;
bool hastexture;
int type, oldtype;
int SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate);
int SphereCheckPossible(XYZ *p1, float radius, XYZ *move, float *rotate);
int LineCheck(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
- int LineCheckSlide(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
int LineCheckPossible(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
int LineCheckSlidePossible(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
void UpdateVertexArray();
void drawdifftex(GLuint texture);
void drawdifftex(Texture texture);
void drawimmediate();
- void drawdiffteximmediate(GLuint texture);
void Rotate(float xang, float yang, float zang);
~Model();
void deallocate();