FCDGeometry Class Reference
[COLLADA Document Geometry Entity]

A COLLADA geometry entity. More...

#include <FCDGeometry.h>

Inheritance diagram for FCDGeometry:

FCDEntity FCDObjectWithId FCDObject FUObject List of all members.

Public Member Functions

 FCDGeometry (FCDocument *document)
 Contructor: do not use directly.
virtual ~FCDGeometry ()
 Destructor: only release cloned geometries directly.
virtual Type GetType () const
 Retrieves the entity class type.
bool IsMesh () const
 Retrieves whether the type of this geometry is a mesh.
FCDGeometryMeshGetMesh ()
 Retrieves the mesh information structure for this geometry.
const FCDGeometryMeshGetMesh () const
 See above.
FCDGeometryMeshCreateMesh ()
 Sets the type of this geometry to mesh and creates an empty mesh structure.
bool IsSpline () const
 Retrieves whether the type of this geometry is a spline.
FCDGeometrySplineGetSpline ()
 Retrieves the spline information structure for this geometry.
const FCDGeometrySplineGetSpline () const
 See above.
FCDGeometrySplineCreateSpline ()
 Sets the type of this geometry to spline and creates an empty spline structure.
FCDGeometryClone (FloatList &newPositions, uint32 newPositionsStride, FloatList &newNormals, uint32 newNormalsStride)
virtual FUStatus LoadFromXML (xmlNode *node)
 [INTERNAL] Reads in the <geometry> element from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the <geometry> element to the given COLLADA XML tree node.

Detailed Description

A COLLADA geometry entity.

There are two types of COLLADA geometry entities: meshes and splines.

Meshes are collections of polygons where the vertices always have a position, usually have a normal to define smooth or hard edges and may be colored or textured.

Splines are a sequence of control points used to generate a smooth curve.


Constructor & Destructor Documentation

FCDGeometry::FCDGeometry FCDocument document  ) 
 

Contructor: do not use directly.

Create new geometries using the FCDocument::AddGeometry function, or the FCDLibrary::AddEntity function.

Parameters:
document The COLLADA document which owns the new geometry entity.

virtual FCDGeometry::~FCDGeometry  )  [virtual]
 

Destructor: only release cloned geometries directly.

Release original geometries using the FCDLibrary::ReleaseEntity function. All original geometries are released with the document that they belong to.


Member Function Documentation

FCDGeometry* FCDGeometry::Clone FloatList newPositions,
uint32  newPositionsStride,
FloatList newNormals,
uint32  newNormalsStride
 

Deprecated:
[INTERNAL] Clones the geometry entity. Works only on mesh geometry. Creates a full copy of the geometry, with the vertices overwritten by the given data: this is used when importing COLLADA 1.3 skin controllers. You will need to release the cloned entity.
Parameters:
newPositions The list of vertex position that will overwrite the current mesh vertex positions. This list may be empty.
newPositionsStride The stride, in bytes, of the newPositions list. For an empty newPositions list, this value is discarded.
newNormals The list of vertex normals that will overwrite the current mesh vertex normals. This list may be empty.
newNormalsStride The stride, in bytes, of the newNormals list. For an empty newNormals list, this value is discarded.
Returns:
The cloned geometry entity. This pointer will be NULL, if the geometry is not a mesh. You will need to release this pointer.

FCDGeometryMesh* FCDGeometry::CreateMesh  ) 
 

Sets the type of this geometry to mesh and creates an empty mesh structure.

This function will release any mesh or spline structure that the geometry may already contain

Returns:
The mesh information structure. This pointer will always be valid.

FCDGeometrySpline* FCDGeometry::CreateSpline  ) 
 

Sets the type of this geometry to spline and creates an empty spline structure.

This function will release any mesh or spline structure that the geometry may already contain.

Returns:
The spline information structure. This pointer will always be valid.

FCDGeometryMesh* FCDGeometry::GetMesh  )  [inline]
 

Retrieves the mesh information structure for this geometry.

Verify that this geometry is a mesh using the IsMesh function prior to calling this function.

Returns:
The mesh information structure. This pointer will be NULL when the geometry is a spline or is undefined.

FCDGeometrySpline* FCDGeometry::GetSpline  )  [inline]
 

Retrieves the spline information structure for this geometry.

Verify that this geometry is a spline using the IsSpline function prior to calling this function.

Returns:
The spline information structure. This pointer will be NULL when the geometry is a mesh or is undefined.

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

Retrieves the entity class type.

This function is a part of the FCDEntity interface.

Returns:
The entity class type: GEOMETRY.

Reimplemented from FCDEntity.

bool FCDGeometry::IsMesh  )  const [inline]
 

Retrieves whether the type of this geometry is a mesh.

Returns:
Whether this geometry is a mesh.

bool FCDGeometry::IsSpline  )  const [inline]
 

Retrieves whether the type of this geometry is a spline.

Returns:
Whether this geometry is a spline.

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

[INTERNAL] Reads in the <geometry> element from a given COLLADA XML tree node.

Parameters:
node 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 geometry.

Reimplemented from FCDEntity.

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

[INTERNAL] Writes out the <geometry> element to the given COLLADA XML tree node.

Parameters:
parentNode The COLLADA XML parent node in which to insert the geometry information.
Returns:
The created <geometry> element XML tree node.

Reimplemented from FCDEntity.


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