Public Member Functions | Protected Member Functions

MFnPhongShader Class Reference

Search for all occurrences

Detailed Description

Manage Phong Shaders.

MFnPhongShader facilitates the creation and manipulation of dependency graph nodes representing Phong shaders.

#include <MFnPhongShader.h>

Inheritance diagram for MFnPhongShader:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual MFn::Type type () const
 Function set type.
virtual ~MFnPhongShader ()
 Destructor.
 MFnPhongShader ()
 Default constructor.
 MFnPhongShader (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor.
MObject create (bool UIvisible=true, MStatus *ReturnStatus=NULL)
 Creates a new phong shader dependency graph node and adds it to the dependency graph.
float cosPower (MStatus *ReturnStatus=NULL) const
 Retrieves the value of the "cosPower" attribute of a phong shader node.
MStatus setCosPower (const float &cos_power)
 Sets the value of the "cosPower" attribute of a shader node.
 MFnPhongShader (const MObject &object, MStatus *ReturnStatus=NULL)
 Constructor.

Protected Member Functions

virtual const char * className () const
 Class name.

Constructor & Destructor Documentation

MFnPhongShader ( 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:
MFnPhongShader ( 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::kPhong.

Reimplemented from MFnReflectShader.

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

Class name.

Return the class name : "MFnPhongShader".

Reimplemented from MFnReflectShader.

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

Creates a new phong shader dependency graph node and adds it to the dependency graph.

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

Parameters:
[in]UIvisibledetermines whether or not the new node will be connected to the shader classification node.
[out]ReturnStatusreturn status
Returns:
MObject representing the new dependency node.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kInsufficientMemory ran out of memory
  • MS::kNoModelActive no model is currently active
  • MS::kLicenseFailure application not licensed for attempted operation
  • MS::kFailure the new node could not be created, or the new node could not be added to the dependency graph, or the new node could not be connected to the classification node.

Reimplemented from MFnLambertShader.

float cosPower ( MStatus ReturnStatus = NULL) const

Retrieves the value of the "cosPower" attribute of a phong shader node.

This attribute determines the size of specular highlights produced by the shader.

Parameters:
[out]ReturnStatusreturn status
Returns:
The value of the "cosPower" attribute of the shader node.
Status Codes:
MStatus setCosPower ( const float &  cos_power)

Sets the value of the "cosPower" attribute of a shader node.

Parameters:
[in]cos_powervalue to which the attribute will be set.
Returns:
Return status
Status Codes:

MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader
MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader MFnPhongShader