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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnNonAmbientLight Class Reference

# OpenMaya - API module for common classes | FunctionSet classes

Search for all occurrences

## Detailed Description

Manage Non-ambient Light dependency Nodes.

MFnNonAmbientLight facilitates modification of dependency graph nodes representing non-ambient lights. This includes area lights, linear lights, and non-extended lights.

Examples:

  hwAnisotropicShader_NV20.cpp, and hwToonShader_NV20.cpp.

`#include <MFnNonAmbientLight.h>`

Inheritance diagram for MFnNonAmbientLight:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnNonAmbientLight ()
| Destructor.
| MFnNonAmbientLight ()
| Default constructor.
| MFnNonAmbientLight (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
| MFnNonAmbientLight (const MDagPath &object, MStatus *ret=NULL)
| Constructor.
short | decayRate (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "decayRate" attribute of a non-ambient light node.
MStatus | setDecayRate (const short &decay_rate)
| Sets the value of the "decayRate" attribute of a non-ambient light node.
| MFnNonAmbientLight (const MObject &object, MStatus *ret=NULL)
| Constructor.
## Protected Member Functions
virtual const char * | className () const
| Class name.

## Constructor & Destructor Documentation

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

Destructor.

The class destructor.

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

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

MFnNonAmbientLight | ( | 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::kNonAmbientLight.

Reimplemented from MFnLight.

Reimplemented in MFnAreaLight, MFnDirectionalLight, MFnNonExtendedLight, MFnPointLight, MFnSpotLight, and MFnVolumeLight.

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

Search for all occurrences

Class name.

Return the class name : "MFnNonAmbientLight".

Reimplemented from MFnLight.

Reimplemented in MFnAreaLight, MFnDirectionalLight, MFnNonExtendedLight, MFnPointLight, MFnSpotLight, and MFnVolumeLight.

short decayRate | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the value of the "decayRate" attribute of a non-ambient light node.

This attribute determines the type of decay for the light.

The decay rate is with respect to the distance between the light and the surface point being shaded. The decay values range from 0 - 3. The light intensity decays according to (I / d ** v), where I is the light intensity, d is the distance between the light and the surface point being shaded, and v is the decay rate value. A decay rate of 0 means there is no decay in intensity, a value of 1 indicates linear decay. A decay rate of 2 is the most physically accurate behaviour.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  The value of the "decayRate" attribute of the non-ambient light node.

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set doesn not have a valid object.

MStatus setDecayRate | ( | const short & | decay_rate | ) |

Search for all occurrences

Sets the value of the "decayRate" attribute of a non-ambient light node.

Parameters:

  [in] | decay_rate | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set doesn not have a valid object,

MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight
MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight MFnNonAmbientLight