Public Member Functions | Protected Member Functions

MFnAirField Class Reference

Search for all occurrences

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.

#include <MFnAirField.h>

Inheritance diagram for MFnAirField:
Inheritance graph
[legend]

List of all members.

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
 Returns the direction the air is blowing.
MStatus setDirection (const MVector &airDirection)
 Sets the direction vector for the air to blow.
double speed (MStatus *ReturnStatus=NULL) const
 Returns the control setting on how quickly objects match the velocity of the air field.
MStatus setSpeed (double value)
 Sets the control setting on how quickly the objects match the velocity of the air field.
double 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.
MStatus setInheritVelocity (double velocity)
 Sets the amount of the moving air field's velocity that is added to the direction and magnitude of the wind.
bool 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.
MStatus setInheritRotation (bool enable)
 Enables the air field to undergo rotations and effect the direction that the air field points.
bool 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.
MStatus setComponentOnly (bool enable)
 Enables the air field to apply force specified as a combination of its direction, speed, and inherit veloicty attributes.
double spread (MStatus *ReturnStatus=NULL) const
 Returns a value that represents an angle which objects are affected by the air fields direction setting.
MStatus setSpread (double value)
 Sets the value representing an angle which objects are affected by the air fields direction setting.
bool enableSpread (MStatus *ReturnStatus=NULL) const
 Returns true if the air field is using the spread angle to define the influence of the air field.
MStatus setEnableSpread (bool enable)
 Enables the air field to influence objects based on the spread angle setting.
 MFnAirField (const MObject &object, MStatus *ret=NULL)
 Constructor.

Protected Member Functions

virtual const char * className () const
 Class name.

Constructor & Destructor Documentation

~MFnAirField ( ) [virtual]

Destructor.

Class destructor.

MFnAirField ( MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

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

Parameters:
[in]objectThe MObject to attach the function set to
[out]ReturnStatusthe return status
Status Codes:
MFnAirField ( const MDagPath object,
MStatus ReturnStatus = NULL 
)

Constructor.

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

Parameters:
[in]objectThe const MDagPath to attach the function set to
[out]ReturnStatusThe return status
Status Codes:
MFnAirField ( const MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

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

Parameters:
[in]objectThe MObject to attach the function set to
[out]ReturnStatusthe return status
Status Codes:

Member Function Documentation

MFn::Type type ( ) const [virtual]

Function set type.

Return the class type : MFn::kAir.

Reimplemented from MFnField.

MVector direction ( MStatus ReturnStatus = NULL) const

Returns the direction the air is blowing.

Parameters:
[out]ReturnStatusStatus code
Returns:
A vector representing direction.
Status Codes:
MStatus setDirection ( const MVector airDirection)

Sets the direction vector for the air to blow.

Parameters:
[in]airDirectionA vector representing direction.
Returns:
Status code
Status Codes:
double speed ( MStatus ReturnStatus = NULL) const

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

Parameters:
[out]ReturnStatusStatus code
Returns:
The value of the speed setting.
Status Codes:
MStatus setSpeed ( double  value)

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

Parameters:
[in]valueA 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 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]ReturnStatusStatus code
Returns:
A value from 0 to 1 representing the amount of velocity added.
Status Codes:
MStatus 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]velocityA value from 0 to 1 representing the amount of velocity that is added.
Returns:
Status code
Status Codes:
bool 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]ReturnStatusStatus code
Returns:
  • true Rotations will change the direction the air field points.
  • false Rotations do not change the air field direction.
Status Codes:
MStatus setInheritRotation ( bool  enable)

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

Parameters:
[in]enableFlag to enable or disable rotations effects.
Returns:
Status code
Status Codes:
bool 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]ReturnStatusStatus code
Returns:
  • true Force applied only in direction of attributes.
  • false Force applied to match velocities.
Status Codes:
MStatus setComponentOnly ( bool  enable)

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

Parameters:
[in]enableFlag to enable or disable combination of attributes.
Returns:
Status code
Status Codes:
double 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]ReturnStatusStatus 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 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]valueA 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 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]ReturnStatusStatus 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 setEnableSpread ( bool  enable)

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

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

MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField
MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField MFnAirField