Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::scene::IColladaMeshWriterProperties Class Referenceabstract

Callback interface for properties which can be used to influence collada writing. More...

#include <nirtcpp/core/engine/IColladaMeshWriter.hpp>

Inheritance diagram for nirt::scene::IColladaMeshWriterProperties:
Inheritance graph
Collaboration diagram for nirt::scene::IColladaMeshWriterProperties:
Collaboration graph

Public Member Functions

virtual E_COLLADA_TECHNIQUE_FX getTechniqueFx (const video::SMaterial &material) const =0
 Which lighting model should be used in the technique (FX) section when exporting effects (materials)
 
virtual s32 getTextureIdx (const video::SMaterial &material, E_COLLADA_COLOR_SAMPLER cs) const =0
 Which texture index should be used when writing the texture of the given sampler color.
 
virtual E_COLLADA_NIRT_COLOR getColorMapping (const video::SMaterial &material, E_COLLADA_COLOR_SAMPLER cs) const =0
 Return which color from Nirtcpp should be used for the color requested by collada.
 
virtual video::SColor getCustomColor (const video::SMaterial &material, E_COLLADA_COLOR_SAMPLER cs) const =0
 Return custom colors for certain color types requested by collada.
 
virtual E_COLLADA_TRANSPARENT_FX getTransparentFx (const video::SMaterial &material) const =0
 Return the transparence color interpretation.
 
virtual f32 getTransparency (const video::SMaterial &material) const =0
 Transparency value for that material.
 
virtual f32 getReflectivity (const video::SMaterial &material) const =0
 Reflectivity value for that material.
 
virtual f32 getIndexOfRefraction (const video::SMaterial &material) const =0
 Return index of refraction for that material.
 
virtual bool isExportable (const nirt::scene::ISceneNode *node) const =0
 
virtual IMeshgetMesh (nirt::scene::ISceneNode *node)=0
 
virtual bool useNodeMaterial (const scene::ISceneNode *node) const =0
 Return if the node has it's own material overwriting the mesh-materials.
 
- Public Member Functions inherited from nirt::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from nirt::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Detailed Description

Callback interface for properties which can be used to influence collada writing.

Member Function Documentation

◆ getColorMapping()

virtual E_COLLADA_NIRT_COLOR nirt::scene::IColladaMeshWriterProperties::getColorMapping ( const video::SMaterial material,
E_COLLADA_COLOR_SAMPLER  cs 
) const
pure virtual

Return which color from Nirtcpp should be used for the color requested by collada.

Note that collada allows exporting either texture or color, not both. So color mapping is only checked if we have no valid texture already. By default we try to return best fits when possible. For example ECCS_DIFFUSE is mapped to ECIC_DIFFUSE. When ECIC_CUSTOM is returned then the result of getCustomColor will be used.

◆ getCustomColor()

virtual video::SColor nirt::scene::IColladaMeshWriterProperties::getCustomColor ( const video::SMaterial material,
E_COLLADA_COLOR_SAMPLER  cs 
) const
pure virtual

Return custom colors for certain color types requested by collada.

Only used when getColorMapping returns ECIC_CUSTOM for the same parameters.

◆ getIndexOfRefraction()

virtual f32 nirt::scene::IColladaMeshWriterProperties::getIndexOfRefraction ( const video::SMaterial material) const
pure virtual

Return index of refraction for that material.

By default we don't write that.

Returns
a value greater equal 0.f to write <index_of_refraction> when it is lesser than 0 nothing will be written

◆ getMesh()

virtual IMesh * nirt::scene::IColladaMeshWriterProperties::getMesh ( nirt::scene::ISceneNode node)
pure virtual

Return the mesh for the given node. If it has no mesh or shouldn't export it's mesh you can return 0 in which case only the transformation matrix of the node will be used.

◆ getReflectivity()

virtual f32 nirt::scene::IColladaMeshWriterProperties::getReflectivity ( const video::SMaterial material) const
pure virtual

Reflectivity value for that material.

The amount of perfect mirror reflection to be added to the reflected light

Returns
0.0 - 1.0 for reflectivity and element is not written at all when < 0.f

◆ getTextureIdx()

virtual s32 nirt::scene::IColladaMeshWriterProperties::getTextureIdx ( const video::SMaterial material,
E_COLLADA_COLOR_SAMPLER  cs 
) const
pure virtual

Which texture index should be used when writing the texture of the given sampler color.

Returns
the index to the texture-layer or -1 if that texture should never be exported Note: for ECCS_TRANSPARENT by default the alpha channel is used, if you want to use RGB you have to set also the ECOF_RGB_ZERO flag in getTransparentFx.

◆ getTransparency()

virtual f32 nirt::scene::IColladaMeshWriterProperties::getTransparency ( const video::SMaterial material) const
pure virtual

Transparency value for that material.

This value is additional to transparent settings, if both are set they will be multiplicated.

Returns
1.0 for fully transparent, 0.0 for not transparent and not written at all when < 0.f

◆ getTransparentFx()

virtual E_COLLADA_TRANSPARENT_FX nirt::scene::IColladaMeshWriterProperties::getTransparentFx ( const video::SMaterial material) const
pure virtual

Return the transparence color interpretation.

Not this is only about ECCS_TRANSPARENT and does not affect getTransparency.

◆ isExportable()

virtual bool nirt::scene::IColladaMeshWriterProperties::isExportable ( const nirt::scene::ISceneNode node) const
pure virtual

Should node be used in scene export? (only needed for scene-writing, ignored in mesh-writing) By default all visible nodes are exported.

◆ useNodeMaterial()

virtual bool nirt::scene::IColladaMeshWriterProperties::useNodeMaterial ( const scene::ISceneNode node) const
pure virtual

Return if the node has it's own material overwriting the mesh-materials.

Usually true except for mesh-nodes which have isReadOnlyMaterials set. This is mostly important for naming (as ISceneNode::getMaterial() already returns the correct material). You have to override it when exporting custom scenenodes with own materials.

Returns
true => The node's own material is used, false => ignore node material and use the one from the mesh

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

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print