14 #ifndef __GU_Turbulence_h__
15 #define __GU_Turbulence_h__
60 unsigned singleAttractor:1,
90 void cook(
float now,
float time_step = 1./30.);
103 buildCollisionCache();
104 initCollision(collision);
163 {
flags.singleAttractor = onOff; }
165 {
return flags.singleAttractor; }
184 { attractor.setAttractor(gdp); initAttractor(gdp); }
189 { attractor.initPointAttractorForce(); }
192 { attractor.cleanPointAttractorForce(); }
198 { attractor.getAttractorForce(myGdp->getPos3(ptoff),
force,
199 getSingleAttractor(), myGdp->pointIndex(ptoff)); }
220 virtual int changeTime(
float t);
223 virtual float getBirthRate(
float t);
227 virtual float getLifetime(
float t,
int split);
230 virtual int getNumSplit(
float t);
239 virtual void setBirthAttributes(
GA_Offset ptoff,
245 virtual float getMass(
float t,
GA_Offset ptoff) = 0;
247 virtual void getForce(
float t,
GA_Offset ptoff,
252 virtual void updateSource(
float t);
253 virtual void updateCollision(
float t);
254 virtual void updateAttractor(
float t);
271 virtual void initCollision(
GU_Detail *coll);
298 void cookTime(
float t,
float tinc);
299 void updateBitFields();
300 void changeVelocity(
float t,
float tinc,
GA_Offset ptoff);
308 int birthPoint(
float t,
float tinc);
312 void buildCollisionCache();
Iteration over a range of elements.
void setCollision(GU_Detail *gdp)
void setSource(GU_Detail *gdp)
void setBirthAll(int onOff)
void setAccurateMove(int onOff)
void setAttractor(GU_Detail *gdp)
void setStartTime(float t)
#define GA_INVALID_OFFSET
void setBounceOnContact()
int getDestroyMode() const
GU_Detail * getMySource()
int getModifySource() const
void setModifySource(int onOff)
int getJitterBirth() const
GLsizei GLsizei GLchar * source
void setGain(float n, float t)
void setSingleAttractor(int onOff)
int getSingleAttractor() const
GA_RWHandleV3 myVelocityHandle
GA_RWHandleV2 myLifeHandle
const GA_PointGroup * getFixedPoints()
GU_INTEGRATION_TYPE getIntegration() const
void setDestroyMode(int onOff)
int getRevertFixed() const
int getAccurateMove() const
void setPointReuse(int val)
SIM_API const UT_StringHolder force
int getPointReuse() const
GA_Size GEO_ParticleVertexIndex
GA_RWHandleI myPStateHandle
GEO_PrimParticle * getParticles()
void setGdp(GU_Detail *g)
void setIntegration(GU_INTEGRATION_TYPE t)
void setJitterBirth(int onOff)
void OIIO_UTIL_API split(string_view str, std::vector< string_view > &result, string_view sep=string_view(), int maxsplit=-1)
virtual void initAttractor(GU_Detail *)
void getAttractorForce(GA_Offset ptoff, UT_Vector3 &force)
void setRevertFixed(int onOff)
GU_INTEGRATION_TYPE euler
const GA_PointGroup * fixedPoints