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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnNewtonField Class Reference

# OpenMayaFX - API module for effects | FunctionSet classes

Search for all occurrences

## Detailed Description

Function set for Newton Fields.

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

A newton field pulls an object toward another with a force that is dependent on the mass of the object exerting the field. It follows Newton's Law of Universal Gravitation.

`#include <MFnNewtonField.h>`

Inheritance diagram for MFnNewtonField:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnNewtonField ()
| Destructor.
| MFnNewtonField ()
| Default constructor.
| MFnNewtonField (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
| MFnNewtonField (const MDagPath &object, MStatus *ret=NULL)
| Constructor.
double | minDistance (MStatus *ReturnStatus=NULL) const
| Returns the minimum distance from the newton field at which the force of the field is exerted.
MStatus | setMinDistance (double distance)
| Sets the minimum distance from the newton field at which the force of the field is exerted.
| MFnNewtonField (const MObject &object, MStatus *ret=NULL)
| Constructor.
## Protected Member Functions
virtual const char * | className () const
| Class name. Search for all occurrences

## Constructor & Destructor Documentation

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

Destructor.

Class destructor.

MFnNewtonField | ( | 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

MFnNewtonField | ( | 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

MFnNewtonField | ( | 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::kNewton.

Reimplemented from MFnField.

double minDistance | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the minimum distance from the newton field at which the force of the field is exerted.

Parameters:

  [out] | ReturnStatus | Status code

Returns:
  A value representing distance in internal linear units.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occurred.

MStatus setMinDistance | ( | double | distance | ) |

Search for all occurrences

Sets the minimum distance from the newton field at which the force of the field is exerted.

Parameters:

  [in] | distance | A value representing distance in internal linear units.

Returns:
  Status code

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure An object error has occurred.

MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField
MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField MFnNewtonField