3 Copyright (C) 2003 Nuno Subtil
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 /* $Id: object.h,v 1.2 2003/11/22 17:32:10 nsubtil Exp $ */
40 float na
[3], nb
[3], nc
[3];
53 struct face_tri
**fc_list
;
55 /* display list deste objecto para polígonos de cor fixa*/
57 /* polígonos de cor variável */
70 struct ocache_entry
*next
;
73 int object_hash_vertex(float vx
[3]);
74 int object_hash_face(struct face_tri
*face
);
75 void object_add_face(struct object
*obj
, struct face_tri
*face
);
76 struct object
*object_cache_find_file(char *fname
, int *n_objs
);
77 void object_cache_add_file(char *fname
, struct object
*objs
, int n_objs
);
78 int object_face_equal(struct face_tri
*f1
, struct face_tri
*f2
);
79 int object_get_vertex_index(float **vx_list
, int num_vx
, float vec
[3]);
80 int object_get_face_index(struct face_tri
**fc_list
, int num_fc
, struct face_tri
*fc
);
81 void object_write_file(char *fname
, struct object
*objs
, int n_objs
);
82 struct object
*object_read_file(char *fname
, int *n_objs
);
83 void object_release_dlists(void);
84 void object_recompile_dlists(void);