Hi Everton, Sorry I only see your post now. Unfortunately, despite spending many hours on this last year, I was never able to figure out how to use the TGLMultipolygon properly. I think my latest post above sums it up well so if anyone has an idea how to solve this, your help is welcome!
Hi, Thanks for trying to help. I let this problem rest for a while bu I'm back at it trying to find a solution. Regarding your last comment, I'm not trying to reinvent the wheel, just using some code that dates from way back, maybe even before GLScene came around. But I'll look into the GLVectorGeometry as you suggested, and update my code accordingly. Regarding the issue, I don't think the problem comes from the projection function. I tested it on a few polygons and it gives me what I expect. I...
Hi, Thanks for trying to help. I let this problem rest for a while bu I'm back at it trying to find a solution. Regarding your last comment, I'm not trying to reinvent the wheel, just using some code that dates from way back, maybe even before GLScene came around. But I'll look into the GLVectorGeometry as you suggested, and update my code accordingly. Regarding the issue, I don't think the problem comes from the projection function. I tested it on a few polygons and it gives me what I expect. I...
Hi, Thanks for trying to help. I let this problem rest for a while bu I'm back at it trying to find a solution. Regarding your last comment, I'm not trying to reinvent the wheel, just using some code that dates from way back, maybe even before GLScene came around. But I'll look into the GLVectorGeometry as you suggested, and update my code accordingly. Regarding the issue, I don't think the problem comes from the projection function. I tested it on a few polygons and it gives me what I expect. I...
Hi, I extracted the relevant code and made a sample application. Please see attached zip. Currently, the app uses our own library to represent and manipulate 2D and 3D objects. I might update to GLgeometry if I manage to display what I want using GLscene. The function I'm having trouble with is called "AddGLMultiPolygon". It transforms a standard 3D polygon (array of 3D points) into a TGLMultiPolygon. That is done by projecting the 3D polygon onto its own plate in order to build the contour. However,...
Hi, I extracted the relavent code and made a sample application. Please see attached zip. Currently, the app uses our own library to represent and manipulate 2D and 3D objects. I might update to GLgeometry if I manage to display what I want using GLscene. The function I'm having trouble with is called "AddGLMultiPolygon". It transforms a standard 3D polygon (array of 3D points) into a TGLMultiPolygon. That is done by projecting the 3D polygon onto its own plate in order to build the contour. However,...
Hi Jerome, Here's a extact from my code: First some types definition: a building is made of polygons, which are made of XYZ points. type T2Dpoint = record x: Extended; y: Extended; end; T3DPoint = array [0..2] of extended; // Point 0=x, 1=y, 2=z T3DVector = T3DPoint; T3DPolyPoint = array of T3DPoint; // Polygon T3DBuilding = array of T3DPolyPoint; // Building Then the global function which is called to daw a building: function DrawBuilding(bld: T3DBuilding); var i,j : Integer; poly3D : T3DPolyPoint;...
Hi Jerome, Here's a extact from my code: First some types definition: a building is made of polygons, which are made of XYZ points. type T2Dpoint = record x: Extended; y: Extended; end; T3DPoint = array [0..2] of extended; // Point 0=x, 1=y, 2=z T3DVector = T3DPoint; T3DPolyPoint = array of T3DPoint; // Polygon T3DBuilding = array of T3DPolyPoint; // Building Then the global function which is called to daw a building: function DrawBuilding(bld: T3DBuilding); var i,j : Integer; poly3D : T3DPolyPoint;...