FCDMaterialLibrary Class Reference
[COLLADA Document Object Model.]

The shared COLLADA material and effect libraries. More...

#include <FCDMaterialLibrary.h>

Inheritance diagram for FCDMaterialLibrary:

FCDLibrary< FCDEntity > List of all members.

Public Member Functions

 FCDMaterialLibrary (FCDocument *document)
 Constructor: do not use directly.
virtual ~FCDMaterialLibrary ()
 Destructor: do not use directly.
FCDEffectListGetEffects ()
 Retrieves the list of effects contained by this library.
const FCDEffectListGetEffects () const
 See above.
size_t GetEffectCount () const
 Retrieves the number of effects contained by this library.
FCDEffectGetEffect (size_t index)
 Retrieves an effect contained by this library.
const FCDEffectGetEffect (size_t index) const
 See above.
FCDEffectFindEffect (const string &daeId)
 [INTERNAL] Retrieves an effect contained by this library.
FCDEffectAddEffect ()
 Creates a new effect.
void ReleaseEffect (FCDEffect *effect)
 Releases an effect.
FCDMaterialListGetMaterials ()
 Retrieves the list of materials contained by this library.
const FCDMaterialListGetMaterials () const
 See above.
size_t GetMaterialCount () const
 Retrieves the number of materials contained by this library.
FCDMaterialGetMaterial (size_t index)
 Retrieves a material contained by this library.
const FCDMaterialGetMaterial (size_t index) const
 See above.
FCDMaterialFindMaterial (const string &daeId)
 [INTERNAL] Retrieves a material contained by this library.
FCDTextureFindTexture (const string &daeId)
 [INTERNAL] Retrieves a texture contained by this library.
FCDMaterialAddMaterial ()
 Creates a new material.
void ReleaseMaterial (FCDMaterial *material)
 Releases a material.
virtual FUStatus LoadFromXML (xmlNode *node)
 [INTERNAL] Reads in the contents of the library from the COLLADA XML document.
virtual void WriteToXML (xmlNode *libraryNode) const
 [INTERNAL] Writes out the library entities to the COLLADA XML document.

Detailed Description

The shared COLLADA material and effect libraries.

This class covers the material and effect libraries, as well as the texture library for COLLADA 1.3 backward compatibility.

Todo:
When information push is fully implemented: split the effect library out of this one.


Constructor & Destructor Documentation

FCDMaterialLibrary::FCDMaterialLibrary FCDocument document  ) 
 

Constructor: do not use directly.

The document object will create the one and only object of this class.

Parameters:
document The COLLADA document that owns this library.

virtual FCDMaterialLibrary::~FCDMaterialLibrary  )  [virtual]
 

Destructor: do not use directly.

The document object will release its libraries.


Member Function Documentation

FCDEffect* FCDMaterialLibrary::AddEffect  ) 
 

Creates a new effect.

Returns:
The newly created effect.

FCDMaterial* FCDMaterialLibrary::AddMaterial  ) 
 

Creates a new material.

Returns:
The newly created material.

FCDEffect* FCDMaterialLibrary::FindEffect const string &  daeId  ) 
 

[INTERNAL] Retrieves an effect contained by this library.

Parameters:
daeId The COLLADA id of the effect.
Returns:
The matching effect. This pointer will be NULL if no effect matches the COLLADA id.

FCDMaterial* FCDMaterialLibrary::FindMaterial const string &  daeId  ) 
 

[INTERNAL] Retrieves a material contained by this library.

Parameters:
daeId The COLLADA id of the material.
Returns:
The matching material. This pointer will be NULL if no material matches the COLLADA id.

FCDTexture* FCDMaterialLibrary::FindTexture const string &  daeId  ) 
 

[INTERNAL] Retrieves a texture contained by this library.

Parameters:
daeId The COLLADA id of the texture.
Returns:
The matching texture. This pointer will be NULL if no texture matches the COLLADA id.

FCDEffect* FCDMaterialLibrary::GetEffect size_t  index  )  [inline]
 

Retrieves an effect contained by this library.

Parameters:
index The index of the effect.
Returns:
The given effect. This pointer will be NULL if no effect matches the index.

size_t FCDMaterialLibrary::GetEffectCount  )  const [inline]
 

Retrieves the number of effects contained by this library.

Returns:
The number of effects within the library.

FCDEffectList& FCDMaterialLibrary::GetEffects  )  [inline]
 

Retrieves the list of effects contained by this library.

Returns:
The list of effects.

FCDMaterial* FCDMaterialLibrary::GetMaterial size_t  index  )  [inline]
 

Retrieves a material contained by this library.

Parameters:
index The index of the material.
Returns:
The given material. This pointer will be NULL if no material matches the index.

size_t FCDMaterialLibrary::GetMaterialCount  )  const [inline]
 

Retrieves the number of materials contained by this library.

Returns:
The number of materials within the library.

FCDMaterialList& FCDMaterialLibrary::GetMaterials  )  [inline]
 

Retrieves the list of materials contained by this library.

Returns:
The list of materials.

virtual FUStatus FCDMaterialLibrary::LoadFromXML xmlNode *  node  )  [virtual]
 

[INTERNAL] Reads in the contents of the library from the COLLADA XML document.

This method will be called once for the effect library and once for the material library. It may also be called once, for COLLADA 1.3 backward compatibility, for the texture library.

Parameters:
node The COLLADA XML tree node to parse into entities.
Returns:
The status of the import. If the status is not successful, it may be dangerous to extract information from the library.

Reimplemented from FCDLibrary< FCDEntity >.

void FCDMaterialLibrary::ReleaseEffect FCDEffect effect  ) 
 

Releases an effect.

Todo:
Implement FCDMaterialLibrary::ReleaseEffect.
Parameters:
effect The effect to release.

void FCDMaterialLibrary::ReleaseMaterial FCDMaterial material  ) 
 

Releases a material.

Todo:
Implement FCDMaterialLibrary::ReleaseMaterial.
Parameters:
material The material to release.

virtual void FCDMaterialLibrary::WriteToXML xmlNode *  libraryNode  )  const [virtual]
 

[INTERNAL] Writes out the library entities to the COLLADA XML document.

This method writes out the material library within the given node and writes out the effect library as a sibling node to the given node.

Parameters:
libraryNode The COLLADA XML tree node in which to write the materials.

Reimplemented from FCDLibrary< FCDEntity >.


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