Blender  V2.93
Classes | Typedefs | Functions
BKE_ocean.h File Reference
#include <stdbool.h>

Go to the source code of this file.

Classes

struct  OceanResult
 
struct  OceanCache
 

Typedefs

typedef struct OceanResult OceanResult
 
typedef struct OceanCache OceanCache
 

Functions

struct Ocean * BKE_ocean_add (void)
 
void BKE_ocean_free_data (struct Ocean *oc)
 
void BKE_ocean_free (struct Ocean *oc)
 
bool BKE_ocean_ensure (struct OceanModifierData *omd, const int resolution)
 
void BKE_ocean_init_from_modifier (struct Ocean *ocean, struct OceanModifierData const *omd, const int resolution)
 
void BKE_ocean_init (struct Ocean *o, int M, int N, float Lx, float Lz, float V, float l, float A, float w, float damp, float alignment, float depth, float time, int spectrum, float fetch_jonswap, float sharpen_peak_jonswap, short do_height_field, short do_chop, short do_spray, short do_normals, short do_jacobian, int seed)
 
void BKE_ocean_simulate (struct Ocean *o, float t, float scale, float chop_amount)
 
float BKE_ocean_jminus_to_foam (float jminus, float coverage)
 
void BKE_ocean_eval_uv (struct Ocean *oc, struct OceanResult *ocr, float u, float v)
 
void BKE_ocean_eval_uv_catrom (struct Ocean *oc, struct OceanResult *ocr, float u, float v)
 
void BKE_ocean_eval_xz (struct Ocean *oc, struct OceanResult *ocr, float x, float z)
 
void BKE_ocean_eval_xz_catrom (struct Ocean *oc, struct OceanResult *ocr, float x, float z)
 
void BKE_ocean_eval_ij (struct Ocean *oc, struct OceanResult *ocr, int i, int j)
 
struct OceanCache * BKE_ocean_init_cache (const char *bakepath, const char *relbase, int start, int end, float wave_scale, float chop_amount, float foam_coverage, float foam_fade, int resolution)
 
void BKE_ocean_simulate_cache (struct OceanCache *och, int frame)
 
void BKE_ocean_bake (struct Ocean *o, struct OceanCache *och, void(*update_cb)(void *, float progress, int *cancel), void *update_cb_data)
 
void BKE_ocean_cache_eval_uv (struct OceanCache *och, struct OceanResult *ocr, int f, float u, float v)
 
void BKE_ocean_cache_eval_ij (struct OceanCache *och, struct OceanResult *ocr, int f, int i, int j)
 
void BKE_ocean_free_cache (struct OceanCache *och)
 
void BKE_ocean_free_modifier_cache (struct OceanModifierData *omd)
 
float BLI_ocean_spectrum_piersonmoskowitz (const struct Ocean *oc, const float kx, const float kz)
 
float BLI_ocean_spectrum_texelmarsenarsloe (const struct Ocean *oc, const float kx, const float kz)
 
float BLI_ocean_spectrum_jonswap (const struct Ocean *oc, const float kx, const float kz)
 

Typedef Documentation

◆ OceanCache

typedef struct OceanCache OceanCache

◆ OceanResult

typedef struct OceanResult OceanResult

Function Documentation

◆ BKE_ocean_add()

struct Ocean* BKE_ocean_add ( void  )

Definition at line 1604 of file ocean.c.

References MEM_callocN.

Referenced by copyData(), initData(), and ocean_bake_exec().

◆ BKE_ocean_bake()

void BKE_ocean_bake ( struct Ocean *  o,
struct OceanCache *  och,
void(*)(void *, float progress, int *cancel)  update_cb,
void *  update_cb_data 
)

◆ BKE_ocean_cache_eval_ij()

void BKE_ocean_cache_eval_ij ( struct OceanCache *  och,
struct OceanResult *  ocr,
int  f,
int  i,
int  j 
)

◆ BKE_ocean_cache_eval_uv()

void BKE_ocean_cache_eval_uv ( struct OceanCache *  och,
struct OceanResult *  ocr,
int  f,
float  u,
float  v 
)

◆ BKE_ocean_ensure()

bool BKE_ocean_ensure ( struct OceanModifierData *  omd,
const int  resolution 
)

◆ BKE_ocean_eval_ij()

void BKE_ocean_eval_ij ( struct Ocean *  oc,
struct OceanResult *  ocr,
int  i,
int  j 
)

◆ BKE_ocean_eval_uv()

void BKE_ocean_eval_uv ( struct Ocean *  oc,
struct OceanResult *  ocr,
float  u,
float  v 
)

◆ BKE_ocean_eval_uv_catrom()

void BKE_ocean_eval_uv_catrom ( struct Ocean *  oc,
struct OceanResult *  ocr,
float  u,
float  v 
)

◆ BKE_ocean_eval_xz()

void BKE_ocean_eval_xz ( struct Ocean *  oc,
struct OceanResult *  ocr,
float  x,
float  z 
)

◆ BKE_ocean_eval_xz_catrom()

void BKE_ocean_eval_xz_catrom ( struct Ocean *  oc,
struct OceanResult *  ocr,
float  x,
float  z 
)

◆ BKE_ocean_free()

void BKE_ocean_free ( struct Ocean *  oc)

Definition at line 1640 of file ocean.c.

References MEM_freeN.

Referenced by freeData(), and oceanbake_endjob().

◆ BKE_ocean_free_cache()

void BKE_ocean_free_cache ( struct OceanCache *  och)

Definition at line 1650 of file ocean.c.

References MEM_freeN.

Referenced by BKE_ocean_free_modifier_cache(), and freeData().

◆ BKE_ocean_free_data()

void BKE_ocean_free_data ( struct Ocean *  oc)

◆ BKE_ocean_free_modifier_cache()

void BKE_ocean_free_modifier_cache ( struct OceanModifierData *  omd)

◆ BKE_ocean_init()

void BKE_ocean_init ( struct Ocean *  o,
int  M,
int  N,
float  Lx,
float  Lz,
float  V,
float  l,
float  A,
float  w,
float  damp,
float  alignment,
float  depth,
float  time,
int  spectrum,
float  fetch_jonswap,
float  sharpen_peak_jonswap,
short  do_height_field,
short  do_chop,
short  do_spray,
short  do_normals,
short  do_jacobian,
int  seed 
)

◆ BKE_ocean_init_cache()

struct OceanCache* BKE_ocean_init_cache ( const char *  bakepath,
const char *  relbase,
int  start,
int  end,
float  wave_scale,
float  chop_amount,
float  foam_coverage,
float  foam_fade,
int  resolution 
)

Referenced by ocean_bake_exec().

◆ BKE_ocean_init_from_modifier()

void BKE_ocean_init_from_modifier ( struct Ocean *  ocean,
struct OceanModifierData const *  omd,
const int  resolution 
)

Referenced by copyData(), initData(), and ocean_bake_exec().

◆ BKE_ocean_jminus_to_foam()

float BKE_ocean_jminus_to_foam ( float  jminus,
float  coverage 
)

◆ BKE_ocean_simulate()

void BKE_ocean_simulate ( struct Ocean *  o,
float  t,
float  scale,
float  chop_amount 
)

◆ BKE_ocean_simulate_cache()

void BKE_ocean_simulate_cache ( struct OceanCache *  och,
int  frame 
)

◆ BLI_ocean_spectrum_jonswap()

float BLI_ocean_spectrum_jonswap ( const struct Ocean *  oc,
const float  kx,
const float  kz 
)

◆ BLI_ocean_spectrum_piersonmoskowitz()

float BLI_ocean_spectrum_piersonmoskowitz ( const struct Ocean *  oc,
const float  kx,
const float  kz 
)

◆ BLI_ocean_spectrum_texelmarsenarsloe()

float BLI_ocean_spectrum_texelmarsenarsloe ( const struct Ocean *  oc,
const float  kx,
const float  kz 
)