A tiny software raymarcher that attempts to render "n-dimension" manofold insertions as an image appearing to be a non-euclidean 3-dimensional space. Written for the uqcs hackathon 2020. This repo is a mirror of: https://github.com/ailrst/blackpink
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
884 B

4 years ago
#ifndef TYPES_H
#define TYPES_H
#define B_NUM_RAYMARCH_THREADS 8
4 years ago
#define B_WINDOW_WIDTH 900
4 years ago
#define B_WINDOW_HEIGHT 504
#define B_INTERNAL_HEIGHT 64
#define B_INTERNAL_WIDTH 114
4 years ago
4 years ago
#include "vect.h"
4 years ago
#include "main.h"
4 years ago
4 years ago
enum solid_op {
4 years ago
B_ADD
4 years ago
};
4 years ago
struct ray
{
struct vec *pos;
struct vec *dir;
4 years ago
};
struct camera
{
struct vec *x;
struct vec *y;
struct vec *z;
struct vec *pos;
4 years ago
struct vec *light;
//struct vec *rot;
4 years ago
int dims;
};
struct pixel_info
{
int flags; /* 0 - no collide */
4 years ago
struct colour col;
4 years ago
int iterations;
double travel_dist;
double scene_dist;
};
4 years ago
struct solid {
enum solid_op op;
struct vec pos;
4 years ago
double rotation;
double scale;
4 years ago
double (*dist)(struct vec *);
4 years ago
};
4 years ago
struct object
{
struct solid sol;
4 years ago
struct colour base_col;
4 years ago
struct colour (*col)(struct ray *, struct object *o);
4 years ago
};
4 years ago
#endif