Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/blenkernel/BKE_ocean.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/blenkernel/BKE_ocean.h')
-rw-r--r--source/blender/blenkernel/BKE_ocean.h107
1 files changed, 65 insertions, 42 deletions
diff --git a/source/blender/blenkernel/BKE_ocean.h b/source/blender/blenkernel/BKE_ocean.h
index 9f9314710e8..3ba6486e6c5 100644
--- a/source/blender/blenkernel/BKE_ocean.h
+++ b/source/blender/blenkernel/BKE_ocean.h
@@ -28,41 +28,41 @@ extern "C" {
struct OceanModifierData;
typedef struct OceanResult {
- float disp[3];
- float normal[3];
- float foam;
-
- /* raw eigenvalues/vectors */
- float Jminus;
- float Jplus;
- float Eminus[3];
- float Eplus[3];
+ float disp[3];
+ float normal[3];
+ float foam;
+
+ /* raw eigenvalues/vectors */
+ float Jminus;
+ float Jplus;
+ float Eminus[3];
+ float Eplus[3];
} OceanResult;
typedef struct OceanCache {
- struct ImBuf **ibufs_disp;
- struct ImBuf **ibufs_foam;
- struct ImBuf **ibufs_norm;
+ struct ImBuf **ibufs_disp;
+ struct ImBuf **ibufs_foam;
+ struct ImBuf **ibufs_norm;
- const char *bakepath;
- const char *relbase;
+ const char *bakepath;
+ const char *relbase;
- /* precalculated for time range */
- float *time;
+ /* precalculated for time range */
+ float *time;
- /* constant for time range */
- float wave_scale;
- float chop_amount;
- float foam_coverage;
- float foam_fade;
+ /* constant for time range */
+ float wave_scale;
+ float chop_amount;
+ float foam_coverage;
+ float foam_fade;
- int start;
- int end;
- int duration;
- int resolution_x;
- int resolution_y;
+ int start;
+ int end;
+ int duration;
+ int resolution_x;
+ int resolution_y;
- int baked;
+ int baked;
} OceanCache;
struct Ocean *BKE_ocean_add(void);
@@ -71,29 +71,52 @@ void BKE_ocean_free(struct Ocean *oc);
bool BKE_ocean_ensure(struct OceanModifierData *omd);
void BKE_ocean_init_from_modifier(struct Ocean *ocean, struct OceanModifierData const *omd);
-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, short do_height_field, short do_chop, short do_normals, short do_jacobian, int seed);
+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,
+ short do_height_field,
+ short do_chop,
+ short do_normals,
+ short do_jacobian,
+ int seed);
void BKE_ocean_simulate(struct Ocean *o, float t, float scale, float chop_amount);
/* sampling the ocean surface */
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);
-
+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);
/* ocean cache handling */
-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);
+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_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);