Compile hair volumetrics code as C++, so we can use Eigen easier.
authorLukas Tönne <lukas.toenne@gmail.com>
Thu, 6 Nov 2014 14:05:42 +0000 (15:05 +0100)
committerLukas Tönne <lukas.toenne@gmail.com>
Tue, 20 Jan 2015 08:30:06 +0000 (09:30 +0100)
source/blender/physics/CMakeLists.txt
source/blender/physics/intern/hair_volume.cpp [moved from source/blender/physics/intern/hair_volume.c with 99% similarity]

index 5df32c2ea32c653e3e972457dbb2c6810191a599..018535cc2abbf569c18af21234bcc59f3a93af9a 100644 (file)
@@ -41,7 +41,7 @@ set(INC_SYS
 set(SRC
        intern/BPH_mass_spring.cpp
        intern/ConstrainedConjugateGradient.h
-       intern/hair_volume.c
+       intern/hair_volume.cpp
        intern/implicit.h
        intern/implicit_blender.c
        intern/implicit_eigen.cpp
similarity index 99%
rename from source/blender/physics/intern/hair_volume.c
rename to source/blender/physics/intern/hair_volume.cpp
index 0713878239f08442433148671860b593c878e217..23abe917935d79146d699d4ad20ccf134b07a844 100644 (file)
@@ -582,7 +582,7 @@ HairGrid *BPH_hair_volume_create_vertex_grid(float cellsize, const float gmin[3]
        }
        size = hair_grid_size(res);
        
-       grid = MEM_callocN(sizeof(HairGrid), "hair grid");
+       grid = (HairGrid *)MEM_callocN(sizeof(HairGrid), "hair grid");
        grid->res[0] = res[0];
        grid->res[1] = res[1];
        grid->res[2] = res[2];
@@ -590,7 +590,7 @@ HairGrid *BPH_hair_volume_create_vertex_grid(float cellsize, const float gmin[3]
        copy_v3_v3(grid->gmax, gmax_margin);
        grid->cellsize = cellsize;
        grid->inv_cellsize = scale;
-       grid->verts = MEM_mallocN(sizeof(HairGridVert) * size, "hair voxel data");
+       grid->verts = (HairGridVert *)MEM_mallocN(sizeof(HairGridVert) * size, "hair voxel data");
 
        /* initialize grid */
        for (i = 0; i < size; ++i) {