CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iMeshObjectFactory Struct Reference

This object is a factory which can generate mesh objects of a certain type. More...

#include <object.h>

Inheritance diagram for iMeshObjectFactory:

iBase csMeshFactory List of all members.

Public Methods

virtual csPtr< iMeshObjectNewInstance ()=0
 Create an instance of iMeshObject. More...

virtual void HardTransform (const csReversibleTransform &t)=0
 Do a hard transform of this factory. More...

virtual bool SupportsHardTransform () const=0
 Return true if HardTransform is supported for this factory. More...

virtual void SetLogicalParent (iBase *logparent)=0
 Set a reference to some logical parent in the context that holds the mesh factories. More...

virtual iBaseGetLogicalParent () const=0
 Get the logical parent for this mesh factory. More...

virtual iObjectModelGetObjectModel ()=0
 Get the generic interface describing the geometry of this mesh factory. More...


Detailed Description

This object is a factory which can generate mesh objects of a certain type.

For example, if you want to have multiple sets of sprites from the same sprite template then you should have an instance of iMeshObjectFactory for evey sprite template and an instance of iMeshObject for every sprite.

To use a mesh factory in the engine, you have to create a mesh factory wrapper for it.

Definition at line 242 of file imesh/object.h.


Member Function Documentation

virtual iBase* iMeshObjectFactory::GetLogicalParent   const [pure virtual]
 

Get the logical parent for this mesh factory.

See SetLogicalParent() for more information.

Implemented in csMeshFactory.

virtual iObjectModel* iMeshObjectFactory::GetObjectModel   [pure virtual]
 

Get the generic interface describing the geometry of this mesh factory.

It is possible that this will return 0 if the factory itself doesn't support the geometry. In that case you need to get the object model from the individual instance instead. Note that for collision detection and other parts of CS it is prefered to use the factory object model when available as that reduces the amount of redundant memory usage.

Implemented in csMeshFactory.

virtual void iMeshObjectFactory::HardTransform const csReversibleTransform   t [pure virtual]
 

Do a hard transform of this factory.

This transformation and the original coordinates are not remembered but the object space coordinates are directly computed (world space coordinates are set to the object space coordinates by this routine). Note that some implementations of mesh objects will not change the orientation of the object but only the position.

Implemented in csMeshFactory.

virtual csPtr<iMeshObject> iMeshObjectFactory::NewInstance   [pure virtual]
 

Create an instance of iMeshObject.

Implemented in csMeshFactory.

virtual void iMeshObjectFactory::SetLogicalParent iBase   logparent [pure virtual]
 

Set a reference to some logical parent in the context that holds the mesh factories.

When a mesh factory is used in the context of the 3D engine then this will be an iMeshFactoryWrapper. Similarly for the isometric engine. Note that this function should NOT increase the ref-count of the given logical parent because this would cause a circular reference (since the logical parent already holds a reference to this mesh factory).

Implemented in csMeshFactory.

virtual bool iMeshObjectFactory::SupportsHardTransform   const [pure virtual]
 

Return true if HardTransform is supported for this factory.

Implemented in csMeshFactory.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14