prosperon/source/engine/warp.h

49 lines
1,003 B
C
Raw Normal View History

2024-01-04 08:14:37 -06:00
#ifndef WARP_H
#define WARP_H
#include "stdint.h"
#include "transform.h"
typedef uint32_t warpmask;
#define gravmask 1U
typedef struct {
transform3d t;
float strength;
float decay;
int spherical;
HMM_Vec3 planar_force;
warpmask mask;
} warp_gravity;
2024-01-14 10:24:31 -06:00
typedef struct {
transform3d t;
int unlimited_range;
HMM_Vec3 range;
HMM_Vec3 falloff;
HMM_Vec3 damp;
warpmask mask;
} warp_damp;
typedef struct {
transform3d t;
float strength;
float decay;
float pulse; /* strength of random variance in the wind effect */
float frequency; /* when 0, pulse is smooth. Increase for very pulse over time */
float turbulence; /* When 0, pulsing is smooth and regular. Increase for more chaos. */
int spherical;
} warp_wind;
2024-01-04 08:14:37 -06:00
/* returns the total force for an object at pos */
HMM_Vec3 warp_force(HMM_Vec3 pos, warpmask mask);
warp_gravity *warp_gravity_make();
2024-01-14 10:24:31 -06:00
warp_damp *warp_damp_make();
void warp_gravity_free(warp_gravity *g);
void warp_damp_free(warp_damp *d);
2024-01-04 08:14:37 -06:00
#endif