mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
27 lines
643 B
C
27 lines
643 B
C
/* mesh
|
|
*
|
|
* written by Alexander Zaprjagaev
|
|
* frustum@public.tsu.ru
|
|
*/
|
|
|
|
#ifndef __MESH_H__
|
|
#define __MESH_H__
|
|
|
|
typedef struct {
|
|
float xyz[3]; /* ËÏÏÒÄÉÎÁÔÁ */
|
|
float normal[3]; /* ÎÏÒÍÁÌØ */
|
|
float st[2]; /* ÔÅËÓÔÕÒÎÙÅ ËÏÏÒÄÉÎÁÔÙ */
|
|
} mesh_vertex_t;
|
|
|
|
typedef struct {
|
|
int num_vertex; /* ÞÉÓÌÏ ×ÅÒÛÉÎ */
|
|
mesh_vertex_t *vertex; /* ×ÅÒÛÉÎÙ */
|
|
float matrix[16]; /* ÍÁÔÒÉÃÁ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÑ */
|
|
} mesh_t;
|
|
|
|
mesh_t *mesh_create(float *vertex,int num_vertex);
|
|
mesh_t *mesh_load_3ds(char *name);
|
|
void mesh_set_matrix(mesh_t *mesh,float *matrix);
|
|
void mesh_render(mesh_t *mesh);
|
|
|
|
#endif /* __MESH_H__ */
|