On 16 November 2016 at 13:21, Uma Devi Selvaraj <umaselvam1...@gmail.com> wrote: > I need to calculate area , perimeter & volume of a selected part or area > in 3d model. For example after rendering 3d model, if I select some > area(cloased area) , say point1 point2 point3. Point1 connected to point2 > point2 to point3, point3 connected to point1. Is it possible to do it with > the help of OSG.?
The OSG has basic vector maths code that can help with the low level calculations but there no utility that provides the functionality you are after - it's very niche application specific task you are after not appropriate for a general purpose scene graph. You'll need to work out how to build each of the components necessary yourself, it's very much as task in the domain of your application. I'm afraid this is not an trivial task, it's not something I'd expect a developer new to scene graphs and vector maths to try and tackle so you may have a steep learning curve ahead if you want to tackle it yourself. Much of this learning isn't OSG specific, the OSG is only relevant to storage of data, computation of what parts of the scene graph are relevant and the maths you want to use will all be down to you and tailored to your applications needs. > And how can I get longitude,latitude and altitude for the points(say > point1).? Is there any example for this.? So that it can be helpful for me. The way you typically do this type of task is to transform local vertices of geometries into world coordinates which is typically. ECEF (Earth Center Earth Fixed) for whole earth databases, then use the osg::ElipsoidModel to compute the world coords into lats and longs. I don't recall any specific example code that does this. the headers to EllispodModel has all that you need at the low level of the conversion. > Do I need to build any other OSG application for this task.? Where does the > longitude,latitude and altitude informations are stored in 3d models > (.3ds,.osg,.osgt)? Lat, long and altitude are not generally stored in subgraphs of a scene graph, instead the subgraphs have their own local coordinate frames or may be stored in world coodinates. The only place where lat,longs and altitude come in are implicitly via the EllipsoidModel attached to a CoordinateSystemNode that can be used to decorate a scene graph. Typically only whole earth models will have CoordinateSystemNode. You always have to compute the lat, long and altitude for individual points on demand as they aren't stored, only the local/word coordinates are stored in the scene graph. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org