Public Member Functions
ShaderArrayParameter Class Reference

Detailed Description

Represents an array parameter for a Shader.

An array parameter is a specialization of the ShaderParameter class which contains a set of ShaderParameter objects. These types of parameters are useful for supporting a dynamic number of instances of parameters. For example, the Softimage_March_Fractal_vol_1_0 Volume Effects shader defines an array parameter of light references labeled scatter_lights_input that allows you to add any number of lights.

It can contain any number of sub-parameters, all of the same type. Its contents can be moved around, new parameters added and old ones removed.

These type of parameters can be defined using the ShaderArrayParamDef interface.

See also:
ArrayParameter, ShaderParameter
Since:
9.0 (2011)

#include <xsi_shaderarrayparameter.h>

Inheritance diagram for ShaderArrayParameter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ShaderArrayParameter ()
 ~ShaderArrayParameter ()
 ShaderArrayParameter (const CRef &in_ref)
 ShaderArrayParameter (const ShaderArrayParameter &in_obj)
bool IsA (siClassID in_ClassID) const
siClassID GetClassID () const
ShaderArrayParameteroperator= (const ShaderArrayParameter &in_obj)
ShaderArrayParameteroperator= (const CRef &in_ref)
ShaderParameter operator[] (LONG in_index)
LONG GetCount () const
ShaderParameter Add ()
CStatus Remove (LONG in_lIndex)
CStatus Remove (const ShaderParameter &in_parameter)
CStatus Clear ()
CStatus Move (LONG in_lIndex, LONG in_lUpDown)
CStatus Move (const ShaderParameter &in_parameter, LONG in_lUpDown)

Constructor & Destructor Documentation

Constructs an ShaderArrayParameter object.

Destroys an ShaderArrayParameter object.

ShaderArrayParameter ( const CRef in_ref)

Constructs an ShaderArrayParameter object from a reference to another ShaderArrayParameter object.

Parameters:
in_refA reference to a group.

Constructs a new ShaderArrayParameter object from an existing ShaderArrayParameter object.

Parameters:
in_objAn existing Group object to copy into this Group object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID) const [virtual]

Returns true if this object supports the functionality of a specified class. For example, an ShaderArrayParameter is a type of ShaderParameter, so an ShaderArrayParameter object supports ShaderParameter functionality.

Parameters:
in_ClassIDTest if this object supports this class.
Returns:
True if this object supports the specified class, and false otherwise.

Reimplemented from ShaderParameter.

siClassID GetClassID ( ) const [virtual]

Returns the class ID for this object.

Returns:
The class ID.

Reimplemented from ShaderParameter.

ShaderArrayParameter& operator= ( const ShaderArrayParameter in_obj)

Assigns an ShaderArrayParameter object to an existing ShaderArrayParameter object.

Parameters:
in_objAn ShaderArrayParameter object to be copied into this object.
Returns:
The reinitialized ShaderArrayParameter object.
ShaderArrayParameter& operator= ( const CRef in_ref)

Assigns a CRef to this ShaderArrayParameter object. The ShaderArrayParameter object is cleared if the CRef is not a reference to an object that supports the ShaderArrayParameter class.

Parameters:
in_refA reference to an object that supports the ShaderArrayParameter class.
Returns:
The reinitialized ShaderArrayParameter object.

Reimplemented from ShaderParameter.

ShaderParameter operator[] ( LONG  in_index)

Returns the parameter at a given index. If the index is out of bounds, this operator returns an empty, invalid ShaderParameter object.

Parameters:
in_indexInteger index of the parameter to get.
Returns:
The parameter at the given index
Empty parameter if the index is out of bounds
LONG GetCount ( ) const

Returns the size of the array. If the array is empty or invalid, 0 is returned.

Returns:
The number of parameters in the array.
Since:
9.0 (2011)
ShaderParameter Add ( )

Appends a new parameter to this array. The type of the new parameter is determined by the definition of the array parameter. This corresponds to clicking the Add button for the shader array parameter section on the shader's property page.

Returns:
The new parameter. If the array is static, an invalid ShaderParameter object is returned.
See also:
ShaderArrayParamDef, ShaderArrayParameter::Remove
Since:
9.0 (2011)
CStatus Remove ( LONG  in_lIndex)

Removes the item from this array that matches the specified index. This corresponds to choosing Remove from an item's context menu in the UI.

Parameters:
in_lIndexThe index of the parameter to remove.
Returns:
CStatus::OK if succeeded.
CStatus::Fail if the index is out of bounds.
See also:
ShaderArrayParameter::Add
Since:
9.0 (2011)
CStatus Remove ( const ShaderParameter in_parameter)

Removes the specified item from this array. This corresponds to choosing Remove from an item's context menu in the UI.

Parameters:
in_parameterShaderParameter to remove.
Returns:
CStatus::OK if successful.
CStatus::Fail if the parameter is not a member of the array.
See also:
ShaderArrayParameter::Add
Since:
9.0 (2011)
CStatus Clear ( )

Removes all items from this array. This corresponds to clicking the Clear button for the shader array parameter section on the shader's property page.

Returns:
CStatus::OK if successful.
Since:
9.0 (2011)

Reimplemented from CBase.

CStatus Move ( LONG  in_lIndex,
LONG  in_lUpDown 
)

Moves a parameter up or down in the array relative to its current position. The new position of the parameter is calculated by adding in_lUpDown to the current index and clamping the result to the array boundaries (0 to ShaderArrayParameter::GetCount - 1).

Parameters:
in_lIndexThe index of the parameter to move.
in_lUpDownPositive or negative amount to move the parameter.
Returns:
CStatus::OK if successful.
CStatus::Fail if the index is out of bounds.
Since:
9.0 (2011)
CStatus Move ( const ShaderParameter in_parameter,
LONG  in_lUpDown 
)

Moves a given parameter up or down in the array relative to its current position. The new position of the parameter is calculated by adding in_lUpDown to the current index and clamping the result to the array boundaries (0 to ShaderArrayParameter::GetCount - 1).

Parameters:
in_parameterThe parameter to move.
in_lUpDownPositive or negative amount to move the parameter.
Returns:
CStatus::OK if successful.
CStatus::Fail if the given parameter is not a member of the array.
Since:
9.0 (2011)

The documentation for this class was generated from the following file: