FCDEffectProfile Class Reference
[COLLADA Effect Classes [ColladaFX]]

The base for a COLLADA effect profile. More...

#include <FCDEffectProfile.h>

Inheritance diagram for FCDEffectProfile:

FCDObject FUObject FCDEffectProfileFX FCDEffectStandard List of all members.

Public Member Functions

 FCDEffectProfile (FCDocument *document, FCDEffect *parent)
 Constructor: do not use directly.
virtual ~FCDEffectProfile ()
 Destructor: do not use directly.
virtual FUDaeProfileType::Type GetType () const =0
 Retrieves the profile type for this effect.
FCDEffectGetParent ()
 Retrieves the parent effect.
const FCDEffectGetParent () const
 See above.
const string & GetDaeId () const
 [INTERNAL] Retrieves the COLLADA id of the parent effect.
virtual FCDEffectParameterFindParameterBySemantic (const string &semantic)=0
 Retrieves an effect parameter.
virtual void FindParametersBySemantic (const string &semantic, FCDEffectParameterList &parameters)=0
 Retrieves a subset of the effect parameter list.
virtual void FindParametersByReference (const string &reference, FCDEffectParameterList &parameters)=0
 Retrieves a subset of the effect parameter list.
virtual FCDEffectProfileClone (FCDEffect *newParent)=0
 [INTERNAL] Clones the profile effect and its parameters.
virtual void Flatten ()=0
 [INTERNAL] Flattens this effect profile, pushing all the effect parameter overrides into the effect parameter generators and moving all the parameters to the effect technique level of abstraction.
virtual FUStatus LoadFromXML (xmlNode *profileNode)=0
 [INTERNAL] Reads in the effect profile from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const =0
 [INTERNAL] Writes out the effect profile to the given COLLADA XML tree node.

Detailed Description

The base for a COLLADA effect profile.

COLLADA has multiple effect profiles: CG, HLSL, GLSL, GLES and the COMMON profile. For each profile, there is a class which implements this abstract class. This abstract class solely holds the parent effect and allows access to the profile type.

See also:
FCDEffectProfileFX FCDEffectStandard


Constructor & Destructor Documentation

FCDEffectProfile::FCDEffectProfile FCDocument document,
FCDEffect parent
 

Constructor: do not use directly.

Instead, use the FCDEffect::AddProfile function.

Parameters:
document The COLLADA document that owns this effect profile.
parent The effect which contains this profile.

virtual FCDEffectProfile::~FCDEffectProfile  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDEffect::ReleaseProfile function.


Member Function Documentation

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

[INTERNAL] Clones the profile effect and its parameters.

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

Implemented in FCDEffectProfileFX, and FCDEffectStandard.

virtual FCDEffectParameter* FCDEffectProfile::FindParameterBySemantic const string &  semantic  )  [pure 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 effect parameter that matches the semantic. This pointer will be NULL if no effect parameter matches the given semantic.

Implemented in FCDEffectProfileFX, and FCDEffectStandard.

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

Retrieves a subset of the effect parameter list.

Look for effect parameters 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.

Implemented in FCDEffectProfileFX, and FCDEffectStandard.

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

Retrieves a subset of the effect parameter list.

Look for effect parameters 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.

Implemented in FCDEffectProfileFX, and FCDEffectStandard.

virtual void FCDEffectProfile::Flatten  )  [pure virtual]
 

[INTERNAL] Flattens this effect profile, pushing all the effect parameter overrides into the effect parameter generators and moving all the parameters to the effect technique level of abstraction.

To flatten the material, use the FCDMaterialInstance::FlattenMaterial function.

Implemented in FCDEffectProfileFX, and FCDEffectStandard.

const string& FCDEffectProfile::GetDaeId  )  const
 

[INTERNAL] Retrieves the COLLADA id of the parent effect.

This function is useful when reporting errors and warnings.

Returns:
The COLLADA id of the parent effect.

FCDEffect* FCDEffectProfile::GetParent  )  [inline]
 

Retrieves the parent effect.

This is the effect which contains this profile.

Returns:
The parent effect. This pointer will never be NULL.

virtual FUDaeProfileType::Type FCDEffectProfile::GetType  )  const [pure virtual]
 

Retrieves the profile type for this effect.

This function allows you to up-cast the pointer safely to a more specific effect profile class.

Returns:
The profile type.

Implemented in FCDEffectProfileFX, and FCDEffectStandard.

virtual FUStatus FCDEffectProfile::LoadFromXML xmlNode *  profileNode  )  [pure 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.

Implemented in FCDEffectProfileFX, and FCDEffectStandard.

virtual xmlNode* FCDEffectProfile::WriteToXML xmlNode *  parentNode  )  const [pure 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 effect profile.
Returns:
The created element XML tree node.

Implemented in FCDEffectProfileFX, and FCDEffectStandard.


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