FCDEntityInstance Class Reference
[COLLADA Document Object Model.]

A COLLADA entity instance. More...

#include <FCDEntityInstance.h>

Inheritance diagram for FCDEntityInstance:

FCDObject FUObject FCDExternalReference FCDGeometryInstance FCDMaterialInstance List of all members.

Public Types

enum  Type {
  SIMPLE, EXTERNAL_REFERENCE, GEOMETRY, MATERIAL,
  PHYSICS_MODEL, PHYSICS_RIGID_BODY, PHYSICS_RIGID_CONSTRAINT
}
 The class type of the entity instance class. More...

Public Member Functions

 FCDEntityInstance (FCDocument *document, FCDEntity *entity=NULL)
 Constructor: do not use directly.
virtual ~FCDEntityInstance ()
 Destructor: do not use directly.
virtual Type GetType () const
 Retrieves the entity instance class type.
FCDEntityGetEntity ()
 Retrieves the instantiated entity.
const FCDEntityGetEntity () const
 See above.
virtual FUStatus LoadFromXML (xmlNode *UNUSED(instanceNode))
 [INTERNAL] Reads in the entity instance from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the entity instance to the given COLLADA XML tree node.

Protected Member Functions

void SetEntity (FCDEntity *_entity)
 Sets the instantiated entity.

Static Protected Member Functions

static const char * GetInstanceClassType (FCDEntity::Type type)
 [INTERNAL] Retrieves the COLLADA name for the instantiation of a given entity type.

Detailed Description

A COLLADA entity instance.

COLLADA allows for quite a bit of per-instance settings for entities. This information is held by the up-classes of this class. This base class is simply meant to hold the entity that is instantiated.


Member Enumeration Documentation

enum FCDEntityInstance::Type
 

The class type of the entity instance class.

Used this information to up-cast an entity instance.

Enumerator:
SIMPLE  A simple entity instance that has no per-instance information.

This is used for lights and cameras in the visual scene graph and there is no up-class.

EXTERNAL_REFERENCE  An external reference(FCDExternalReference).
GEOMETRY  A geometry entity(FCDGeometryInstance).
MATERIAL  A material entity(FCDMaterialInstance).
PHYSICS_MODEL  A physics model(FCDPhysicsModelInstance).
PHYSICS_RIGID_BODY  A physics rigid body(FCDPhysicsRigidBodyInstance).
PHYSICS_RIGID_CONSTRAINT  A physics rigid constraint(FCDPhysicsRigidConstraintInstance).


Constructor & Destructor Documentation

FCDEntityInstance::FCDEntityInstance FCDocument document,
FCDEntity entity = NULL
 

Constructor: do not use directly.

Instead, use the appropriate allocation function. For scene node instance: FCDSceneNode::AddInstance.

Parameters:
document The COLLADA document that owns the entity instance.
entity The entity to instantiate. This pointer will be NULL for some up-classes where the entity instantiate is more complex.

virtual FCDEntityInstance::~FCDEntityInstance  )  [virtual]
 

Destructor: do not use directly.

Instead, use the appropriate release funciton. For scene node instances: FCDSceneNode::ReleaseInstance.


Member Function Documentation

FCDEntity* FCDEntityInstance::GetEntity  )  [inline]
 

Retrieves the instantiated entity.

Returns:
The instantiated entity.

static const char* FCDEntityInstance::GetInstanceClassType FCDEntity::Type  type  )  [static, protected]
 

[INTERNAL] Retrieves the COLLADA name for the instantiation of a given entity type.

Parameters:
type The entity class type.
Returns:
The COLLADA name to instantiate an entity of the given class type.

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

Retrieves the entity instance class type.

This is used to determine the up-class for the entity instance object.

Returns:
The class type: SIMPLE for entity instances with no up-class.

Reimplemented in FCDExternalReference, FCDGeometryInstance, and FCDMaterialInstance.

virtual FUStatus FCDEntityInstance::LoadFromXML xmlNode *  UNUSED(instanceNode)  )  [inline, virtual]
 

[INTERNAL] Reads in the entity instance from a given COLLADA XML tree node.

Parameters:
UNUSED 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 instance.

void FCDEntityInstance::SetEntity FCDEntity _entity  )  [inline, protected]
 

Sets the instantiated entity.

This is used in up-classes to support different instantiation schemes.

Parameters:
_entity The instantiated entity.

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

[INTERNAL] Writes out the entity instance to the given COLLADA XML tree node.

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

Reimplemented in FCDExternalReference, FCDGeometryInstance, and FCDMaterialInstance.


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