Inherits DD::Image::ParticleRender.
Inherited by DD::Image::ParticleBehaviour.
Public Types | |
enum | OpType { eMove, eBounce, eSpawn, eOther } |
Types of particle ops. These are used when reordering the particle graph. | |
Public Member Functions | |
ParticleOp (Node *node) | |
virtual bool | applyBehaviour (const ParticleContext &context, ParticleSystem *ps)=0 |
unsigned | node_color () const override |
const char * | node_shape () const override |
void | appendSimulationCurve (DD::Image::Hash &hash) const |
virtual bool | doApplyBehaviour (const ParticleContext &context, ParticleSystem &ps, unsigned pathMask)=0 |
int | minimum_inputs () const override |
int | maximum_inputs () const override |
Op * | default_input (int input) const override |
bool | test_input (int input, Op *op) const override |
void | add_input_handle (int i, ViewerContext *ctx) override |
virtual OpType | getOpType () |
ParticleOp * | particleOp () override |
Cast to a ParticleOp. This is much cheaper and safer than using dynamic_cast. | |
const ParticleOp * | particleOp () const override |
Static Public Member Functions | |
static void | ParticleChannels_knob (Knob_Callback f, ParticleChannelSet *ptr, const char *name, const char *label=NULL) |
Protected Member Functions | |
virtual void | appendSimulationInput (int nodeInput, DD::Image::Hash &hash) const |
Particle operator This is the base class for all Ops which work on particle systems. To write your own ParticleOp, override the applyBehaviour method to modify the particle system in place.
FIXME-documentation
void DD::Image::ParticleOp::appendSimulationCurve | ( | DD::Image::Hash & | hash | ) | const |
get the curve-hash that affects the particle system's simulation
References DD::Image::Knob::append(), appendSimulationInput(), DD::Image::Op::Class(), DD::Image::Op::input(), DD::Image::Op::knob(), DD::Image::Knob::NO_RERENDER, and DD::Image::Op::node_inputs().
void DD::Image::ParticleOp::appendSimulationInput | ( | int | nodeInput, |
DD::Image::Hash & | hash | ||
) | const [protected, virtual] |
get the curve-hash for the particle nodeInput. Subclasses can override this to not do anything or to only hash in particular data if the general curve-hash would not affect the simulation state.
References DD::Image::Op::input().
Referenced by appendSimulationCurve().
void DD::Image::ParticleOp::add_input_handle | ( | int | i, |
ViewerContext * | ctx | ||
) | [override, virtual] |
we should ignore geo inputs for this purpose, as we shouldn't draw them if their panels are not open, and we don't want to suppress drawing them having lowered the state to CONNECTED from SHOW_OBJECT (see GeoOp::build_handles)
Reimplemented from DD::Image::Op.
References DD::Image::Op::input().