8 #ifndef __SIM_Impacts_h__
9 #define __SIM_Impacts_h__
24 #define SIM_IMPACTS_FRICTION 0x00000001
28 #define SIM_IMPACTS_REPULSION 0x00000002
32 #define SIM_IMPACTS_POINTINSIDE 0x00000004
35 #define SIM_IMPACTS_CLOTHVOLUME 0x00000008
38 #define SIM_IMPACTS_CLOTHCLOTH 0x00000010
41 #define SIM_IMPACTS_PARTSTOP 0x00000020
44 #define SIM_IMPACTS_PARTKILL 0x00000040
47 #define SIM_IMPACTS_PARTCONTINUE 0x00000080
50 #define SIM_IMPACTS_PARTSTICK 0x00000100
53 #define SIM_IMPACTS_PARTBOUNCE 0x00000200
56 #define SIM_IMPACTS_PARTANY (SIM_IMPACTS_PARTSTOP | \
57 SIM_IMPACTS_PARTKILL | \
58 SIM_IMPACTS_PARTCONTINUE | \
59 SIM_IMPACTS_PARTSTICK | \
60 SIM_IMPACTS_PARTBOUNCE)
64 #define SIM_IMPACTS_FEEDBACK 0x00000400
69 #define SIM_IMPACTS_NOPRIMUV 0x00000800
74 #define SIM_IMPACTS_RESTING 0x00001000
89 int getNumImpacts()
const;
99 fpreal getImpulse(
int index)
const;
101 void setImpulse(
int index,
fpreal impulse);
103 void removeLastImpact();
108 GA_Index getPointNumber(
int index)
const;
111 int getPrimitiveNumber(
int index)
const;
113 fpreal getPrimitiveU(
int index)
const;
115 fpreal getPrimitiveV(
int index)
const;
117 fpreal getPrimitiveW(
int index)
const;
119 int getOtherObjId(
int index)
const;
122 int getOtherObjPointNumber(
int index)
const;
125 int getOtherObjPrimitiveNumber(
int index)
const;
128 fpreal getOtherObjPrimitiveU(
int index)
const;
131 fpreal getOtherObjPrimitiveV(
int index)
const;
134 fpreal getOtherObjPrimitiveW(
int index)
const;
166 void addPrimitiveImpact(
const UT_Vector3 &pos,
187 void mergeImpactsInTimeRange(
const SIM_Impacts &src,
197 void keepOnlyImpactsForAffectors(
222 bool objainfinitemass,
225 bool objbinfinitemass,
228 fpreal dynamicfrictionmultiplier,
230 bool usesdfvelocitya =
false,
231 bool usepointvelocitya =
true,
232 bool usesdfvelocityb =
false,
233 bool usepointvelocityb =
true);
241 bool objbinfinitemass,
244 fpreal dynamicfrictionmultiplier,
246 bool usesdfvelocityb =
false,
247 bool usepointvelocityb =
true);
258 fpreal dynamicfrictionmultiplier,
262 static void splitImpulse(
const UT_Vector3 &impulse,
264 fpreal &normalImpulseLength,
288 void resizeArrays(
int numimpacts);
292 void removeImpact(
int index);
314 "Impact Information",
virtual void makeEqualSubclass(const SIM_Data *source)
#define DECLARE_STANDARD_GETCASTTOTYPE()
virtual bool loadSubclass(UT_IStream &is)
GT_API const UT_StringHolder time
virtual SIM_Query * createQueryObjectSubclass() const
virtual int64 getMemorySizeSubclass() const
int getFlags(int version)
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Holds pointers to a number of SIM_Object objects.
GLsizei GLsizei GLchar * source
virtual void saveSubclass(std::ostream &os) const
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
static const SIM_DopDescription * getEmptyDopDescription()
A DOP description that says not to create an automatic DOP.
virtual void initializeSubclass()