void goblin3d_free(goblin3d_obj_t *obj)
Frees the memory associated with a 3D object structure.
Definition: goblin3d.cpp:116
void goblin3d_precalculate(goblin3d_obj_t *obj)
Precalculates the rotated and projected points for a 3D object.
Definition: goblin3d.cpp:145
bool goblin3d_edge_exists(goblin3d_obj_t *obj, uint32_t v1, uint32_t v2)
Checks if an edge exists between two vertices in a Goblin3D object.
Definition: goblin3d.cpp:233
bool goblin3d_parse_obj_file(const char *filename, goblin3d_obj_t *obj)
Parses an OBJ file to construct a Goblin3D object.
Definition: goblin3d.cpp:261
void(* goblin3d_obj_draw_fn)(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
Type definition for a callback function used to draw lines between points.
Definition: goblin3d.h:101
void goblin3d_init_empty(goblin3d_obj_t *obj)
Initializes an empty Goblin3D object.
Definition: goblin3d.cpp:106
void goblin3d_render(goblin3d_obj_t *obj, goblin3d_obj_draw_fn draw)
Renders the 3D object by drawing its edges on a 2D plane.
Definition: goblin3d.cpp:185
bool goblin3d_init(goblin3d_obj_t *obj, uint32_t point_count, uint32_t edge_count)
Initializes a 3D object structure.
Definition: goblin3d.cpp:36
bool goblin3d_add_point(goblin3d_obj_t *obj, float x, float y, float z)
Adds a 3D point to a Goblin3D object.
Definition: goblin3d.cpp:199
bool goblin3d_add_edge(goblin3d_obj_t *obj, uint32_t v1, uint32_t v2)
Adds an edge between two vertices in a Goblin3D object.
Definition: goblin3d.cpp:245
Structure representing a 3D object for rendering using the Goblin3D library.
Definition: goblin3d.h:72
uint32_t point_count
Definition: goblin3d.h:85
float ** orig_points
Definition: goblin3d.h:75
float z_angle_deg
Definition: goblin3d.h:83
float scale_size
Definition: goblin3d.h:87
float y_offset
Definition: goblin3d.h:79
float ** points
Definition: goblin3d.h:73
uint32_t ** edges
Definition: goblin3d.h:74
float x_offset
Definition: goblin3d.h:78
float z_offset
Definition: goblin3d.h:80
float x_angle_deg
Definition: goblin3d.h:81
float ** rotated_points
Definition: goblin3d.h:76
uint32_t edge_count
Definition: goblin3d.h:86
float y_angle_deg
Definition: goblin3d.h:82