- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnDirectionManip Class Reference
OpenMayaUI - API module for user interface | FunctionSet classes

This reference page is linked to from the following overview topics: Base Manipulators, Communication Between Manipulators and Nodes.

Search for all occurrences

## Detailed Description

DirectionManip function set.

The DirectionManip allows the user to specify a direction, as defined by the vector from the start point to the manipulator position. It uses a FreePointTriadManip to specify the end point of a vector relative to a given start point. This manipulator generates a vector from the start point to the end point.

Examples:

  swissArmyManip.cpp.

`#include <MFnDirectionManip.h>`

Inheritance diagram for MFnDirectionManip:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnDirectionManip ()
| Destructor.
| MFnDirectionManip ()
| Default constructor.
| MFnDirectionManip (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
| MFnDirectionManip (const MDagPath &object, MStatus *ret=NULL)
| Constructor.
MObject | create (MStatus *ReturnStatus=NULL)
| Creates a new DirectionManip.
MObject | create (const MString &manipName, const MString &directionName, MStatus *ReturnStatus=NULL)
| Creates a new DirectionManip.
MStatus | connectToDirectionPlug (MPlug &directionPlug)
| Connect to the direction plug.
MStatus | setNormalizeDirection (bool state)
| Sets whether or not to the direction should be normalized.
MStatus | setDrawStart (bool state)
| Sets whether or not to draw the start of the DirectionManip.
MStatus | setStartPoint (MPoint &startPoint)
| Sets the start point of the DirectionManip.
MStatus | setDirection (MVector &direction)
| Sets the direction of the DirectionManip.
unsigned int | startPointIndex (MStatus *ReturnStatus=NULL) const
| Returns the index of the start point of the DirectionManip.
unsigned int | endPointIndex (MStatus *ReturnStatus=NULL) const
| Returns the index of the end point of the DirectionManip.
unsigned int | directionIndex (MStatus *ReturnStatus=NULL) const
| Returns the index of the direction.
| MFnDirectionManip (const MObject &object, MStatus *ret=NULL)
| Constructor.
## Protected Member Functions
virtual const char * | className () const
| Class name.

## Constructor & Destructor Documentation

~MFnDirectionManip | ( |  | ) | `[virtual]`

Destructor.

Class destructor.

MFnDirectionManip | ( | 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:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnDirectionManip | ( | 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:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnDirectionManip | ( | 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:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

## Member Function Documentation

MFn::Type type | ( |  | ) | const`[virtual]`

Search for all occurrences

Function set type.

Return the class type : MFn::kDirectionManip.

Reimplemented from MFnManip3D.

const char * className | ( |  | ) | const`[protected, virtual]`

Search for all occurrences

Class name.

Return the class name : "MFnDirectionManip".

Reimplemented from MFnManip3D.

MObject create | ( | MStatus * | ReturnStatus = `NULL` | ) |

Search for all occurrences

Creates a new DirectionManip.

This function set's object is set to be the new manipulator.

This method should only be used to create a non-composite DirectionManip.

The name that appears in the feedback line is "direction"

Parameters:

  [out] | ReturnStatus | return status

Returns:
  Newly created DirectionManip

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MObject create | ( | const MString & | manipName,
|  | const MString & | directionName,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Creates a new DirectionManip.

This function set's object is set to be the new manipulator.

This method should only be used to create a non-composite DirectionManip.

The name that appears in the feedback line is specified by the directionName argument.

Parameters:

  [in] | manipName | Name of the manip for UI purposes.
  [in] | directionName | Label for the direction value which appears in the feedback line.
  [out] | ReturnStatus | Status code.

Returns:
  Newly created DirectionManip.

Status Codes:
  - MS::kSuccess Operation successful.
  - MS::kFailure Operation failed.

Reimplemented from MFnDependencyNode.

MStatus connectToDirectionPlug | ( | MPlug & | directionPlug | ) |

Search for all occurrences

Connect to the direction plug.

The data type corresponding to the directionPlug is MFnNumericData::k3Double.

Parameters:

  [in] | directionPlug | the direction plug

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

Examples:
  swissArmyManip.cpp.

MStatus setNormalizeDirection | ( | bool | state | ) |

Search for all occurrences

Sets whether or not to the direction should be normalized.

By default the direction is normalized.

Parameters:

  [in] | state | whether or not the direction should be normalized

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MStatus setDrawStart | ( | bool | state | ) |

Search for all occurrences

Sets whether or not to draw the start of the DirectionManip.

The start of the DirectionManip is indicated by a grey dot. By default the start is not drawn.

Parameters:

  [in] | state | whether or not the start should be drawn

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MStatus setStartPoint | ( | MPoint & | startPoint | ) |

Search for all occurrences

Sets the start point of the DirectionManip.

Parameters:

  [in] | startPoint | the start point of the DirectionManip

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MStatus setDirection | ( | MVector & | direction | ) |

Search for all occurrences

Sets the direction of the DirectionManip.

Parameters:

  [in] | direction | the direction of the DirectionManip

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

unsigned int startPointIndex | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the index of the start point of the DirectionManip.

The data type corresponding to this index is MFnNumericData::k3Double.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  Start point index

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

Examples:
  swissArmyManip.cpp.

unsigned int endPointIndex | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the index of the end point of the DirectionManip.

The data type corresponding to this index is MFnNumericData::k3Double.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  End point index

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

unsigned int directionIndex | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the index of the direction.

The data type corresponding to this index is MFnNumericData::k3Double.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  Direction index

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip
MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip MFnDirectionManip