This reference page is linked to from the following overview topics: 親クラスの説明, サンプル プラグインの概要, サンプル C++ プラグインの説明.
Base class for user defined particle emitters.
MPxFluidEmitterNode allows the creation and manipulation of dependency graph nodes representing fluid emitters.
#include <MPxFluidEmitterNode.h>
Public Member Functions |
|
MPxFluidEmitterNode () | |
Class constructor. |
|
virtual | ~MPxFluidEmitterNode () |
The class destructor. |
|
virtual MPxNode::Type | type () const |
This method returns the type of the node.
|
|
virtual MStatus | compute (const MPlug &plug, MDataBlock &dataBlock) |
This method should be overridden in user
defined nodes. |
|
virtual MStatus | fluidEmitter (const MObject &fluidObj, const MMatrix &worldMatrix, int plugIndex) |
This is the main method that plug-in fluid
emitter nodes must override in order to emit into fluids. |
|
double | fluidDensityEmission (MDataBlock &block) |
Intended to be called from within the
emitter's compute()
method, this method retrieves the "fluidDensityEmission" attribute
value common to all fluid emitters. |
|
double | fluidHeatEmission (MDataBlock &block) |
Intended to be called from within the
emitter's compute()
method, this method retrieves the "fluidHeatEmission" attribute
value common to all fluid emitters. |
|
double | fluidFuelEmission (MDataBlock &block) |
Intended to be called from within the
emitter's compute()
method, this method retrieves the "fluidFuelEmission" attribute
value common to all fluid emitters. |
|
bool | fluidEmitColor (MDataBlock &block) |
Intended to be called from within the
emitter's compute()
method, this method retrieves the "fluidEmitColor" attribute value
common to all fluid emitters. |
|
MColor | fluidColor (MDataBlock &block) |
Intended to be called from within the
emitter's compute()
method, this method retrieves the "fluidColor" attribute value
common to all fluid emitters. |
|
double | fluidDropoff (MDataBlock &block) |
Intended to be called from within the
emitter's compute()
method, this method retrieves the "fluidDropoff" attribute value
common to all fluid emitters. |
|
double | turbulence (MDataBlock &block) |
Intended to be called from within the
emitter's compute()
method, this method retrieves the "turbulence" attribute value
common to all fluid emitters. |
|
bool | fluidJitter (MDataBlock &block) |
Intended to be called from within the
emitter's compute()
method, this method retrieves the "fluidJitter" attribute value
common to all fluid emitters. |
|
Static Public Member Functions |
|
static const char * | className () |
Returns the name of this class. |
|
Static Public Attributes |
|
static MObject | mFluidDensityEmission |
density emission rate attribute |
|
static MObject | mFluidHeatEmission |
heat emission rate attribute |
|
static MObject | mFluidFuelEmission |
fuel emission rate attribute |
|
static MObject | mEmitFluidColor |
color emission toggle attribute |
|
static MObject | mFluidColor |
emission color attribute |
|
static MObject | mFluidColorR |
emission red color channel attribute |
|
static MObject | mFluidColorG |
emission green color channel attribute |
|
static MObject | mFluidColorB |
emission blue color channel attribute |
|
static MObject | mFluidDropoff |
emission dropoff attribute |
|
static MObject | mTurbulence |
emission turbulence attribute |
|
static MObject | mFluidJitter |
emission jitter attribute |
|
static MObject | mEmissionFunction |
emission function attribute |
MPxNode::Type type | ( | ) | const [virtual] |
This method returns the type of the node.
It should not be overridden by the user. It will return MPxNode::kEmitterNode.
Reimplemented from MPxEmitterNode.
MStatus compute | ( | const MPlug & | plug, |
MDataBlock & | dataBlock | ||
) | [virtual] |
This method should be overridden in user defined nodes.
Recompute the given output based on the nodes inputs. The plug represents the data value that needs to be recomputed, and the data block holds the storage for all of the node's attributes.
The MDataBlock will provide smart handles for reading and writing this node's attribute values. Only these values should be used when performing computations.
When evaluating the dependency graph, Maya will first call the compute method for this node. If the plug that is provided to the compute indicates that that the attribute was defined by the Maya parent node, the compute method should return MS::kUnknownParameter. When this occurs, Maya will call the internal Maya node from which the user-defined node is derived to compute the plug's value.
This means that a user defined node does not need to be concerned with computing inherited output attributes. However, if desired, these can be safely recomputed by this method to change the behaviour of the node.
[in] | plug | plug representing the attribute that needs to be recomputed |
[in] | dataBlock | data block containing storage for the node's attributes |
Reimplemented from MPxEmitterNode.
MStatus fluidEmitter | ( | const MObject & | fluidObj, |
const MMatrix & | worldMatrix, | ||
int | plugIndex | ||
) | [virtual] |
This is the main method that plug-in fluid emitter nodes must override in order to emit into fluids.
When an emitter is attached to a fluid, at every evaluation step the fluid will call this method on the emitter. The method receives a fluid object into which to emit, the index of the fluid in the array of fluid targets for this emitter, and the worldspace matrix of the fluid. The emitter should query its attributes to determine how much density, heat, color, and/or fuel to emit into the fluid, then call the MFnFluid::emitIntoArrays() method to actually add the necessary quantities to the fluid.
Returning MS::kUnknownParameter from this method will cause Maya to execute the default fluid emitter's emission behavior.
[in] | fluidObj | the fluid object into which the emitter is emitting. |
[in] | worldMatrix | object to world transformation matrix for the fluid |
[in] | plugIndex | the index of the fluid in the array of emission targets for this emitter. Pass this value to the random number stream generation routines in MPxEmitterNode. |
double fluidDensityEmission | ( | MDataBlock & | block | ) |
Intended to be called from within the emitter's compute() method, this method retrieves the "fluidDensityEmission" attribute value common to all fluid emitters.
This indicates the amount of fluid material to be emitted per second, and it is modulated by the emitter's "rate" attribute value.
[in] | block | data block containing storage for the node's attributes |
double fluidHeatEmission | ( | MDataBlock & | block | ) |
Intended to be called from within the emitter's compute() method, this method retrieves the "fluidHeatEmission" attribute value common to all fluid emitters.
This indicates the amount of heat to be emitted per second, and it is modulated by the emitter's "rate" attribute value.
[in] | block | data block containing storage for the node's attributes |
double fluidFuelEmission | ( | MDataBlock & | block | ) |
Intended to be called from within the emitter's compute() method, this method retrieves the "fluidFuelEmission" attribute value common to all fluid emitters.
This indicates the amount of fuel to be emitted per second, and it is modulated by the emitter's "rate" attribute value.
[in] | block | data block containing storage for the node's attributes |
bool fluidEmitColor | ( | MDataBlock & | block | ) |
Intended to be called from within the emitter's compute() method, this method retrieves the "fluidEmitColor" attribute value common to all fluid emitters.
This indicates whether or not the emitter should emit color into the fluid.
[in] | block | data block containing storage for the node's attributes |
MColor fluidColor | ( | MDataBlock & | block | ) |
Intended to be called from within the emitter's compute() method, this method retrieves the "fluidColor" attribute value common to all fluid emitters.
This specifies the color to be added to the fluid.
[in] | block | data block containing storage for the node's attributes |
double fluidDropoff | ( | MDataBlock & | block | ) |
Intended to be called from within the emitter's compute() method, this method retrieves the "fluidDropoff" attribute value common to all fluid emitters.
This specifies the the speed with which fluid emission drops off with increasing distance from the emitter, with higher values meaning faster dropoff.
[in] | block | data block containing storage for the node's attributes |
double turbulence | ( | MDataBlock & | block | ) |
Intended to be called from within the emitter's compute() method, this method retrieves the "turbulence" attribute value common to all fluid emitters.
This specifies the amount of turbulence that should be applied to the emitter's output.
[in] | block | data block containing storage for the node's attributes |
bool fluidJitter | ( | MDataBlock & | block | ) |
Intended to be called from within the emitter's compute() method, this method retrieves the "fluidJitter" attribute value common to all fluid emitters.
This specifies how the voxel grid should be sampled for emission. Without jitter, the grid is sampled only at voxel centers, but with jitter enabled, each voxel is sampled at a random location. The fluid emitter is responsible for implementing this behavior. It is recommended that the random stream methods on MPxEmitterNode be used to implement repeatable randomized behavior in this area.
[in] | block | data block containing storage for the node's attributes |
const char * className | ( | ) | [static] |