Commit: ba733ed600d8cc436805a1680f42a954a61febb3
Author: Jacques Lucke
Date:   Sun Dec 9 15:54:32 2018 +0100
Branches: rigid_deform
https://developer.blender.org/rBba733ed600d8cc436805a1680f42a954a61febb3

renaming LaplacianSystem to RigidDeformSystem

===================================================================

M       source/blender/modifiers/intern/MOD_rigiddeform.c
M       source/blender/modifiers/intern/MOD_rigiddeform_system.cc
M       source/blender/modifiers/intern/MOD_rigiddeform_system.h

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_rigiddeform.c 
b/source/blender/modifiers/intern/MOD_rigiddeform.c
index cf62f77d395..a91f0a1e43e 100644
--- a/source/blender/modifiers/intern/MOD_rigiddeform.c
+++ b/source/blender/modifiers/intern/MOD_rigiddeform.c
@@ -163,7 +163,7 @@ static void bind_current_mesh_to_modifier(
 /* ********** Calculate new positions *********** */
 
 typedef struct Cache {
-       struct LaplacianSystem *system;
+       struct RigidDeformSystem *system;
 } Cache;
 
 static Cache *cache_new(void)
@@ -174,7 +174,7 @@ static Cache *cache_new(void)
 static void cache_free(Cache *cache)
 {
        if (cache->system) {
-               LaplacianSystem_free(cache->system);
+               RigidDeformSystem_free(cache->system);
        }
        MEM_freeN(cache);
 }
@@ -192,11 +192,11 @@ static void deform_vertices(RigidDeformModifierData 
*rdmd, Mesh *mesh, VectorArr
        Cache *cache = (Cache *)rdmd->cache;
 
        if (cache->system == NULL) {
-               cache->system = LaplacianSystem_new(mesh);
-               LaplacianSystem_setAnchors(cache->system, 
rdmd->bind_data->anchor_indices, rdmd->bind_data->anchor_amount);
+               cache->system = RigidDeformSystem_new(mesh);
+               RigidDeformSystem_setAnchors(cache->system, 
rdmd->bind_data->anchor_indices, rdmd->bind_data->anchor_amount);
        }
 
-       LaplacianSystem_correctNonAnchors(cache->system, vertex_cos, 
rdmd->iterations);
+       RigidDeformSystem_correctNonAnchors(cache->system, vertex_cos, 
rdmd->iterations);
 }
 
 static RigidDeformModifierData *get_original_modifier_data(
diff --git a/source/blender/modifiers/intern/MOD_rigiddeform_system.cc 
b/source/blender/modifiers/intern/MOD_rigiddeform_system.cc
index 23b3c1027cf..9e9ce1e2072 100644
--- a/source/blender/modifiers/intern/MOD_rigiddeform_system.cc
+++ b/source/blender/modifiers/intern/MOD_rigiddeform_system.cc
@@ -383,13 +383,13 @@ static Vectors calculate_new_inner_diff(
        return new_diffs;
 }
 
-struct LaplacianSystemMatrix
+struct RigidDeformSystemMatrix
 {
        SparseMatrixF L, A_II, A_IB;
        ReorderData order;
        Eigen::SimplicialLDLT<SparseMatrixD> *solver;
 
-       LaplacianSystemMatrix(
+       RigidDeformSystemMatrix(
                std::vector<WeightedEdge> &edges,
                std::vector<int> anchors,
                        int vertex_amount)
@@ -493,7 +493,7 @@ struct LaplacianSystemMatrix
        }
 };
 
-class LaplacianSystem
+class RigidDeformSystem
 {
 
 private:
@@ -502,11 +502,11 @@ private:
        std::vector<WeightedEdge> edges;
 
        std::vector<int> *anchor_indices = nullptr;
-       LaplacianSystemMatrix *system_matrix = nullptr;
+       RigidDeformSystemMatrix *system_matrix = nullptr;
        Vectors *initial_inner_diff = nullptr;
 
 public:
-       LaplacianSystem(Mesh *orig_mesh)
+       RigidDeformSystem(Mesh *orig_mesh)
        {
                this->orig_vertex_positions = getVertexPositions(orig_mesh);
                this->triangle_indices = getTriangleIndices(orig_mesh);
@@ -518,7 +518,7 @@ public:
        void setAnchors(std::vector<int> &anchor_indices)
        {
                this->anchor_indices = new std::vector<int>(anchor_indices);
-               this->system_matrix = new LaplacianSystemMatrix(
+               this->system_matrix = new RigidDeformSystemMatrix(
                        this->edges, *this->anchor_indices, 
this->vertex_amount());
                this->initial_inner_diff = 
this->system_matrix->calculateInnerDiff(this->orig_vertex_positions);
        }
@@ -577,14 +577,14 @@ public:
        }
 };
 
-LaplacianSystem *LaplacianSystem_new(struct Mesh *mesh)
+RigidDeformSystem *RigidDeformSystem_new(struct Mesh *mesh)
 {
        TIMEIT("new");
-       return new LaplacianSystem(mesh);
+       return new RigidDeformSystem(mesh);
 }
 
-void LaplacianSystem_setAnchors(
-        LaplacianSystem *system,
+void RigidDeformSystem_setAnchors(
+        RigidDeformSystem *system,
         int *anchor_indices, int anchor_amount)
 {
        TIMEIT("set anchors");
@@ -592,16 +592,16 @@ void LaplacianSystem_setAnchors(
        system->setAnchors(anchors);
 }
 
-void LaplacianSystem_correctNonAnchors(
-        LaplacianSystem *system, Vector3Ds positions, int iterations)
+void RigidDeformSystem_correctNonAnchors(
+        RigidDeformSystem *system, Vector3Ds positions, int iterations)
 {
        Vectors _positions(positions, system->vertex_amount());
        system->correct_non_anchors(_positions, iterations);
        _positions.copy_to(positions);
 }
 
-void LaplacianSystem_free(
-        struct LaplacianSystem *system)
+void RigidDeformSystem_free(
+        struct RigidDeformSystem *system)
 {
 
 }
\ No newline at end of file
diff --git a/source/blender/modifiers/intern/MOD_rigiddeform_system.h 
b/source/blender/modifiers/intern/MOD_rigiddeform_system.h
index 6e862120446..2bb82ec68f1 100644
--- a/source/blender/modifiers/intern/MOD_rigiddeform_system.h
+++ b/source/blender/modifiers/intern/MOD_rigiddeform_system.h
@@ -30,21 +30,21 @@ extern "C" {
 #endif
 
 struct Mesh;
-struct LaplacianSystem;
+struct RigidDeformSystem;
 
 typedef float (*Vector3Ds)[3];
 
-struct LaplacianSystem *LaplacianSystem_new(struct Mesh *mesh);
+struct RigidDeformSystem *RigidDeformSystem_new(struct Mesh *mesh);
 
-void LaplacianSystem_setAnchors(
-        struct LaplacianSystem *system,
+void RigidDeformSystem_setAnchors(
+        struct RigidDeformSystem *system,
         int *anchor_indices, int anchor_amount);
 
-void LaplacianSystem_correctNonAnchors(
-        struct LaplacianSystem *system, Vector3Ds positions, int iterations);
+void RigidDeformSystem_correctNonAnchors(
+        struct RigidDeformSystem *system, Vector3Ds positions, int iterations);
 
-void LaplacianSystem_free(
-        struct LaplacianSystem *system);
+void RigidDeformSystem_free(
+        struct RigidDeformSystem *system);
 
 #ifdef __cplusplus
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to