FCDEffectProfileFX Class Reference
[COLLADA Effect Classes [ColladaFX]]

A general effect profile description. More...

#include <FCDEffectProfileFX.h>

Inheritance diagram for FCDEffectProfileFX:

FCDEffectProfile FCDObject FUObject List of all members.

Public Member Functions

 FCDEffectProfileFX (FCDocument *document, FCDEffect *parent, FUDaeProfileType::Type type)
 Constructor: do not use directly.
virtual ~FCDEffectProfileFX ()
 Destructor: do not use directly.
virtual FUDaeProfileType::Type GetType () const
 Retrieves the profile type for this effect.
const string & GetIncludeFilename () const
const fstring & GetPlatform () const
 Retrieves the name of the platform in which to use the effect profile.
void SetPlatform (fstring &_platform)
 Sets the name of the platform in which to use the effect profile.
FCDEffectTechniqueListGetTechniqueList ()
 Retrieves the list of techniques contained within this effect profile.
const FCDEffectTechniqueListGetTechniqueList () const
 See above.
size_t GetTechniqueCount () const
 Retrieves the number of techniques contained within this effect profile.
FCDEffectTechniqueGetTechnique (size_t index)
 Retrieves a technique contained within this effect profile.
const FCDEffectTechniqueGetTechnique (size_t index) const
 See above.
FCDEffectTechniqueAddTechnique ()
 Adds a new technique to this effect profile.
void ReleaseTechnique (FCDEffectTechnique *technique)
 Releases a technique contained within this effect profile.
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.
FCDEffectParameterListGetParameters ()
 Retrieves the list of effect parameters contained within the effect profile.
const FCDEffectParameterListGetParameters () 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.
virtual FCDEffectProfileClone (FCDEffect *newParent)
 [INTERNAL] Clones the full effect profile.
virtual void Flatten ()
 [INTERNAL] Flattens this effect profile.
virtual FUStatus LoadFromXML (xmlNode *profileNode)
 [INTERNAL] Reads in the effect profile from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the effect profile to the given COLLADA XML tree node.

Detailed Description

A general effect profile description.

The general effect profile contains all the information necessary to implement the advanced effect profiles, such as CG, HLSL, GLSL and GLES. Since these effect profiles contains extremely similar information, they use the same description structure. For the COMMON profile, see the FCDEffectStandard class.

You should use the GetType function to figure out which profile this structure addresses. You can then retrieve one or many of the FCDEffectTechnique objects that describe how to render for this profile. You may want to check the FCDEffectMaterialTechniqueHint objects at the FCDMaterial level, in order to determine which technique(s) to use for your platform. At the profile level of abstraction, parameters may be generated within the FCDEffectParamterList.


Constructor & Destructor Documentation

FCDEffectProfileFX::FCDEffectProfileFX FCDocument document,
FCDEffect parent,
FUDaeProfileType::Type  type
 

Constructor: do not use directly.

Instead, use the FCDEffect::AddProfile function.

Parameters:
document The COLLADA document which owns the effect profile.
parent The effect which contains this profile.
type The type of profile.

virtual FCDEffectProfileFX::~FCDEffectProfileFX  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDEffect:RemoveProfile function.


Member Function Documentation

FCDEffectCode* FCDEffectProfileFX::AddCode  ) 
 

Adds a new code inclusion to this effect profile.

Returns:
The new code inclusion.

void FCDEffectProfileFX::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.

FCDEffectTechnique* FCDEffectProfileFX::AddTechnique  ) 
 

Adds a new technique to this effect profile.

Returns:
The new technique object.

virtual FCDEffectProfile* FCDEffectProfileFX::Clone FCDEffect newParent  )  [virtual]
 

[INTERNAL] Clones the full effect profile.

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

Implements FCDEffectProfile.

FCDEffectCode* FCDEffectProfileFX::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* FCDEffectProfileFX::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. This function searches through the effect profile and the level of abstractions below.

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* FCDEffectProfileFX::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. This function searches through the effect profile and the level of abstractions below.

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.

Implements FCDEffectProfile.

virtual void FCDEffectProfileFX::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. This function searches through the effect profile and the level of abstractions below.

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.

Implements FCDEffectProfile.

virtual void FCDEffectProfileFX::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. This function searches through the effect profile and the level of abstractions below.

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

Implements FCDEffectProfile.

virtual void FCDEffectProfileFX::Flatten  )  [virtual]
 

[INTERNAL] Flattens this effect profile.

Pushes all the effect parameter overrides into the effect parameter generators and moves all the parameters to the effect technique level of abstraction. To flatten the material, use the FCDMaterialInstance::FlattenMaterial function.

Implements FCDEffectProfile.

FCDEffectCode* FCDEffectProfileFX::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 FCDEffectProfileFX::GetCodeCount  )  const [inline]
 

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

Returns:
The number of code inclusions.

FCDEffectCodeList& FCDEffectProfileFX::GetCodeList  )  [inline]
 

Retrieves the list of code inclusions.

Returns:
The list of code inclusions.

const string& FCDEffectProfileFX::GetIncludeFilename  )  const [inline]
 

Deprecated:
Retrieves the filename of the file that contains the code for this effect profile. Instead, look through the FCDEffectCode object, using the GetCodeList function and retrieve the correct object and its filename string.
Returns:
The filename of the file to import.

FCDEffectParameterList* FCDEffectProfileFX::GetParameters  )  [inline]
 

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

At this level of abstraction, there should be only effect parameter generators.

Returns:
The list of effect parameters.

const fstring& FCDEffectProfileFX::GetPlatform  )  const [inline]
 

Retrieves the name of the platform in which to use the effect profile.

This parameter is very optional.

Returns:
The platform name.

FCDEffectTechnique* FCDEffectProfileFX::GetTechnique size_t  index  )  [inline]
 

Retrieves a technique contained within this effect profile.

You may want to check the FCDEffectMaterialTechniqueHint objects at the FCDMaterial level, in order to determine which technique(s) to use for your platform.

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

size_t FCDEffectProfileFX::GetTechniqueCount  )  const [inline]
 

Retrieves the number of techniques contained within this effect profile.

Returns:
The number of inner techniques.

FCDEffectTechniqueList& FCDEffectProfileFX::GetTechniqueList  )  [inline]
 

Retrieves the list of techniques contained within this effect profile.

You may want to check the FCDEffectMaterialTechniqueHint objects at the FCDMaterial level, in order to determine which technique(s) to use for your platform.

Returns:
The list of inner techniques.

virtual FUDaeProfileType::Type FCDEffectProfileFX::GetType  )  const [inline, virtual]
 

Retrieves the profile type for this effect.

This function is a part of the FCDEffectProfile interface and allows you to up-cast an effect profile pointer safely to this class.

Returns:
The profile type. This should never be the value: 'COMMON', but all other profiles currently derive from this class.

Implements FCDEffectProfile.

virtual FUStatus FCDEffectProfileFX::LoadFromXML xmlNode *  profileNode  )  [virtual]
 

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

Parameters:
profileNode The COLLADA XML tree node.
Returns:
The status of the import. If the status is not successful, it may be dangerous to extract information from the effect profile.

Implements FCDEffectProfile.

void FCDEffectProfileFX::ReleaseCode FCDEffectCode code  ) 
 

Releases a code inclusion contained within this effect profile.

Parameters:
code The code inclusion to release.

void FCDEffectProfileFX::ReleaseTechnique FCDEffectTechnique technique  ) 
 

Releases a technique contained within this effect profile.

Parameters:
technique The technique to release.

void FCDEffectProfileFX::SetPlatform fstring &  _platform  )  [inline]
 

Sets the name of the platform in which to use the effect profile.

This parameter is very optional.

Parameters:
_platform The platform name.

virtual xmlNode* FCDEffectProfileFX::WriteToXML xmlNode *  parentNode  )  const [virtual]
 

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

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

Implements FCDEffectProfile.


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