2024-09-29 20:11:45 +00:00
|
|
|
#ifndef MODEL_H
|
|
|
|
#define MODEL_H
|
2023-10-25 13:02:23 +00:00
|
|
|
|
|
|
|
typedef struct _model {
|
|
|
|
GLfloat *object;
|
2024-10-02 20:18:24 +00:00
|
|
|
GLfloat *colors;
|
2024-10-23 13:27:18 +00:00
|
|
|
Tensor **transformations;
|
2023-10-25 13:02:23 +00:00
|
|
|
size_t bufsize;
|
2024-10-02 20:18:24 +00:00
|
|
|
size_t transformation_count;
|
|
|
|
size_t transformation_size;
|
2023-10-25 13:02:23 +00:00
|
|
|
} Model;
|
|
|
|
|
2024-09-29 20:11:45 +00:00
|
|
|
typedef struct _model_registry {
|
|
|
|
Model **models;
|
|
|
|
size_t model_count;
|
|
|
|
size_t size;
|
|
|
|
} ModelRegistry;
|
|
|
|
|
2023-12-13 09:56:21 +00:00
|
|
|
Model *model_load(const char *);
|
2024-09-29 20:11:45 +00:00
|
|
|
ModelRegistry* modelRegistry_new(void);
|
|
|
|
int modelRegistry_register(ModelRegistry *, Model *);
|
|
|
|
void modelRegistry_free(ModelRegistry *);
|
2024-10-02 20:18:24 +00:00
|
|
|
GLfloat * model_applyTransformations(Model *);
|
|
|
|
void model_colorFromPosition(Model *);
|
2024-10-25 09:38:25 +00:00
|
|
|
void model_colorXYZ(Model *, int R, int G, int B);
|
2024-10-08 09:29:52 +00:00
|
|
|
void model_colorRed(Model *);
|
|
|
|
void model_colorGreen(Model *);
|
|
|
|
void model_colorBlue(Model *);
|
|
|
|
void model_colorWhite(Model *);
|
|
|
|
void model_colorBlack(Model *);
|
|
|
|
Model *model_circle(int, GLfloat);
|
2024-10-13 20:43:43 +00:00
|
|
|
Model *model_line(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
|
2023-10-25 13:02:23 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|