This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
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
Учебные материалы

Unigine.ImportScene Class

This class is used to manage scene graphs to be imported. A scene graph is a tree of nodes. When it is first created, the node is "empty" (i.e: it is an object without any graphical representation that only contains the position information). In this state, it is used only to represent parents in the node tree structure. Normally other objects (cameras, lights, meshes,...) are added to nodes as attributes to specialize it. Node attribute is an object in itself and is connected to a node. The same node attribute can be shared among multiple nodes.

A scene can include the following components:

ImportScene Class

Members


ImportScene ( ) #

Constructor. Creates an empty import scene instance.

int GetNumNodes ( ) #

Returns the total number of nodes in the imported scene.

Return value

Number of nodes in the imported scene.

ImportNode GetNode ( int i ) #

Returns a node contained in the imported scene by its index.

Arguments

Return value

Scene node with the specified index (ImportNode class instance if it exists).

ImportNode AddNode ( ImportNode parent ) #

Adds a new node as an attribute to the specified scene graph node and returns the corresponding ImportNode instance.

Arguments

  • ImportNode parent - Scene graph node to add a new node to.

Return value

New added ImportNode class instance.

bool RemoveNode ( ImportNode node ) #

Removes the specified scene graph node.

Arguments

Return value

true if the specified scene graph node was successfully removed from the scene; otherwise false.

int GetNumMeshes ( ) #

Returns the total number of meshes in the imported scene.

Return value

Number of meshes in the imported scene.

ImportMesh GetMesh ( int i ) #

Returns a mesh contained in the imported scene by its index.

Arguments

Return value

Mesh with the specified index (ImportMesh class instance if it exists).

ImportMesh AddMesh ( ImportNode node ) #

Adds a new mesh as an attribute to the specified imported node and returns the corresponding ImportMesh instance.

Arguments

  • ImportNode node - Scene graph node to add a new mesh to.

Return value

New added ImportMesh class instance.

void RemoveMesh ( ImportMesh mesh ) #

Removes the specified mesh from the list meshes of the imported scene.

Arguments

int GetNumLights ( ) #

Returns the total number of lights in the imported scene.

Return value

Number of lights in the imported scene.

ImportLight GetLight ( int i ) #

Returns a light source contained in the imported scene by its index.

Arguments

Return value

Light source with the specified index (ImportLight class instance if it exists).

ImportLight AddLight ( ImportNode node ) #

Adds a new light as an attribute to the specified imported node and returns the corresponding ImportLight instance.

Arguments

  • ImportNode node - Scene graph node to add a light source camera to.

Return value

New added ImportLight class instance.

void RemoveLight ( ImportLight light ) #

Removes the specified light source from the list of light sources of the imported scene.

Arguments

int GetNumCameras ( ) #

Returns the total number of camera in the imported scene.

Return value

Number of cameras in the imported scene.

ImportCamera GetCamera ( int i ) #

Returns a camera contained in the imported scene by its index.

Arguments

Return value

Camera with the specified index (ImportCamera class instance if it exists).

ImportCamera AddCamera ( ImportNode node ) #

Adds a new camera as an attribute to the specified imported node and returns the corresponding ImportCamera instance.

Arguments

  • ImportNode node - Scene graph node to add a new camera to.

Return value

New added ImportCamera class instance.

void RemoveCamera ( ImportCamera camera ) #

Removes the specified camera from the scene.

Arguments

int GetNumAnimations ( ) #

Returns the total number of animations in the imported scene.

Return value

Number of animations in the imported scene.

ImportAnimation GetAnimation ( int i ) #

Returns an animation contained in the imported scene by its index.

Arguments

Return value

Animation with the specified index (ImportAnimation class instance if it exists).

ImportAnimation AddAnimation ( ) #

Adds a given animation to the scene and returns an instance of the added animation.

Return value

New added ImportAnimation class instance.

void RemoveAnimation ( ImportAnimation animation ) #

Removes the specified animation from the scene.

Arguments

int GetNumMaterials ( ) #

Returns the total number of materials in the imported scene.

Return value

Number of materials in the imported scene.

ImportMaterial GetMaterial ( int i ) #

Returns a material contained in the imported scene by its index.

Arguments

Return value

Material with the specified index (ImportMaterial class instance if it exists).

ImportMaterial AddMaterial ( ) #

Adds a given material to the scene and returns an instance of the added material.

Return value

New added ImportMaterial class instance.

ImportMaterial GetMaterial ( string name ) #

Returns a material contained in the imported scene by its name.

Arguments

  • string name - Material name.

Return value

Material with the specified name (ImportMaterial class instance if it exists).

void ReplaceMaterial ( ImportMaterial old_material, ImportMaterial new_material ) #

Replaces the specified material contained in the imported scene with another one.

Arguments

void RemoveMaterial ( ImportMaterial material ) #

Removes the specified material from the scene.

Arguments

int GetNumTextures ( ) #

Returns the total number of textures in the imported scene.

Return value

Number of textures in the imported scene.

ImportTexture GetTexture ( int i ) #

Returns a texture contained in the imported scene by its index.

Arguments

Return value

Texture with the specified index (ImportTexture class instance if it exists).

ImportTexture GetTexture ( string filepath ) #

Returns a texture contained in the imported scene by its file path.

Arguments

  • string filepath - Texture file path.

Return value

Texture with the specified file path (ImportTexture class instance if it exists).

ImportTexture FindTexture ( string filepath ) #

Returns a texture contained in the imported scene by its file path.

Arguments

  • string filepath - Texture file path.

Return value

Texture with the specified file path (ImportTexture class instance if it exists).
Last update: 13.12.2024
Build: ()