HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RBD_ColliderSDF.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef __RBD_ColliderSDF_h__
9 #define __RBD_ColliderSDF_h__
10 
11 
12 #include "RBD_API.h"
13 #include "RBD_Solver.h"
14 #include "RBD_Object.h"
15 #include "RBD_Utils.h"
16 
17 #include <SIM/SIM_Collider.h>
18 #include <SIM/SIM_Utils.h>
19 
20 class SIM_Object;
21 class SIM_Random;
22 class SIM_SDF;
23 class RBD_State;
24 class RBD_ContactGraph;
25 class RBD_ObjectTree;
26 
28 {
29 public:
30  /// Finds intersection of RBD objects. Fills the given queue with all
31  /// of the two way intersections.
32  void intersectRBDObjects(SIM_IsectPriorityQueue &queue,
33  RBD_Object *obj_a, RBD_Object *obj_b,
34  bool findany,
35  bool finddeepest,
36  fpreal depthtol,
37  bool ignorevel,
38  bool usesdfvel,
39  bool usepointvel) const;
40 
41 protected:
42  explicit RBD_ColliderSDF(const SIM_DataFactory *factory);
43  ~RBD_ColliderSDF() override;
44 
45  /// Perform collision.
46  /// - The return value is true if successful and false if the timestep
47  /// should be repeated.
48  /// - Thickness is a "diameter" - the thickness from one side of the
49  /// cloth/hair to the other.
50 
52  SIM_Object &object,
53  SIM_Object &affector,
54  const SIM_Time &startTime,
55  const SIM_Time &endTime,
56  SIM_ImpactApplyType implactapplytype,
57  int impactflags) const override;
58 
59  /// Find all vertices of A which are inside of B and add them
60  /// to our queue.
61  void findVertexIntersections(SIM_IsectPriorityQueue &queue,
62  RBD_Object *obj_a,
63  RBD_Object *obj_b,
64  bool reverseobj,
65  bool findany,
66  bool finddeepest,
67  fpreal depthtol,
68  bool ignorevel,
69  bool usesdfvel,
70  bool usepointvel,
71  int child_id_a,
72  int child_id_b,
73  bool allow_childa_recurse = true) const;
74 
75 
76 
77  static const SIM_DopDescription *getDopDescription();
81  "Volume/Volume Collider",
82  getDopDescription());
83 };
84 
85 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define RBD_API
Definition: RBD_API.h:10
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
SIM_ImpactApplyType
Defines the possible affector types when doing collision detection.
Definition: SIM_Collider.h:56
This class holds a signed distance function representing a GU_Detail.
Definition: SIM_SDF.h:27
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the queue
Definition: thread.h:623
virtual bool collideObjectsSubclass(SIM_Engine &engine, SIM_Object &object, SIM_Object &affector, const SIM_Time &starttime, const SIM_Time &endtime, SIM_ImpactApplyType impactapplytype, int impactflags) const
fpreal64 fpreal
Definition: SYS_Types.h:277