![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <MaterialImporter.hpp>
Public Member Functions | |
virtual | ~MaterialImporter ()=default |
C3D_API | MaterialImporter (Engine &engine, castor::String const &prefix) |
Constructor. | |
C3D_API | MaterialImporter (Engine &engine, castor::String const &prefix, ImporterFile *file) |
Constructor. | |
C3D_API MaterialPtr | importData (castor::String const &name, ImporterFile *file, Parameters const ¶meters, castor::Map< PassComponentTextureFlag, TextureConfiguration > const &textureRemaps) |
Material import Function. | |
C3D_API bool | importData (Material &material, ImporterFile *file, Parameters const ¶meters, castor::Map< PassComponentTextureFlag, TextureConfiguration > const &textureRemaps) |
Scene import Function. | |
C3D_API castor::ImageRPtr | loadImage (castor::String const &name, castor::ImageCreateParams const ¶ms) const |
Loads an image. | |
C3D_API castor::ImageRPtr | loadImage (castor::Path const &path, castor::ImageLoaderConfig const &loadConfig) const |
Loads an image from a file. | |
C3D_API castor::ImageRPtr | loadImage (castor::Path const &path) const |
Loads an image from a file. | |
C3D_API castor::ImageRPtr | loadImage (castor::String const &name, castor::String type, castor::ByteArray data, castor::ImageLoaderConfig const &loadConfig) const |
Loads a texture. | |
C3D_API castor::ImageRPtr | loadImage (castor::String name, castor::String type, castor::ByteArray data) const |
Loads a texture. | |
C3D_API TextureSourceInfo | loadTexture (castor::Path const &path, TextureConfiguration const &config, castor::ImageLoaderConfig const &loadConfig) const |
Loads a texture. | |
C3D_API TextureSourceInfo | loadTexture (castor::Path const &path, TextureConfiguration const &config) const |
Loads a texture. | |
C3D_API TextureSourceInfo | loadTexture (castor::String name, castor::String type, castor::ByteArray data, TextureConfiguration const &config, castor::ImageLoaderConfig const &loadConfig) const |
Loads a texture. | |
C3D_API TextureSourceInfo | loadTexture (castor::String name, castor::String type, castor::ByteArray data, TextureConfiguration const &config) const |
Loads a texture. | |
C3D_API void | loadTexture (castor::Path const &path, TextureConfiguration const &config, PassTextureConfig const &passConfig, Pass &pass, castor::ImageLoaderConfig const &loadConfig) const |
Loads a texture and adds it to the given pass. | |
C3D_API void | loadTexture (castor::Path const &path, TextureConfiguration const &config, PassTextureConfig const &passConfig, Pass &pass) const |
Loads a texture and adds it to the given pass. | |
C3D_API void | loadTexture (castor::String name, castor::String type, castor::ByteArray data, TextureConfiguration const &config, PassTextureConfig const &passConfig, Pass &pass) const |
Loads a texture and adds it to the given pass. | |
C3D_API void | loadTexture (castor::String name, castor::String type, castor::ByteArray data, TextureConfiguration const &config, PassTextureConfig const &passConfig, Pass &pass, castor::ImageLoaderConfig const &loadConfig) const |
Loads a texture and adds it to the given pass. | |
C3D_API bool | convertToNormalMap (castor::Path &path, castor3d::TextureConfiguration &config) const |
Converts given height image file to a normal+height image. | |
ImporterFile const * | getImporterFile () const noexcept |
castor::StringView | getPrefix () const noexcept |
![]() | |
Engine * | getOwner () const noexcept |
void | setOwner (Engine &owner) noexcept |
Static Public Member Functions | |
static C3D_API bool | importData (Material &material, castor::Path const &pathFile, Parameters const ¶meters, castor::Map< PassComponentTextureFlag, TextureConfiguration > const &textureRemaps) |
Scene import Function. | |
Protected Attributes | |
castor::String | m_prefix |
ImporterFile * | m_file {} |
Parameters | m_parameters |
castor::Map< PassComponentTextureFlag, TextureConfiguration > | m_textureRemaps |
castor::ImageLoaderConfig | m_loadConfig { false, false, false } |
float | m_emissiveMult { 1.0f } |
Additional Inherited Members | |
![]() | |
OwnedBy (Engine &owner) noexcept | |
Constructor. | |
|
virtualdefault |
|
explicit |
Constructor.
[in] | engine | The engine. |
[in] | prefix | The prefix used for logging. |
|
explicit |
Constructor.
[in] | engine | The engine. |
[in] | prefix | The prefix used for logging. |
[in] | file | The file to import. |
C3D_API bool castor3d::MaterialImporter::convertToNormalMap | ( | castor::Path & | path, |
castor3d::TextureConfiguration & | config ) const |
Converts given height image file to a normal+height image.
[in,out] | path | The image file path (can be relative or absolute), receives the resulting normal+height image file path. |
[in,out] | config | The texture unit configuration. |
false
if any error occured.
|
inlinenoexcept |
References m_file.
|
inlinenoexcept |
References m_prefix.
C3D_API MaterialPtr castor3d::MaterialImporter::importData | ( | castor::String const & | name, |
ImporterFile * | file, | ||
Parameters const & | parameters, | ||
castor::Map< PassComponentTextureFlag, TextureConfiguration > const & | textureRemaps ) |
|
static |
Scene import Function.
[out] | material | Receives the imported data. |
[in] | pathFile | The location of the file to import. |
[in] | parameters | Import configuration parameters. |
[in] | textureRemaps | The imported textures remapping parameters. |
false
if any problem occured. C3D_API bool castor3d::MaterialImporter::importData | ( | Material & | material, |
ImporterFile * | file, | ||
Parameters const & | parameters, | ||
castor::Map< PassComponentTextureFlag, TextureConfiguration > const & | textureRemaps ) |
Scene import Function.
[out] | material | Receives the imported data. |
[in] | file | The file to import. |
[in] | parameters | Import configuration parameters. |
[in] | textureRemaps | The imported textures remapping parameters. |
false
if any problem occured. C3D_API castor::ImageRPtr castor3d::MaterialImporter::loadImage | ( | castor::Path const & | path | ) | const |
Loads an image from a file.
[in] | path | The image file path (can be relative or absolute). |
C3D_API castor::ImageRPtr castor3d::MaterialImporter::loadImage | ( | castor::Path const & | path, |
castor::ImageLoaderConfig const & | loadConfig ) const |
Loads an image from a file.
[in] | path | The image file path (can be relative or absolute). |
[in] | loadConfig | La configuration pour le loader d'image. |
C3D_API castor::ImageRPtr castor3d::MaterialImporter::loadImage | ( | castor::String const & | name, |
castor::ImageCreateParams const & | params ) const |
Loads an image.
[in] | name | The image name. |
[in] | params | The image creation parameters. |
C3D_API castor::ImageRPtr castor3d::MaterialImporter::loadImage | ( | castor::String const & | name, |
castor::String | type, | ||
castor::ByteArray | data, | ||
castor::ImageLoaderConfig const & | loadConfig ) const |
Loads a texture.
[in] | name | The image name. |
[in] | type | The image data type. |
[in] | data | The image data. |
[in] | loadConfig | La configuration pour le loader d'image. |
C3D_API castor::ImageRPtr castor3d::MaterialImporter::loadImage | ( | castor::String | name, |
castor::String | type, | ||
castor::ByteArray | data ) const |
Loads a texture.
[in] | name | The image name. |
[in] | type | The image data type. |
[in] | data | The image data. |
C3D_API TextureSourceInfo castor3d::MaterialImporter::loadTexture | ( | castor::Path const & | path, |
TextureConfiguration const & | config ) const |
Loads a texture.
[in] | path | The image file path (can be relative or absolute). |
[in] | config | The texture unit configuration. |
C3D_API TextureSourceInfo castor3d::MaterialImporter::loadTexture | ( | castor::Path const & | path, |
TextureConfiguration const & | config, | ||
castor::ImageLoaderConfig const & | loadConfig ) const |
Loads a texture.
[in] | path | The image file path (can be relative or absolute). |
[in] | config | The texture unit configuration. |
[in] | loadConfig | The image loader configuration. |
C3D_API void castor3d::MaterialImporter::loadTexture | ( | castor::Path const & | path, |
TextureConfiguration const & | config, | ||
PassTextureConfig const & | passConfig, | ||
Pass & | pass ) const |
Loads a texture and adds it to the given pass.
[in] | path | The image file path (can be relative or absolute). |
[in] | passConfig | The texture configuration. |
[in] | config | The texture unit configuration. |
[in,out] | pass | Receives the loaded image. |
C3D_API void castor3d::MaterialImporter::loadTexture | ( | castor::Path const & | path, |
TextureConfiguration const & | config, | ||
PassTextureConfig const & | passConfig, | ||
Pass & | pass, | ||
castor::ImageLoaderConfig const & | loadConfig ) const |
Loads a texture and adds it to the given pass.
[in] | path | The image file path (can be relative or absolute). |
[in] | passConfig | The texture configuration. |
[in] | config | The texture unit configuration. |
[in,out] | pass | Receives the loaded image. |
[in] | loadConfig | The image loader configuration. |
C3D_API TextureSourceInfo castor3d::MaterialImporter::loadTexture | ( | castor::String | name, |
castor::String | type, | ||
castor::ByteArray | data, | ||
TextureConfiguration const & | config ) const |
Loads a texture.
[in] | name | The image name. |
[in] | type | The image data type. |
[in] | data | The image data. |
[in] | config | The texture unit configuration. |
C3D_API TextureSourceInfo castor3d::MaterialImporter::loadTexture | ( | castor::String | name, |
castor::String | type, | ||
castor::ByteArray | data, | ||
TextureConfiguration const & | config, | ||
castor::ImageLoaderConfig const & | loadConfig ) const |
Loads a texture.
[in] | name | The image name. |
[in] | type | The image data type. |
[in] | data | The image data. |
[in] | config | The texture unit configuration. |
[in] | loadConfig | The image loader configuration. |
C3D_API void castor3d::MaterialImporter::loadTexture | ( | castor::String | name, |
castor::String | type, | ||
castor::ByteArray | data, | ||
TextureConfiguration const & | config, | ||
PassTextureConfig const & | passConfig, | ||
Pass & | pass ) const |
Loads a texture and adds it to the given pass.
[in] | name | The image name. |
[in] | type | The image data type. |
[in] | data | The image data. |
[in] | config | The texture configuration. |
[in] | passConfig | The texture unit configuration. |
[in,out] | pass | Receives the loaded image. |
C3D_API void castor3d::MaterialImporter::loadTexture | ( | castor::String | name, |
castor::String | type, | ||
castor::ByteArray | data, | ||
TextureConfiguration const & | config, | ||
PassTextureConfig const & | passConfig, | ||
Pass & | pass, | ||
castor::ImageLoaderConfig const & | loadConfig ) const |
Loads a texture and adds it to the given pass.
[in] | name | The image name. |
[in] | type | The image data type. |
[in] | data | The image data. |
[in] | config | The texture configuration. |
[in] | passConfig | The texture unit configuration. |
[in,out] | pass | Receives the loaded image. |
[in] | loadConfig | The image loader configuration. |
|
protected |
|
protected |
Referenced by getImporterFile().
|
protected |
|
protected |
|
protected |
Referenced by getPrefix().
|
protected |