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 Tönne <lukas.toenne@gmail.com>2014-11-06 16:05:32 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:06 +0300
commitbf96400558db9e8e79a00a73eba99a1ca008231f (patch)
tree85af516b6ded76da7d710b40eee03012ddc6dc41 /source/blender/physics/intern/implicit.h
parent8dbb6f0d5dd923c57af74f16bbb0e86333dd0a51 (diff)
Use a fixed, uniform cell size for hair continuum grids.
This is a bit more awkward for artists to use, but necessary for a stable solution of the hair continuum calculation. The grid size is defined by the user, the extent of the grid is then calculated based on the hair geometry. A hard upper limit prevents bad memory allocation in case too small values are entered. Conflicts: source/blender/physics/intern/BPH_mass_spring.cpp
Diffstat (limited to 'source/blender/physics/intern/implicit.h')
-rw-r--r--source/blender/physics/intern/implicit.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/physics/intern/implicit.h b/source/blender/physics/intern/implicit.h
index eba2df411af..373a73cf53f 100644
--- a/source/blender/physics/intern/implicit.h
+++ b/source/blender/physics/intern/implicit.h
@@ -170,10 +170,12 @@ struct HairGrid;
struct Object;
struct VoxelData;
-struct HairGrid *BPH_hair_volume_create_vertex_grid(int res, const float gmin[3], const float gmax[3]);
+#define MAX_HAIR_GRID_RES 256
+
+struct HairGrid *BPH_hair_volume_create_vertex_grid(float cellsize, const float gmin[3], const float gmax[3]);
void BPH_hair_volume_free_vertex_grid(struct HairGrid *grid);
void BPH_hair_volume_set_debug_data(struct HairGrid *grid, struct SimDebugData *debug_data);
-void BPH_hair_volume_grid_geometry(struct HairGrid *grid, float cellsize[3], int res[3], float gmin[3], float gmax[3]);
+void BPH_hair_volume_grid_geometry(struct HairGrid *grid, float *cellsize, int res[3], float gmin[3], float gmax[3]);
void BPH_hair_volume_add_vertex(struct HairGrid *grid, const float x[3], const float v[3]);
void BPH_hair_volume_add_segment(struct HairGrid *grid,