This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine::Importer Class

Header: #include <UnigineImport.h>

This class is used to manage a file importer. File importers are used by the Engine's import system to bring the data stored in various non-native formats to UNIGINE. Each importer can be used to import multiple file formats, but there shouldn't be two or more importers registered for a single file format.

Importer has a set of flags defining which scene components are to be extracted and imported. So, the importer should be initialized before use.

Each importer generates UNIGINE objects on the basis of metadata extracted from the imported files and uses a set of processors to perform all necessary auxiliary operations (data preparation, file saving, file management, etc.). Importer allows you to add any number of pre- and post-processors. However, you can set only one processor for each scene component.

Notice
This is a base class for all importers. Your custom importer class must be inherited from it.

You can customize actions to be performed when importing the whole scene as well as when importing textures, materials, meshes, animations, lights, cameras by overriding the corresponding event handler functions for your custom importer

Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	virtual bool onInit(const ImportScenePtr &scene, const char *filepath) override;
	virtual bool onImport(const char *output_path) override;
	virtual bool onImportTexture(const Unigine::ImportProcessor &processor, const Unigine::ImportTexturePtr &import_texture) override;
	virtual bool onImportMaterial(const Unigine::ImportProcessor &processor, const Unigine::MaterialPtr &material, const Unigine::ImportMaterial &import_material) override;
	virtual bool onImportMesh(const Unigine::ImportProcessor &processor, const Unigine::MeshPtr &mesh, const Unigine::ImportMesh &import_mesh) override;
	virtual bool onImportLight(const Unigine::ImportProcessor &processor, const Unigine::LightPtr &light, const Unigine::ImportLight &import_light) override;
	virtual bool onImportCamera(const Unigine::ImportProcessor &processor, const Unigine::PlayerPtr &camera, const Unigine::ImportCamera &import_camera);
	virtual bool onImportNode(const Unigine::ImportProcessor &processor, const Unigine::NodePtr &node, const Unigine::ImportNode &import_node) override;
	virtual bool onImportNodeChild(const ImportProcessorPtr &processor, const Unigine::NodePtr &node_parent, const ImportNodePtr &import_node_parent, const Unigine::NodePtr &node_child, const ImportNodePtr &import_node_child) override;
	virtual bool onImportAnimation(const Unigine::ImportProcessor &processor, const Unigine::MeshAnimationPtr &animation, const Unigine::ImportMesh &import_mesh, const Unigine::ImportAnimation &import_animation) override;

private:
	ImportScene *import_scene();
	void import_textures(const Unigine::ImportScene &scene);
	void import_materials(const Unigine::ImportScene &scene);
	void import_animations(const Unigine::ImportScene &scene);

	void process_node(const Unigine::ImportScene &import_scene, const Unigine::ImportNode &parent, fbx::FbxNode *fbx_node);
	void process_mesh(const Unigine::ImportScene &import_scene, const Unigine::ImportNode &node, fbx::FbxNode *fbx_node, fbx::FbxMesh *fbx_mesh);
	void process_light(const Unigine::ImportScene &import_scene, const Unigine::ImportNode &node, fbx::FbxNode *fbx_node, fbx::FbxLight *fbx_light);
	void process_camera(const Unigine::ImportScene &import_scene, const Unigine::ImportNode &node, fbx::FbxNode *fbx_node, fbx::FbxCamera *fbx_camera);

/*...*/

};

Importer Class

枚举

Axis#

Axis.
Name描述
None = -1Axis none.
X = None + 1X axis.
NX = X + 1Negative X axis.
Y = NX + 1Y axis.
NY = Y + 1Negative Y axis.
Z = NY + 1Z axis.
NZ = Z + 1Negative Z axis.

Members

void setAnimationsProcessor ( const char * processor ) #

Sets a new import processor to be used for importing animations.

Arguments

  • const char * processor - The animations import processor.

const char * getAnimationsProcessor() const#

Returns the current import processor to be used for importing animations.

Return value

Current animations import processor.

void setLightsProcessor ( const char * processor ) #

Sets a new import processor to be used for importing light sources.

Arguments

  • const char * processor - The lights import processor.

const char * getLightsProcessor() const#

Returns the current import processor to be used for importing light sources.

Return value

Current lights import processor.

void setMeshesProcessor ( const char * processor ) #

Sets a new import processor to be used for importing meshes.

Arguments

  • const char * processor - The meshes import processor.

const char * getMeshesProcessor() const#

Returns the current import processor to be used for importing meshes.

Return value

Current meshes import processor.

void setNodesProcessor ( const char * processor ) #

Sets a new import processor to be used for importing nodes.

Arguments

  • const char * processor - The nodes import processor.

const char * getNodesProcessor() const#

Returns the current import processor to be used for importing nodes.

Return value

Current nodes import processor.

void setCamerasProcessor ( const char * processor ) #

Sets a new import processor to be used for importing cameras.

Arguments

  • const char * processor - The cameras import processor.

const char * getCamerasProcessor() const#

Returns the current import processor to be used for importing cameras.

Return value

Current cameras import processor.

void setMaterialsProcessor ( const char * processor ) #

Sets a new import processor to be used for importing materials.

Arguments

  • const char * processor - The materials import processor.

const char * getMaterialsProcessor() const#

Returns the current import processor to be used for importing materials.

Return value

Current materials import processor.

void setOutputFilepath ( const char * filepath ) #

Sets a new resulting output file path for imported scene component(s). In case a set of files is generated, the path to resulting *.node file will be returned.

Arguments

  • const char * filepath - The output file path.

const char * getOutputFilepath() const#

Returns the current resulting output file path for imported scene component(s). In case a set of files is generated, the path to resulting *.node file will be returned.

Return value

Current output file path.

void setTexturesProcessor ( const char * processor ) #

Sets a new import processor to be used for importing textures.

Arguments

  • const char * processor - The textures import processor.

const char * getTexturesProcessor() const#

Returns the current import processor to be used for importing textures.

Return value

Current textures import processor.

Importer ( ) #

Constructor. Creates an empty importer.

Ptr<Importer> getImporter ( ) const#

Returns the importer itself.

Return value

Importer itself.

bool containsParameter ( const char * name ) const#

Returns a value indicating whether the list of import parameters includes a parameter with a given name.

Arguments

  • const char * name - Parameter name.

Return value

true if the list of import parameters includes a parameter with a given name; otherwise, false.

void setParameterInt ( const char * name, int v ) #

Sets a new value for the specified integer parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • const char * name - Name of the integer parameter.
  • int v - New value to be set.

int getParameterInt ( const char * name ) const#

Returns the current value of the specified integer parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • const char * name - Name of the integer parameter.

Return value

Value of the integer parameter.

void setParameterFloat ( const char * name, float v ) #

Sets a new value for the specified float parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • const char * name - Name of the float parameter.
  • float v - New value to be set.

float getParameterFloat ( const char * name ) const#

Returns the current value of the specified float parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • const char * name - Name of the float parameter.

Return value

Value of the float parameter.

void setParameterDouble ( const char * name, double v ) #

Sets a new value for the specified double parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • const char * name - Name of the double parameter.
  • double v - New value to be set.

double getParameterDouble ( const char * name ) const#

Returns the current value of the specified double parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • const char * name - Name of the double parameter.

Return value

Value of the double parameter.

void setParameterString ( const char * name, const char * v ) #

Sets a new value for the specified string parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • const char * name - Name of the string parameter.
  • const char * v - New value to be set.

const char * getParameterString ( const char * name ) const#

Returns the current value of the specified string parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • const char * name - Name of the string parameter.

Return value

Value of the string parameter.

bool addPreProcessor ( const char * type_name ) #

Adds an import pre-processor with a given type name. There are built-in pre-processors that can also be added to custom importers.

Arguments

  • const char * type_name - Pre-processor type name.

Return value

true if the specified import pre-processor is successfully added; otherwise, false.

void removePreProcessor ( const char * type_name ) #

Removes an import pre-processor with a given type name. There are built-in pre-processors that can also be added to custom importers.

Arguments

  • const char * type_name - Pre-processor type name.

bool hasPreProcessor ( const char * type_name ) #

Returns a value indicating if an import pre-processor with a given type name is used by the importer. There are built-in pre-processors that can also be added to custom importers.

Arguments

  • const char * type_name - Pre-processor type name.

Return value

true if an import pre-processor with a given type name is used by the importer; otherwise, false.

bool addPostProcessor ( const char * type_name ) #

Adds an import post-processor with a given type name. There are built-in post-processors that can also be added to custom importers.

Arguments

  • const char * type_name - Post-processor type name to check.

void removePostProcessor ( const char * type_name ) #

Removes an import post-processor with a given type name. There are built-in post-processors that can also be added to custom importers.

Arguments

  • const char * type_name - Post-processor type name.

bool hasPostProcessor ( const char * type_name ) #

Returns a value indicating if an import post-processor with a given type name is used by the importer. There are built-in post-processors that can also be added to custom importers.

Arguments

  • const char * type_name - Post-processor type name to check.

Return value

true if an import post-processor with a given type name is used by the importer; otherwise, false.

Ptr<ImportScene> getScene ( ) const#

Returns the imported scene.

Return value

Instance of the ImportScene class.

bool init ( const char * filepath, int flags = ~0 ) #

Initializes the importer for the specified file using the given flags. Import flags specify which scene components are to be imported.

Arguments

  • const char * filepath - Path to a file to be imported.
  • int flags - Set of import flags. Any combination of IMPORT_* flags, or ~0 to set all of them.

Return value

true if the importer was initialized successfully; otherwise, 0.

bool import ( const char * output_path ) #

Imports the contents of the input file to the specified output path.

Arguments

  • const char * output_path - Output path.

Return value

true if the contents of the input file are successfully imported to the specified output path; otherwise, false.

const char * getSourceFilepath ( ) const#

Returns the path to the source file.

Return value

Source file path.

int getFlags ( ) const#

Returns the current set of import flags (IMPORT_*) resulting output file path for imported scene component(s). In case if a set of files were generated the path to resulting *.node file will be returned.

bool computeBoundBox ( const Ptr<ImportMesh> & import_mesh ) #

Computes a bound box for the specified mesh.

Arguments

  • const Ptr<ImportMesh> & import_mesh - Imported mesh for which a bound box is to be calculated.

Return value

true if a bound box for the specified mesh is successfully calculated; otherwise, false.

bool preprocess ( ) #

Starts execution of all added pre-processors.

Return value

true if the pre-processing is completed successfully.

Ptr<Node> convertNode ( const Ptr<ImportProcessor> & processor, const Ptr<ImportNode> & root_node ) #

Converts metadata stored in an instance of the ImportNode class to UNIGINE's node (node hierarchy).

Arguments

Return value

Resulting UNIGINE's node instance that stores the specified imported node (node hierarchy).

bool importTexture ( const Ptr<ImportProcessor> & processor, const Ptr<ImportTexture> & import_texture ) #

Imports the specified texture and uses the specified processor to process and save the generated texture to a corresponding file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing textures, when implementing a custom importer, you can override the onImportTexture() method.

Arguments

Return value

true if the specified texture was successfully imported; otherwise, false.

bool importMaterial ( const Ptr<ImportProcessor> & processor, const Ptr<Material> & material, const Ptr<ImportMaterial> & import_material ) #

Imports the specified material and uses the specified processor to process and save the generated material to a corresponding file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing materials, when implementing a custom importer, you can override the onImportMaterial() method.

Arguments

Return value

true if the specified material was successfully imported; otherwise, false.

bool importMesh ( const Ptr<ImportProcessor> & processor, const Ptr<Mesh> & mesh, const Ptr<ImportMesh> & import_mesh ) #

Imports the specified mesh and uses the specified processor to process and save the generated mesh to a corresponding file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing meshes, when implementing a custom importer, you can override the onImportMesh() method.

Arguments

Return value

true if the specified mesh was successfully imported; otherwise, false.

Ptr<Light> importLight ( const Ptr<ImportProcessor> & processor, const Ptr<ImportLight> & import_light ) #

Imports the specified light and uses the specified processor to process and save the generated light to a corresponding *.node file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing lights, when implementing a custom importer, you can override the onImportLight() method.

Arguments

Return value

UNIGINE's light instance that stores the specified imported light source.

Ptr<Player> importCamera ( const Ptr<ImportProcessor> & processor, const Ptr<ImportCamera> & import_camera ) #

Imports the specified camera and uses the specified processor to process and save the generated player to a corresponding *.node file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing cameras, when implementing a custom importer, you can override the onImportCamera() method.

Arguments

Return value

UNIGINE's player instance that stores the specified imported camera.

bool importAnimation ( const Ptr<ImportProcessor> & processor, const Ptr<MeshAnimation> & animation, const Ptr<ImportAnimation> & import_animation ) #

Imports the specified mesh animation and uses the specified processor to process and save the generated mesh animation to a corresponding file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing mesh animations, when implementing a custom importer, you can override the onImportAnimation() method.

Arguments

Return value

true if the specified animation was successfully imported; otherwise, false.

bool importAnimation ( const Ptr<ImportProcessor> & processor, const Ptr<MeshAnimation> & animation, const Ptr<ImportMesh> & import_mesh, const Ptr<ImportAnimation> & import_animation ) #

Imports the specified mesh animation and uses the specified processor to process and save the generated mesh animation to a corresponding file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing mesh animations, when implementing a custom importer, you can override the onImportAnimation() method.

Arguments

Return value

true if the specified animation was successfully imported; otherwise, false.

bool checkSupportedAnimation ( const Ptr<ImportMesh> & import_mesh, const Ptr<ImportAnimation> & import_animation ) const#

Returns a value indicating if importing of the specified animation of the specified imported mesh is supported.

Arguments

Return value

true if importing of the specified animation of the specified imported mesh is supported; otherwise, false.

Ptr<Node> importNode ( const Ptr<ImportProcessor> & processor, const Ptr<ImportNode> & import_node ) #

Imports the specified node and uses the specified processor to process and save the generated node to a corresponding file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing nodes, when implementing a custom importer, you can override the onImportNode() method.

Arguments

Return value

Target UNIGINE's node instance to store the specified imported node.

bool importNodeChild ( const Ptr<ImportProcessor> & processor, const Ptr<Node> & node_parent, const Ptr<ImportNode> & import_node_parent, const Ptr<Node> & node_child, const Ptr<ImportNode> & import_node_child ) #

Imports the specified parent node with the specified child node and uses the specified processor to process and save generated nodes to a corresponding file in the output directory specified in the import() method.
Notice
To customize actions to be performed on importing nodes, when implementing a custom importer, you can override the onImportNodeChild() method.

Arguments

Return value

true if the specified parent node along with the specified child node were successfully imported; otherwise, false.

bool postprocess ( ) #

Starts execution of all added post-processors. Post-processors can be used to manage files generated in the process of import.

Return value

true if the post-processing is completed successfully.

bool getBasis ( Importer::Axis up_axis, Importer::Axis front_axis, Math::dmat4 & ret ) #

Returns the transformation matrix for the basis specified by axes.

Arguments

  • Importer::Axis up_axis - Up axis of the basis.
  • Importer::Axis front_axis - Front axis of the basis.
  • Math::dmat4 & ret - Transformation matrix for the basis specified by axes.

Return value

true the transformation matrix for the basis was successfully calculated; otherwise, false.

bool onComputeBoundBox ( const Ptr<ImportMesh> & import_mesh ) #

Extendable method for custom bound box computation.

Arguments

  • const Ptr<ImportMesh> & import_mesh - Imported mesh for which a bound box is to be calculated.

Return value

true if a bound box for the specified mesh was successfully calculated; otherwise, false.

bool onInit ( const Ptr<ImportScene> & import_scene, const char * filepath ) #

Builds and initializes the imported scene based on the data contained in the specified input file.

Arguments

  • const Ptr<ImportScene> & import_scene - Imported scene (built from the data contained in the specified input file).
  • const char * filepath - Path to an input file to be imported.

Return value

true if the scene is successfully initialized using the data from the specified input file; otherwise, false.

bool onImport ( const char * output_path ) #

Import event handler function. This function is called each time when the import() function is called. You can specify your custom actions to be performed on scene import.
Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	bool onImport(const char *output_path) override;

/*...*/

};

/*...*/

bool MyCustomImporter::onImport(const char *output_path)
{
	bool result = false;

	// your custom actions

	return result;
}

Arguments

  • const char * output_path - Output path to be used to store generated file(s) with imported data.

Return value

true if import operation for the specified output path was successful; otherwise, false.

bool onImportTexture ( const Ptr<ImportProcessor> & processor, const Ptr<ImportTexture> & import_texture ) #

Texture import event handler function. This function is called each time when the importTexture() function is called. You can specify your custom actions to be performed on texture import.
Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	bool onImportTexture(const ImportProcessorPtr &processor, const ImportTexturePtr &import_texture) override;

/*...*/

};

/*...*/

bool MyCustomImporter::onImportTexture(const ImportProcessorPtr &processor, const ImportTexturePtr &import_texture)
{
	bool result = false;
	
	// your custom actions
	
	return result;
}

Arguments

Return value

true if the specified texture was successfully imported; otherwise, false.

bool onImportMaterial ( const Ptr<ImportProcessor> & processor, const Ptr<Material> & material, const Ptr<ImportMaterial> & import_material ) #

Material import event handler function. This function is called each time when the importMaterial() function is called. You can specify your custom actions to be performed on material import.
Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	bool onImportMaterial(const ImportProcessorPtr &processor, const Unigine::MaterialPtr &material, const ImportMaterialPtr &import_material) override;

/*...*/

};

/*...*/

bool MyCustomImporter::onImportMaterial(const ImportProcessorPtr &processor, const Unigine::MaterialPtr &material, const ImportMaterialPtr &import_material)
{
	bool result = false;
	
	// your custom actions
	
	return result;
}

Arguments

Return value

true if the specified material was successfully imported; otherwise, false.

Ptr<Light> onImportLight ( const Ptr<ImportProcessor> & processor, const Ptr<ImportLight> & import_light ) #

Light import event handler function. This function is called each time when the importLight() function is called. You can specify your custom actions to be performed on light import.
Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	Unigine::LightPtr onImportLight(const ImportProcessorPtr &processor, const ImportLightPtr &import_light) override;

/*...*/

};

/*...*/

Unigine::LightPtr MyCustomImporter::onImportLight(const ImportProcessorPtr &processor, const ImportLightPtr &import_light)
{
	bool result = false;

	// your custom actions

	return result;
}

Arguments

Return value

UNIGINE's light instance that stores the specified imported light.

Ptr<Player> onImportCamera ( const Ptr<ImportProcessor> & processor, const Ptr<ImportCamera> & import_camera ) #

Camera import event handler function. This function is called each time when the importCamera() function is called. You can specify your custom actions to be performed on camera import.
Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	Unigine::PlayerPtr onImportCamera(const ImportProcessorPtr &processor, const ImportCameraPtr &import_camera) override;

/*...*/

};

/*...*/

Unigine::PlayerPtr MyCustomImporter::onImportCamera(const ImportProcessorPtr &processor, const ImportCameraPtr &import_camera)
{
	bool result = false;

	// your custom actions

	return result;
}

Arguments

Return value

UNIGINE's player instance that stores the specified imported camera.

bool onImportMesh ( const Ptr<ImportProcessor> & processor, const Ptr<Mesh> & mesh, const Ptr<ImportMesh> & import_mesh ) #

Mesh import event handler function. This function is called each time when the importMesh() function is called. You can specify your custom actions to be performed on mesh import.
Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	bool onImportMesh(const ImportProcessorPtr &processor, const Unigine::MeshPtr &mesh, const ImportMeshPtr &import_mesh) override;

/*...*/

};

/*...*/

bool MyCustomImporter::onImportMesh(const ImportProcessorPtr &, const Unigine::MeshPtr &mesh, const ImportMeshPtr &import_mesh)
{
	bool result = false;
	
	// your custom actions
	
	return result;
}

Arguments

Return value

true if the specified mesh was successfully imported; otherwise, false.

Ptr<Node> onImportNode ( const Ptr<ImportProcessor> & processor, const Ptr<ImportNode> & import_node ) #

Node import event handler function. This function is called each time when the importNode() function is called. You can specify your custom actions to be performed on node import.
Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	Unigine::NodePtr onImportNode(const ImportProcessorPtr &processor, const ImportNodePtr &import_node) override;

/*...*/

};

/*...*/

Unigine::NodePtr MyCustomImporter::onImportNode(const ImportProcessorPtr &processor, const ImportNodePtr &import_node)
{
	bool result = false;
	
	// your custom actions
	
	return result;
}

Arguments

Return value

UNIGINE's node instance that stores the specified imported node.

bool onImportNodeChild ( const Ptr<ImportProcessor> & processor, const Ptr<Node> & node_parent, const Ptr<ImportNode> & import_node_parent, const Ptr<Node> & node_child, const Ptr<ImportNode> & import_node_child ) #

Node import event handler function. This function is called each time when the importNodeChild() function is called. You can specify your custom actions to be performed on importing and processing node hierarchies (e.g. assigning properties to node children).
Source code (C++)
class MyCustomImporter : public Unigine::Importer
{
public:
	MyCustomImporter();
	virtual ~MyCustomImporter();

/*...*/

// overrides of event functions
protected:
	bool onImportNodeChild(const ImportProcessorPtr &processor, const Unigine::NodePtr &node_parent, const ImportNodePtr &import_node_parent, const Unigine::NodePtr &node_child, const ImportNodePtr &import_node_child) override;

/*...*/

};

/*...*/

bool MyCustomImporter::onImportNodeChild(const ImportProcessorPtr &processor, const Unigine::NodePtr &node_parent, const ImportNodePtr &import_node_parent, const Unigine::NodePtr &node_child, const ImportNodePtr &import_node_child)
{
	bool result = false;
	
	// your custom actions
	
	return result;
}

Arguments

Return value

true if the specified parent node and its child node animation were successfully imported; otherwise, false.

bool onImportAnimation ( const Ptr<ImportProcessor> & processor, const Ptr<MeshAnimation> & animation, const Ptr<ImportAnimation> & import_animation ) #

Animation import event handler function. This function is called each time when the importAnimation() function is called. You can specify your custom actions to be performed on animation import.

Arguments

Return value

true if the specified mesh animation was successfully imported; otherwise, false.

bool onImportAnimation ( const Ptr<ImportProcessor> & processor, const Ptr<MeshAnimation> & animation, const Ptr<ImportMesh> & import_mesh, const Ptr<ImportAnimation> & import_animation ) #

Animation import event handler function. This function is called each time when the importAnimation() function is called. You can specify your custom actions to be performed on animation import.

Arguments

Return value

true if the specified mesh animation was successfully imported; otherwise, false.

bool onCheckSupportedAnimation ( const Ptr<ImportMesh> & import_mesh, const Ptr<ImportAnimation> & import_animation ) const#

Animation import support check event handler function. This function is called each time when the checkSupportedAnimation() function is called. You can specify your custom actions to be performed on animation import.

Arguments

Return value

true if importing of the specified mesh animation is supported; otherwise, false.
Last update: 2024-08-16
Build: ()