Loading...
Searching...
No Matches
irr::scene::IColladaMeshWriter Class Referenceabstract

Interface for writing meshes. More...

`#include <IColladaMeshWriter.h>`

Inheritance diagram for irr::scene::IColladaMeshWriter:

## Public Member Functions

| IColladaMeshWriter ()
virtual | ~IColladaMeshWriter ()
| Destructor.
virtual video::SColorf | getAmbientLight () const
| Return ambient light of the scene which is written.
IColladaMeshWriterNames * | getDefaultNameGenerator () const
| Return the original default name generator of the writer.
IColladaMeshWriterProperties * | getDefaultProperties () const
| Return the original default properties of the writer.
virtual bool | getExportSMaterialsOnlyOnce () const
virtual E_COLLADA_GEOMETRY_WRITING | getGeometryWriting () const
| Get the current style of geometry writing.
virtual IColladaMeshWriterNames * | getNameGenerator () const
| Get currently used name generator.
virtual IColladaMeshWriterProperties * | getProperties () const
| Get properties which are currently used.
virtual bool | getWriteDefaultScene () const
| Get if a default scene should be written.
virtual bool | getWriteTextures () const
| Get if texture information should be written.
virtual void | setAmbientLight (const video::SColorf &ambientColor)
| Sets ambient color of the scene to write.
virtual void | setExportSMaterialsOnlyOnce (bool exportOnce)
| Make certain there is only one collada material generated per Irrlicht material.
virtual void | setGeometryWriting (E_COLLADA_GEOMETRY_WRITING writeStyle)
| Control when and how often a mesh is written.
virtual void | setNameGenerator (IColladaMeshWriterNames *nameGenerator)
| Install a generator to create custom names on export.
virtual void | setProperties (IColladaMeshWriterProperties *p)
| Set properties to use by the meshwriter instead of it's default properties.
virtual void | setWriteDefaultScene (bool write)
| Set if a default scene should be written when writing meshes.
virtual void | setWriteTextures (bool write)
| Set if texture information should be written.
virtual irr::core::stringw | toNCName (const irr::core::stringw &oldString, const irr::core::stringw &prefix=irr::core::stringw(L"_NC_")) const =0
| Restrict the characters of oldString a set of allowed characters in xs::NCName and add the prefix.
virtual bool | writeScene (io::IWriteFile *file, scene::ISceneNode *root)=0
| writes a scene starting with the given node
Public Member Functions inherited from irr::scene::IMeshWriter
virtual | ~IMeshWriter ()
| Destructor.
virtual EMESH_WRITER_TYPE | getType () const =0
| Get the type of the mesh writer.
virtual bool | writeMesh (io::IWriteFile *file, scene::IMesh *mesh, s32 flags=EMWF_NONE)=0
| Write a static mesh.
Public Member Functions inherited from irr::IReferenceCounted
| IReferenceCounted ()
| Constructor.
virtual | ~IReferenceCounted ()
| Destructor.
bool | drop () const
| Drops the object. Decrements the reference counter by one.
const c8 * | getDebugName () const
| Returns the debug name of the object.
s32 | getReferenceCount () const
| Get the reference count.
void | grab () const
| Grabs the object. Increments the reference counter by one.

## Protected Member Functions

virtual void | setDefaultNameGenerator (IColladaMeshWriterNames *p)
virtual void | setDefaultProperties (IColladaMeshWriterProperties *p)
Protected Member Functions inherited from irr::IReferenceCounted
void | setDebugName (const c8 *newName)
| Sets the debug name of the object.

## Detailed Description

Interface for writing meshes.

Definition at line 201 of file IColladaMeshWriter.h.

## Constructor & Destructor Documentation

## IColladaMeshWriter()

irr::scene::IColladaMeshWriter::IColladaMeshWriter | ( |  | ) |

inline

Definition at line 205 of file IColladaMeshWriter.h.

References irr::scene::ECGI_PER_MESH.

## ~IColladaMeshWriter()

virtual irr::scene::IColladaMeshWriter::~IColladaMeshWriter | ( |  | ) |

inline virtual

Destructor.

Definition at line 214 of file IColladaMeshWriter.h.

## Member Function Documentation

## getAmbientLight()

virtual video::SColorf irr::scene::IColladaMeshWriter::getAmbientLight | ( |  | ) | const

inline virtual

Return ambient light of the scene which is written.

Definition at line 265 of file IColladaMeshWriter.h.

## getDefaultNameGenerator()

IColladaMeshWriterNames * irr::scene::IColladaMeshWriter::getDefaultNameGenerator | ( |  | ) | const

inline

Return the original default name generator of the writer.

You can use this pointer in your own generator to access and return default values.

Definition at line 354 of file IColladaMeshWriter.h.

## getDefaultProperties()

IColladaMeshWriterProperties * irr::scene::IColladaMeshWriter::getDefaultProperties | ( |  | ) | const

inline

Return the original default properties of the writer.

You can use this pointer in your own properties to access and return default values.

Definition at line 329 of file IColladaMeshWriter.h.

## getExportSMaterialsOnlyOnce()

virtual bool irr::scene::IColladaMeshWriter::getExportSMaterialsOnlyOnce | ( |  | ) | const

inline virtual

Definition at line 302 of file IColladaMeshWriter.h.

## getGeometryWriting()

virtual E_COLLADA_GEOMETRY_WRITING irr::scene::IColladaMeshWriter::getGeometryWriting | ( |  | ) | const

inline virtual

Get the current style of geometry writing.

Definition at line 284 of file IColladaMeshWriter.h.

## getNameGenerator()

virtual IColladaMeshWriterNames * irr::scene::IColladaMeshWriter::getNameGenerator | ( |  | ) | const

inline virtual

Get currently used name generator.

Definition at line 347 of file IColladaMeshWriter.h.

## getProperties()

virtual IColladaMeshWriterProperties * irr::scene::IColladaMeshWriter::getProperties | ( |  | ) | const

inline virtual

Get properties which are currently used.

Definition at line 322 of file IColladaMeshWriter.h.

## getWriteDefaultScene()

virtual bool irr::scene::IColladaMeshWriter::getWriteDefaultScene | ( |  | ) | const

inline virtual

Get if a default scene should be written.

Definition at line 253 of file IColladaMeshWriter.h.

## getWriteTextures()

virtual bool irr::scene::IColladaMeshWriter::getWriteTextures | ( |  | ) | const

inline virtual

Get if texture information should be written.

Definition at line 237 of file IColladaMeshWriter.h.

## setAmbientLight()

virtual void irr::scene::IColladaMeshWriter::setAmbientLight | ( | const video::SColorf & | ambientColor | ) |

inline virtual

Sets ambient color of the scene to write.

Definition at line 259 of file IColladaMeshWriter.h.

## setDefaultNameGenerator()

virtual void irr::scene::IColladaMeshWriter::setDefaultNameGenerator | ( | IColladaMeshWriterNames * | p | ) |

inline protected virtual

Definition at line 378 of file IColladaMeshWriter.h.

References irr::IReferenceCounted::grab().

## setDefaultProperties()

virtual void irr::scene::IColladaMeshWriter::setDefaultProperties | ( | IColladaMeshWriterProperties * | p | ) |

inline protected virtual

Definition at line 366 of file IColladaMeshWriter.h.

References irr::IReferenceCounted::grab().

## setExportSMaterialsOnlyOnce()

virtual void irr::scene::IColladaMeshWriter::setExportSMaterialsOnlyOnce | ( | bool | exportOnce | ) |

inline virtual

Make certain there is only one collada material generated per Irrlicht material.

Checks before creating a collada material-name if an identical video::SMaterial has been exported already. If so don't export it with another name. This is set by default and leads to way smaller .dae files. Note that if you need to disable this flag for some reason you can still get a similar effect using the IColladaMeshWriterNames::nameForMaterial by returning identical names for identical materials there.

Definition at line 297 of file IColladaMeshWriter.h.

## setGeometryWriting()

virtual void irr::scene::IColladaMeshWriter::setGeometryWriting | ( | E_COLLADA_GEOMETRY_WRITING | writeStyle | ) |

inline virtual

Control when and how often a mesh is written.

Optimally ECGI_PER_MESH would be always sufficent - writing geometry once per mesh. Unfortunately many tools (at the time of writing this nearly all of them) have trouble on import when different materials are used per node. So when you override materials per node and importing the resuling collada has materials problems in other tools try using other values here.

Parameters

  writeStyle | One of the E_COLLADA_GEOMETRY_WRITING settings.

Definition at line 278 of file IColladaMeshWriter.h.

## setNameGenerator()

virtual void irr::scene::IColladaMeshWriter::setNameGenerator | ( | IColladaMeshWriterNames * | nameGenerator | ) |

inline virtual

Install a generator to create custom names on export.

Definition at line 335 of file IColladaMeshWriter.h.

References irr::IReferenceCounted::grab().

## setProperties()

virtual void irr::scene::IColladaMeshWriter::setProperties | ( | IColladaMeshWriterProperties * | p | ) |

inline virtual

Set properties to use by the meshwriter instead of it's default properties.

Overloading properties with an own class allows modifying the writing process in certain ways. By default properties are set to the DefaultProperties.

Definition at line 310 of file IColladaMeshWriter.h.

References irr::IReferenceCounted::grab().

## setWriteDefaultScene()

virtual void irr::scene::IColladaMeshWriter::setWriteDefaultScene | ( | bool | write | ) |

inline virtual

Set if a default scene should be written when writing meshes.

Many collada readers fail to read a mesh if the collada files doesn't contain a scene as well. The scene is doing an instantiation of the mesh. When using writeScene this flag is ignored (as we have scene there already)

Definition at line 247 of file IColladaMeshWriter.h.

## setWriteTextures()

virtual void irr::scene::IColladaMeshWriter::setWriteTextures | ( | bool | write | ) |

inline virtual

Set if texture information should be written.

Definition at line 231 of file IColladaMeshWriter.h.

## toNCName()

virtual irr::core::stringw irr::scene::IColladaMeshWriter::toNCName | ( | const irr::core::stringw & | oldString,
|  | const irr::core::stringw & | prefix = irr::core::stringw(L"_NC_") ) const

pure virtual

Restrict the characters of oldString a set of allowed characters in xs::NCName and add the prefix.

A tool function to help when using a custom name generator to generative valid names for collada names and id's.

## writeScene()

virtual bool irr::scene::IColladaMeshWriter::writeScene | ( | io::IWriteFile * | file,
|  | scene::ISceneNode * | root )

pure virtual

writes a scene starting with the given node

The documentation for this class was generated from the following file:

- IColladaMeshWriter.h

- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0