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
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.

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.

Articles in This Section

Last update: 2017-07-03
Build: ()