Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

fime_star.h

Go to the documentation of this file.
00001 
00010 #ifndef _FIME_STAR_H_
00011 #define _FIME_STAR_H_
00012 
00013 #include <stdlib.h>
00014 
00015 #include "vtx.h"
00016 #include "matrix.h"
00017 #include "obj_driver.h"
00018 #include "draw/viewport.h"
00019 
00023 typedef struct {
00024   matrix_t mtx;     
00025   vtx_t scale;      
00026   vtx_t cur_scale;  
00027   vtx_t goal_scale; 
00028   vtx_t angle;      
00029   vtx_t inc_angle;  
00030   float z_mov;
00031   float cur_z_mov;
00032 } fime_star_trans_t;
00033 
00037 typedef struct {
00038   fime_star_trans_t * trans; 
00039   obj_t *obj;                
00040   vtx_t pos;                 
00041 } fime_star_t;
00042 
00046 typedef struct {
00047   float xmin;
00048   float xmax;
00049   float ymin;
00050   float ymax;
00051   float zmin;
00052   float zmax;
00053 } fime_star_box_t;
00054 
00055 typedef struct fime_star_field_s fime_star_field_t;
00056 
00060 typedef void (*fime_star_generator_t)(fime_star_field_t *, fime_star_t *);
00061 
00065 struct fime_star_field_s {
00066   int nb_forms;
00067   obj_driver_t ** forms;
00068 
00069   int nb_trans;                    
00070   fime_star_trans_t * trans;       
00072   int nb_stars;                    
00073   fime_star_t * stars;             
00075   fime_star_box_t box;             
00076   fime_star_generator_t generator; 
00077   void * cookie;
00078 
00079 } ;
00080 
00081 
00082 fime_star_field_t * fime_star_init(int nb_stars,
00083                                    const char ** forms,
00084                                    const fime_star_box_t * box,
00085                                    void * cookie);
00086 
00087 void fime_star_shutdown(fime_star_field_t * sf);
00088 int fime_star_update(fime_star_field_t * sf, const float seconds);
00089 
00090 int fime_star_render(fime_star_field_t * sf,
00091                      viewport_t *vp,
00092                      matrix_t camera, matrix_t proj,
00093                      vtx_t * ambient,
00094                      vtx_t * diffuse,
00095                      vtx_t * light,
00096                      int opaque);
00097 
00098 #endif /* #define _FIME_STAR_H_ */

dcplaya documentation version 2.0 Generated on November 2004 by doxygen 1.3.6