FCDEntity Class Reference
[COLLADA Document Object Model.]

A COLLADA entity. More...

#include <FCDEntity.h>

Inheritance diagram for FCDEntity:

FCDObjectWithId FCDObject FUParameterizable FUTrackable FUObject FCDAnimation FCDAnimationClip FCDController FCDEffect FCDEmitter FCDForceField FCDGeometry FCDImage FCDMaterial FCDPhysicsAnalyticalGeometry FCDPhysicsMaterial FCDPhysicsModel FCDPhysicsRigidBody FCDPhysicsRigidConstraint FCDPhysicsScene FCDSceneNode FCDTargetedEntity List of all members.

Public Types

enum  Type {
  ENTITY,
  ANIMATION,
  ANIMATION_CLIP,
  CAMERA,
  LIGHT,
  IMAGE,
  MATERIAL,
  EFFECT,
  GEOMETRY,
  CONTROLLER,
  SCENE_NODE,
  PHYSICS_RIGID_CONSTRAINT,
  PHYSICS_MATERIAL,
  PHYSICS_RIGID_BODY,
  PHYSICS_SHAPE,
  PHYSICS_ANALYTICAL_GEOMETRY,
  PHYSICS_MODEL,
  PHYSICS_SCENE_NODE,
  FORCE_FIELD,
  EMITTER,
  TYPE_COUNT
}
 The types of entity classes. More...

Public Member Functions

 FCDEntity (FCDocument *document, const char *baseId="GenericEntity")
 Constructor: do not use directly.
virtual ~FCDEntity ()
 Destructor.
virtual Type GetType () const
 Retrieves the entity class type for an entity.
const fstringGetName () const
 Retrieves the name of the entity.
void SetName (const fstring &_name)
 Sets the name of the entity.
FCDExtraGetExtra ()
 Retrieves the extra information tree for this entity.
const FCDExtraGetExtra () const
 See above.
FCDAssetGetAsset ()
 Retrieves the asset information for this entity.
const FCDAssetGetAsset () const
 See above.
void GetHierarchicalAssets (FCDAssetList &assets)
 Retrieves the asset information structures that affect this entity in its hierarchy.
virtual void GetHierarchicalAssets (FCDAssetConstList &assets) const
 See above.
bool HasNote () const
 Retrieves whether the entity has a user-defined note.
const fstringGetNote () const
 Retrieves the user-defined note for this entity.
void SetNote (const fstring &_note)
 Sets the user-defined note for this entity.
virtual FCDEntityFindDaeId (const fm::string &daeId)
 Retrieves the child entity that has the given COLLADA id.
virtual const FCDEntityFindDaeId (const fm::string &daeId) const
 See above.
virtual FCDEntityClone (FCDEntity *clone=NULL, bool cloneChildren=false) const
 Copies the entity information into a clone.

Static Public Member Functions

static fstring CleanName (const fchar *c)
 Cleans illegal characters in from the input char string.

Detailed Description

A COLLADA entity.

A COLLADA entity is an object contained within a COLLADA library. As such, it is based on the FCDObjectWithId class so that it can be accessed by other entities, such as the scene graph.

The entity adds to the FCDObjectWithId class: a name, an extra tree and an optional note, as well as a way to identity the type of the entity, in order to up-cast it to its correct class.


Member Enumeration Documentation

enum FCDEntity::Type
 

The types of entity classes.

Each type corresponds directly to one class that contains the FCDEntity class as a parent, so you can up-cast FCDEntity pointers.

Enumerator:
ENTITY  A generic entity (FCDEntity).

Should never be used.

ANIMATION  An animation (FCDAnimation).
ANIMATION_CLIP  An animation clip (FCDAnimationClip).
CAMERA  A camera (FCDCamera).
LIGHT  A light (FCDLight).
IMAGE  An image (FCDImage).
MATERIAL  A visual material definition (FCDMaterial).
EFFECT  An effect definition (FCDEffect).
GEOMETRY  A geometric object (FCDGeometry).

Includes splines and meshes.

CONTROLLER  A geometric controller (FCDController).

Includes skins and morphers.

SCENE_NODE  A visual scene node (FCDSceneNode).
PHYSICS_RIGID_CONSTRAINT  A physics rigid constraint (FCDPhysicsRigidConstraint).
PHYSICS_MATERIAL  A physics material definiton (FCDPhysicsMaterial).
PHYSICS_RIGID_BODY  A physics rigid body (FCDPhysicsRigidBody).
PHYSICS_SHAPE  A physics shape (FCDPhysicsShape).
PHYSICS_ANALYTICAL_GEOMETRY  A physics analytical geometric object (FCDPhysicsAnalyticalGeometry).
PHYSICS_MODEL  A physics model (FCDPhysicsModel).
PHYSICS_SCENE_NODE  A physics scene node (FCDPhysicsScene).
FORCE_FIELD  A physics force field (FCDForceField).
EMITTER  A generic emitter for sound and particles (FCDEmitter) - Premium feature.


Constructor & Destructor Documentation

FCDEntity::FCDEntity FCDocument document,
const char *  baseId = "GenericEntity"
 

Constructor: do not use directly.

Instead, create objects of the up-classes.

Parameters:
document The COLLADA document that owns the entity.
baseId The prefix COLLADA id to be used if no COLLADA id is provided.


Member Function Documentation

static fstring FCDEntity::CleanName const fchar *  c  )  [static]
 

Cleans illegal characters in from the input char string.

Parameters:
c The string to clean
Returns:
the sanitized version

virtual FCDEntity* FCDEntity::Clone FCDEntity clone = NULL,
bool  cloneChildren = false
const [virtual]
 

Copies the entity information into a clone.

All the overwriting functions of this function should call this function to copy the COLLADA id and the other entity-level information. All the up-classes of this class should implement this function. The cloned entity may reside in another document.

Parameters:
clone The empty clone. If this pointer is NULL, a new entity will be created and you will need to release the returned pointer manually.
cloneChildren Whether to recursively clone this entity's children.
Returns:
The clone.

Reimplemented in FCDAnimation, FCDAnimationClip, FCDEffect, FCDEmitter, FCDForceField, FCDGeometry, FCDImage, FCDMaterial, FCDPhysicsAnalyticalGeometry, FCDPASBox, FCDPASPlane, FCDPASSphere, FCDPASCylinder, FCDPASCapsule, FCDPASTaperedCylinder, FCDPhysicsMaterial, FCDPhysicsModel, FCDPhysicsRigidBody, FCDPhysicsRigidConstraint, FCDPhysicsScene, FCDSceneNode, and FCDTargetedEntity.

virtual FCDEntity* FCDEntity::FindDaeId const fm::string daeId  )  [inline, virtual]
 

Retrieves the child entity that has the given COLLADA id.

This function is only useful for entities that are hierarchical: visual/physics scene nodes and animations.

Parameters:
daeId A COLLADA id.
Returns:
The child entity with the given id. This pointer will be NULL if no child entity matches the given id.

Reimplemented in FCDAnimation, and FCDSceneNode.

FCDAsset* FCDEntity::GetAsset  ) 
 

Retrieves the asset information for this entity.

In the non-const version, calling this function will create an asset structure. If you are interested in a specific asset-type information, such as up_axis and units, please use the FCDEntity::GetHierarchicalAssets function.

Returns:
The asset information structure.

FCDExtra* FCDEntity::GetExtra  )  [inline]
 

Retrieves the extra information tree for this entity.

The prefered way to save extra information in FCollada is at the entity level. Use this extra information tree to store any information you want exported and imported back.

Returns:
The extra information tree.

void FCDEntity::GetHierarchicalAssets FCDAssetList assets  )  [inline]
 

Retrieves the asset information structures that affect this entity in its hierarchy.

Parameters:
assets A list of asset information structures to fill in.

Reimplemented in FCDAnimation, and FCDSceneNode.

const fstring& FCDEntity::GetName  )  const [inline]
 

Retrieves the name of the entity.

This value has no direct use in COLLADA but is useful to track the user-friendly name of an entity.

Returns:
The name.

const fstring& FCDEntity::GetNote  )  const
 

Retrieves the user-defined note for this entity.

This value is a simpler way, than the extra tree, to store user-defined information that does not belong in COLLADA.

Returns:
The user-defined note.

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

Retrieves the entity class type for an entity.

You can use the entity class type of up-cast an entity pointer to the correct up-class. This function should be overwritten by all up-classes.

Returns:
The entity class type.

Reimplemented in FCDAnimation, FCDAnimationClip, FCDCamera, FCDController, FCDEffect, FCDEmitter, FCDForceField, FCDGeometry, FCDImage, FCDLight, FCDMaterial, FCDPhysicsAnalyticalGeometry, FCDPhysicsMaterial, FCDPhysicsModel, FCDPhysicsRigidBody, FCDPhysicsRigidConstraint, FCDPhysicsScene, and FCDSceneNode.

bool FCDEntity::HasNote  )  const
 

Retrieves whether the entity has a user-defined note.

This value is a simpler way, than the extra tree, to store user-defined information that does not belong in COLLADA.

Returns:
Whether the entity has an user-defined note.

void FCDEntity::SetName const fstring _name  ) 
 

Sets the name of the entity.

This value has no direct use in COLLADA but is useful to track the user-friendly name of an entity.

Parameters:
_name The name.

void FCDEntity::SetNote const fstring _note  ) 
 

Sets the user-defined note for this entity.

This value is a simpler way, than the extra tree, to store user-defined information that does not belong in COLLADA.

Parameters:
_note The user-defined note.


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