FCDEffectPass Class Reference
[COLLADA Effect Classes [ColladaFX]]

A COLLADA effect pass. More...

#include <FCDEffectPass.h>

Inheritance diagram for FCDEffectPass:

FCDObject FUObject List of all members.

Public Member Functions

 FCDEffectPass (FCDocument *document, FCDEffectTechnique *_parent)
 Constructor: do not use directly.
virtual ~FCDEffectPass ()
 Destructor: do not use directly.
FCDEffectTechniqueGetParent ()
 Retrieves the effect techniques which contains this effect pass.
const FCDEffectTechniqueGetParent () const
 See above.
const string & GetDaeId () const
 Retrieves the COLLADA id of the parent effect.
const fstring & GetPassName () const
 Retrieves the sub-id of the effect pass.
void SetPassName (const fstring &_name)
 Sets the optional sub-id for the effect pass.
const MeshDataListGetMeshData () const
size_t GetShaderCount () const
 Retrieves the number of shaders contained within the effect pass.
FCDEffectPassShaderGetShader (size_t index)
 Retrieves a specific shader.
const FCDEffectPassShaderGetShader (size_t index) const
 See above.
FCDEffectPassShaderAddShader ()
 Adds a new shader to the pass.
void ReleaseShader (FCDEffectPassShader *shader)
 Releases a shader contained within the pass.
FCDEffectPassShaderGetVertexShader ()
 Retrieves the vertex shader for this effect pass.
const FCDEffectPassShaderGetVertexShader () const
 See above.
FCDEffectPassShaderGetFragmentShader ()
 Retrieves the fragment shader for this effect pass.
const FCDEffectPassShaderGetFragmentShader () const
 See above.
FCDEffectPassShaderAddVertexShader ()
 Adds a new vertex shader to the pass.
FCDEffectPassShaderAddFragmentShader ()
 Adds a new fragment shader to the pass.
FCDEffectPassClone (FCDEffectTechnique *newParent) const
 [INTERNAL] Clones the full effect pass.
FUStatus LoadFromXML (xmlNode *passNode, xmlNode *techniqueNode, xmlNode *profileNode)
 [INTERNAL] Reads in the effect pass from a given COLLADA XML tree node.
xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the effect pass to the given COLLADA XML tree node.

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 COLLADA document that owns this effect pass.
_parent The effect technique that contains this effect pass.

virtual FCDEffectPass::~FCDEffectPass  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDEffectTechnique::ReleasePass function.


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.

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 FCDEffectTechnique newParent  )  const
 

[INTERNAL] Clones the full effect pass.

Parameters:
newParent The effect technique that will contain the cloned profile.
Returns:
The cloned pass. This pointer will never be NULL.

const string& FCDEffectPass::GetDaeId  )  const
 

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.

FCDEffectPassShader* FCDEffectPass::GetFragmentShader  ) 
 

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.

const MeshDataList& FCDEffectPass::GetMeshData  )  const [inline]
 

Deprecated:
Retrieves the list of mesh data bindings. This patches bad export data in ColladaMaya and will be removed soon.
Returns:
The list of mesh data bindings.

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.

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  ) 
 

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.

FUStatus FCDEffectPass::LoadFromXML xmlNode *  passNode,
xmlNode *  techniqueNode,
xmlNode *  profileNode
 

[INTERNAL] Reads in the effect pass from a given COLLADA XML tree node.

Parameters:
passNode The COLLADA XML tree node.
techniqueNode X
Deprecated:
bad interface : this dependency must be taken out[3]
Parameters:
profileNode X
Deprecated:
bad interface : this dependency must be taken out[2]
Returns:
The status of the import. If the status is not successful, it may be dangerous to extract information from the effect pass.

void FCDEffectPass::ReleaseShader FCDEffectPassShader shader  ) 
 

Releases a shader contained within the pass.

Parameters:
shader The shader to release.

void FCDEffectPass::SetPassName const fstring &  _name  )  [inline]
 

Sets the optional sub-id for the effect pass.

This sub-id is optional.

Parameters:
_name The sub-id.

xmlNode* FCDEffectPass::WriteToXML xmlNode *  parentNode  )  const
 

[INTERNAL] Writes out the effect pass to the given COLLADA XML tree node.

Parameters:
parentNode The COLLADA XML parent node in which to insert the effect pass.
Returns:
The created element XML tree node.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:42 2006 for FCollada by  doxygen 1.4.6-NO