This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Engine Library Migration

New classes in this section:

Updated Intersections

In UNIGINE 2.0, there are several classes that are used to manage intersections, namely:

Notice
Instances of these classes are deleted automatically when it is necessary.

A temporary instance of one of these classes should be constructed and passed into the getIntersection() method instead of a return array. For example:

  • In UNIGINE, the result of intersection is added to the return array:
    Source code (UnigineScript)
    int ret[0];
    engine.physics.getIntersection(vec3(0.0f,0.0f,2.0f),vec3(0.0f,0.0f,4.0f),0x01,ret);
  • In UNIGINE 2.0, the result of intersection is added to the given instance of the PhysicsIntersection class
    Source code (UnigineScript)
    PhysicsIntersection intersection = new PhysicsIntersection();
    engine.physics.getIntersection(vec3(0.0f,0.0f,2.0f),vec3(0.0f,0.0f,4.0f),0x01,intersection);

Notice
If you passing NULL instead of an intersection query, the object will perform the fast intersection algorithm without searching the closest intersection point.
Last update: 03.07.2017
Build: ()