void goblin3d_free(goblin3d_obj_t *obj)
Frees the memory associated with a 3D object structure.
Definition: goblin3d.cpp:97
void goblin3d_precalculate(goblin3d_obj_t *obj)
Precalculates the rotated and projected points for a 3D object.
Definition: goblin3d.cpp:126
bool goblin3d_init(goblin3d_obj_t *obj, uint8_t point_count, uint8_t edge_count)
Initializes a 3D object structure.
Definition: goblin3d.cpp:27
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_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:166
Structure representing a 3D object for rendering using the Goblin3D library.
Definition: goblin3d.h:72
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
float x_offset
Definition: goblin3d.h:78
uint8_t edge_count
Definition: goblin3d.h:86
uint8_t ** edges
Definition: goblin3d.h:74
float z_offset
Definition: goblin3d.h:80
float x_angle_deg
Definition: goblin3d.h:81
float ** rotated_points
Definition: goblin3d.h:76
uint8_t point_count
Definition: goblin3d.h:85
float y_angle_deg
Definition: goblin3d.h:82