FCDEffect Class Reference
[COLLADA Effect Classes [ColladaFX]]

A COLLADA effect. More...

#include <FCDEffect.h>

Inheritance diagram for FCDEffect:

FCDEntity FCDObjectWithId FCDObject FUObject List of all members.

Public Member Functions

 FCDEffect (FCDocument *document)
 Constructor: do not use directly.
virtual ~FCDEffect ()
 Destructor: do not use directly.
virtual Type GetType () const
 Retrieves the type for this entity class.
size_t GetProfileCount () const
 Retrieves the number of profiles contained within the effect.
FCDEffectProfileGetProfile (size_t index)
 Retrieves a profile contained within the effect.
const FCDEffectProfileGetProfile (size_t index) const
 See above.
FCDEffectProfileListGetProfiles ()
 Retrieves the list of the profiles contained within the effect.
const FCDEffectProfileListGetProfiles () const
 See above.
FCDEffectProfileFindProfile (FUDaeProfileType::Type type)
 Retrieves the profile for a specific profile type.
const FCDEffectProfileFindProfile (FUDaeProfileType::Type type) const
 See above.
FCDEffectProfileFindProfileByTypeAndPlatform (FUDaeProfileType::Type type, string platform)
 Retrieves the profile for a specific profile type and platform.
const FCDEffectProfileFindProfileByTypeAndPlatform (FUDaeProfileType::Type type, string platform) const
 See above.
bool HasProfile (FUDaeProfileType::Type type) const
 Retrieves whether the effect contains a profile of the given type.
FCDEffectProfileAddProfile (FUDaeProfileType::Type type)
 Creates a profile of the given type.
void ReleaseProfile (FCDEffectProfile *profile)
 Releases the given effect profile.
FCDEffectParameterListGetParameters ()
 Retrieves the list of common effect parameters declared at the effect level.
const FCDEffectParameterListGetParameters () const
 See above.
void AddParameter (FCDEffectParameter *parameter)
 [INTERNAL] Inserts an existing parameter into the list of common effect parameters at this abstraction level.
FCDEffectParameterFindParameterBySemantic (const string &semantic)
 Retrieves a common effect parameter.
void FindParametersBySemantic (const string &semantic, FCDEffectParameterList &parameters)
 Retrieves a subset of the common effect parameter list.
void FindParametersByReference (const string &reference, FCDEffectParameterList &parameters)
 Retrieves a subset of the common effect parameter list.
FCDEffectClone ()
 Clones the effect object.
void Flatten ()
 [INTERNAL] Flattens the effect, pushing all the common effect parameters into to the effect technique level of abstraction.
virtual FUStatus LoadFromXML (xmlNode *effectNode)
 [INTERNAL] Reads in the <effect> element from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the <effect> element to the given COLLADA XML tree node.
FCDEffectImageListGetImages ()
 Retrieves the list of the images contained within the effect.
const FCDEffectImageListGetImages () const
 See above.

Detailed Description

A COLLADA effect.

A COLLADA effect is one of many abstraction level that defines how to render mesh polygon sets. It contains one or more rendering profile that the application can choose to support. In theory, all the rendering profiles should reach the same render output, using different rendering technologies.

An effect may also declare new general purpose parameters that are common to all the profiles.


Constructor & Destructor Documentation

FCDEffect::FCDEffect FCDocument document  ) 
 

Constructor: do not use directly.

Instead use the FCDMaterialLibrary::AddEffect function.

Parameters:
document The COLLADA document that owns this effect.

virtual FCDEffect::~FCDEffect  )  [virtual]
 

Destructor: do not use directly.

Instead use the FCDMaterialLibrary::ReleaseEffect function.


Member Function Documentation

void FCDEffect::AddParameter FCDEffectParameter parameter  ) 
 

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

This function is used during the flattening of a material.

Parameters:
parameter The effect parameter to insert.

FCDEffectProfile* FCDEffect::AddProfile FUDaeProfileType::Type  type  ) 
 

Creates a profile of the given type.

If a profile of this type already exists, it will be released, as a COLLADA effect should only contain one profile of each type.

Parameters:
type The profile type.
Returns:
The new effect profile.

FCDEffect* FCDEffect::Clone  ) 
 

Clones the effect object.

Everything is cloned, including the effect parameter and their animations. You will need release the cloned effect directly, by deleting the pointer.

Returns:
The cloned effect object. You will must delete this pointer.

FCDEffectParameter* FCDEffect::FindParameterBySemantic const string &  semantic  ) 
 

Retrieves a common effect parameter.

Looks for the common effect parameter with the correct semantic, in order to bind or override its value. This function searches through the effect 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.

void FCDEffect::FindParametersByReference const string &  reference,
FCDEffectParameterList parameters
 

Retrieves a subset of the common effect parameter list.

Look for the effect parameter generators with the correct reference. This function searches through the effect 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.

void FCDEffect::FindParametersBySemantic const string &  semantic,
FCDEffectParameterList parameters
 

Retrieves a subset of the common effect parameter list.

Look for the effect parameter generators with the correct semantic. This function searches through the effect 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.

FCDEffectProfile* FCDEffect::FindProfile FUDaeProfileType::Type  type  ) 
 

Retrieves the profile for a specific profile type.

There should only be one profile of each type within an effect. This function allows you to retrieve the profile for a given type.

Parameters:
type The profile type.
Returns:
The profile of this type. This pointer will be NULL if the effect does not have any profile of this type.

FCDEffectProfile* FCDEffect::FindProfileByTypeAndPlatform FUDaeProfileType::Type  type,
string  platform
 

Retrieves the profile for a specific profile type and platform.

There should only be one profile of each type within an effect. This function allows you to retrieve the profile for a given type.

Parameters:
type The profile type and platform.
Returns:
The profile of this type. This pointer will be NULL if the effect does not have any profile of this type.

void FCDEffect::Flatten  ) 
 

[INTERNAL] Flattens the effect, pushing all the common effect parameters into to the effect technique level of abstraction.

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

FCDEffectImageList& FCDEffect::GetImages  )  [inline]
 

Retrieves the list of the images contained within the effect.

Returns:
The list of effect images.

FCDEffectParameterList* FCDEffect::GetParameters  )  [inline]
 

Retrieves the list of common effect parameters declared at the effect level.

According to the COLLADA 1.4 schema, you should expect only parameter generators at this abstraction level.

Returns:
The list of effect parameters.

FCDEffectProfile* FCDEffect::GetProfile size_t  index  )  [inline]
 

Retrieves a profile contained within the effect.

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

size_t FCDEffect::GetProfileCount  )  const [inline]
 

Retrieves the number of profiles contained within the effect.

Returns:
The number of profiles within the effect.

FCDEffectProfileList& FCDEffect::GetProfiles  )  [inline]
 

Retrieves the list of the profiles contained within the effect.

Returns:
The list of effect profiles.

virtual Type FCDEffect::GetType  )  const [inline, virtual]
 

Retrieves the type for this entity class.

This function is a part of the FCDEntity interface.

Returns:
The entity type: EFFECT.

Reimplemented from FCDEntity.

bool FCDEffect::HasProfile FUDaeProfileType::Type  type  )  const [inline]
 

Retrieves whether the effect contains a profile of the given type.

Parameters:
type The profile type.
Returns:
Whether the effect has a profile of this type.

virtual FUStatus FCDEffect::LoadFromXML xmlNode *  effectNode  )  [virtual]
 

[INTERNAL] Reads in the <effect> element from a given COLLADA XML tree node.

Parameters:
effectNode 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.

Reimplemented from FCDEntity.

void FCDEffect::ReleaseProfile FCDEffectProfile profile  ) 
 

Releases the given effect profile.

Parameters:
profile The effect profile.

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

[INTERNAL] Writes out the <effect> element to the given COLLADA XML tree node.

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

Reimplemented from FCDEntity.


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