FCDEffectTechnique Class Reference
[COLLADA Effect Classes [ColladaFX]]

A COLLADA effect technique. More...

#include <FCDEffectTechnique.h>

Inheritance diagram for FCDEffectTechnique:

FCDObject FUObject List of all members.

Public Member Functions

 FCDEffectTechnique (FCDocument *document, FCDEffectProfileFX *_parent)
 Constructor: do not use directly.
virtual ~FCDEffectTechnique ()
 Destructor: do not use directly.
FCDEffectProfileFXGetParent ()
 Retrieves the effect profile that contains this technique.
const FCDEffectProfileFXGetParent () const
 See above.
const string & GetDaeId () const
 Retrieves the COLLADA id of the parent effect.
const fstring & GetName () const
 Retrieves the sub-id of the technique.
void SetName (const fstring &_name)
 Sets the sub-id of the technique.
FCDEffectPassListGetPassList ()
 Retrieves the list of passes.
const FCDEffectPassListGetPassList () const
 See above.
size_t GetPassCount () const
 Retrieves the number of passes contained within this effect technique.
FCDEffectPassGetPass (size_t index)
 Retrieves a specific pass contained within this effect technique.
const FCDEffectPassGetPass (size_t index) const
 See above.
FCDEffectPassAddPass ()
 Adds a new pass to this effect technique.
void ReleasePass (FCDEffectPass *pass)
 Releases a pass contaied within this effect technique.
FCDEffectCodeListGetCodeList ()
 Retrieves the list of code inclusions.
const FCDEffectCodeListGetCodeList () const
 See above.
size_t GetCodeCount () const
 Retrieves the number of code inclusions contained within the effect profile.
FCDEffectCodeGetCode (size_t index)
 Retrieves a code inclusion contained within the effect profile.
const FCDEffectCodeGetCode (size_t index) const
 See above.
FCDEffectCodeFindCode (const string &sid)
 Retrieves the code inclusion with the given sub-id.
const FCDEffectCodeFindCode (const string &sid) const
 See above.
FCDEffectCodeAddCode ()
 Adds a new code inclusion to this effect profile.
void ReleaseCode (FCDEffectCode *code)
 Releases a code inclusion contained within this effect profile.
FCDEffectParameterListGetParameterList ()
 Retrieves the list of effect parameters contained within the effect profile.
const FCDEffectParameterListGetParameterList () const
 See above.
void AddParameter (FCDEffectParameter *parameter)
 [INTERNAL] Inserts an existing parameter into the list of effect parameters at this abstraction level.
const FCDEffectParameterFindParameter (const char *reference) const
 Retrieves an effect parameter.
virtual FCDEffectParameterFindParameterBySemantic (const string &semantic)
 Retrieves an effect parameter.
virtual void FindParametersBySemantic (const string &semantic, FCDEffectParameterList &parameters)
 Retrieves a subset of the effect parameter list.
virtual void FindParametersByReference (const string &reference, FCDEffectParameterList &parameters)
 Retrieves a subset of the effect parameter list.
FCDEffectTechniqueClone (FCDEffectProfileFX *newParent)
 [INTERNAL] Clones the full effect technique.
void Flatten ()
 [INTERNAL] Flattens this effect technique.
FUStatus LoadFromXML (xmlNode *techniqueNode, xmlNode *profileNode)
 [INTERNAL] Reads in the effect technique from a given COLLADA XML tree node.
xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the effect technique to the given COLLADA XML tree node.

Detailed Description

A COLLADA effect technique.

The COLLADA effect technique contains the passes to be used in the rendering of polygon sets.

It also contains a list of effect parameters: both generators and overrides and it is the lowest level of abstraction in which you can access effect parameters. For flattened materials, this means that all the effect parameters will be accessible at this level.

It also contains a list of effect code inclusions.


Constructor & Destructor Documentation

FCDEffectTechnique::FCDEffectTechnique FCDocument document,
FCDEffectProfileFX _parent
 

Constructor: do not use directly.

Instead, use the FCDEffectProfileFX::AddTechnique function.

Parameters:
document The COLLADA document which owns this technique.
_parent The effect profile which contains the technique.

virtual FCDEffectTechnique::~FCDEffectTechnique  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDEffectProfileFX::ReleaseTechnique function.


Member Function Documentation

FCDEffectCode* FCDEffectTechnique::AddCode  ) 
 

Adds a new code inclusion to this effect profile.

Returns:
The new code inclusion.

void FCDEffectTechnique::AddParameter FCDEffectParameter parameter  ) 
 

[INTERNAL] Inserts an existing parameter into the list of effect parameters at this abstraction level.

This function is used during the flattening of a material.

Parameters:
parameter The effect parameter to insert.

FCDEffectPass* FCDEffectTechnique::AddPass  ) 
 

Adds a new pass to this effect technique.

Returns:
The new pass.

FCDEffectTechnique* FCDEffectTechnique::Clone FCDEffectProfileFX newParent  ) 
 

[INTERNAL] Clones the full effect technique.

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

FCDEffectCode* FCDEffectTechnique::FindCode const string &  sid  ) 
 

Retrieves the code inclusion with the given sub-id.

Parameters:
sid A COLLADA sub-id.
Returns:
The code inclusion with the given sub-id. This pointer will be NULL, if there are no code inclusions that match the given sub-id.

const FCDEffectParameter* FCDEffectTechnique::FindParameter const char *  reference  )  const
 

Retrieves an effect parameter.

Looks for the effect parameter with the correct reference, in order to bind or override its value.

Parameters:
reference The reference to match. In the case of effect parameter generators, the sub-id is used to match.
Returns:
The first effect parameter that matches the reference. This pointer will be NULL if no effect parameter matches the given semantic.

virtual FCDEffectParameter* FCDEffectTechnique::FindParameterBySemantic const string &  semantic  )  [virtual]
 

Retrieves an effect parameter.

Looks for the effect parameter with the correct semantic, in order to bind or override its value.

Parameters:
semantic The effect parameter semantic to match.
Returns:
The first effect parameter that matches the semantic. This pointer will be NULL if no effect parameter matches the given semantic.

virtual void FCDEffectTechnique::FindParametersByReference const string &  reference,
FCDEffectParameterList parameters
[virtual]
 

Retrieves a subset of the effect parameter list.

Look for the effect parameter generators with the correct reference.

Parameters:
reference The effect parameter reference to match. In the case of effect parameter generators, the reference is replaced by the sub-id.
parameters The list of parameters to fill in. This list is not cleared.

virtual void FCDEffectTechnique::FindParametersBySemantic const string &  semantic,
FCDEffectParameterList parameters
[virtual]
 

Retrieves a subset of the effect parameter list.

Look for the effect parameter generators with the correct semantic.

Parameters:
semantic The effect parameter semantic to match.
parameters The list of parameters to fill in. This list is not cleared.

void FCDEffectTechnique::Flatten  ) 
 

[INTERNAL] Flattens this effect technique.

Merges the parameter overrides into the parameter generators.

FCDEffectCode* FCDEffectTechnique::GetCode size_t  index  )  [inline]
 

Retrieves a code inclusion contained within the effect profile.

Parameters:
index The index of the code inclusion.
Returns:
The code inclusion. This pointer will be NULL if the index is out-of-bounds.

size_t FCDEffectTechnique::GetCodeCount  )  const [inline]
 

Retrieves the number of code inclusions contained within the effect profile.

Returns:
The number of code inclusions.

FCDEffectCodeList& FCDEffectTechnique::GetCodeList  )  [inline]
 

Retrieves the list of code inclusions.

Returns:
The list of code inclusions.

const string& FCDEffectTechnique::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.

const fstring& FCDEffectTechnique::GetName  )  const [inline]
 

Retrieves the sub-id of the technique.

Returns:
The sub-id of the technique.

FCDEffectParameterList* FCDEffectTechnique::GetParameterList  )  [inline]
 

Retrieves the list of effect parameters contained within the effect profile.

This is the lowest level of abstraction and may contain either effect parameter generators or effect parameter overrides.

Returns:
The list of effect parameters.

FCDEffectProfileFX* FCDEffectTechnique::GetParent  )  [inline]
 

Retrieves the effect profile that contains this technique.

Returns:
The parent effect profile.

FCDEffectPass* FCDEffectTechnique::GetPass size_t  index  )  [inline]
 

Retrieves a specific pass contained within this effect technique.

Parameters:
index The index of the pass.
Returns:
The pass. This pointer will be NULL if the index is out-of-bounds.

size_t FCDEffectTechnique::GetPassCount  )  const [inline]
 

Retrieves the number of passes contained within this effect technique.

Returns:
The number of passes.

FCDEffectPassList& FCDEffectTechnique::GetPassList  )  [inline]
 

Retrieves the list of passes.

Returns:
The list of passes.

FUStatus FCDEffectTechnique::LoadFromXML xmlNode *  techniqueNode,
xmlNode *  profileNode
 

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

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

void FCDEffectTechnique::ReleaseCode FCDEffectCode code  ) 
 

Releases a code inclusion contained within this effect profile.

Parameters:
code The code inclusion to release.

void FCDEffectTechnique::ReleasePass FCDEffectPass pass  ) 
 

Releases a pass contaied within this effect technique.

Parameters:
pass The pass to release.

void FCDEffectTechnique::SetName const fstring &  _name  )  [inline]
 

Sets the sub-id of the technique.

The effect technique must have a valid sub-id that is unique within its scope. Otherwise, one will be provided on XML export.

Parameters:
_name A valid sub-id.

xmlNode* FCDEffectTechnique::WriteToXML xmlNode *  parentNode  )  const
 

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

Parameters:
parentNode The COLLADA XML parent node in which to insert the effect technique.
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