iMeshObjectFactory Struct Reference
[Mesh plugins]
This object is a factory which can generate mesh objects of a certain type.
More...
#include <imesh/object.h>
Inheritance diagram for iMeshObjectFactory:
![Inheritance graph](structiMeshObjectFactory__inherit__graph.png)
Public Member Functions | |
virtual csPtr< iMeshObjectFactory > | Clone ()=0 |
Creates a copy of this factory and returns the clone. | |
virtual csFlags & | GetFlags ()=0 |
Get flags for this factory. | |
virtual iMaterialWrapper * | GetMaterialWrapper () const =0 |
Get the material of the factory. | |
virtual iMeshFactoryWrapper * | GetMeshFactoryWrapper () const =0 |
Get the logical parent for this mesh factory. | |
virtual iMeshObjectType * | GetMeshObjectType () const =0 |
Get the ObjectType for this mesh factory. | |
virtual uint | GetMixMode () const =0 |
Get mix mode. | |
virtual iObjectModel * | GetObjectModel ()=0 |
Get the generic interface describing the geometry of this mesh factory. | |
virtual void | HardTransform (const csReversibleTransform &t)=0 |
Do a hard transform of this factory. | |
virtual csPtr< iMeshObject > | NewInstance ()=0 |
Create an instance of iMeshObject. | |
virtual bool | SetMaterialWrapper (iMaterialWrapper *material)=0 |
Set the material of the mesh. | |
virtual void | SetMeshFactoryWrapper (iMeshFactoryWrapper *logparent)=0 |
Set a reference to the mesh factory wrapper parent. | |
virtual void | SetMixMode (uint mode)=0 |
Set mix mode. Note that not all meshes may support this. | |
virtual bool | SupportsHardTransform () const =0 |
Return true if HardTransform is supported for this factory. |
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 every 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.
Main creators of instances implementing this interface:
- All mesh objects implement this.
- iMeshObjectType::NewFactory()
Main ways to get pointers to this interface:
Main users of this interface:
- The 3D engine plugin (crystalspace.engine.3d).
Definition at line 297 of file object.h.
Member Function Documentation
virtual csPtr<iMeshObjectFactory> iMeshObjectFactory::Clone | ( | ) | [pure virtual] |
Creates a copy of this factory and returns the clone.
virtual csFlags& iMeshObjectFactory::GetFlags | ( | ) | [pure virtual] |
Get flags for this factory.
The following flags are at least supported:
- CS_FACTORY_STATICSHAPE: factory will never animate.
Mesh factories may implement additional flags. These mesh factory specific flags must be equal to at least 0x00010000.
Implemented in csMeshFactory.
virtual iMaterialWrapper* iMeshObjectFactory::GetMaterialWrapper | ( | ) | const [pure virtual] |
virtual iMeshFactoryWrapper* iMeshObjectFactory::GetMeshFactoryWrapper | ( | ) | const [pure virtual] |
Get the logical parent for this mesh factory.
See SetMeshFactoryWrapper() for more information.
Implemented in csMeshFactory.
virtual iMeshObjectType* iMeshObjectFactory::GetMeshObjectType | ( | ) | const [pure virtual] |
virtual uint iMeshObjectFactory::GetMixMode | ( | ) | const [pure virtual] |
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] |
virtual bool iMeshObjectFactory::SetMaterialWrapper | ( | iMaterialWrapper * | material | ) | [pure virtual] |
Set the material of the mesh.
This only works for single-material factories. If not supported this function will return false.
Implemented in csMeshFactory.
virtual void iMeshObjectFactory::SetMeshFactoryWrapper | ( | iMeshFactoryWrapper * | logparent | ) | [pure virtual] |
Set a reference to the mesh factory wrapper parent.
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 void iMeshObjectFactory::SetMixMode | ( | uint | mode | ) | [pure virtual] |
virtual bool iMeshObjectFactory::SupportsHardTransform | ( | ) | const [pure virtual] |
The documentation for this struct was generated from the following file:
- imesh/object.h
Generated for Crystal Space by doxygen 1.4.7