Public Member Functions | Protected Member Functions

MFnDirectionalLight Class Reference

Search for all occurrences

Detailed Description

Manage Directional Light dependency nodes.

MFnDirectionalLight facilitates creation and manipulation of dependency nodes representing direction lights.

#include <MFnDirectionalLight.h>

Inheritance diagram for MFnDirectionalLight:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual MFn::Type type () const
 Function set type.
virtual ~MFnDirectionalLight ()
 Destructor.
 MFnDirectionalLight ()
 Default constructor.
 MFnDirectionalLight (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor.
 MFnDirectionalLight (const MDagPath &object, MStatus *ret=NULL)
 Constructor.
MObject create (bool UIvisible=true, MStatus *ReturnStatus=NULL)
 Creates a new directional light dependency graph node and adds it to the dependency graph.
MObject create (const MObject &parent, bool UIvisible=true, bool wantTransform=false, MStatus *ReturnStatus=NULL)
 Creates a new directional light dependency graph node and adds it to the dependency graph.
float shadowAngle (MStatus *ReturnStatus=NULL) const
 Retrieves the value of the "shadowAngle" attribute of a directional light node.
MStatus setShadowAngle (const float &shadow_angle)
 Sets the value of the "shadowAngle" attribute of a directional light node.
bool useLightPosition (MStatus *ReturnStatus=NULL) const
 Retrieves the value of the "useLightPosition" attribute of a directional light.
MStatus setUseLightPosition (const bool use_light_position)
 Sets the value of the "useLightPosition" attribute of a directional light.
 MFnDirectionalLight (const MObject &object, MStatus *ret=NULL)
 Constructor.
MObject create (const MObject &parent, bool UIvisible=true, MStatus *ReturnStatus=NULL)
 NO SCRIPT SUPPORT.

Protected Member Functions

virtual const char * className () const
 Class name.

Constructor & Destructor Documentation

~MFnDirectionalLight ( ) [virtual]

Destructor.

The class destructor.

MFnDirectionalLight ( 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:
MFnDirectionalLight ( 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:
MFnDirectionalLight ( 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::kDirectionalLight.

Reimplemented from MFnNonExtendedLight.

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

Class name.

Return the class name : "MFnDirectionalLight".

Reimplemented from MFnNonExtendedLight.

MObject create ( bool  UIvisible = true,
MStatus ReturnStatus = NULL 
)

Creates a new directional light dependency graph node and adds it to the dependency graph.

If the UIvisible parameter is true, the new node will be connected to the light classification node (which allows the UI to recognize the node as a light) and added to the default light list. If UIvisible is false, the node will be created in isolation.

The light node is added to the current model, under a new transformation.

Parameters:
[in]UIvisibledetermines whether or not to connect the new node to the light classification node and add it to the default light list.
[out]ReturnStatusreturn status
Returns:
MObject representing the new dependency node.
Status Codes:
MObject create ( const MObject parent,
bool  UIvisible = true,
bool  wantTransform = false,
MStatus ReturnStatus = NULL 
)

Creates a new directional light dependency graph node and adds it to the dependency graph.

If the UIvisible parameter is true, the new node will be connected to the light classification node (which allows the UI to recognize the node as a light) and added to the default light list. If UIvisible is false, the node will be created in isolation.

If wantTransform parameter is false ( which is by default ), the new shape node is created under the specified parent and no transform node is created. If the specified parent is null, then no shape node will be created.

The light node is added to the current model, under the specified parent.

Parameters:
[in]parentthe node under which the new light and its transform will be added.
[in]wantTransformBoolean to indicate whether the transform node is needed or not, which is 'false' by default.
[in]UIvisibledetermines whether or not to connect the new node to the light classification node and add it to the default light list.
[out]ReturnStatusreturn status
Returns:
MObject representing the new dependency node.
Status Codes:
float shadowAngle ( MStatus ReturnStatus = NULL) const

Retrieves the value of the "shadowAngle" attribute of a directional light node.

This attribute represents an angular divergence from the direction vector of the light used to calculate soft shadows.

Parameters:
[out]ReturnStatusreturn status
Returns:
The value of the "shadowAngle" attribute of the light node.
Status Codes:
MStatus setShadowAngle ( const float &  shadow_angle)

Sets the value of the "shadowAngle" attribute of a directional light node.

Parameters:
[in]shadow_anglevalue to which the attribute will be set.
Returns:
Return status
Status Codes:
bool useLightPosition ( MStatus ReturnStatus = NULL) const

Retrieves the value of the "useLightPosition" attribute of a directional light.

This attribute determines if the objects behind the light will cast shadows.

Parameters:
[out]ReturnStatusreturn status
Returns:
The value of the "useLightPosition" attribute of the directional light.
Status Codes:
MStatus setUseLightPosition ( const bool  use_light_position)

Sets the value of the "useLightPosition" attribute of a directional light.

Parameters:
[in]use_light_positionvalue to which the attribute will be set.
Returns:
Return status
Status Codes:
MObject create ( const MObject parent,
bool  UIvisible = true,
MStatus ReturnStatus = NULL 
)

NO SCRIPT SUPPORT.

Creates a new directional light dependency graph node and adds it to the dependency graph.

If the UIvisible parameter is true, the new node will be connected to the light classification node (which allows the UI to recognize the node as a light) and added to the default light list. If UIvisible is false, the node will be created in isolation.

The light node is added to the current model, under a new transformation. The transformation is added to the current model under the specified parent.

Parameters:
[in]parentthe node under which the new light and its transform will be added.
[in]UIvisibledetermines whether or not to connect the new node to the light classification node and add it to the default light list.
[out]ReturnStatusreturn status
Returns:
MObject representing the new dependency node.
Status Codes:

MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight
MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight MFnDirectionalLight