FCDEffectParameter Class Reference
[COLLADA Effect Classes [ColladaFX]]

A COLLADA effect parameter. More...

#include <FCDEffectParameter.h>

Inheritance diagram for FCDEffectParameter:

FCDObject FUObject FCDEffectParameterBool FCDEffectParameterFloat FCDEffectParameterFloat2 FCDEffectParameterFloat3 FCDEffectParameterInt FCDEffectParameterMatrix FCDEffectParameterSampler FCDEffectParameterString FCDEffectParameterSurface FCDEffectParameterVector List of all members.

Public Types

enum  Type {
  SAMPLER, INTEGER, BOOLEAN, FLOAT,
  FLOAT2, FLOAT3, VECTOR, MATRIX,
  STRING, SURFACE
}
 The type of the effect parameter class. More...

Public Member Functions

 FCDEffectParameter (FCDocument *document)
 Constructor: do not use directly.
virtual ~FCDEffectParameter ()
 Destructor: do not use directly.
virtual Type GetType () const =0
 Retrieves the type of effect parameter class.
const string & GetReference () const
 Retrieves the reference for this effect parameter.
const string & GetSemantic () const
 Retrieves the semantic for this effect parameter.
void SetSemantic (const string &_semantic)
 Sets the semantic for this effect parameter.
bool IsGenerator () const
 Retrieves whether this effect parameter is a parameter generator.
bool IsModifier () const
 Retrieves whether this effect parameter is a parameter modifier.
const string & GetBindSymbol () const
void SetBindSymbol (const string &_bindSymbol)
bool IsFragment () const
void SetFragment (bool _isFragment)
virtual FCDEffectParameterClone ()=0
 Creates a full copy of the effect parameter.
virtual void Overwrite (FCDEffectParameter *target)
 [INTERNAL] Overwrites the target parameter with this parameter.
virtual FUStatus LoadFromXML (xmlNode *parameterNode)
 [INTERNAL] Reads in the effect parameter from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the effect parameter to the given COLLADA XML tree node.

Protected Member Functions

void Clone (FCDEffectParameter *clone)
 [INTERNAL] Copies into the given effect parameters, the variables held by the FCDEffectParameter interface.

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::Type
 

The type of the effect parameter class.

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 FCDEffectParameterList::AddParameter function.

Parameters:
document The COLLADA document that owns the effect parameter.

virtual FCDEffectParameter::~FCDEffectParameter  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDEffectParameterList::ReleaseParameter function. When released, the effect parameter list will also release all its parameters, if it owns them.


Member Function Documentation

void FCDEffectParameter::Clone FCDEffectParameter clone  )  [protected]
 

[INTERNAL] Copies into the given effect parameters, the variables held by the FCDEffectParameter interface.

This function is used by the classes based on this interface during the cloning process.

Parameters:
clone The parameter to clone.

virtual FCDEffectParameter* FCDEffectParameter::Clone  )  [pure virtual]
 

Creates a full copy of the effect parameter.

Returns:
The cloned effect parameter. You will need to delete this pointer.

Implemented in FCDEffectParameterSampler, FCDEffectParameterInt, FCDEffectParameterBool, FCDEffectParameterString, FCDEffectParameterFloat, FCDEffectParameterFloat2, FCDEffectParameterFloat3, FCDEffectParameterVector, FCDEffectParameterMatrix, and FCDEffectParameterSurface.

const string& FCDEffectParameter::GetBindSymbol  )  const [inline]
 

Deprecated:
Retrieves the program bind symbol for this parameter. This information should be available per-shader, in the FCDEffectPassShader class.
Returns:
The program bind symbol.

const 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 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 FCDEffectParameterSampler, FCDEffectParameterInt, FCDEffectParameterBool, FCDEffectParameterString, FCDEffectParameterFloat, FCDEffectParameterFloat2, FCDEffectParameterFloat3, FCDEffectParameterVector, FCDEffectParameterMatrix, and FCDEffectParameterSurface.

bool FCDEffectParameter::IsFragment  )  const [inline]
 

Deprecated:
Retrieves whether the program bind symbol attached to this parameter belongs to a fragment/pixel shader. This information is available per-shader, in the FCDEffectPassShader class.
Returns:
Whether it belongs to a fragment/pixel shader.

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.

virtual FUStatus FCDEffectParameter::LoadFromXML xmlNode *  parameterNode  )  [virtual]
 

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

Parameters:
parameterNode 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 parameter.

Reimplemented in FCDEffectParameterSampler, FCDEffectParameterInt, FCDEffectParameterBool, FCDEffectParameterString, FCDEffectParameterFloat, FCDEffectParameterFloat2, FCDEffectParameterFloat3, FCDEffectParameterVector, FCDEffectParameterMatrix, 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 FCDEffectParameterSampler, FCDEffectParameterInt, FCDEffectParameterBool, FCDEffectParameterString, FCDEffectParameterFloat, FCDEffectParameterFloat2, FCDEffectParameterFloat3, FCDEffectParameterVector, FCDEffectParameterMatrix, and FCDEffectParameterSurface.

void FCDEffectParameter::SetBindSymbol const string &  _bindSymbol  )  [inline]
 

Deprecated:
Sets the program bind symbol for this parameter. This information is available per-shader, in the FCDEffectPassShader class.
Parameters:
_bindSymbol The program bind symbol.

void FCDEffectParameter::SetFragment bool  _isFragment  )  [inline]
 

Deprecated:
Sets whether the program bind symbol attached to this parameter belongs to a fragment/pixel shader. This information is available per-shader, in the FCDEffectPassShader class.
Parameters:
_isFragment Whether it belongs to a fragment/pixel shader.

void FCDEffectParameter::SetSemantic const string &  _semantic  )  [inline]
 

Sets the semantic for this effect parameter.

Parameters:
_semantic The semantic.

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

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

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

Reimplemented in FCDEffectParameterSampler, FCDEffectParameterInt, FCDEffectParameterBool, FCDEffectParameterString, FCDEffectParameterFloat, FCDEffectParameterFloat2, FCDEffectParameterFloat3, FCDEffectParameterVector, FCDEffectParameterMatrix, and FCDEffectParameterSurface.


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