Blender  V3.3
Functions
ocean.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_modifier_types.h"
#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_path_util.h"
#include "BLI_rand.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_ocean.h"
#include "ocean_intern.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "RE_texture.h"
#include "BLI_hash.h"

Go to the source code of this file.

Functions

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

Detailed Description

Based on original code by Drew Whitehouse / Houdini Ocean Toolkit OpenMP hints by Christian Schnellhammer

Definition in file ocean.c.

Function Documentation

◆ BKE_ocean_add()

struct Ocean* BKE_ocean_add ( void  )

Definition at line 1608 of file ocean.c.

References MEM_callocN.

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

◆ BKE_ocean_bake()

void BKE_ocean_bake ( struct Ocean *  UNUSEDo,
struct OceanCache *  UNUSEDoch,
void(*)(void *, float progress, int *cancel)  update_cb,
void *  UNUSEDupdate_cb_data 
)

Definition at line 1699 of file ocean.c.

References update_cb(), and void.

◆ BKE_ocean_cache_eval_ij()

void BKE_ocean_cache_eval_ij ( struct OceanCache *  UNUSEDoch,
struct OceanResult *  UNUSEDocr,
int   UNUSEDf,
int   UNUSEDi,
int   UNUSEDj 
)

Definition at line 1672 of file ocean.c.

◆ BKE_ocean_cache_eval_uv()

void BKE_ocean_cache_eval_uv ( struct OceanCache *  UNUSEDoch,
struct OceanResult *  UNUSEDocr,
int   UNUSEDf,
float   UNUSEDu,
float   UNUSEDv 
)

Definition at line 1664 of file ocean.c.

◆ BKE_ocean_eval_ij()

void BKE_ocean_eval_ij ( struct Ocean *  UNUSEDoc,
struct OceanResult *  UNUSEDocr,
int   UNUSEDi,
int   UNUSEDj 
)

Definition at line 1594 of file ocean.c.

◆ BKE_ocean_eval_uv()

void BKE_ocean_eval_uv ( struct Ocean *  UNUSEDoc,
struct OceanResult *  UNUSEDocr,
float   UNUSEDu,
float   UNUSEDv 
)

Definition at line 1565 of file ocean.c.

◆ BKE_ocean_eval_uv_catrom()

void BKE_ocean_eval_uv_catrom ( struct Ocean *  UNUSEDoc,
struct OceanResult *  UNUSEDocr,
float   UNUSEDu,
float   UNUSEDv 
)

Definition at line 1573 of file ocean.c.

◆ BKE_ocean_eval_xz()

void BKE_ocean_eval_xz ( struct Ocean *  UNUSEDoc,
struct OceanResult *  UNUSEDocr,
float   UNUSEDx,
float   UNUSEDz 
)

Definition at line 1580 of file ocean.c.

◆ BKE_ocean_eval_xz_catrom()

void BKE_ocean_eval_xz_catrom ( struct Ocean *  UNUSEDoc,
struct OceanResult *  UNUSEDocr,
float   UNUSEDx,
float   UNUSEDz 
)

Definition at line 1587 of file ocean.c.

◆ BKE_ocean_free()

void BKE_ocean_free ( struct Ocean *  oc)

Definition at line 1645 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 1655 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 *  UNUSEDoc)

Definition at line 1641 of file ocean.c.

◆ BKE_ocean_free_modifier_cache()

void BKE_ocean_free_modifier_cache ( struct OceanModifierData *  omd)

◆ BKE_ocean_init()

bool BKE_ocean_init ( struct Ocean *  UNUSEDo,
int   UNUSEDM,
int   UNUSEDN,
float   UNUSEDLx,
float   UNUSEDLz,
float   UNUSEDV,
float   UNUSEDl,
float   UNUSEDA,
float   UNUSEDw,
float   UNUSEDdamp,
float   UNUSEDalignment,
float   UNUSEDdepth,
float   UNUSEDtime,
int   UNUSEDspectrum,
float   UNUSEDfetch_jonswap,
float   UNUSEDsharpen_peak_jonswap,
short   UNUSEDdo_height_field,
short   UNUSEDdo_chop,
short   UNUSEDdo_spray,
short   UNUSEDdo_normals,
short   UNUSEDdo_jacobian,
int   UNUSEDseed 
)

Definition at line 1615 of file ocean.c.

◆ BKE_ocean_init_cache()

OceanCache* BKE_ocean_init_cache ( const char *  UNUSEDbakepath,
const char *  UNUSEDrelbase,
int   UNUSEDstart,
int   UNUSEDend,
float   UNUSEDwave_scale,
float   UNUSEDchop_amount,
float   UNUSEDfoam_coverage,
float   UNUSEDfoam_fade,
int   UNUSEDresolution 
)

Definition at line 1680 of file ocean.c.

References MEM_callocN.

◆ BKE_ocean_init_from_modifier()

bool BKE_ocean_init_from_modifier ( struct Ocean *  UNUSEDocean,
struct OceanModifierData const *  UNUSEDomd,
int   UNUSEDresolution 
)

Definition at line 1708 of file ocean.c.

◆ BKE_ocean_jminus_to_foam()

float BKE_ocean_jminus_to_foam ( float   UNUSEDjminus,
float   UNUSEDcoverage 
)

Definition at line 1560 of file ocean.c.

◆ BKE_ocean_simulate()

void BKE_ocean_simulate ( struct Ocean *  UNUSEDo,
float   UNUSEDt,
float   UNUSEDscale,
float   UNUSEDchop_amount 
)

Definition at line 1601 of file ocean.c.

◆ BKE_ocean_simulate_cache()

void BKE_ocean_simulate_cache ( struct OceanCache *  UNUSEDoch,
int   UNUSEDframe 
)

Definition at line 1695 of file ocean.c.