Inherits DD::Image::ParticleOp.
Public Types | |
enum | FalloffType { eNoFalloff, eInverseFalloff, eInverseSquareFalloff } |
Public Member Functions | |
ParticleBehaviour (Node *node) | |
int | minimum_inputs () const override |
int | maximum_inputs () const override |
bool | test_input (int input, Op *op) const override |
Op * | default_input (int input) const override |
const char * | input_label (int input, char *buffer) const override |
int | knob_changed (DD::Image::Knob *knob) override |
ParticleOp * | input_pop () const |
bool | doApplyBehaviour (const ParticleContext &context, ParticleSystem &ps, unsigned pathMask) override |
void | addConditionsKnobs (Knob_Callback f) |
void | addDomainKnobs (Knob_Callback f) |
void | addSeedKnob (Knob_Callback f) |
void | applyForce (ParticleSystem *ps, unsigned idx, const ParticleContext &ctx, Vector3 force) |
apply force to particle, for timeslice dt | |
void | applyAcceleration (ParticleSystem *ps, unsigned idx, const ParticleContext &ctx, Vector3 accel) |
apply acceleration to particle, for timeslice dt | |
void | applyForce (const ParticleContext &ctx, const Vector3 &force, Vector3 &particleVelocity, double particleStartTime, float particleMass) |
void | applyAcceleration (const ParticleContext &ctx, const Vector3 &acceleration, Vector3 &particleVelocity, double particleStartTime) |
Domain * | domain () const |
virtual bool | conditionsApply (ParticleSystem *system, unsigned idx) |
return true if the conditions apply _and_ the particle is within any domain | |
HandlesMode | doAnyHandles (ViewerContext *ctx) override |
void | build_handles (ViewerContext *context) override |
void | draw_handle (ViewerContext *context) override |
Static Public Member Functions | |
static void | Falloff_knob (Knob_Callback f, FalloffType *falloffType, const char *name, const char *label=NULL) |
add the an Enumeration_Knob for falloff, with given name/label | |
static float | calculateFalloff (float r, FalloffType type) |
calculate the fallout given distance /r/ | |
Protected Attributes | |
float | _probability |
ParticleChannelSet | _channels |
unsigned int | _pathMask |
Random | _random |
int | _seed |
float | _minAge |
float | _maxAge |
int | _domainType |
bool | _domainInvert |
Matrix4 | _axis |
Matrix4 | _axisInverse |
The base class for most of the particle forces and behaviours. This extends ParticleOp by adding the standard knobs for all the conditions that must apply for a particle before the op acts on it.
void DD::Image::ParticleBehaviour::applyForce | ( | const ParticleContext & | ctx, |
const Vector3 & | force, | ||
Vector3 & | particleVelocity, | ||
double | particleStartTime, | ||
float | particleMass | ||
) | [inline] |
apply force to particle, for timeslice dt This (preferred) version is for use when you have the pointers to the particle attributes, which is much faster.
void DD::Image::ParticleBehaviour::applyAcceleration | ( | const ParticleContext & | ctx, |
const Vector3 & | acceleration, | ||
Vector3 & | particleVelocity, | ||
double | particleStartTime | ||
) | [inline] |
apply acceleration to particle, for timeslice dt This (preferred) version is for use when you have the pointers to the particle attributes, which is much faster.