30 lines
395 B
C
30 lines
395 B
C
#ifndef TRIANGLE_H
|
|
#define TRIANGLE_H
|
|
|
|
#include <stdint.h>
|
|
#include "vector.h"
|
|
|
|
typedef uint32_t color_t;
|
|
|
|
typedef struct {
|
|
int a;
|
|
int b;
|
|
int c;
|
|
color_t color;
|
|
} face_t;
|
|
|
|
typedef struct {
|
|
int x;
|
|
int y;
|
|
} int_vec2_t;
|
|
|
|
typedef struct {
|
|
vec2_t points[3];
|
|
color_t color;
|
|
float average_depth;
|
|
} triangle_t;
|
|
|
|
void draw_filled_triangle(triangle_t triangle);
|
|
|
|
#endif
|