#include <MFnSpotLight.h>
MFnSpotLight facilitates creation and manipulation of dependency graph nodes representing spotlights.
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) |
MObject | create (const MObject &parent, bool UIvisible=true, bool wantTransform=false, MStatus *ReturnStatus=NULL) |
double | coneAngle (MStatus *ReturnStatus=NULL) const |
MStatus | setConeAngle (const double &coneAngle) |
double | penumbraAngle (MStatus *ReturnStatus=NULL) const |
MStatus | setPenumbraAngle (const double &penumbraAngle) |
double | dropOff (MStatus *ReturnStatus=NULL) const |
MStatus | setDropOff (const double &dropOff) |
bool | barnDoors (MStatus *ReturnStatus=NULL) const |
MStatus | setBarnDoors (const bool &barnDoors) |
double | barnDoorAngle (MBarnDoor which_door, MStatus *ReturnStatus=NULL) const |
MStatus | setBarnDoorAngle (MBarnDoor which_door, const double &barn_door_angle) |
bool | useDecayRegions (MStatus *ReturnStatus=NULL) const |
MStatus | setUseDecayRegions (const bool &use_decay_regions) |
float | startDistance (MDecayRegion which_region, MStatus *ReturnStatus=NULL) const |
MStatus | setStartDistance (MDecayRegion which_region, const float &start_distance) |
float | endDistance (MDecayRegion which_region, MStatus *ReturnStatus=NULL) const |
MStatus | setEndDistance (MDecayRegion which_region, const float &end_distance) |
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. |
MFnSpotLight::~MFnSpotLight | ( | ) | [virtual] |
Destructor.
The class destructor.
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 |
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 |
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 MFnSpotLight::type | ( | ) | const [virtual] |
const char * MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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 MFnSpotLight::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. |
MObject MFnSpotLight::create | ( | const MObject & | parent, | |
bool | UIvisible = true , |
|||
MStatus * | ReturnStatus = NULL | |||
) |
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 |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |