initial commit of this kluge
This commit is contained in:
67
bubulles.h
Normal file
67
bubulles.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
bubulles.h
|
||||
*/
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define LIBBB_VERSION 40
|
||||
|
||||
#define SZ_BUBULLE_TEXT 51 /* arbitrary value */
|
||||
|
||||
typedef struct {
|
||||
double x, y, z;
|
||||
unsigned long reserved;
|
||||
} XYZ;
|
||||
|
||||
typedef struct {
|
||||
float r, g, b, a;
|
||||
unsigned long reserved;
|
||||
} RGBA;
|
||||
|
||||
typedef struct {
|
||||
XYZ p; /* position */
|
||||
double d; /* diameter */
|
||||
int gray;
|
||||
RGBA col;
|
||||
long ttl;
|
||||
double kvalue; /* wtf ? */
|
||||
} Bubulle;
|
||||
|
||||
typedef struct {
|
||||
char name[SZ_BUBULLE_TEXT+1];
|
||||
int size; /* max number of bubulles */
|
||||
int fidx; /* next free slot */
|
||||
XYZ position;
|
||||
unsigned long flags;
|
||||
Bubulle *bbs;
|
||||
} BBList;
|
||||
|
||||
BBList * alloc_bubulles(char *name, int nbre, int k);
|
||||
int free_bubulles(BBList *bbl, int k);
|
||||
int print_bublist_desc(BBList *bbl, int k);
|
||||
int push_bubulle(BBList *where, Bubulle *what);
|
||||
int poke_bubulle(BBList *where, Bubulle *what, int idx);
|
||||
int peek_bubulle(BBList *from, Bubulle *to, int idx);
|
||||
|
||||
int cleanfill_my_bublist(BBList *what, int k);
|
||||
int bubulles_version(int k);
|
||||
void bubulles_sizeof(int k);
|
||||
|
||||
Bubulle * bubulle_getaddr(BBList *where, int idx);
|
||||
|
||||
int fprint_bubulles(FILE *fp, char *title, BBList *bbl, int k);
|
||||
int niceprint_bubulle(Bubulle *what, int unused);
|
||||
int bubulles_to_data(char *fname, char *title, BBList *bbl, int k);
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
typedef struct {
|
||||
double minX, minY, minZ;
|
||||
double maxX, maxY, maxZ;
|
||||
int flags;
|
||||
} BBox;
|
||||
|
||||
int bounding_box(Bubulle *boubs, int nbre, BBox *bbox);
|
||||
int print_bbox(BBox *bbox, int k);
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
Reference in New Issue
Block a user