Hi Sanat,

On 29/10/10 8:28 , Sanat Talmaki wrote:
> I have the data as a shapefile (.shp) and need to create the 3D model from 
> that. I
> realize that osg can load shp files so is it a good option to modify the 
> plugin dll
> that loads shp files ? So that when it comes across a polyline feature, it 
> creates a
> cylinder around it and then loads it.

Modifying plugins to implement application-specific behaviour is not a good 
idea.  I
always try to say as general as possible, eg. in your case to be able to load 
data from
(best case) all supported file formats.

I don't know shapefiles but I presume what you're after is stored as LINES or 
LINE_STRIPs.
 As roughtly outlined before I'd create a NodeVisitor that checks all Geodes to 
see if
they have any LINES or LINE_STRIP geometry in them and if so extract the 
individual lines
from that.  This can then be used as input for the cylinder generation.

> Also, I tried loading a .shp in a trial program and using visual studio 
> debugging step
> through, I was not able to step through the functions that are called in the 
> dll (i
> took a look at the dll source code)

You might need to tell VS where to find the source for the plugin or the pdb 
file.  Sorry,
I'm no VS expert :-|

Cheers,
/ulrich
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to