A class for providing lighting information that may be used with Viewport 2.0.
This class allows for access to various per-light information accessible via the MDrawContext class in Viewport 2.0.
#include <MDrawContext.h>
Public Types | |
enum | ParameterType { kInvalid, kBoolean, kInteger, kFloat, kFloat2, kFloat3, kFloat4, kFloat4x4Row, kFloat4x4Col, kTexture2, kSampler } |
Specifies light parameter data types. More... | |
enum | StockParameterSemantic { kNoSemantic, kLightEnabled, kWorldPosition, kWorldDirection, kIntensity, kColor, kEmitsDiffuse, kEmitsSpecular, kDecayRate, kDropoff, kCosConeAngle, kStartShadowParameters , kShadowMap, kShadowSamp, kShadowBias, kShadowMapSize, kShadowViewProj, kShadowColor, kGlobalShadowOn, kShadowOn } |
Specifies semantic meanings for predefined names for common or "stock" light parameters. More... | |
Public Member Functions | |
void | parameterList (MStringArray &list) const |
Get the names of all light parameters that are accessible. | |
ParameterType | parameterType (const MString ¶meterName) const |
Get the type of the named parameter, returns kInvalid if parameter is not found. | |
StockParameterSemantic | parameterSemantic (const MString ¶meterName) const |
Get the stock semantic for a named parameter. | |
unsigned int | arrayParameterCount (const MString ¶meterName) const |
Return the array size of a parameter. | |
MStatus | getParameter (const MString ¶meterName, MIntArray &value) |
Get a named, boolean or integer parameter. | |
MStatus | getParameter (const MString ¶meterName, MFloatArray &value) |
Get a named, float parameter. | |
MStatus | getParameter (const MString ¶meterName, MMatrix &value) |
Get a named, matrix parameter. | |
MStatus | getParameter (const MString ¶meterName, MSamplerStateDesc &samplerDesc) |
Get a description of a sampler parameter. | |
void * | getParameterTextureHandle (const MString ¶meterName) |
Get a resource handle for a texture parameter. | |
MStatus | getParameter (const MString ¶meterName, MTextureAssignment &value) |
Get a named texture parameter. | |
Protected Member Functions | |
~MLightParameterInformation () | |
Destructor. |
enum ParameterType |
Specifies light parameter data types.
Specifies semantic meanings for predefined names for common or "stock" light parameters.
The semantic is provided to aid in the determination of the appropriate mapping of parameter values to programmable shader or fixed function lighting inputs.
Note that not all parameters exist on all lights so there may be no match for a given stock name. For example a directional light will have no position parameter.
void parameterList | ( | MStringArray & | list | ) | const |
Get the names of all light parameters that are accessible.
[out] | list | The list to populate parameter names |
MLightParameterInformation::ParameterType parameterType | ( | const MString & | parameterName | ) | const |
Get the type of the named parameter, returns kInvalid if parameter is not found.
[in] | parameterName | Name of the parameter to query |
MLightParameterInformation::StockParameterSemantic parameterSemantic | ( | const MString & | parameterName | ) | const |
Get the stock semantic for a named parameter.
[in] | parameterName | Name of the parameter to query |
unsigned int arrayParameterCount | ( | const MString & | parameterName | ) | const |
Return the array size of a parameter.
If the parameter is not an array then a value of 0 is returned.
[in] | parameterName | Name of the parameter to query |
Get a named, boolean or integer parameter.
[in] | parameterName | Name of the parameter to retrieve |
[out] | value | Value of the parameter |
MStatus getParameter | ( | const MString & | parameterName, |
MFloatArray & | value | ||
) |
Get a named, float parameter.
[in] | parameterName | Name of the parameter to retrieve |
[out] | value | Value of the parameter |
Get a named, matrix parameter.
[in] | parameterName | Name of the parameter to retrieve |
[out] | value | Value of the parameter |
MStatus getParameter | ( | const MString & | parameterName, |
MSamplerStateDesc & | samplerDesc | ||
) |
Get a description of a sampler parameter.
[in] | parameterName | Name of the parameter to retrieve |
[out] | samplerDesc | Sampler state description retrieved |
void * getParameterTextureHandle | ( | const MString & | parameterName | ) |
Get a resource handle for a texture parameter.
[in] | parameterName | Name of the parameter to query |
MStatus getParameter | ( | const MString & | parameterName, |
MHWRender::MTextureAssignment & | value | ||
) |
Get a named texture parameter.
[in] | parameterName | Name of the parameter to query |
[out] | value | Value of the parameter |