diff --git a/include/bounce/cloth/cloth_contact_manager.h b/include/bounce/cloth/cloth_contact_manager.h index eccf419..c1e8bd7 100644 --- a/include/bounce/cloth/cloth_contact_manager.h +++ b/include/bounce/cloth/cloth_contact_manager.h @@ -19,8 +19,8 @@ #ifndef B3_CLOTH_CONTACT_MANAGER_H #define B3_CLOTH_CONTACT_MANAGER_H -#include -#include +#include +#include #include #include #include diff --git a/include/bounce/cloth/cloth_contact_solver.h b/include/bounce/cloth/contacts/cloth_contact_solver.h similarity index 100% rename from include/bounce/cloth/cloth_contact_solver.h rename to include/bounce/cloth/contacts/cloth_contact_solver.h diff --git a/include/bounce/cloth/cloth_particle_body_contact.h b/include/bounce/cloth/contacts/cloth_particle_body_contact.h similarity index 100% rename from include/bounce/cloth/cloth_particle_body_contact.h rename to include/bounce/cloth/contacts/cloth_particle_body_contact.h diff --git a/include/bounce/cloth/cloth_particle_triangle_contact.h b/include/bounce/cloth/contacts/cloth_particle_triangle_contact.h similarity index 100% rename from include/bounce/cloth/cloth_particle_triangle_contact.h rename to include/bounce/cloth/contacts/cloth_particle_triangle_contact.h diff --git a/include/bounce/cloth/dense_vec3.h b/include/bounce/sparse/dense_vec3.h similarity index 100% rename from include/bounce/cloth/dense_vec3.h rename to include/bounce/sparse/dense_vec3.h diff --git a/include/bounce/cloth/diag_mat33.h b/include/bounce/sparse/diag_mat33.h similarity index 98% rename from include/bounce/cloth/diag_mat33.h rename to include/bounce/sparse/diag_mat33.h index b08065e..f7a1486 100644 --- a/include/bounce/cloth/diag_mat33.h +++ b/include/bounce/sparse/diag_mat33.h @@ -20,7 +20,7 @@ #define B3_DIAG_MAT_33_H #include -#include +#include // Diagonal matrix storing only the diagonal elements of the // original matrix. diff --git a/include/bounce/cloth/sparse_mat33.h b/include/bounce/sparse/sparse_mat33.h similarity index 98% rename from include/bounce/cloth/sparse_mat33.h rename to include/bounce/sparse/sparse_mat33.h index 273b7ad..7bebd1a 100644 --- a/include/bounce/cloth/sparse_mat33.h +++ b/include/bounce/sparse/sparse_mat33.h @@ -20,8 +20,8 @@ #define B3_SPARSE_MAT_33_H #include -#include -#include +#include +#include // An element in a sparse matrix. struct b3RowValue diff --git a/include/bounce/cloth/sparse_mat33_view.h b/include/bounce/sparse/sparse_mat33_view.h similarity index 98% rename from include/bounce/cloth/sparse_mat33_view.h rename to include/bounce/sparse/sparse_mat33_view.h index 414808c..9d92520 100644 --- a/include/bounce/cloth/sparse_mat33_view.h +++ b/include/bounce/sparse/sparse_mat33_view.h @@ -19,7 +19,7 @@ #ifndef B3_SPARSE_MAT_33_VIEW_H #define B3_SPARSE_MAT_33_VIEW_H -#include +#include struct b3ArrayRowValue { diff --git a/include/bounce/cloth/sparse_sym_mat33.h b/include/bounce/sparse/sparse_sym_mat33.h similarity index 99% rename from include/bounce/cloth/sparse_sym_mat33.h rename to include/bounce/sparse/sparse_sym_mat33.h index c8af4a2..e4d4b3e 100644 --- a/include/bounce/cloth/sparse_sym_mat33.h +++ b/include/bounce/sparse/sparse_sym_mat33.h @@ -19,7 +19,7 @@ #ifndef B3_SPARSE_SYM_MAT_33_H #define B3_SPARSE_SYM_MAT_33_H -#include +#include // A sparse symmetric matrix. // Each row is a list of non-zero elements in the row. diff --git a/include/bounce/cloth/sparse_sym_mat33_view.h b/include/bounce/sparse/sparse_sym_mat33_view.h similarity index 96% rename from include/bounce/cloth/sparse_sym_mat33_view.h rename to include/bounce/sparse/sparse_sym_mat33_view.h index 269d4dc..7d944d6 100644 --- a/include/bounce/cloth/sparse_sym_mat33_view.h +++ b/include/bounce/sparse/sparse_sym_mat33_view.h @@ -19,8 +19,8 @@ #ifndef B3_SPARSE_SYM_MAT_33_VIEW_H #define B3_SPARSE_SYM_MAT_33_VIEW_H -#include -#include +#include +#include // A read-only sparse symmetric matrix. struct b3SparseSymMat33View diff --git a/src/bounce/cloth/cloth_force_solver.cpp b/src/bounce/cloth/cloth_force_solver.cpp index 2370c2a..e530d54 100644 --- a/src/bounce/cloth/cloth_force_solver.cpp +++ b/src/bounce/cloth/cloth_force_solver.cpp @@ -19,10 +19,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include // Here, we solve Ax = b using the Modified Preconditioned Conjugate Gradient (MPCG) algorithm. diff --git a/src/bounce/cloth/cloth_solver.cpp b/src/bounce/cloth/cloth_solver.cpp index 9cdc4c8..6bf66ab 100644 --- a/src/bounce/cloth/cloth_solver.cpp +++ b/src/bounce/cloth/cloth_solver.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/bounce/cloth/cloth_contact_solver.cpp b/src/bounce/cloth/contacts/cloth_contact_solver.cpp similarity index 99% rename from src/bounce/cloth/cloth_contact_solver.cpp rename to src/bounce/cloth/contacts/cloth_contact_solver.cpp index 8825734..ae715c6 100644 --- a/src/bounce/cloth/cloth_contact_solver.cpp +++ b/src/bounce/cloth/contacts/cloth_contact_solver.cpp @@ -16,7 +16,7 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#include +#include #include #include #include diff --git a/src/bounce/cloth/cloth_particle_body_contact.cpp b/src/bounce/cloth/contacts/cloth_particle_body_contact.cpp similarity index 96% rename from src/bounce/cloth/cloth_particle_body_contact.cpp rename to src/bounce/cloth/contacts/cloth_particle_body_contact.cpp index 54b3ed5..fb580f9 100644 --- a/src/bounce/cloth/cloth_particle_body_contact.cpp +++ b/src/bounce/cloth/contacts/cloth_particle_body_contact.cpp @@ -16,7 +16,7 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#include +#include #include #include #include diff --git a/src/bounce/cloth/cloth_particle_triangle_contact.cpp b/src/bounce/cloth/contacts/cloth_particle_triangle_contact.cpp similarity index 96% rename from src/bounce/cloth/cloth_particle_triangle_contact.cpp rename to src/bounce/cloth/contacts/cloth_particle_triangle_contact.cpp index 8be1b1b..64d4073 100644 --- a/src/bounce/cloth/cloth_particle_triangle_contact.cpp +++ b/src/bounce/cloth/contacts/cloth_particle_triangle_contact.cpp @@ -16,13 +16,13 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#include +#include #include #include #include #include -// +// Solve constrained Barycentric coordinates for point Q static void b3Solve3(float32 out[3], const b3Vec3& A, const b3Vec3& B, const b3Vec3& C, const b3Vec3& Q) diff --git a/src/bounce/cloth/spring_force.cpp b/src/bounce/cloth/spring_force.cpp index e2d0265..1f687ae 100644 --- a/src/bounce/cloth/spring_force.cpp +++ b/src/bounce/cloth/spring_force.cpp @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include void b3SpringForceDef::Initialize(b3Particle* particle1, b3Particle* particle2, float32 structuralStiffness, float32 dampingStiffness) { diff --git a/src/bounce/softbody/softbody_force_solver.cpp b/src/bounce/softbody/softbody_force_solver.cpp index e35307d..3d7adbf 100644 --- a/src/bounce/softbody/softbody_force_solver.cpp +++ b/src/bounce/softbody/softbody_force_solver.cpp @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include // This work is based on the paper "Interactive Virtual Materials" written by // Matthias Mueller Fischer