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:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-11-13 16:17:27 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2011-11-13 16:17:27 +0400
commit11c83d843206648a33bcc8b4d754577ec0a51d2a (patch)
tree58af33c372ba5d77f68d6ed7b37e5aecd6e6c678 /source/blender/makesdna/DNA_modifier_types.h
parentb1019a56b54294fc91293c5c43ef46d54950ae84 (diff)
Ocean Sim modifier patch
by Matt Ebb, Hamed Zaghaghi This adds a new Modifier "Ocean" to simulate large-scale wave motion. Details can be found in the wiki documentation [1], the project homepage [2] and the patch tracker [3] The modifier is disabled by default for now. To enable it, the WITH_OCEANSIM (cmake) / WITH_BF_OCEANSIM (scons) flags have to be set. The code depends on fftw3, so this also has to be enabled. [1] http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Simulation/Ocean [2] http://www.savetheoceansim.com [3] http://projects.blender.org/tracker/?group_id=9&atid=127&func=detail&aid=28338
Diffstat (limited to 'source/blender/makesdna/DNA_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 20001ea6cb6..aec984cda34 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -75,6 +75,7 @@ typedef enum ModifierType {
eModifierType_WeightVGProximity,
eModifierType_EmptySlot, /* keep so DynamicPaint keep loading, can re-use later */
eModifierType_DynamicPaint, /* reserve slot */
+ eModifierType_Ocean,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -750,6 +751,64 @@ typedef struct ScrewModifierData {
#define MOD_SCREW_OBJECT_OFFSET (1<<2)
// #define MOD_SCREW_OBJECT_ANGLE (1<<4)
+typedef struct OceanModifierData {
+ ModifierData modifier;
+
+ struct Ocean *ocean;
+ struct OceanCache *oceancache;
+
+ int resolution;
+ int spatial_size;
+
+ float wind_velocity;
+
+ float damp;
+ float smallest_wave;
+ float depth;
+
+ float wave_alignment;
+ float wave_direction;
+ float wave_scale;
+
+ float chop_amount;
+ float foam_coverage;
+ float time;
+
+ int seed;
+ int flag;
+ int output;
+
+ int refresh;
+
+ int bakestart;
+ int bakeend;
+
+ char cachepath[240]; // FILE_MAX
+ int cached;
+
+ int geometry_mode;
+ float size;
+ int repeat_x;
+ int repeat_y;
+
+ float foam_fade;
+
+} OceanModifierData;
+
+#define MOD_OCEAN_GEOM_GENERATE 0
+#define MOD_OCEAN_GEOM_DISPLACE 1
+#define MOD_OCEAN_GEOM_SIM_ONLY 2
+
+#define MOD_OCEAN_REFRESH_RESET 1
+#define MOD_OCEAN_REFRESH_SIM 2
+#define MOD_OCEAN_REFRESH_ADD 4
+#define MOD_OCEAN_REFRESH_CLEAR_CACHE 8
+#define MOD_OCEAN_REFRESH_TOPOLOGY 16
+
+#define MOD_OCEAN_GENERATE_FOAM 1
+#define MOD_OCEAN_GENERATE_NORMALS 2
+
+
typedef struct WarpModifierData {
ModifierData modifier;