Public Member Functions | Protected Member Functions

MFnDragField Class Reference

Search for all occurrences

Detailed Description

Function set for Drag Fields.

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

A drag field exerts a friction, or braking force, proportional to the speed of a moving object.

#include <MFnDragField.h>

Inheritance diagram for MFnDragField:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual MFn::Type type () const
 Function set type.
virtual ~MFnDragField ()
 Destructor.
 MFnDragField ()
 Default constructor.
 MFnDragField (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor.
 MFnDragField (const MDagPath &object, MStatus *ret=NULL)
 Constructor.
MVector direction (MStatus *ReturnStatus=NULL) const
 Returns the direction of the drag force's influence along the x, y, and z axes.
MStatus setDirection (const MVector &dragDirection)
 Sets the direction of the drag force's influence along the x, y, and z axes.
bool useDirection (MStatus *ReturnStatus=NULL) const
 Returns true if the braking force is exerted only against the component of the object's velocity that lies along the direction of the drag force.
MStatus setUseDirection (bool enable)
 Enables the braking force to be exerted only against the component of the object's velocity that lies along the direction setting of the drag force.
 MFnDragField (const MObject &object, MStatus *ret=NULL)
 Constructor.

Protected Member Functions

virtual const char * className () const
 Class name.

Constructor & Destructor Documentation

~MFnDragField ( ) [virtual]

Destructor.

Class destructor.

MFnDragField ( 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:
MFnDragField ( 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:
MFnDragField ( 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::kDrag.

Reimplemented from MFnField.

MVector direction ( MStatus ReturnStatus = NULL) const

Returns the direction of the drag force's influence along the x, y, and z axes.

You must have the Use Direction setting turned on for this attribute to take effect.

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

Sets the direction of the drag force's influence along the x, y, and z axes.

You must have the Use Direction setting turned on for this attribute to take effect.

Parameters:
[in]dragDirectionA vector representing direction.
Returns:
Status code
Status Codes:
bool useDirection ( MStatus ReturnStatus = NULL) const

Returns true if the braking force is exerted only against the component of the object's velocity that lies along the direction of the drag force.

Parameters:
[out]ReturnStatusStatus code
Returns:
  • true Use the direction setting to determine the braking force.
  • false Use the objects velocity to determine the braking force.
Status Codes:
MStatus setUseDirection ( bool  enable)

Enables the braking force to be exerted only against the component of the object's velocity that lies along the direction setting of the drag force.

Parameters:
[in]enableFlag to enable or disable direction setting.
Returns:
Status code
Status Codes:

MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField
MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField MFnDragField