00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc. 00008 * 477 Richmond Street West, Suite 1001 00009 * Toronto, Ontario 00010 * Canada M5V 3E7 00011 * 416-504-9876 00012 */ 00013 00014 #ifndef __SIM_RelationshipCollide_h__ 00015 #define __SIM_RelationshipCollide_h__ 00016 00017 #include "SIM_API.h" 00018 #include "SIM_RelationshipData.h" 00019 #include "SIM_OptionsUser.h" 00020 00021 class SIM_Collider; 00022 00023 /// This class defines a relationship between objects that need to perform 00024 /// collision detection. 00025 class SIM_API SIM_RelationshipCollide : public SIM_RelationshipData, 00026 public SIM_OptionsUser 00027 { 00028 public: 00029 /// The priority parameter is used when two or more collision 00030 /// relationships apply to the same pair of objects. In that case, 00031 /// the collision relationship with the higher priority is used to 00032 /// determine what collider to use for those objects. An example of 00033 /// this would be where several cloth objects are set up in a mutual 00034 /// collision relationship, but the user doesn't want to do any 00035 /// self-collision detection. In this case the mutual collision 00036 /// data between all the cloth objects would be given a low priority. 00037 /// Then each cloth object would have a high priority collision 00038 /// relationship with just itself, and specifying a SIM_ColliderNone 00039 /// as the collider. 00040 GETSET_DATA_FUNCS_I(SIM_NAME_PRIORITY, Priority); 00041 00042 /// Gets the const SIM_Collider subdata that defines the collision 00043 /// detection method to use. This data is found by returning the first 00044 /// SIM_Collider subdata attached to this data. If no SIM_Collider 00045 /// subdata is attached to this relationship, the standard method 00046 /// of finding a proper default collider for a pair of objects is 00047 /// used. For information on this, see the SIM_ColliderLabel class. 00048 const SIM_Collider *getCollider() const; 00049 00050 protected: 00051 explicit SIM_RelationshipCollide(const SIM_DataFactory *factory); 00052 virtual ~SIM_RelationshipCollide(); 00053 00054 private: 00055 static const SIM_DopDescription *getCollideDopDescription(); 00056 00057 DECLARE_STANDARD_GETCASTTOTYPE(); 00058 DECLARE_DATAFACTORY(SIM_RelationshipCollide, 00059 SIM_RelationshipData, 00060 "Collide Relationship", 00061 getCollideDopDescription()); 00062 }; 00063 00064 #endif 00065
1.5.9