HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_RelationshipCollide.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 __SIM_RelationshipCollide_h__
9 #define __SIM_RelationshipCollide_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_RelationshipData.h"
13 #include "SIM_OptionsUser.h"
14 
15 class SIM_Collider;
16 
17 /// This class defines a relationship between objects that need to perform
18 /// collision detection.
20  public SIM_OptionsUser
21 {
22 public:
23  /// The priority parameter is used when two or more collision
24  /// relationships apply to the same pair of objects. In that case,
25  /// the collision relationship with the higher priority is used to
26  /// determine what collider to use for those objects. An example of
27  /// this would be where several cloth objects are set up in a mutual
28  /// collision relationship, but the user doesn't want to do any
29  /// self-collision detection. In this case the mutual collision
30  /// data between all the cloth objects would be given a low priority.
31  /// Then each cloth object would have a high priority collision
32  /// relationship with just itself, and specifying a SIM_ColliderNone
33  /// as the collider.
35 
36  /// Gets the const SIM_Collider subdata that defines the collision
37  /// detection method to use. This data is found by returning the first
38  /// SIM_Collider subdata attached to this data. If no SIM_Collider
39  /// subdata is attached to this relationship, the standard method
40  /// of finding a proper default collider for a pair of objects is
41  /// used. For information on this, see the SIM_ColliderLabel class.
42  const SIM_Collider *getCollider() const;
43 
44 protected:
45  explicit SIM_RelationshipCollide(const SIM_DataFactory *factory);
46  ~SIM_RelationshipCollide() override;
47 
48 private:
49  static const SIM_DopDescription *getCollideDopDescription();
50 
54  "Collide Relationship",
55  getCollideDopDescription());
56 };
57 
58 #endif
59 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define SIM_NAME_PRIORITY
Definition: SIM_Names.h:174
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define GETSET_DATA_FUNCS_I(DataName, FuncName)
#define SIM_API
Definition: SIM_API.h:12