FCDLibrary< T > Class Template Reference
[COLLADA Document Object Model.]

A COLLADA library. More...

#include <FCDLibrary.h>

Inheritance diagram for FCDLibrary< T >:

FCDObject FUParameterizable FUTrackable FUObject List of all members.

Public Member Functions

 FCDLibrary (FCDocument *document)
 Constructor: do not use directly.
virtual ~FCDLibrary ()
 Destructor.
T * AddEntity ()
 Creates a new entity within this library.
void AddEntity (T *entity)
 Inserts a new entity to this library.
T * FindDaeId (const fm::string &daeId)
 Retrieves the library entity with the given COLLADA id.
const T * FindDaeId (const fm::string &daeId) const
 See above.
bool IsEmpty () const
 Returns whether the library contains no entities.
size_t GetEntityCount () const
 Retrieves the number of entities within the library.
T * GetEntity (size_t index)
 Retrieves an indexed entity from the library.
const T * GetEntity (size_t index) const
 See above.
FCDAssetGetAsset (bool create=true)
 Retrieves the asset information for the library.
const FCDAssetGetAsset () const
FCDExtraGetExtra ()
 Retrieves the asset information for the library.
const FCDExtraGetExtra () const

Detailed Description

template<class T>
class FCDLibrary< T >

A COLLADA library.

A COLLADA library holds a list of entities. There are libraries for the following entities: animations (FCDAnimation), animation clips (FCDAnimationClip), meshes and splines (FCDGeometry), materials (FCDMaterial), effects (FCDEffect), images (FCDImage), skins and morphers (FCDController), cameras (FCDCamera), lights (FCDLight), physics models (FCDPhysicsModel), physics materials (FCDPhysicsMaterial), physics scenes (FCDPhysicsScene) and visual scenes (FCDSceneNode).

The COLLADA libraries are contained within the FCDocument object.


Constructor & Destructor Documentation

template<class T>
FCDLibrary< T >::FCDLibrary FCDocument document  ) 
 

Constructor: do not use directly.

All the necessary libraries are created by the FCDocument object during its creation.

Parameters:
document The parent document.


Member Function Documentation

template<class T>
void FCDLibrary< T >::AddEntity T *  entity  ) 
 

Inserts a new entity to this library.

This function is useful if you are adding cloned entites back inside the library.

Parameters:
entity The entity to insert in the library.
Returns:
The entity to insert.

template<class T>
T * FCDLibrary< T >::AddEntity  ) 
 

Creates a new entity within this library.

Returns:
The newly created entity.

template<class T>
T* FCDLibrary< T >::FindDaeId const fm::string daeId  )  [inline]
 

Retrieves the library entity with the given COLLADA id.

Parameters:
daeId The COLLADA id of the entity.
Returns:
The library entity which matches the COLLADA id. This pointer will be NULL if no matching entity was found.

template<class T>
FCDAsset * FCDLibrary< T >::GetAsset bool  create = true  ) 
 

Retrieves the asset information for the library.

The non-const version of this function can create an empty asset structure for this library.

Parameters:
create Whether to create the asset tag if it is missing. Defaults to true.
Returns:
The asset tag for the library.

template<class T>
T* FCDLibrary< T >::GetEntity size_t  index  )  [inline]
 

Retrieves an indexed entity from the library.

Parameters:
index The index of the entity to retrieve. Should be within the range [0, GetEntityCount()[.
Returns:
The indexed entity.

template<class T>
size_t FCDLibrary< T >::GetEntityCount  )  const [inline]
 

Retrieves the number of entities within the library.

Returns:
the number of entities contained within the library.

template<class T>
FCDExtra* FCDLibrary< T >::GetExtra  )  [inline]
 

Retrieves the asset information for the library.

Returns:
The asset tag for the library.

template<class T>
bool FCDLibrary< T >::IsEmpty  )  const [inline]
 

Returns whether the library contains no entities.

Returns:
Whether the library is empty.


The documentation for this class was generated from the following files:
Generated on Thu Feb 14 16:58:39 2008 for FCollada by  doxygen 1.4.6-NO