summaryrefslogtreecommitdiff
path: root/includes/gravity.h
blob: 949dc71f655ac5a78ca390ccd05c0b61f7d31674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef GRAVITY_H
#define GRAVITY_H

#include "defines.h"

extern int ngrav_enable; //Newtonian gravity
extern int gravwl_timeout;
extern int gravityMode;

float *gravmap;//Maps to be used by the main thread
float *gravp;
float *gravy;
float *gravx;
unsigned *gravmask;

float *th_ogravmap;// Maps to be processed by the gravity thread
float *th_gravmap;
float *th_gravx;
float *th_gravy;
float *th_gravp;

void gravity_init();
void gravity_cleanup();
void gravity_update_async();

void start_grav_async();
void stop_grav_async();
void update_grav();
void gravity_mask();

void bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh);

#ifdef GRAVFFT
void grav_fft_init();
void grav_fft_cleanup();
#endif

#endif