- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FCDEffectPass Class Reference
[COLLADA Effect Classes [ColladaFX]]

A COLLADA effect pass. More...

`#include <FCDEffectPass.h>`

Inheritance diagram for FCDEffectPass:

List of all members.

## Public Member Functions
| FCDEffectPass (FCDocument *document, FCDEffectTechnique *parent)
| Constructor: do not use directly.
virtual | ~FCDEffectPass ()
| Destructor.
FCDEffectTechnique * | GetParent ()
| Retrieves the effect techniques which contains this effect pass.
const FCDEffectTechnique * | GetParent () const
| See above.
| DEPRECATED (3.05A, GetParent()->GetParent()->GetParent()->GetDaeId()) const fm
| Retrieves the COLLADA id of the parent effect.
const fstring & | GetPassName () const
| Retrieves the sub-id of the effect pass.
void | SetPassName (const fchar *_name)
| Sets the optional sub-id for the effect pass.
size_t | GetShaderCount () const
| Retrieves the number of shaders contained within the effect pass.
FCDEffectPassShader * | GetShader (size_t index)
| Retrieves a specific shader.
const FCDEffectPassShader * | GetShader (size_t index) const
| See above.
FCDEffectPassShader * | AddShader ()
| Adds a new shader to the pass.
| DEPRECATED (3.05A, shader->Release()) void ReleaseShader(FCDEffectPassShader *shader)
| Releases a shader contained within the pass.
FCDEffectPassShader * | GetVertexShader ()
| Retrieves the vertex shader for this effect pass.
const FCDEffectPassShader * | GetVertexShader () const
| See above.
FCDEffectPassShader * | GetFragmentShader ()
| Retrieves the fragment shader for this effect pass.
const FCDEffectPassShader * | GetFragmentShader () const
| See above.
FCDEffectPassShader * | AddVertexShader ()
| Adds a new vertex shader to the pass.
FCDEffectPassShader * | AddFragmentShader ()
| Adds a new fragment shader to the pass.
| DEPRECATED (3.05A, GetRenderStateCount and GetRenderState(index)) void GetRenderStates() const
| Retrieves the container of the render states for the pass.
size_t | GetRenderStateCount () const
| Retrieves the number of render states defined for the pass.
FCDEffectPassState * | GetRenderState (size_t index)
| Retrieves a specific render state defined for the pass.
const FCDEffectPassState * | GetRenderState (size_t index) const
| See above.
FCDEffectPassState * | AddRenderState (FUDaePassState::State type)
| Adds a new render state to the effect pass.
FCDEffectPassState * | FindRenderState (FUDaePassState::State type)
| Retrieves a specific render state defined for the pass.
const FCDEffectPassState * | FindRenderState (FUDaePassState::State type) const
| See above.
FCDEffectPass * | Clone (FCDEffectPass *clone=NULL) const
| Clones the effect pass and shaders.

## Detailed Description

A COLLADA effect pass.

The effect pass contains a list of effect shaders. While they may be missing, it does not make sense for the effect pass to contain more than two shaders: a vertex shader and a fragment/pixel shader.

For this reason, we provide the GetVertexShader and the GetFragmentShader which we expect will be used for most applications, rather than looking through the list of shader objects.

## Constructor & Destructor Documentation

FCDEffectPass::FCDEffectPass | ( | FCDocument * | document,
|  | FCDEffectTechnique * | parent
| ) |

  | Constructor: do not use directly. Instead, use the FCDEffectTechnique::AddPass function. Parameters:
  | document | The FCollada document that owns this pass.
  | parent | The effect technique that contains this effect pass.

## Member Function Documentation

FCDEffectPassShader* FCDEffectPass::AddFragmentShader | ( |  | ) |

| Adds a new fragment shader to the pass. If a fragment shader already exists within the pass, it will be released. Returns: The new fragment shader.

FCDEffectPassState* FCDEffectPass::AddRenderState | ( | FUDaePassState::State | type | ) |

  | Adds a new render state to the effect pass. Render states automatically get sorted by type. Parameters:
  | type | The type of the render state to add. If a render state of this type already exists within the effect pass, it will be returned.
Returns: A render state of the given type.

FCDEffectPassShader* FCDEffectPass::AddShader | ( |  | ) |

| Adds a new shader to the pass. Returns: The new shader.

FCDEffectPassShader* FCDEffectPass::AddVertexShader | ( |  | ) |

| Adds a new vertex shader to the pass. If a vertex shader already exists within the pass, it will be released. Returns: The new vertex shader.

FCDEffectPass* FCDEffectPass::Clone | ( | FCDEffectPass * | clone = `NULL` | ) | const

  | Clones the effect pass and shaders. Parameters:
  | clone | The cloned pass. If this pointer is NULL, a new pass is created and you will need to release this new pass.
Returns: The cloned pass.

FCDEffectPass::DEPRECATED | ( | 3. | 05A,
|  | GetRenderStateCount and | GetRenderState(index)
| ) | const`[inline]`

| Retrieves the container of the render states for the pass. Returns: The render state list.

FCDEffectPass::DEPRECATED | ( | 3. | 05A,
|  | shader-> | Release()
| ) | `[inline]`

  | Releases a shader contained within the pass. Parameters:
  | shader | The shader to release.

FCDEffectPass::DEPRECATED | ( | 3. | 05A,
|  | GetParent()->GetParent()->GetParent()->GetDaeId() |
| ) | const`[inline]`

| Retrieves the COLLADA id of the parent effect. This function is mostly useful as a shortcut for debugging and reporting. Returns: The COLLADA id of the parent effect.

FCDEffectPassState* FCDEffectPass::FindRenderState | ( | FUDaePassState::State | type | ) | `[inline]`

  | Retrieves a specific render state defined for the pass. Parameters:
  | type | The type of the render state to retrieve.
Returns: The render state with the given type. This pointer will be NULL if no render state has been defined for the given type.

FCDEffectPassShader* FCDEffectPass::GetFragmentShader | ( |  | ) | `[inline]`

| Retrieves the fragment shader for this effect pass. Returns: The fragment shader. This pointer will be NULL if no shader within the pass affects pixels/fragments.

FCDEffectTechnique* FCDEffectPass::GetParent | ( |  | ) | `[inline]`

| Retrieves the effect techniques which contains this effect pass. Returns: The parent technique.

const fstring& FCDEffectPass::GetPassName | ( |  | ) | const`[inline]`

| Retrieves the sub-id of the effect pass. This sub-id is optional. Returns: The sub-id.

FCDEffectPassState* FCDEffectPass::GetRenderState | ( | size_t | index | ) | `[inline]`

  | Retrieves a specific render state defined for the pass. Parameters:
  | index | The index of the render state.
Returns: The render state at the given index.

size_t FCDEffectPass::GetRenderStateCount | ( |  | ) | const`[inline]`

| Retrieves the number of render states defined for the pass. Returns: The render state count.

FCDEffectPassShader* FCDEffectPass::GetShader | ( | size_t | index | ) | `[inline]`

  | Retrieves a specific shader. Parameters:
  | index | The index of the shader.
Returns: The shader. This pointer will be NULL if the index is out-of-bounds.

size_t FCDEffectPass::GetShaderCount | ( |  | ) | const`[inline]`

| Retrieves the number of shaders contained within the effect pass. Returns: The number of shaders.

FCDEffectPassShader* FCDEffectPass::GetVertexShader | ( |  | ) | `[inline]`

| Retrieves the vertex shader for this effect pass. Returns: The vertex shader. This pointer will be NULL if no shader within the pass affects vertices.

void FCDEffectPass::SetPassName | ( | const fchar * | _name | ) | `[inline]`

  | Sets the optional sub-id for the effect pass. This sub-id is optional. Parameters:
  | _name | The sub-id.

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

- FCDocument/FCDEffectPass.h