Manage Spot Light dependency Nodes.
MFnSpotLight facilitates creation and manipulation of dependency graph nodes representing spotlights.
#include <MFnSpotLight.h>
Public Types |
|
enum | MBarnDoor { kLeft, kRight, kTop, kBottom } |
Available doors for barnDoor-related methods. More... |
|
enum | MDecayRegion { kFirst, kSecond, kThird } |
Decay regions. More... |
|
Public Member Functions |
|
virtual MFn::Type | type () const |
Function set type. |
|
virtual | ~MFnSpotLight () |
Destructor. |
|
MFnSpotLight () | |
Default constructor. |
|
MFnSpotLight (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. |
|
MFnSpotLight (const MDagPath &object, MStatus *ret=NULL) | |
Constructor. |
|
MObject | create (bool UIvisible=true, MStatus *ReturnStatus=NULL) |
Creates a new spotlight 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 spotlight dependency graph
node and adds it to the dependency graph. |
|
double | coneAngle (MStatus *ReturnStatus=NULL) const |
Retrieves the value of the "coneAngle"
attribute of a light node. |
|
MStatus | setConeAngle (const double &coneAngle) |
Sets the value of the "coneAngle" attribute
of a light node. |
|
double | penumbraAngle (MStatus *ReturnStatus=NULL) const |
Retrieves the value of the "penumbraAngle"
attribute of a light node. |
|
MStatus | setPenumbraAngle (const double &penumbraAngle) |
Sets the value of the "penumbraAngle"
attribute of a light node. |
|
double | dropOff (MStatus *ReturnStatus=NULL) const |
Retrieves the value of the "dropOff"
attribute of a light node. |
|
MStatus | setDropOff (const double &dropOff) |
Sets the value of the "dropOff" attribute of
a light node. |
|
bool | barnDoors (MStatus *ReturnStatus=NULL) const |
Retrieves the value of the "barnDoors"
attribute of a light node. |
|
MStatus | setBarnDoors (const bool &barnDoors) |
Sets the value of the "barnDoors" attribute
of a light node. |
|
double | barnDoorAngle (MBarnDoor which_door, MStatus *ReturnStatus=NULL) const |
Retrieves the value of the barn door angle
for the specified barn door. |
|
MStatus | setBarnDoorAngle (MBarnDoor which_door, const double &barn_door_angle) |
Sets the value of the appropriate barn door
angle attribute of a light node. |
|
bool | useDecayRegions (MStatus *ReturnStatus=NULL) const |
Retrieves the value of the "useDecayRegions"
attribute of a light node. |
|
MStatus | setUseDecayRegions (const bool &use_decay_regions) |
Sets the value of the "useDecayRegions"
attribute of a light node. |
|
float | startDistance (MDecayRegion which_region, MStatus *ReturnStatus=NULL) const |
Retrieves the value of the start distance
for the specified decay regions. |
|
MStatus | setStartDistance (MDecayRegion which_region, const float &start_distance) |
Sets the value of the appropriate decay
region start distance attribute of a light node. |
|
float | endDistance (MDecayRegion which_region, MStatus *ReturnStatus=NULL) const |
Retrieves the value of the end distance for
the specified decay regions. |
|
MStatus | setEndDistance (MDecayRegion which_region, const float &end_distance) |
Sets the value of the appropriate decay
region end distance attribute of a light node. |
|
MFnSpotLight (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. |
enum MBarnDoor |
Available doors for barnDoor-related methods.
enum MDecayRegion |
Decay regions.
~MFnSpotLight | ( | ) | [virtual] |
Destructor.
The class destructor.
MFnSpotLight | ( | MObject & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFnSpotLight | ( | const MDagPath & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
Constructor.
Class constructor that initializes the function set to the given constant MDagPath object.
[in] | object | The const MDagPath to attach the function set to |
[out] | ReturnStatus | The return status |
MFnSpotLight | ( | const MObject & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type type | ( | ) | const [virtual] |
const char * className | ( | ) | const [protected, virtual] |
Creates a new spotlight 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.
[in] | UIvisible | determines whether or not to connect the new node to the light classification node and add it to the default light list. |
[out] | ReturnStatus | return status |
MObject create | ( | const MObject & | parent, |
bool | UIvisible = true , |
||
bool | wantTransform =
false , |
||
MStatus * | ReturnStatus =
NULL |
||
) |
Creates a new spotlight 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.
[in] | parent | the node under which the new light and its transform will be added. |
[in] | wantTransform | Boolean to indicate whether the transform node is needed or not, which is 'false' by default. |
[in] | UIvisible | determines whether or not to connect the new node to the light classification node and add it to the default light list. |
[out] | ReturnStatus | return status |
double coneAngle | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Retrieves the value of the "coneAngle" attribute of a light node.
This attribute represents the angle that the spotlight cone makes with the spotlight direction vector.
[out] | ReturnStatus | return status |
MStatus setConeAngle | ( | const double & | cone_angle | ) |
Sets the value of the "coneAngle" attribute of a light node.
[in] | cone_angle | value to which the attribute will be set. |
double penumbraAngle | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Retrieves the value of the "penumbraAngle" attribute of a light node.
This attribute represents the extra angle beyond the cone angle used in soft shadow computations.
[out] | ReturnStatus | return status |
MStatus setPenumbraAngle | ( | const double & | penumbra_angle | ) |
Sets the value of the "penumbraAngle" attribute of a light node.
[in] | penumbra_angle | value to which the attribute will be set. |
double dropOff | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Retrieves the value of the "dropOff" attribute of a light node.
This attribute represents the degree to which intensity of the light decreases with increasing angular distance from the light direction vector. Higher values represent more rapid intensity dropoff.
[out] | ReturnStatus | return status |
MStatus setDropOff | ( | const double & | drop_off | ) |
Sets the value of the "dropOff" attribute of a light node.
[in] | drop_off | value to which the attribute will be set. |
bool barnDoors | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Retrieves the value of the "barnDoors" attribute of a light node.
This attribute determines whether or not the light uses barn doors.
[out] | ReturnStatus | return status |
MStatus setBarnDoors | ( | const bool & | barn_doors | ) |
Sets the value of the "barnDoors" attribute of a light node.
[in] | barn_doors | value to which the attribute will be set. |
Retrieves the value of the barn door angle for the specified barn door.
The barn door angles are represented by the "leftBarnDoor", "rightBarnDoor", "topBarnDoor", and "bottomBarnDoor" attributes. This function retrieves the value of the appropriate attribute.
[in] | which_door | which barn door to return. |
[out] | ReturnStatus | return status |
Sets the value of the appropriate barn door angle attribute of a light node.
[in] | which_door | Which barn door to return. |
[in] | barn_door_angle | New value for the barn door. |
bool useDecayRegions | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Retrieves the value of the "useDecayRegions" attribute of a light node.
This attribute determines whether or not the light uses decay regions.
[out] | ReturnStatus | return status |
MStatus setUseDecayRegions | ( | const bool & | use_decay_regions | ) |
Sets the value of the "useDecayRegions" attribute of a light node.
[in] | use_decay_regions | value to which the attribute will be set. |
float startDistance | ( | MDecayRegion | which_region, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Retrieves the value of the start distance for the specified decay regions.
The start distances for the spotlight's 3 decay regions are represented by the "startDistance1", "startDistance2", and "startDistance3" attributes. This function retrieves the value of the appropriate attribute.
[in] | which_region | the decay region whose startDistance attribute is to be retrieved. |
[out] | ReturnStatus | return status |
MStatus setStartDistance | ( | MDecayRegion | which_region, |
const float & | start_distance | ||
) |
Sets the value of the appropriate decay region start distance attribute of a light node.
[in] | which_region | the decay region whose start distance is to be set. |
[in] | start_distance | value to which the attribute will be set. |
float endDistance | ( | MDecayRegion | which_region, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Retrieves the value of the end distance for the specified decay regions.
The end distances for the spotlight's 3 decay regions are represented by the "endDistance1", "endDistance2", and "endDistance3" attributes. This function retrieves the value of the appropriate attribute.
[in] | which_region | the decay region whose endDistance attribute is to be retrieved. |
[out] | ReturnStatus | return status |
MStatus setEndDistance | ( | MDecayRegion | which_region, |
const float & | end_distance | ||
) |
Sets the value of the appropriate decay region end distance attribute of a light node.
[in] | which_region | the decay region whose end distance is to be set. |
[in] | end_distance | value to which the attribute will be set. |
NO SCRIPT SUPPORT.
Creates a new spotlight 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.
[in] | parent | the node under which the new light and its transform will be added. |
[in] | UIvisible | determines whether or not to connect the new node to the light classification node and add it to the default light list. |
[out] | ReturnStatus | return status |