- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FCDEffectParameter Class Reference
[COLLADA Effect Classes [ColladaFX]]

A COLLADA effect parameter. More...

`#include <FCDEffectParameter.h>`

Inheritance diagram for FCDEffectParameter:

List of all members.

## Public Types
enum | Type { SAMPLER, INTEGER, BOOLEAN, FLOAT, FLOAT2, FLOAT3, VECTOR, MATRIX, STRING, SURFACE }
| The value type of the effect parameter. More...
enum | ParamType { GENERATOR, MODIFIER, ANIMATOR, REFERENCER, CONSTANT }
| The usage type of the effect parameter. More...
## Public Member Functions
| FCDEffectParameter (FCDocument *document)
| Constructor: do not use directly.
virtual | ~FCDEffectParameter ()
| Destructor.
virtual Type | GetType () const =0
| Retrieves the type of effect parameter class.
ParamType | GetParamType () const
| Retrieves the type of parameter.
const fm::string & | GetReference () const
| Retrieves the reference for this effect parameter.
void | SetReference (const char *_reference)
| Sets the reference for the effect parameter.
const fm::string & | GetSemantic () const
| Retrieves the semantic for this effect parameter.
void | SetSemantic (const char *_semantic)
| Sets the semantic for this effect parameter.
bool | IsGenerator () const
| Retrieves whether this effect parameter is a parameter generator.
void | SetGenerator ()
| Sets this effect parameter as a generator.
bool | IsModifier () const
| Retrieves whether this effect parameter is a parameter modifier.
void | SetModifier ()
| Sets this effect parameter as a modified.
bool | IsAnimator () const
| Retrieves whether this effect is an animated parameter.
void | SetAnimator ()
| Sets this effect parameter as animated.
bool | IsReferencer () const
| Retrieves whether this effect is a referenced parameter.
void | SetReferencer ()
| Sets this effect parameter as referencer.
bool | IsConstant () const
| Retrieves whether this effect is a constant parameter.
void | SetConstant ()
| Sets this effect parameter as constant.
const FCDEffectParameterAnnotation ** | GetAnnotations () const
| Retrieves the list of annotations for this parameter. See above.
size_t | GetAnnotationCount () const
| Retrieves the number of annotations for this parameter.
FCDEffectParameterAnnotation * | GetAnnotation (size_t index)
| Retrieves an annotation of this parameter.
const FCDEffectParameterAnnotation * | GetAnnotation (size_t index) const
| See above.
FCDEffectParameterAnnotation * | AddAnnotation ()
| Adds a blank annotation to this parameter.
void | AddAnnotation (const fchar *name, FCDEffectParameter::Type type, const fchar *value)
| Adds an annotation to this parameter.
void | AddAnnotation (const fstring &name, FCDEffectParameter::Type type, const fchar *value)
| See above.
void | AddAnnotation (const fchar *name, FCDEffectParameter::Type type, const fstring &value)
| See above.
void | AddAnnotation (const fstring &name, FCDEffectParameter::Type type, const fstring &value)
| See above.
template<class T>
void | AddAnnotation (const fchar *name, FCDEffectParameter::Type type, const T &value)
| See above.
template<class T>
void | AddAnnotation (const fstring &name, FCDEffectParameter::Type type, const T &value)
| See above.
| DEPRECATED (3.05A, annotation->Release) inline void ReleaseAnnotation(FCDEffectParameterAnnotation *annotation)
| Releases an annotation of this parameter.
virtual bool | IsValueEqual (FCDEffectParameter *parameter)=0
| Compares this parameter's value with another.
virtual FCDEffectParameter * | Clone (FCDEffectParameter *clone=NULL) const
| Creates a full copy of the effect parameter.
virtual void | Overwrite (FCDEffectParameter *target)
| [INTERNAL] Overwrites the target parameter with this parameter.

## Detailed Description

A COLLADA effect parameter.

This interface class is used to define all the valid ColladaFX parameter types. There are many types of parameters: integers, booleans, floating-point values, 2D, 3D and 4D vectors of floating-point values, matrices, strings, surfaces and their samplers.

A COLLADA effect parameter may generate a new effect parameter, in which case it will declare a semantic and a reference: to represent it within the COLLADA document.

## Member Enumeration Documentation

enum FCDEffectParameter::ParamType

  | The usage type of the effect parameter. Enumerator:
  GENERATOR | This should be the type used for a 'newparam' element. Valid only at the levels of effect, profile common or technique common.
  MODIFIER | This should be the type used for a 'setparam' element. Valid only at the instance effect level.
  ANIMATOR | This should be the type used for a 'param' element that is to be animated. Valid only at the bind_material level.
  REFERENCER | This should be the type used for a 'param' element used in any of the common techniques. The 'param' needs to have a reference that is the same as the generator used above.
  CONSTANT | This should be the type used for a parameter that is either a color or a float in any of the common techniques. This type isn't linked to any parameter elsewhere.

enum FCDEffectParameter::Type

  | The value type of the effect parameter. Enumerator:
  SAMPLER | A sampler effect parameter. Points towards a surface parameter and adds extra texturing parameters.
  INTEGER | A single integer effect parameter.
  BOOLEAN | A single boolean effect parameter.
  FLOAT | A single floating-pointer value effect parameter.
  FLOAT2 | A 2D vector of floating-pointer values.
  FLOAT3 | A 3D vector of floating-pointer values.
  VECTOR | A 4D vector of floating-pointer values.
  MATRIX | A 4x4 matrix.
  STRING | A string effect parameter.
  SURFACE | A surface effect parameter. Contains a COLLADA image pointer.

## Constructor & Destructor Documentation

FCDEffectParameter::FCDEffectParameter | ( | FCDocument * | document | ) |

  | Constructor: do not use directly. Instead, use the appropriate AddEffectParameter function. Parameters:
  | document | The COLLADA document that owns the effect parameter.

## Member Function Documentation

void FCDEffectParameter::AddAnnotation | ( | const fchar * | name,
|  | FCDEffectParameter::Type | type,
|  | const fchar * | value
| ) |

  | Adds an annotation to this parameter. Parameters:
  | name | The name of the annotation.
  | type | The type of the annotation.
  | value | The value of the annotation.

FCDEffectParameterAnnotation* FCDEffectParameter::AddAnnotation | ( |  | ) |

| Adds a blank annotation to this parameter. Returns: The blank annotation.

virtual FCDEffectParameter* FCDEffectParameter::Clone | ( | FCDEffectParameter * | clone = `NULL` | ) | const`[virtual]`

  | Creates a full copy of the effect parameter. Parameters:
  | clone | The cloned effect parameter. If this pointer is NULL, a new effect parameter will be created and you will need to delete this pointer.
Returns: The cloned effect parameter. Reimplemented in FCDEffectParameterT< PrimitiveType >, FCDEffectParameterAnimatableT< PrimitiveType, Qualifiers >, FCDEffectParameterSampler, and FCDEffectParameterSurface.

FCDEffectParameter::DEPRECATED | ( | 3. | 05A,
|  | annotation-> | Release
| ) | `[inline]`

  | Releases an annotation of this parameter. Parameters:
  | annotation | The annotation to release.

FCDEffectParameterAnnotation* FCDEffectParameter::GetAnnotation | ( | size_t | index | ) | `[inline]`

  | Retrieves an annotation of this parameter. Parameters:
  | index | The index of the annotation.
Returns: The annotation for the given index. This pointer will be NULL if the index is out-of-bounds.

size_t FCDEffectParameter::GetAnnotationCount | ( |  | ) | const`[inline]`

| Retrieves the number of annotations for this parameter. Returns: The number of annotations.

const FCDEffectParameterAnnotation** FCDEffectParameter::GetAnnotations | ( |  | ) | const`[inline]`

| Retrieves the list of annotations for this parameter. See above. Returns: The list of annotations.

ParamType FCDEffectParameter::GetParamType | ( |  | ) | const`[inline]`

| Retrieves the type of parameter. The parameter can be a generator (newparam), a modifier (setparam) or an animated param (animator). Returns: The type of the parameter.

const fm::string& FCDEffectParameter::GetReference | ( |  | ) | const`[inline]`

| Retrieves the reference for this effect parameter. In the case of generators, the reference string contains the sub-id. Returns: The reference.

const fm::string& FCDEffectParameter::GetSemantic | ( |  | ) | const`[inline]`

| Retrieves the semantic for this effect parameter. Returns: The semantic.

virtual Type FCDEffectParameter::GetType | ( |  | ) | const`[pure virtual]`

| Retrieves the type of effect parameter class. Returns: The type of the effect parameter class. Implemented in FCDEffectParameterT< PrimitiveType >, FCDEffectParameterAnimatableT< PrimitiveType, Qualifiers >, FCDEffectParameterSampler, and FCDEffectParameterSurface.

bool FCDEffectParameter::IsAnimator | ( |  | ) | const`[inline]`

| Retrieves whether this effect is an animated parameter. A ColladaFX parameter must be generated to be modified or bound at higher abstraction levels. Returns: Whether this is an animator.

bool FCDEffectParameter::IsConstant | ( |  | ) | const`[inline]`

| Retrieves whether this effect is a constant parameter. This type of parameter belongs to the technique and isn't referenced anywhere. It should have an empty reference. Returns: Whether this is a constant parameter.

bool FCDEffectParameter::IsGenerator | ( |  | ) | const`[inline]`

| Retrieves whether this effect parameter is a parameter generator. A ColladaFX parameter must be generated to be modified or bound at higher abstraction levels. Returns: Whether this is a generator.

bool FCDEffectParameter::IsModifier | ( |  | ) | const`[inline]`

| Retrieves whether this effect parameter is a parameter modifier. A ColladaFX parameter must be generated to be modified or bound at higher abstraction levels. Returns: Whether this is a modifier.

bool FCDEffectParameter::IsReferencer | ( |  | ) | const`[inline]`

| Retrieves whether this effect is a referenced parameter. This type of parameter must have a valid reference equal to that of the generator paramater in order to be properly linked. Returns: Whether this is a referencer.

virtual bool FCDEffectParameter::IsValueEqual | ( | FCDEffectParameter * | parameter | ) | `[pure virtual]`

  | Compares this parameter's value with another. Parameters:
  | parameter | The given parameter to compare with.
Returns: true if the values are equal Implemented in FCDEffectParameterT< PrimitiveType >, FCDEffectParameterAnimatableT< PrimitiveType, Qualifiers >, FCDEffectParameterSampler, and FCDEffectParameterSurface.

virtual void FCDEffectParameter::Overwrite | ( | FCDEffectParameter * | target | ) | `[virtual]`

  | [INTERNAL] Overwrites the target parameter with this parameter. This function is used during the flattening of materials. Parameters:
  | target | The target parameter to overwrite.
Reimplemented in FCDEffectParameterT< PrimitiveType >, FCDEffectParameterAnimatableT< PrimitiveType, Qualifiers >, FCDEffectParameterSampler, and FCDEffectParameterSurface.

void FCDEffectParameter::SetReference | ( | const char * | _reference | ) |

  | Sets the reference for the effect parameter. In the case of generators, the reference string contains the sub-id. Parameters:
  | _reference | The reference.

void FCDEffectParameter::SetSemantic | ( | const char * | _semantic | ) | `[inline]`

  | Sets the semantic for this effect parameter. Parameters:
  | _semantic | The semantic.

The documentation for this class was generated from the following file:

- FCDocument/FCDEffectParameter.h