This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::AutodeskImport Class

A class for the Autodesk FBX import plugin, which allows adding content stored in the FBX format into Unigine engine.

Warning
The functions of the class will take effect only when UnigineEditor is loaded.

int AUTODESK_IMPORT_AXIS_NX

Description

Negative X-coordinate position.

int AUTODESK_IMPORT_AXIS_NY

Description

Negative Y-coordinate position.

int AUTODESK_IMPORT_AXIS_NZ

Description

Negative Z-coordinate position.

int AUTODESK_IMPORT_AXIS_PX

Description

Positive X-coordinate position.

int AUTODESK_IMPORT_AXIS_PY

Description

Positive Y-coordinate position.

int AUTODESK_IMPORT_AXIS_PZ

Description

Positive Z-coordinate position.

int AUTODESK_IMPORT_CAMERA_ORTHOGONAL

Description

Orthogonal camera.

int AUTODESK_IMPORT_CAMERA_PERSPECTIVE

Description

Perspective camera.

int AUTODESK_IMPORT_DECAY_CUBIC

Description

Cubic decay.

int AUTODESK_IMPORT_DECAY_LINEAR

Description

Linear decay.

int AUTODESK_IMPORT_DECAY_NONE

Description

Without a decay.

int AUTODESK_IMPORT_DECAY_QUADRATIC

Description

Quadratic decay.

int AUTODESK_IMPORT_LIGHT_AREA

Description

Area light.

int AUTODESK_IMPORT_LIGHT_DIRECTIONAL

Description

Directional light.

int AUTODESK_IMPORT_LIGHT_POINT

Description

Point light.

int AUTODESK_IMPORT_LIGHT_SPOT

Description

Projection light.

int AUTODESK_IMPORT_LIGHT_VOLUME

Description

Volume light.

int AUTODESK_IMPORT_MATERIAL_LAMBERT

Description

Lambertian shading.

int AUTODESK_IMPORT_MATERIAL_PHONG

Description

Phong shading.

int AUTODESK_IMPORT_ORIENTATION_LEFT

Description

Left-handed orientation.

int AUTODESK_IMPORT_ORIENTATION_RIGHT

Description

Right-handed orientation.

int AUTODESK_IMPORT_PARAMETER_AMBIENT

Description

Ambient parameter.

int AUTODESK_IMPORT_PARAMETER_BUMPMAP

Description

Bumpmap parameter.

int AUTODESK_IMPORT_PARAMETER_DIFFUSE

Description

Diffuse parameter.

int AUTODESK_IMPORT_PARAMETER_EMISSIVE

Description

Emission parameter.

int AUTODESK_IMPORT_PARAMETER_NORMALMAP

Description

Normal map parameter.

int AUTODESK_IMPORT_PARAMETER_REFLECTION

Description

Reflection parameter.

int AUTODESK_IMPORT_PARAMETER_SHININESS

Description

Shininess parameter.

int AUTODESK_IMPORT_PARAMETER_SPECULAR

Description

Specular parameter.

int AUTODESK_IMPORT_PARAMETER_TRANSPARENCY

Description

Transparency parameter.

AutodeskImport Class

Members


int getAnimation(int num, Unigine::Ptr<Unigine::Mesh> mesh, float scale, int animation, float fps)

Copies an animation of the FBX mesh into the given mesh.

Arguments

  • int num - Mesh ID number.
  • Unigine::Ptr<Unigine::Mesh> mesh - Mesh, into which the animation is copied.
  • float scale - The mesh scale.
  • int animation - Animation ID number.
  • float fps - The FPS value of the animation frame.

Return value

1 if the animation is added successfully; otherwise, 0.

float getAnimationMaxTime(int num)

Returns the maximum time value for the specified animation.

Arguments

  • int num - Animation ID number.

Return value

Maximum time value.

float getAnimationMinTime(int num)

Returns the minimum time value for the specified animation.

Arguments

  • int num - Animation ID number.

Return value

Minimum time value.

string getAnimationName(int num)

Returns the name of the specified animation.

Arguments

  • int num - Animation ID number.

Return value

Name of the animation.

void setAnimationTime(int num, float time)

Sets an animation time.

Arguments

  • int num - Animation ID number.
  • float time - Animation time.

string getAuthor()

Returns the string with the author's name.

Return value

Author name.

float getCameraFov(int num)

Returns the camera field of view value.

Arguments

  • int num - Camera ID number.

Return value

Camera FOV value.

int getCameraType(int num)

Returns the camera type.

Arguments

  • int num - Camera ID number.

Return value

Type of the camera.

float getCameraZFar(int num)

Returns the camera far clipping plane value.

Arguments

  • int num - Camera ID number.

Return value

Far clipping plane.

float getCameraZNear(int num)

Returns the camera near clipping plane value.

Arguments

  • int num - Camera ID number.

Return value

Near clipping plane.

string getComment()

Returns the string with the user comment.

Return value

User comment.

string getCreator()

Returns the string with the creator name.

Return value

Creator name.

int getFrontAxis()

Returns the axis, that placed towards the camera.

Return value

Front axis.

string getKeywords()

Returns the string with the keywords.

Return value

Keywords.

int getLightCastShadow(int num)

Returns the value indicating if the specified light casts shadows.

Arguments

  • int num - Light ID number.

Return value

1 if shadows are cast, otherwise - 0.

vec3 getLightColor(int num)

Returns the specified light color.

Arguments

  • int num - Light ID number.

Return value

Color model of three values.

int getLightDecay(int num)

Returns the decay type of the specified light.

Arguments

  • int num - Light ID number.

Return value

Type of the decay.

int getLightFarAttenuation(int num)

Returns the far attenuation value for the specified light.

Arguments

  • int num - Light ID number.

Return value

Far attenuation value.

float getLightFarAttenuationEnd(int num)

Returns the far attenuation end value for the specified light.

Arguments

  • int num - Light ID number.

Return value

Far attenuation end value.

float getLightFarAttenuationStart(int num)

Returns the far attenuation start value for the specified light.

Arguments

  • int num - Light ID number.

Return value

Far attenuation start value.

float getLightInnerAngle(int num)

Returns the light inner cone angle. Difference between the inner and outer angles defines a halo around the light.

Arguments

  • int num - Light ID number.

Return value

Inner angle of the light.

float getLightIntensity(int num)

Returns an intensity value for the light.

Arguments

  • int num - Light ID number.

Return value

Light intensity value.

int getLightNearAttenuation(int num)

Returns the near attenuation value for the specified light.

Arguments

  • int num - Light ID number.

Return value

Near attenuation value.

float getLightNearAttenuationEnd(int num)

Returns the near attenuation end value for the specified light.

Arguments

  • int num - Light ID number.

Return value

Near attenuation end value.

float getLightNearAttenuationStart(int num)

Returns the near attenuation start value for the specified light.

Arguments

  • int num - Light ID number.

Return value

Near attenuation start value.

float getLightOuterAngle(int num)

Returns the light outer cone angle. Difference between the inner and outer angles defines a halo around the light.

Arguments

  • int num - Light ID number.

Return value

Outer angle of the light.

string getLightTexture(int num)

Returns a path to the specified light texture.

Arguments

  • int num - Light ID number.

Return value

Light texture path.

int getLightType(int num)

Returns the type of the specified light.

Arguments

  • int num - Light ID number.

Return value

Type of the light.

int getLightVolumetric(int num)

Returns a value indicating if volumetric lights are enabled.

Arguments

  • int num - Light ID number.

Return value

1 if volumetric lights are enabled; otherwise, 0.

vec3 getMaterialColor(int num, int property)

Returns a color of the material.

Arguments

  • int num - Material ID number.
  • int property - Material property.

Return value

Color model of three values.

string getMaterialImage(int num, int property)

Returns to the specified material image.

Arguments

  • int num - Material ID number.
  • int property - Material property.

Return value

A path to the material image.

string getMaterialName(int num)

Returns a name of the specified material.

Arguments

  • int num - Material ID number.

Return value

Name of the material.

string getMaterialShading(int num)

Returns a shading type for a specified material.

Arguments

  • int num - Material ID number.

Return value

Shading type.

int getMaterialType(int num)

Returns a type of a specified material.

Arguments

  • int num - Material ID number.

Return value

A type of the material.

float getMaterialValue(int num, int property)

Returns a value of the material parameters.

Arguments

  • int num - Material ID number.
  • int property - Material property.

Return value

A material parameters value.

int getMesh(int num, Unigine::Ptr<Unigine::Mesh> mesh, float scale, int use_tangents)

Copies the FBX mesh into the specified one with the given scale.

Arguments

  • int num - Mesh ID number.
  • Unigine::Ptr<Unigine::Mesh> mesh - A mesh into which the given mesh is copied.
  • float scale - The mesh scale.
  • int use_tangents

Return value

1 if the mesh is copied successfully; otherwise, 0.

int getMeshCastShadow(int num)

Returns the value indicating if the specified mesh casts shadows.

Arguments

  • int num - Mesh ID number.

Return value

1 if shadows are cast, otherwise - 0.

string getMeshName(int num)

Returns a string with the mesh name.

Arguments

  • int num - Mesh ID number.

Return value

Name of the mesh.

int getMeshReceiveShadow(int num)

Returns the value indicating if the specified mesh receives shadows.

Arguments

  • int num - Mesh ID number.

Return value

1 if shadows are received, otherwise - 0.

string getMeshSurfaceName(int num, int surface)

Returns a string with the mesh surface name.

Arguments

  • int num - Mesh ID number.
  • int surface - Surface ID number.

Return value

Name of the surface.

float getMeter()

Returns the value of the unit meter.

Return value

Unit meter value.

int getNodeCamera(int num)

Returns the type of the camera, applied to the node.

Arguments

  • int num - Node ID number.

Return value

Camera type.

int getNodeChild(int num, int child)

Returns a given child of the node.

Arguments

  • int num - Node ID number.
  • int child - Node child ID number.

Return value

Child node.

int getNodeJoint(int num)

Returns the joint of the node.

Arguments

  • int num - Node ID number.

Return value

Node joint.

int getNodeLight(int num)

Returns the type of the light, applied to the node.

Arguments

  • int num - Node ID number.

Return value

Light type.

int getNodeMaterial(int num, string name)

Returns the type of the specified material.

Arguments

  • int num - Node ID number.
  • string name - Material name.

Return value

Type of the material.

int getNodeMesh(int num)

Returns the mesh of the node.

Arguments

  • int num - Node ID number.

Return value

Node mesh.

string getNodeName(int num)

Returns the name of the node.

Arguments

  • int num - Node ID number.

Return value

Name of the node.

int getNodeParent(int num)

Returns the parent node of the specified node.

Arguments

  • int num - Node ID number.

Return value

Parent node if the parent is found, otherwise - 0.

mat4 getNodeTransform(int num, float scale)

Returns a transformation matrix of the specified node.

Arguments

  • int num - Node ID number.
  • float scale - Transformation scale.

Return value

Transformation matrix.

int getNumAnimations()

Returns the number of animations.

Return value

Number of animations.

int getNumCameras()

Returns the number of cameras.

Return value

Number of cameras.

int getNumLights()

Returns the number of lights.

Return value

Number of lights.

int getNumMaterials()

Returns the number of materials.

Return value

Number of materials.

int getNumMeshes()

Returns the number of meshes.

Return value

Number of meshes.

int getNumMeshSurfaces(int num)

Returns the number of mesh surfaces.

Arguments

  • int num - Mesh ID number.

Return value

Number of mesh surfaces.

int getNumNodeChildren(int num)

Returns the number of node children.

Arguments

  • int num - Node ID number.

Return value

Number of node children.

int getNumNodeChilds(int num)

Returns the number of node children.
Warning
The function lang="cpp" is deprecated. It is provided to keep your code working until the next release. Please, replace it with getNumNodeChildren().

Arguments

  • int num - Node ID number.

Return value

Number of node children.

int getNumNodes()

Returns the number of nodes.

Return value

Number of nodes.

int getOrientation()

Returns the type of the orientation.

Return value

Orientation type.

string getRevision()

Returns a string with the revision information.

Return value

Revision info.

string getSubject()

Returns the string with a subject.

Return value

Subject string.

string getTitle()

Returns the string with a title.

Return value

Title string.

int getUpAxis()

Returns the axis, that placed upwards.

Return value

Up axis.

int getVersion()

Returns the version of the program.

Return value

Version of the program.

AutodeskImport()

Constructor. Creates an empty instance.

void clear()

Clears all the data associated with the class.

int load(string name)

Loads the FBX file.

Arguments

  • string name - File name.

Return value

1 if the operation was successful, otherwise - 0.

int loadAnimation(string name)

Loads the FBX animation file.

Arguments

  • string name - Animation file name.

Return value

1 if the operation was successful, otherwise - 0.
Last update: 2017-07-03
Build: ()