2000-02-28 03:22:57 -05:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (C) 1998 Janne L<EFBFBD>f <jlof@mail.student.oulu.fi>
|
|
|
|
|
*
|
|
|
|
|
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef LW_H
|
|
|
|
|
#define LW_H
|
|
|
|
|
|
2001-05-16 12:23:13 -04:00
|
|
|
|
#ifdef __WXMAC__
|
2001-07-22 10:57:47 -04:00
|
|
|
|
# ifdef __DARWIN__
|
|
|
|
|
# include <OpenGL/glu.h>
|
|
|
|
|
# else
|
|
|
|
|
# include <glu.h>
|
|
|
|
|
# endif
|
2001-05-16 12:23:13 -04:00
|
|
|
|
#else
|
2001-07-22 10:57:47 -04:00
|
|
|
|
# include <GL/glu.h>
|
2001-05-16 12:23:13 -04:00
|
|
|
|
#endif
|
2000-02-28 03:22:57 -05:00
|
|
|
|
|
|
|
|
|
#define LW_MAX_POINTS 200
|
|
|
|
|
#define LW_MAX_NAME_LEN 500
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
char name[LW_MAX_NAME_LEN];
|
|
|
|
|
GLfloat r,g,b;
|
|
|
|
|
} lwMaterial;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int material; /* material of this face */
|
|
|
|
|
int index_cnt; /* number of vertices */
|
|
|
|
|
int *index; /* index to vertex */
|
|
|
|
|
float *texcoord; /* u,v texture coordinates */
|
|
|
|
|
} lwFace;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int face_cnt;
|
|
|
|
|
lwFace *face;
|
|
|
|
|
|
|
|
|
|
int material_cnt;
|
|
|
|
|
lwMaterial *material;
|
|
|
|
|
|
|
|
|
|
int vertex_cnt;
|
|
|
|
|
GLfloat *vertex;
|
|
|
|
|
|
|
|
|
|
} lwObject;
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2003-09-11 03:20:55 -04:00
|
|
|
|
#if wxUSE_GLCANVAS
|
2004-06-03 06:03:30 -04:00
|
|
|
|
bool lw_is_lwobject(const char *lw_file);
|
2000-02-28 03:22:57 -05:00
|
|
|
|
lwObject *lw_object_read(const char *lw_file);
|
|
|
|
|
void lw_object_free( lwObject *lw_object);
|
|
|
|
|
void lw_object_show(const lwObject *lw_object);
|
|
|
|
|
|
|
|
|
|
GLfloat lw_object_radius(const lwObject *lw_object);
|
|
|
|
|
void lw_object_scale (lwObject *lw_object, GLfloat scale);
|
2003-09-11 03:20:55 -04:00
|
|
|
|
#endif
|
2000-02-28 03:22:57 -05:00
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* LW_H */
|
|
|
|
|
|