Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
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
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes

Unigine::OpenFlightImport Class

A class for the OpenFlight import plugin, which provides an ability to load and convert assets of the FLT format into the native Unigine format.

OpenFlightImport Class

Members


int getCoordinateUnits()

Returns the unit coordinates type.

Return value

Unit coordinates.

int getDatabaseOrigin()

Returns the database origin type.

Return value

Database origin.

double getDeltaX()

Returns the Delta X value of the database.

Return value

Delta X value.

double getDeltaY()

Returns the Delta Y value of the database.

Return value

Delta Y value.

double getDeltaZ()

Returns the Delta Z value of the database.

Return value

Delta Z value.

int getEarthModel()

Returns the Earth model type.

Return value

Earth model.

string getEditDate()

Returns date and time of last revision.

Return value

Date and time of last revision.

int getEditRevision()

Returns the edit revision level.

Return value

Edit revision level.

int getFormatRevision()

Returns the format revision level.

Return value

Format revision level.

vec4 getLightAmbientColor(int num)

Returns the light ambient color.

Arguments

  • int num - Light ID number.

Return value

Light ambient color.

float getLightConstantAttenuation(int num)

Returns the constant light attenuation value.

Arguments

  • int num - Light ID number.

Return value

Constant light attenuation value.

vec4 getLightDiffuseColor(int num)

Returns the light diffuse color.

Arguments

  • int num - Light ID number.

Return value

Light diffuse color.

float getLightFalloffAngle(int num)

Returns the light falloff angle value for the light.

Arguments

  • int num - Light ID number.

Return value

Light falloff angle value.

float getLightFalloffExponent(int num)

Returns the light falloff exponent value for the light.

Arguments

  • int num - Light ID number.

Return value

Light falloff exponent.

float getLightLinearAttenuation(int num)

Returns the linear light attenuation value.

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.

vec4 getLightSpecularColor(int num)

Returns the light specular color.

Arguments

  • int num - Light ID number.

Return value

Light specular color.

int getLightType(int num)

Returns the type of the light.

Arguments

  • int num - Light ID number.

Return value

Light type.

double getLowerLatitude()

Returns the Lambert lower latitude.

Return value

Lower latitude.

double getMajorAxis()

Returns the Earth major axis.

Return value

Earth major axis.

int getMaterialAlpha(int num)

Returns the material Alpha value.

Arguments

  • int num - Material ID number.

Return value

Alpha value.

vec4 getMaterialColor(int num, int property)

Returns the material color value.

Arguments

Return value

Material color.

string getMaterialImage(int num, int property)

Returns a string with the material image directory.

Arguments

Return value

Material image.

string getMaterialName(int num)

Returns the string with the material name.

Arguments

  • int num - Material ID number.

Return value

Material name.

int getMaterialOffset(int num)

Returns the material offset value.

Arguments

  • int num - Material ID number.

Return value

Offset value.

float getMaterialValue(int num, int parameter)

Returns the value of the material.

Arguments

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

Return value

Material value.

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

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

Arguments

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

Return value

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

string getMeshName(int num)

Returns the string with the mesh name.

Arguments

  • int num - Mesh ID number.

Return value

Mesh name.

int getMeshSurfaceEnabled(int num, int surface)

Returns the value indicating if the mesh surface is enabled.

Arguments

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

Return value

1 if the surface is enabled, otherwise - 0.

int getMeshSurfaceMaterial(int num, int surface)

Returns the mesh surface material.

Arguments

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

Return value

Surface material.

float getMeshSurfaceMaxFadeDistance(int num, int surface)

Returns the mesh surface maximum fade distance.

Arguments

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

Return value

Mesh surface maximum fade distance.

float getMeshSurfaceMaxVisibleDistance(int num, int surface)

Returns the mesh surface maximum visible distance.

Arguments

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

Return value

Mesh surface maximum visible distance.

float getMeshSurfaceMinFadeDistance(int num, int surface)

Returns the mesh surface minimum fade distance.

Arguments

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

Return value

Mesh surface minimum fade distance.

float getMeshSurfaceMinVisibleDistance(int num, int surface)

Returns the mesh surface minimum visible distance.

Arguments

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

Return value

Mesh surface minimum visible distance.

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.

double getMinorAxis()

Returns the Earth minor axis.

Return value

Earth minor axis.

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 getNodeEnabled(int num)

Returns the value indicating if the node is enabled.

Arguments

  • int num - Node ID number.

Return value

1 if the node is enabled, otherwise - 0.

int getNodeLight(int num)

Returns the node light type.

Arguments

  • int num - Node ID number.

Return value

Node light type.

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.

int getNodePivot(int num)

Returns the node pivot point.

Arguments

  • int num - Node ID number.

Return value

Pivot point.

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.

double getNortheastLatitude()

Returns the Northeast corner latitude.

Return value

Northeast corner latitude.

double getNortheastLongitude()

Returns the Northeast corner longitude.

Return value

Northeast corner longitude.

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

Returns the number of pivots.

Return value

Number of pivots.

double getOriginLatitude()

Returns the origin latitude.

Return value

Origin latitude.

double getOriginLongitude()

Returns the origin longitude.

Return value

Origin longitude.

mat4 getPivotLocalTransform(int num)

Returns the local transformation matrix.

Arguments

  • int num - Pivot ID number.

Return value

Local transformation matrix.

mat4 getPivotPivotTransform(int num)

Returns the pivot transformation matrix.

Arguments

  • int num - Pivot ID number.

Return value

Pivot transformation matrix.

int getProjectionType()

Returns the projection type.

Return value

Projection type.

double getRadius()

Returns the radius - distance from database origin to the farthest corner.

Return value

Radius value.

double getSouthwestLatitude()

Returns the Southwest corner latitude.

Return value

Southwest corner latitude.

double getSouthwestLongitude()

Returns the Southwest corner longitude.

Return value

Southwest corner longitude.

double getSouthwestX()

Returns the Southwest database X-coordinate.

Return value

Southwest database X-coordinate.

double getSouthwestY()

Returns the Southwest database Y-coordinate.

Return value

Southwest database Y-coordinate.

double getUpperLatitude()

Returns the Lambert upper latitude.

Return value

Upper latitude.

int getUTMZone()

Returns the UTM zone (for UTM projections - negative value means Southern hemisphere).

Return value

UTM zone.

void clear()

Clears all the data associated with the class.

int import(int flags)

Imports the FLT scene.

Arguments

Return value

1 if the operation was successful, otherwise - 0.

int load(string name)

Loads the scene from the FLT file.

Arguments

  • string name - File name.

Return value

1 if the operation was successful, otherwise - 0.

OpenFlightImport()

Constructor. Creates an empty instance.

int OPEN_FLIGHT_IMPORT_LIGHT_INFINITE

Description

Infinite light.

int OPEN_FLIGHT_IMPORT_LIGHT_LOCAL

Description

Local light.

int OPEN_FLIGHT_IMPORT_LIGHT_SPOT

Description

Spot light.

int OPEN_FLIGHT_IMPORT_MERGE_GROUP

Description

Group flag.

int OPEN_FLIGHT_IMPORT_MERGE_LOD

Description

LOD flag.

int OPEN_FLIGHT_IMPORT_MERGE_OBJECT

Description

Objects flag.

int OPEN_FLIGHT_IMPORT_PARAMETER_ALPHA

Description

Alpha component.

int OPEN_FLIGHT_IMPORT_PARAMETER_AMBIENT

Description

Ambient component.

int OPEN_FLIGHT_IMPORT_PARAMETER_BUMPMAP

Description

Bump map component.

int OPEN_FLIGHT_IMPORT_PARAMETER_DETAIL

Description

Detail component.

int OPEN_FLIGHT_IMPORT_PARAMETER_DIFFUSE

Description

Diffuse component.

int OPEN_FLIGHT_IMPORT_PARAMETER_EMISSIVE

Description

Emission component.

int OPEN_FLIGHT_IMPORT_PARAMETER_NORMALMAP

Description

Normal map component.

int OPEN_FLIGHT_IMPORT_PARAMETER_REFLECTION

Description

Reflection component.

int OPEN_FLIGHT_IMPORT_PARAMETER_SHININESS

Description

Shininess component.

int OPEN_FLIGHT_IMPORT_PARAMETER_SPECULAR

Description

Specular component.

int OPEN_FLIGHT_MODEL_BESSEL

Description

Bessel Earth model.

int OPEN_FLIGHT_MODEL_CLARKE

Description

Clark 1866 Earth model.

int OPEN_FLIGHT_MODEL_NAD27

Description

NAD27 Earth model.

int OPEN_FLIGHT_MODEL_USER

Description

User Earth model.

int OPEN_FLIGHT_MODEL_WGS72

Description

WGS72 Earth model.

int OPEN_FLIGHT_MODEL_WGS84

Description

WGS84 Earth model.

int OPEN_FLIGHT_ORIGIN_CIV

Description

Database General Electric CIV/CV/PT2000 origin.

int OPEN_FLIGHT_ORIGIN_CTA5A6

Description

Database Evans and Sutherland CT5A/CT6 origin.

int OPEN_FLIGHT_ORIGIN_DIG12

Description

Database DIGI/DIGII origin.

int OPEN_FLIGHT_ORIGIN_GDF

Description

Database Evans and Sutherland GDF origin.

int OPEN_FLIGHT_ORIGIN_OPEN_FLIGHT

Description

Database OpenFlight origin.

int OPEN_FLIGHT_ORIGIN_PSP_DIG

Description

Database PSP DIG origin.

int OPEN_FLIGHT_PROJECTION_FLAT_EARTH

Description

Flat Earth projection type.

int OPEN_FLIGHT_PROJECTION_GEOCENTRIC

Description

Geocentric projection type.

int OPEN_FLIGHT_PROJECTION_GEODETIC

Description

Geodetic projection type.

int OPEN_FLIGHT_PROJECTION_LAMBERT

Description

Lambert projection type.

int OPEN_FLIGHT_PROJECTION_ROUND_EARTH

Description

Round Earth projection type.

int OPEN_FLIGHT_PROJECTION_TRAPEZOIDAL

Description

Trapezoidal projection type.

int OPEN_FLIGHT_PROJECTION_UTM

Description

UTM projection type.

int OPEN_FLIGHT_UNIT_FEET

Description

Feet vertex coordinate unit.

int OPEN_FLIGHT_UNIT_INCHES

Description

Inches vertex coordinate unit.

int OPEN_FLIGHT_UNIT_KILOMETERS

Description

Kilometers vertex coordinate unit.

int OPEN_FLIGHT_UNIT_METERS

Description

Meters vertex coordinate unit.

int OPEN_FLIGHT_UNIT_NAUTICAL_MILES

Description

Nautical miles vertex coordinate unit.
Last update: 2017-10-20