cinetec_tech Posted November 18, 2014 Share Posted November 18, 2014 Hi, When I add lines into canvas, there are two ways to setup the position of the points. First, set local coordinate to line point through 'canvas.addLinePoint()', then set transform to canvas through 'canvas.addTransform()'; Second, calculate screen position=transform*local coordinate, then set screen position to line point through 'canvas.addLinePoint()'. The first way, I cannot get intersection with lines through 'canvas.getLineIntersection()'. The second way, it works. There are two examples in attach files. 'canvas_03' shows the first way. 'canvas_04' shows the second way. canvas_03.cpp canvas_03.world canvas_04.cpp canvas_04.world Link to comment
cinetec_tech Posted November 19, 2014 Author Share Posted November 19, 2014 a little changes in canvas_04.cpp canvas_04.cpp Link to comment
silent Posted November 19, 2014 Share Posted November 19, 2014 Hi, I've passed this information to the developers. I will answer you as soon as I will get any feedback. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
silent Posted November 19, 2014 Share Posted November 19, 2014 Hi, Just got response from the devs. Perspective projections doesn't work with intersections. The only way of getting correct intersction results is to pass coordinates like you did it in canvas_04 sample. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
frustum Posted December 4, 2014 Share Posted December 4, 2014 Canvas will support intersections with perspective transformatated elements next update. Link to comment
Recommended Posts