MFnAirField Class Reference
[OpenMayaFX - API module for effectsFunctionSet classes]

#include <MFnAirField.h>

Inheritance diagram for MFnAirField:

Inheritance graph
[legend]
Collaboration diagram for MFnAirField:

Collaboration graph
[legend]

List of all members.


Detailed Description

Function set for Air Fields.

Function set for creation, edit, and query of Air Fields.

An air field simulates the effects of moving air.

Public Member Functions

virtual MFn::Type type () const
 Function set type.
virtual ~MFnAirField ()
 Destructor.
 MFnAirField ()
 Default constructor.
 MFnAirField (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor.
 MFnAirField (const MDagPath &object, MStatus *ret=NULL)
 Constructor.
MVector direction (MStatus *ReturnStatus=NULL) const
MStatus setDirection (const MVector &airDirection)
double speed (MStatus *ReturnStatus=NULL) const
MStatus setSpeed (double value)
double inheritVelocity (MStatus *ReturnStatus=NULL) const
MStatus setInheritVelocity (double velocity)
bool inheritRotation (MStatus *ReturnStatus=NULL) const
MStatus setInheritRotation (bool enable)
bool componentOnly (MStatus *ReturnStatus=NULL) const
MStatus setComponentOnly (bool enable)
double spread (MStatus *ReturnStatus=NULL) const
MStatus setSpread (double value)
bool enableSpread (MStatus *ReturnStatus=NULL) const
MStatus setEnableSpread (bool enable)
 MFnAirField (const MObject &object, MStatus *ret=NULL)
 Constructor.

Protected Member Functions

virtual const char * className () const
 Class name.


Constructor & Destructor Documentation

MFnAirField::~MFnAirField (  )  [virtual]

Destructor.

Class destructor.

MFnAirField::MFnAirField ( MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:
[in] object The MObject to attach the function set to
[out] ReturnStatus the return status
Status Codes:

MFnAirField::MFnAirField ( const MDagPath object,
MStatus ReturnStatus = NULL 
)

Constructor.

Class constructor that initializes the function set to the given constant MDagPath object.

Parameters:
[in] object The const MDagPath to attach the function set to
[out] ReturnStatus The return status
Status Codes:

MFnAirField::MFnAirField ( const MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:
[in] object The MObject to attach the function set to
[out] ReturnStatus the return status
Status Codes:


Member Function Documentation

MFn::Type MFnAirField::type (  )  const [virtual]

Function set type.

Return the class type : MFn::kAir

Reimplemented from MFnField.

MVector MFnAirField::direction ( MStatus ReturnStatus = NULL  )  const

Returns the direction the air is blowing.

Parameters:
[out] ReturnStatus Status code
Returns:
A vector representing direction.
Status Codes:

MStatus MFnAirField::setDirection ( const MVector airDirection  ) 

Sets the direction vector for the air to blow.

Parameters:
[in] airDirection A vector representing direction.
Returns:
Status code
Status Codes:

double MFnAirField::speed ( MStatus ReturnStatus = NULL  )  const

Returns the control setting on how quickly objects match the velocity of the air field.

Parameters:
[out] ReturnStatus Status code
Returns:
The value of the speed setting.
Status Codes:

MStatus MFnAirField::setSpeed ( double  value  ) 

Sets the control setting on how quickly the objects match the velocity of the air field.

Parameters:
[in] value A value representing speed.
  • A value of 0 is equivalent of turning the air field off.
  • A value of 1 and objects will match the velocity almost instantaneously.
Returns:
Status code
Status Codes:

double MFnAirField::inheritVelocity ( MStatus ReturnStatus = NULL  )  const

Returns the amount of the moving air field's velocity that is added to the direction and magnitude of the wind.

Parameters:
[out] ReturnStatus Status code
Returns:
A value from 0 to 1 representing the amount of velocity added.
Status Codes:

MStatus MFnAirField::setInheritVelocity ( double  velocity  ) 

Sets the amount of the moving air field's velocity that is added to the direction and magnitude of the wind.

Parameters:
[in] velocity A value from 0 to 1 representing the amount of velocity that is added.
Returns:
Status code
Status Codes:

bool MFnAirField::inheritRotation ( MStatus ReturnStatus = NULL  )  const

Returns true if the air field is rotating or parented to a rotating object, and will undergo that same rotation.

Parameters:
[out] ReturnStatus Status code
Returns:
  • true Rotations will change the direction the air field points.
  • false Rotations do not change the air field direction.
Status Codes:

MStatus MFnAirField::setInheritRotation ( bool  enable  ) 

Enables the air field to undergo rotations and effect the direction that the air field points.

Parameters:
[in] enable Flag to enable or disable rotations effects.
Returns:
Status code
Status Codes:

bool MFnAirField::componentOnly ( MStatus ReturnStatus = NULL  )  const

Returns true if the air field will apply force only in the direction specified by the combination of its direction, speed, and inherit velocity attributes. Returns false if the force is made to effect the object's velocity to match the air field's velocity.

Parameters:
[out] ReturnStatus Status code
Returns:
  • true Force applied only in direction of attributes.
  • false Force applied to match velocities.
Status Codes:

MStatus MFnAirField::setComponentOnly ( bool  enable  ) 

Enables the air field to apply force specified as a combination of its direction, speed, and inherit veloicty attributes.

Parameters:
[in] enable Flag to enable or disable combination of attributes.
Returns:
Status code
Status Codes:

double MFnAirField::spread ( MStatus ReturnStatus = NULL  )  const

Returns a value that represents an angle which objects are affected by the air fields direction setting. This value is taken into account when the Enable Spread attribute is turned on.

Parameters:
[out] ReturnStatus Status code
Returns:
  • A value from 0 to 1 representing an angle.
  • A value of 0 effects objects only exactly in front of the direction vector.
  • A value of 1 effects objects in front by 180 degrees along the direction vector.
Status Codes:

MStatus MFnAirField::setSpread ( double  value  ) 

Sets the value representing an angle which objects are affected by the air fields direction setting. This value is taken into account when the Enable Spread attribute is turned on.

Parameters:
[in] value A value representing an angle.
  • A value of 0 effects objects only exactly in front of the direction vector.
  • A value of 1 effects objects in front by 180 degrees along the direction vector.
Returns:
Status code
Status Codes:

bool MFnAirField::enableSpread ( MStatus ReturnStatus = NULL  )  const

Returns true if the air field is using the spread angle to define the influence of the air field.

Parameters:
[out] ReturnStatus Status code
Returns:
  • true Objects are affected in the area of the spread angle.
  • false Objects are affected by the max distance setting.
Status Codes:

MStatus MFnAirField::setEnableSpread ( bool  enable  ) 

Enables the air field to influence objects based on the spread angle setting.

Parameters:
[in] enable Flag to enable or disable use of the spread angle.
Returns:
Status code
Status Codes:


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6