This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
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.

ColladaImport Class

A class for the Collada import plugin, which allows importing a scene from a DAE file into Unigine engine.

int COLLADA_IMPORT_AXIS_X

Description

X-coordinate position.

int COLLADA_IMPORT_AXIS_Y

Description

Y-coordinate position.

int COLLADA_IMPORT_AXIS_Z

Description

Z-coordinate position.

int COLLADA_IMPORT_CAMERA_ORTHOGRAPHIC

Description

Orthogonal camera.

int COLLADA_IMPORT_CAMERA_PERSPECTIVE

Description

Perspective camera.

int COLLADA_IMPORT_EFFECT_BLINN

Description

Blinn-Phong shading.

int COLLADA_IMPORT_EFFECT_CONSTANT

Description

Constant shading.

int COLLADA_IMPORT_EFFECT_LAMBERT

Description

Lambertian shading.

int COLLADA_IMPORT_EFFECT_PHONG

Description

Phong shading.

int COLLADA_IMPORT_LIGHT_AMBIENT

Description

Ambient light.

int COLLADA_IMPORT_LIGHT_DIRECTIONAL

Description

Directional light.

int COLLADA_IMPORT_LIGHT_POINT

Description

Point light.

int COLLADA_IMPORT_LIGHT_SPOT

Description

Spot-specific (projection) light.

ColladaImport Class

Members


ColladaImport ()

Constructor. Creates an empty instance.

void clear ()

Clears all the data associated with the class.

string getAuthor ()

Returns the string with the author's name.

Return value

Author's name.

string getCameraID (int num)

Returns the string with the camera identifier.

Arguments

  • int num - Camera ID number.

Return value

Camera identifier.

string getCameraName (int num)

Returns the string with the camera name.

Arguments

  • int num - Camera ID number.

Return value

Camera name.

int getCameraType (int num)

Returns the camera type.

Arguments

  • int num - Camera ID number.

Return value

Type of the camera.

float getCameraXMagFov (int num)

Returns the horizontal magnification or FOV value for specified orthogonal camera.

Arguments

  • int num - Camera ID number.

Return value

Horizontal magnification or FOV value.

float getCameraYMagFov (int num)

Returns the vertical magnification or FOV value for specified orthogonal camera.

Arguments

  • int num - Camera ID number.

Return value

Vertical magnification or FOV value.

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 getComments ()

Returns the string with the user comments.

Return value

User comments.

vec3 getLightColor (int num)

Returns the light color.

Arguments

  • int num - Light ID number.

Return value

Color model of three values.

float getLightConstantAttenuation (int num)

Returns the constant light attenuation value for point and spot lights.

Arguments

  • int num - Light ID number.

Return value

Constant light attenuation value.

float getLightFalloffAngle (int num)

Returns the light falloff angle value for spot-specific lights.

Arguments

  • int num - Light ID number.

Return value

Light falloff angle value.

float getLightFalloffExponent (int num)

Returns the light falloff exponent value for spot-specific lights.

Arguments

  • int num - Light ID number.

Return value

Light falloff exponent.

string getLightID (int num)

Returns the string with the light identifier.

Arguments

  • int num - Light ID number.

Return value

Light identifier.

float getLightLinearAttenuation (int num)

Returns the linear light attenuation value for point and spot lights.

Arguments

  • int num - Light ID number.

Return value

Linear light attenuation value.

string getLightName (int num)

Returns the string with the light name.

Arguments

  • int num - Light ID number.

Return value

Light name.

float getLightQuadraticAttenuation (int num)

Returns the quadratic light attenuation value for point and spot lights.

Arguments

  • int num - Light ID number.

Return value

Quadratic light attenuation value.

int getLightType (int num)

Returns the type of the light.

Arguments

  • int num - Light ID number.

Return value

Light type.

string getMaterialID (int num)

Returns the string with the material identifier.

Arguments

  • int num - Material ID number.

Return value

Material identifier.

string getMaterialName (int num)

Returns the string with the material name.

Arguments

  • int num - Material ID number.

Return value

Material name.

string getMaterialParameterImage (int num, int parameter)

Returns a string with the material parameter image directory.

Arguments

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

Return value

Parameter image.

string getMaterialParameterName (int num, int parameter)

Returns a string with the material parameter name.

Arguments

  • int num - Material ID number.
  • int parameter - Parameter ID number.

Return value

Parameter name.

vec4 getMaterialParameterValue (int num, int parameter)

Returns the value of the material parameter.

Arguments

  • int num - Material ID number.
  • int parameter - Parameter ID number.

Return value

Parameter value.

int getMaterialType (int num)

Returns the material type.

Arguments

  • int num - Material ID number.

Return value

Material type.

float getMaxTime ()

Returns the maximum animation time.

Return value

Maximum animation time.

string getMeshID (int num)

Returns the string with the mesh identifier.

Arguments

  • int num - Mesh ID number.

Return value

Mesh identifier.

string getMeshName (int num)

Returns the string with the mesh name.

Arguments

  • int num - Mesh ID number.

Return value

Mesh name.

string getMeshSurfaceName (int num, int surface)

Returns the string with the mesh surface name.

Arguments

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

Return value

Surface name.

float getMeter ()

Returns the value of the unit meter.

Return value

Unit meter value.

float getMinTime ()

Returns the minimum animation time.

Return value

Minimum animation time.

int getNodeCamera (int num)

Returns the camera node.

Arguments

  • int num - Node ID number.

Return value

Camera node.

int getNodeChild (int num, int child)

Returns the child node for the specified node.

Arguments

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

Return value

Child node.

int getNodeController (int num)

Returns the node controller.

Arguments

  • int num - Node ID number.

Return value

Node controller.

string getNodeID (int num)

Returns the string with the node identifier.

Arguments

  • int num - Node ID number.

Return value

Node identifier.

int getNodeJoint (int num)

Returns the node joint.

Arguments

  • int num - Node ID number.

Return value

Node joint.

int getNodeLight (int num)

Returns the node light type.

Arguments

  • int num - Node ID number.

Return value

Node light type.

int getNodeMaterial (int num, string name)

Returns the node material.

Arguments

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

Return value

Node material.

int getNodeMesh (int num)

Returns the node mesh.

Arguments

  • int num - Node ID number.

Return value

Node mesh.

string getNodeName (int num)

Returns the string with the name of the node.

Arguments

  • int num - Node ID number.

Return value

Node name.

int getNodeParent (int num)

Returns the parent of the specified node.

Arguments

  • int num - Node ID number.

Return value

Parent node.

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 getNumCameras ()

Returns the number of cameras.

Return value

Number of cameras.

int getNumLights ()

Returns the number of lights.

Return value

Number of lights.

int getNumMaterialParameters (int num)

Returns the number of material parameters.

Arguments

  • int num - Material ID number.

Return value

Number of parameters.

int getNumMaterials ()

Returns the number of materials.

Return value

Number of materials.

int getNumMeshSurfaces (int num)

Returns the number of mesh surfaces.

Arguments

  • int num - Mesh ID number.

Return value

Number of mesh surfaces.

int getNumMeshes ()

Returns the number of meshes.

Return value

Number of meshes.

int getNumNodeChilds (int num)

Returns the number of node children.

Arguments

  • int num - Node ID number.

Return value

Number of node children.

int getNumNodes ()

Returns the number of nodes.

Return value

Number of nodes.

string getTool ()

Returns the string with the authoring tool name.

Return value

Authoring tool name.

int getUpAxis ()

Returns the axis, that placed upwards.

Return value

Up axis.

int loadAnimation (string name)

Loads the DAE animation.

Arguments

  • string name - Animation name.

Return value

1 if the animation is successfully loaded, otherwise - 0.

int load (string name)

Loads the DAE file.

Arguments

  • string name - DAE file name.

Return value

1 if the file is successfully loaded, otherwise - 0.

int saveAnimation (int controller, string name, float scale, float from, float to, float fps)

Saves the animation into the specified file.

Arguments

  • int controller - Controller.
  • string name - Name of the file the animation will be saved in.
  • float scale - Animation scale.
  • float from - Starting value.
  • float to - Ending value.
  • float fps - FPS value.

Return value

1 if the file is successfully saved, otherwise - 0.

int saveMesh (int num, int controller, string name, float scale, int cache)

Saves a mesh into the specified file.

Arguments

  • int num - Mesh ID number.
  • int controller - Controller number.
  • string name - Name of the file the mesh will be saved in.
  • float scale - Scale value.
  • int cache - Cache value.

Return value

1 if the operation was successful, otherwise - 0.

void setTime (float time)

Sets an animation time.

Arguments

  • float time - Animation time.
Last update: 2017-07-03
Build: ()