#include <MFnLight.h>


MFnLight allows the creation and manipulation of dependency graph nodes representing lights. This is the top level of a hierarchy of light node function sets. It permits manipulation of the attributes common to all types of lights.
Public Member Functions | |
| virtual MFn::Type | type () const |
| Function set type. | |
| virtual | ~MFnLight () |
| Destructor. | |
| MFnLight () | |
| Default constructor. | |
| MFnLight (MObject &object, MStatus *ReturnStatus=NULL) | |
| Constructor. | |
| MFnLight (const MDagPath &object, MStatus *ret=NULL) | |
| Constructor. | |
| MColor | color (MStatus *ReturnStatus=NULL) const |
| MStatus | setColor (const MColor &col) |
| float | intensity (MStatus *ReturnStatus=NULL) const |
| MStatus | setIntensity (const float &intens) |
| bool | useRayTraceShadows (MStatus *ReturnStatus=NULL) const |
| MStatus | setUseRayTraceShadows (const bool &useRayTraceShadows) |
| MColor | shadowColor (MStatus *ReturnStatus=NULL) const |
| MStatus | setShadowColor (const MColor &shadow_color) |
| double | centerOfIllumination (MStatus *ReturnStatus=NULL) const |
| MStatus | setCenterOfIllumination (const double &dist) |
| short | numShadowSamples (MStatus *ReturnStatus=NULL) const |
| MStatus | setNumShadowSamples (const short &num_shadow_samples) |
| short | rayDepthLimit (MStatus *ReturnStatus=NULL) const |
| MStatus | setRayDepthLimit (const short &rayDepthLimit) |
| MColor | opticalFXvisibility (MStatus *ReturnStatus=NULL) const |
| MStatus | setOpticalFXvisibility (const MColor &visibility) |
| MColor | lightIntensity (MStatus *ReturnStatus=NULL) const |
| MFloatVector | lightDirection (int instance, MSpace::Space space=MSpace::kWorld, MStatus *ReturnStatus=NULL) const |
| MFloatVector | lightDirection (MStatus *ReturnStatus=NULL) const |
| bool | lightAmbient (MStatus *ReturnStatus=NULL) const |
| bool | lightDiffuse (MStatus *ReturnStatus=NULL) const |
| bool | lightSpecular (MStatus *ReturnStatus=NULL) const |
| MFnLight (const MObject &object, MStatus *ret=NULL) | |
| Constructor. | |
Protected Member Functions | |
| virtual const char * | className () const |
| Class name. | |
| MFnLight::~MFnLight | ( | ) | [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 MFnLight::type | ( | ) | const [virtual] |
Function set type.
Return the class type : MFn::kLight
Reimplemented from MFnDagNode.
Reimplemented in MFnAmbientLight, MFnAreaLight, MFnDirectionalLight, MFnNonAmbientLight, MFnNonExtendedLight, MFnPointLight, MFnSpotLight, and MFnVolumeLight.
| const char * MFnLight::className | ( | ) | const [protected, virtual] |
Class name.
Return the class name : "MFnLight"
Reimplemented from MFnDagNode.
Reimplemented in MFnAmbientLight, MFnAreaLight, MFnDirectionalLight, MFnNonAmbientLight, MFnNonExtendedLight, MFnPointLight, MFnSpotLight, and MFnVolumeLight.
Retrieves the value of the "color" attribute of a light node. This attribute represents the color of the light emitted by the light node.
| [out] | ReturnStatus | return status |
Sets the value of the "color" attribute of a light node.
| [in] | col | value to which the attribute will be set. |
| float MFnLight::intensity | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "intensity" attribute of a light node. This attribute represents a uniform scaling factor applied to the light color.
| [out] | ReturnStatus | return status |
| MStatus MFnLight::setIntensity | ( | const float & | intens | ) |
Sets the value of the "intensity" attribute of a light node.
| [in] | intens | value to which the attribute will be set. |
| bool MFnLight::useRayTraceShadows | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "useRayTraceShadows" attribute of a light node. This attribute determines whether or not the light should raytrace it's shadows.
| [out] | ReturnStatus | return status |
| MStatus MFnLight::setUseRayTraceShadows | ( | const bool & | useRayTraceShadows | ) |
Sets the value of the "useRayTraceShadows" attribute of a light node.
| [in] | useRayTraceShadows | value to which the attribute will be set. |
Retrieves the value of the "shadowColor" attribute of a light node. This attribute represents the color of the shadows cast by the light.
| [out] | ReturnStatus | return status |
Sets the value of the "shadowColor" attribute of a light node.
| [in] | shadow_color | value to which the attribute will be set. |
| double MFnLight::centerOfIllumination | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "centerOfIllumination" attribute of a light node. This attribute represents the distance to the center of illumination of the light.
| [out] | ReturnStatus | return status |
| MStatus MFnLight::setCenterOfIllumination | ( | const double & | dist | ) |
Sets the value of the "centerOfIllumination" attribute of a light node.
| [in] | dist | value to which the attribute will be set. |
| short MFnLight::numShadowSamples | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "numShadowSamples" attribute of a light node. This attribute represents the number of shadow samples per point used in occulusion testing.
| [out] | ReturnStatus | return status |
| MStatus MFnLight::setNumShadowSamples | ( | const short & | num_shadow_samples | ) |
Sets the value of the "numShadowSamples" attribute of a light node.
| [in] | num_shadow_samples | value to which the attribute will be set. |
| short MFnLight::rayDepthLimit | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "rayDepthLimit" attribute of a light node. This attribute determines a cutoff point for shadow calculations related to the light. Rays whose depth is higher than the value of this attribute will not trigger a shadow calculation for the light.
| [out] | ReturnStatus | return status |
| MStatus MFnLight::setRayDepthLimit | ( | const short & | ray_depth_limit | ) |
Sets the value of the "rayDepthLimit" attribute of a light node.
| [in] | ray_depth_limit | value to which the attribute will be set. |
Retrieves the value of the "opticalFXvisibility" attribute of a light node. This attribute represents an occlusion scaling factor for light glow effects on this light.
| [out] | ReturnStatus | return status |
Sets the value of the "opticalFXvisibility" attribute of a light node.
| [in] | visibility | value to which the attribute will be set. |
Retrieves the value of the "lightIntensity" attribute of a light node. This attribute represents the intensity of the light specified as a color.
| [out] | ReturnStatus | return status |
| MFloatVector MFnLight::lightDirection | ( | int | instance, | |
| MSpace::Space | space = MSpace::kWorld, |
|||
| MStatus * | ReturnStatus = NULL | |||
| ) | const |
Returns the direction in which the light is pointing. This is only valid for lights which are associated with a direction, such as area, directional or spot lights. The vector returned is not normalized.
| [in] | instance | The instance of the light for which to return the direction. |
| [in] | space | The coordinate space for which the direction vector is returned. If MSpace::kWorld is passed in the vector will be in the lights world space. If any other MSpace::Space value in pass in the vector will be returned in object (or local) space. |
| [out] | ReturnStatus | return status |
| MFloatVector MFnLight::lightDirection | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "lightDirection" attribute of a light node. This attribute represents the direction from the light to the point being shading.
NOTE: This value is only valid during the rendering phase. See lightDirection method above for actual light direction.
| [out] | ReturnStatus | return status |
| bool MFnLight::lightAmbient | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "lightAmbient" attribute of a light node. This attribute indicates if the light has an ambient component.
| [out] | ReturnStatus | return status |
| bool MFnLight::lightDiffuse | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "lightDiffuse" attribute of a light node. This attribute indicates if the light has a diffuse component.
| [out] | ReturnStatus | return status |
| bool MFnLight::lightSpecular | ( | MStatus * | ReturnStatus = NULL |
) | const |
Retrieves the value of the "lightSpecular" attribute of a light node. This attribute indicates if the light has a specular component.
| [out] | ReturnStatus | return status |
| Autodesk® Maya® 2010 © 1997-2009 Autodesk, Inc. All rights reserved. |
Generated with
|