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:
- ObjectIntersection/ObjectIntersectionNormal/ObjectIntersectionTexCoord
- WorldIntersection/WorldIntersectionNormal/WorldIntersectionTexCoord
- PhysicsIntersection/PhysicsIntersectionNormal
- GameIntersection Class
- PathRouteIntersection
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:
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
PhysicsIntersection intersection = new PhysicsIntersection(); engine.physics.getIntersection(vec3(0.0f,0.0f,2.0f),vec3(0.0f,0.0f,4.0f),0x01,intersection);
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: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)