38 float enableAreaPreserving=
false;
39 float areaPreservingRate=0.8f;
40 float areaPreservingRigidity=1.0f;
41 float targetPreservationArea=0.0f;
43 float particleSpesificMass=1.0f;
44 bool enableParticleSpesificMass=
false;
47 float circumference=0.0f;
48 bool enableAreaStability=
false;
49 bool enablePassivationOfInternalSprings=
false;
52 bool enableSelfCollisions=
false;
53 float selfCollisionParticleRadius=0.0f;
55 bool enableShapeMatching=
false;
56 float shapeMatchingRate=0.4f;
57 bool ApplyShapeMatchingInternals=
false;
58 bool enableShapeMatchingFixedTransform=
false;
59 QVector shapeMatchingFixedPosition=QVector::Zero();
60 float shapeMatchingFixedRotation=0.0f;
65 float safe_asin(
float value){
75 bool IsPolygonCW(vector<QParticle*> polygon);
97 areaPreservingRate=value;
105 areaPreservingRigidity=value;
113 enableAreaPreserving=value;
125 targetPreservationArea=value;
133 enableSelfCollisions=value;
142 selfCollisionParticleRadius=value;
151 enablePassivationOfInternalSprings=value;
160 enableShapeMatching=value;
161 ApplyShapeMatchingInternals=!withoutInternals;
170 shapeMatchingRate=value;
179 enableShapeMatchingFixedTransform=value;
188 shapeMatchingFixedPosition=value;
197 shapeMatchingFixedRotation=value;
205 particleSpesificMass=value;
214 enableParticleSpesificMass=value;
221 if(enableParticleSpesificMass)
222 return particleSpesificMass;
232 return areaPreservingRate;
236 return areaPreservingRigidity;
240 return enableAreaPreserving;
244 return targetPreservationArea;
248 return enableSelfCollisions;
252 return selfCollisionParticleRadius;
256 return enablePassivationOfInternalSprings;
260 return enableShapeMatching;
266 return shapeMatchingRate;
271 return enableShapeMatchingFixedTransform;
276 return shapeMatchingFixedPosition;
281 return shapeMatchingFixedRotation;
286 return particleSpesificMass;
290 return enableParticleSpesificMass;
QBody objects are the base class for all types of bodies. Any class derived from QBody shares these m...
Definition: qbody.h:43
float GetTotalPolygonsInitialArea()
Definition: qbody.h:226
QSoftBody is a body type that defines deformable, soft objects in the physics world....
Definition: qsoftbody.h:35
QSoftBody * SetShapeMatchingEnabled(bool value, bool withoutInternals=false)
Definition: qsoftbody.h:159
QVector GetShapeMatchingFixedPosition()
Definition: qsoftbody.h:275
float GetTargetPreservationArea()
Definition: qsoftbody.h:243
float GetAreaPreservingRigidity()
Definition: qsoftbody.h:235
QSoftBody * SetRigidity(float value)
Definition: qsoftbody.h:88
float GetParticleSpesificMass()
Definition: qsoftbody.h:285
QSoftBody * SetAreaPreservingRigidity(float value)
Definition: qsoftbody.h:104
QSoftBody * SetAreaPreservingRate(float value)
Definition: qsoftbody.h:96
QSoftBody * SetTargetPreservationArea(float value)
Definition: qsoftbody.h:124
QSoftBody * SetAreaPreservingEnabled(bool value)
Definition: qsoftbody.h:112
void PreserveAreas()
Definition: qsoftbody.cpp:154
float GetShapeMatchingRate()
Definition: qsoftbody.h:265
bool GetShapeMatchingEnabled()
Definition: qsoftbody.h:259
bool GetSelfCollisionsEnabled()
Definition: qsoftbody.h:247
QSoftBody * SetPassivationOfInternalSpringsEnabled(bool value)
Definition: qsoftbody.h:150
QSoftBody * SetParticleSpesificMassEnabled(bool value)
Definition: qsoftbody.h:213
float GetRigidity()
Definition: qsoftbody.h:227
float GetShapeMatchingFixedRotation()
Definition: qsoftbody.h:280
QSoftBody * SetSelfCollisionsEnabled(bool value)
Definition: qsoftbody.h:132
void ApplyShapeMatching()
Definition: qsoftbody.cpp:228
QSoftBody * SetShapeMatchingFixedRotation(float value)
Definition: qsoftbody.h:196
virtual void Update()
Definition: qsoftbody.cpp:79
float GetMass()
Definition: qsoftbody.h:220
bool GetShapeMatchingFixedTransformEnabled()
Definition: qsoftbody.h:270
bool GetPassivationOfInternalSpringsEnabled()
Definition: qsoftbody.h:255
QSoftBody * SetShapeMatchingFixedTransformEnabled(bool value)
Definition: qsoftbody.h:178
QSoftBody * SetShapeMatchingRate(float value)
Definition: qsoftbody.h:169
virtual void PostUpdate()
Definition: qsoftbody.cpp:148
float GetAreaPreservingRate()
Definition: qsoftbody.h:231
QSoftBody * SetSelfCollisionsSpecifiedRadius(float value)
Definition: qsoftbody.h:141
QSoftBody * SetShapeMatchingFixedPosition(QVector value)
Definition: qsoftbody.h:187
float GetSelfCollisionsSpecifiedRadius()
Definition: qsoftbody.h:251
QSoftBody * SetParticleSpesificMass(float value)
Definition: qsoftbody.h:204
bool GetAreaPreservingEnabled()
Definition: qsoftbody.h:239
bool GetParticleSpesificMassEnabled()
Definition: qsoftbody.h:289