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-09-03 17:44:03 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:29:57 +0300
commitfc083b4e5b5052e57c6217967f455f620f0f5ae1 (patch)
tree3764b0f2b8622d0e296bb3aff388d9c6848daf5e /source/blender/blenkernel/BKE_cloth.h
parent0f45f4a3e25437b1353982f081acc6a833e2fd01 (diff)
Preparation for collision code fixing.
Instead of handling contact tests and collision response in the same function in collision.c, first generate contact points and return them as a list, then free at the end of the stepping function. This way the contact response can be integrated into the conjugate gradient method properly instead of using the hackish and unstable double evaluation that is currently used.
Diffstat (limited to 'source/blender/blenkernel/BKE_cloth.h')
-rw-r--r--source/blender/blenkernel/BKE_cloth.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index e4fa0b0648b..151a2b58ad3 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -41,6 +41,7 @@ struct Scene;
struct MFace;
struct DerivedMesh;
struct ClothModifierData;
+struct CollisionModifierData;
struct CollisionTree;
struct VoxelData;
@@ -182,10 +183,24 @@ typedef enum {
// collision.c
////////////////////////////////////////////////
+struct CollPair;
+
+typedef struct ColliderContacts {
+ struct Object *ob;
+ struct CollisionModifierData *collmd;
+
+ struct CollPair *collisions;
+ int totcollisions;
+} ColliderContacts;
+
// needed for implicit.c
int cloth_bvh_objcollision (struct Object *ob, struct ClothModifierData *clmd, float step, float dt );
int cloth_points_objcollision(struct Object *ob, struct ClothModifierData *clmd, float step, float dt);
+void cloth_find_point_contacts(struct Object *ob, struct ClothModifierData *clmd, float step, float dt,
+ ColliderContacts **r_collider_contacts, int *r_totcolliders);
+void cloth_free_contacts(ColliderContacts *collider_contacts, int totcolliders);
+
////////////////////////////////////////////////