#include <MFnParticleSystem.h>
Particle object access class.
Public Types | |
enum | RenderType { kCloud, kTube, kBlobby, kMultiPoint, kMultiStreak, kNumeric, kPoints, kSpheres, kSprites, kStreak } |
Ways in which particles can be rendered. More... | |
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnParticleSystem () |
Destructor. | |
MFnParticleSystem () | |
Default constructor. | |
MFnParticleSystem (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MFnParticleSystem (const MDagPath &object, MStatus *ret=NULL) | |
Constructor. | |
MObject | create (MStatus *status=NULL) |
MObject | create (MObject parent, MStatus *status=NULL) |
MStatus | emit (const MPoint &position) |
MStatus | emit (const MPointArray &positionArray) |
MStatus | emit (const MPoint &position, const MVector &velocity) |
MStatus | emit (const MPointArray &positionArray, const MVectorArray &velocityArray) |
MStatus | saveInitialState () const |
void | evaluateDynamics (MTime &to, bool runupFromStart) |
bool | isValid () const |
MString | particleName () const |
unsigned int | count () const |
RenderType | renderType () const |
void | position (MVectorArray &) const |
void | velocity (MVectorArray &) const |
void | acceleration (MVectorArray &) const |
void | position0 (MVectorArray &) const |
void | position1 (MVectorArray &) const |
void | radius (MDoubleArray &) const |
void | radius0 (MDoubleArray &) const |
void | radius1 (MDoubleArray &) const |
double | surfaceShading () const |
double | threshold () const |
bool | betterIllum () const |
bool | disableCloudAxis () const |
double | tailSize () const |
void | particleIds (MIntArray &) const |
void | age (MDoubleArray &) const |
void | lifespan (MDoubleArray &) const |
void | rgb (MVectorArray &) const |
void | opacity (MDoubleArray &) const |
void | mass (MDoubleArray &) const |
void | emission (MVectorArray &) const |
bool | hasLifespan () const |
bool | hasRgb () const |
bool | hasOpacity () const |
bool | hasEmission () const |
bool | primaryVisibility () const |
bool | visibleInReflections () const |
bool | visibleInRefractions () const |
bool | castsShadows () const |
bool | receiveShadows () const |
unsigned int | getPerParticleAttribute (const MString &attrName, MIntArray &, MStatus *status=NULL) const |
unsigned int | getPerParticleAttribute (const MString &attrName, MVectorArray &, MStatus *status=NULL) const |
unsigned int | getPerParticleAttribute (const MString &attrName, MDoubleArray &, MStatus *status=NULL) const |
void | setPerParticleAttribute (const MString &attrName, MVectorArray &, MStatus *status=NULL) const |
void | setPerParticleAttribute (const MString &attrName, MDoubleArray &, MStatus *status=NULL) const |
bool | isPerParticleIntAttribute (const MString &attrName, MStatus *status=NULL) const |
bool | isPerParticleDoubleAttribute (const MString &attrName, MStatus *status=NULL) const |
bool | isPerParticleVectorAttribute (const MString &attrName, MStatus *status=NULL) const |
bool | isDeformedParticleShape (MStatus *status=NULL) const |
MObject | deformedParticleShape (MStatus *status=NULL) const |
MObject | originalParticleShape (MStatus *status=NULL) const |
MFnParticleSystem (const MObject &object, MStatus *ret=NULL) | |
Constructor. | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
MFnParticleSystem::~MFnParticleSystem | ( | ) | [virtual] |
Destructor.
Class destructor.
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
Constructor.
Class constructor that initializes the function set to the given constant MDagPath object.
[in] | object | The const MDagPath to attach the function set to |
[out] | ReturnStatus | The return status |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type MFnParticleSystem::type | ( | ) | const [virtual] |
To create a new particleShape with a transform.
[out] | ReturnStatus | Status code |
To create a new particleShape. If the parent is not specified, a new transform will be created as the parent.
[in] | parentMObj | The parent as an MObject |
[out] | ReturnStatus | Status code |
To add a new particle at the given position.
[in] | v | The particle's position |
MStatus MFnParticleSystem::emit | ( | const MPointArray & | pArray | ) |
To add an array of new particles at the given positions.
[in] | pArray | The particle's position array |
To add a new particle at the position with its velocity.
[in] | p | The particle's position |
[in] | v | The particle's velocity |
MStatus MFnParticleSystem::emit | ( | const MPointArray & | pArray, | |
const MVectorArray & | vArray | |||
) |
To add an array of new particles at the given positions with their velocity values.
[in] | pArray | The particle's position array |
[in] | vArray | The particle's velocity array |
MStatus MFnParticleSystem::saveInitialState | ( | ) | const |
To reset the particle's current state as the initial state.
void MFnParticleSystem::evaluateDynamics | ( | MTime & | to, | |
bool | runupFromStart | |||
) |
Run up the particle system to a certain frame, from either the current frame, or from the start of the simulation.
bool MFnParticleSystem::isValid | ( | ) | const |
Returns false if the particle array is NULL.
Returns true otherwise.
MString MFnParticleSystem::particleName | ( | ) | const |
Returns the name of this particle system.
unsigned int MFnParticleSystem::count | ( | ) | const |
Returns the particle count at the current frame.
MFnParticleSystem::RenderType MFnParticleSystem::renderType | ( | ) | const |
Return the render type used by the particle object.
void MFnParticleSystem::position | ( | MVectorArray & | positions | ) | const |
Compute each particle's position at the start of the time step. This is done by taking the particle's current position and velocity, and extrapolation backwards in time.
NOTE: For an MFnParticleSystem of renderType kTube, use position0() and position1() instead.
void MFnParticleSystem::velocity | ( | MVectorArray & | array | ) | const |
To return velocity array for all particles.
[out] | array | The resulting velocity array |
void MFnParticleSystem::acceleration | ( | MVectorArray & | array | ) | const |
To return acceleration array for all particles.
[out] | array | The resulting acceleration array |
void MFnParticleSystem::position0 | ( | MVectorArray & | positions | ) | const |
Only for use with an MFnParticleSystem of renderType kTube.
Calculates particle start positions.
void MFnParticleSystem::position1 | ( | MVectorArray & | positions | ) | const |
Only for use with an MFnParticleSystem of renderType kTube.
Calculates particle end positions.
void MFnParticleSystem::radius | ( | MDoubleArray & | radii | ) | const |
Calculates particle radii.
NOTE: For an MFnParticleSystem of renderType kTube, use position0() and position1() instead.
void MFnParticleSystem::radius0 | ( | MDoubleArray & | radii | ) | const |
Only for use with an MFnParticleSystem of renderType kTube.
Calculates the particles' start radii.
void MFnParticleSystem::radius1 | ( | MDoubleArray & | radii | ) | const |
Only for use with an MFnParticleSystem of renderType kTube.
Calculates the particles' end radii.
double MFnParticleSystem::surfaceShading | ( | ) | const |
Only for use with an MFnParticleSystem of renderType kCloud.
Returns the object surface shading value.
double MFnParticleSystem::threshold | ( | ) | const |
Only for use with an MFnParticleSystem of renderType kCloud or kBlobby.
Returns the object threshold.
bool MFnParticleSystem::betterIllum | ( | ) | const |
Only for use with an MFnParticleSystem of renderType kCloud.
Returns a boolean indicating whether or not thick cloud sampling is already enabled.
bool MFnParticleSystem::disableCloudAxis | ( | ) | const |
Only for use with an MFnParticleSystem of renderType kCloud.
Internal use for better illum.
NOTE: Internal use only. Do not call.
double MFnParticleSystem::tailSize | ( | ) | const |
Only for use with an MFnParticleSystem of renderType kTube.
Returns the length scale factor.
void MFnParticleSystem::particleIds | ( | MIntArray & | ids | ) | const |
Return an array of particle identifiers at the start of the time step. The array of particle id's is correlated with the other per-particle arrays returned by this class, so ids[i] will be the id for the particle with position position[i], velocity[i], etc., as long as all these arrays were retrieved for the same time step.
The particle id is a constant identifier for an individual particle that does not change between time steps. The particle id can be used to follow the path of a single particle between frames. Only living particle identifiers are returned by this method.
[out] | ids | Array of particle identifiers. The contents of the array are overwritten with the current list of particle identifiers. |
void MFnParticleSystem::age | ( | MDoubleArray & | ages | ) | const |
Populates the given array with the age values of the particles in this system.
void MFnParticleSystem::lifespan | ( | MDoubleArray & | lifespans | ) | const |
Populates the given array with the lifespan values of the particles in this system, if the particles have this attribute. See hasLifespan().
void MFnParticleSystem::rgb | ( | MVectorArray & | colors | ) | const |
Populates the given array with the color values of the particles in this system, if the particles have this attribute. See hasRgb().
For each particle, processes the internal representation into RGB color values, which are mapped to a vector.
void MFnParticleSystem::opacity | ( | MDoubleArray & | opacities | ) | const |
Populates the given array with the opacity values of the particles in this system, if the particles have this attribute. See hasOpacity().
void MFnParticleSystem::mass | ( | MDoubleArray & | array | ) | const |
To return mass array for all particles.
[out] | array | The resulting mass array |
void MFnParticleSystem::emission | ( | MVectorArray & | emissions | ) | const |
Populates the given array with the incandescence values of the particles in this system, if the particles have this attribute. See hasEmission().
bool MFnParticleSystem::hasLifespan | ( | ) | const |
Returns whether or not the particles in this system have a lifespan attribute. See lifespan().
bool MFnParticleSystem::hasRgb | ( | ) | const |
Returns whether or not the particles in this system have an rgb attribute. See rgb().
bool MFnParticleSystem::hasOpacity | ( | ) | const |
Returns whether or not the particles in this system have an opacity attribute. See opacity().
bool MFnParticleSystem::hasEmission | ( | ) | const |
Returns whether or not the particles in this system have an emission attribute. See emission().
bool MFnParticleSystem::primaryVisibility | ( | ) | const |
Returns whether or not the rendering attribute for primary visibility in reflections has been enabled.
bool MFnParticleSystem::visibleInReflections | ( | ) | const |
Returns whether or not the rendering attribute for particle visibility in reflections has been enabled.
bool MFnParticleSystem::visibleInRefractions | ( | ) | const |
Returns whether or not the rendering attribute for particle visibility in refractions has been enabled.
bool MFnParticleSystem::castsShadows | ( | ) | const |
Returns whether or not the rendering attribute for particles casting shadows has been enabled.
bool MFnParticleSystem::receiveShadows | ( | ) | const |
Returns whether or not the rendering attribute for particles receiving shadows has been enabled.
unsigned int MFnParticleSystem::getPerParticleAttribute | ( | const MString & | attrName, | |
MIntArray & | array, | |||
MStatus * | ReturnStatus = NULL | |||
) | const |
To get per particle integer attribute with its attribute name.
[in] | attrName | The input attribute name |
[out] | array | The returned integer array |
[out] | ReturnStatus | The returned status |
unsigned int MFnParticleSystem::getPerParticleAttribute | ( | const MString & | attrName, | |
MVectorArray & | array, | |||
MStatus * | ReturnStatus = NULL | |||
) | const |
To get the per particle vector attribute of the given name.
[in] | attrName | The input attribute name |
[out] | array | The returned vector array |
[out] | ReturnStatus | The return status |
unsigned int MFnParticleSystem::getPerParticleAttribute | ( | const MString & | attrName, | |
MDoubleArray & | array, | |||
MStatus * | ReturnStatus = NULL | |||
) | const |
To get the per particle double attribute of the given name
[in] | attrName | The input attribute name |
[out] | array | The returned double array |
[out] | ReturnStatus | The return status |
void MFnParticleSystem::setPerParticleAttribute | ( | const MString & | attrName, | |
MVectorArray & | array, | |||
MStatus * | ReturnStatus = NULL | |||
) | const |
To set the per particle vector attribute of the given name with the given values.
[in] | attrName | The input attribute name |
[in] | array | The input vector array |
[out] | ReturnStatus | The return status |
void MFnParticleSystem::setPerParticleAttribute | ( | const MString & | attrName, | |
MDoubleArray & | array, | |||
MStatus * | ReturnStatus = NULL | |||
) | const |
To set the per particle double attribute of the given name with the given values.
[in] | attrName | The input attribute name |
[in] | array | The input double array |
[out] | ReturnStatus | The return status |
bool MFnParticleSystem::isPerParticleIntAttribute | ( | const MString & | attrName, | |
MStatus * | ReturnStatus = NULL | |||
) | const |
To check if the input attribute is a per particle integer attribute.
[in] | attrName | The input attribute name |
[out] | ReturnStatus | The return status |
bool MFnParticleSystem::isPerParticleDoubleAttribute | ( | const MString & | attrName, | |
MStatus * | ReturnStatus = NULL | |||
) | const |
To check if the input attribute is a per particle double attribute.
[in] | attrName | The input attribute name |
[out] | ReturnStatus | The return status |
bool MFnParticleSystem::isPerParticleVectorAttribute | ( | const MString & | attrName, | |
MStatus * | ReturnStatus = NULL | |||
) | const |
To check if the input attribute is a per particle vector attribute.
[in] | attrName | The input attribute name |
[out] | ReturnStatus | The return status |
bool MFnParticleSystem::isDeformedParticleShape | ( | MStatus * | ReturnStatus = NULL |
) | const |
To return if this particle shape is deformed.
[out] | ReturnStatus | Status code |
To get the deformed particleShape.
[out] | ReturnStatus | Status code |
To get the original particleShape.
[out] | ReturnStatus | Status code |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |