Re: [osg-users] OSG and vrJuggler
Hi, I am trying to use OSG with vrJuggler in a cluster equally. If you find some informations or examples, tell me and if I find something, I will tell you. Why you want to use OSG with VRJuggler? Me, I have to make a project for my internship. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25645#25645 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and vrJuggler
Hi, Me, I have to develop an application on a workbench, it's the same as the CAVE except that there are only two screens. So I need only a cluster of 2 machines. I must also use VRPN for navigation in the scene using trackers. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25664#25664 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and vrJuggler
Hi, Thank you for your answer, I had seen the example osgNav but I don't know how to operate on a cluster. I can just use a configuration file or implement more things on this example to work on a cluster. Have you an idea? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25671#25671 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and vrJuggler
You mentioned VE Suite, what is VE Suite? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25682#25682 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [3rdparty] Digital elevation model visualization
Hi, I want to develop an application for the visualization of 3D digital terrain models, and browsing through these models. I found some plugins to add to openscenegraph (VirtualPlanetBuilder, osgEarth, Virtual Terrain Project, ...). What do you recommend? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27387#27387 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Digital elevation model visualization
Hi, Thank you for your answer, I'll follow your advice, I'll look at osgEarth and VPB. Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27420#27420 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Digital elevation model visualization
Hi, I also use VRJuggler to run my application in a virtual reality environment (for example CAVE). OsgEarth and VPB are compatible with VRJuggler? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27425#27425 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Digital elevation model visualization
Hi, Ok, Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27444#27444 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Digital elevation model visualization
Hi, I want to run "osgviewer openstreetmap.earth" with a proxy but my proxy require a user/password. What should I write in the xml file "openstreetmap.earth"? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27463#27463 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] color of terrain
Hi, Is it possible with osgdem in VirtualPlanetBuilder to generate the colors of terrain based on the elevation (eg red for the highest points)? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27527#27527 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] color of terrain
Hi, ok, I'll look at this post. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27535#27535 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Frame rate in OpenSceneGraph
Hi, I want to know if there is a limit in frame rate in OpenSceneGraph because when I run a simple application (ex : "osgviewer cow.osg"), the frame rate never exceeds 60 fps. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28063#28063 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Frame rate in OpenSceneGraph
Hi, Ok, Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28070#28070 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Adding DatabasePager to VRJuggler
Hi, I use VRJuggler and osg for rendering digital elevation models generated by VirtualPlanetBuilder but VRJuggler currently doesn't support DatabasePager. When I load my digital elevation model in VRJuggler, it only show the lowest level (L0_X0_Y0) of detail. I saw that several people had the same problem as me : http://forum.openscenegraph.org/viewtopic.php?t=2730&highlight= and http://forum.openscenegraph.org/viewtopic.php?t=4687&highlight= I tried to make a class supporting DatabasePager following the instructions of the following post: http://forum.openscenegraph.org/viewtopic.php?t=4687&highlight= but my application throws an exception and crashes. Is it someone could help me? I'm sure other people need that. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28192#28192 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] features of VirtualPlanetBuilder
Hi, I use VirtualPlanetBuilder for my internship project. I have to describe in my internship report the opportunities offered by VPB but I can't find documentation.Could you tell me if you found documentation or explained me the features of VPB, the data formats it supports, etc.? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28405#28405 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] features of VirtualPlanetBuilder
Hi, Indeed, I had seen this documentation but it does not explain in detail what can do VPB. I thought rather a documentation a bit like osgEarth. Otherwise, I was referring to input source files that may support VPB. I would have liked if for example we can show the latitude and longitude of a given point by clicking with the mouse, if we can use shapefiles... Does VPB offers roughly the same opportunities as osgEarth? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28411#28411 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Required File Formats for VPBMaster
Hello nerazzuri_4, I have the same problem as you, so I wanted to know if you succeeded and how you managed to convert files of elevation (.adf)? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29629#29629 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] options of VPB
Hi, I do not really understand what are the use and how work the following options : -e Extents of the model to generate -ge Geographic (Lat/Lon) Extents of the model to generate. -b Bounds (similar to extents) of the model to generate. Max/Min order is not important. -gb Geographic Bounds (similar to extents) of the model to generate. Max/Min order is not important. Could someone enlighten me? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29669#29669 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] rendering problem
Hi, Is it normal to have a rendering like this (enclose file) typing "osgdem.exe -d 104n04_0100_deme.dem -l 5 -o 104n04_0100_deme.osg"? When I add --geocentric, I don't have problem in rendering. Thank you! Cheers, Lucie[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29686#29686 Attachments: http://forum.openscenegraph.org//files/rendu_167.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] rendering problem
Hi, Thank you for your reply! No I have not tried without limitation because I think it will take considerable time, isn't it? Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29688#29688 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] rendering problem
Hi, On the other hand, I don't understand why I don't have the same problem when I add "--geocentric". Could you explain it? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29689#29689 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] rendering problem
Hi, Thanks for your reply Robert. I don't know if my dem is in degrees, I found it in this site : http://www.geobase.ca/geobase/en/index.html. I will try to put the coordinate system into meters. Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29692#29692 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] rendering problem
Hi, Thank you for the information! Indeed, the coord system of my dem is in degrees. gdal_info give this : Driver: USGSDEM/USGS Optional ASCII DEM (and CDED) Files: 104n04_0100_deme.dem Size is 1201, 1201 Coordinate System is: GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AXIS["Lat",NORTH], AXIS["Long",EAST], AUTHORITY["EPSG","4269"]] Origin = (-133.75010416660,59.25010416667) Pixel Size = (0.0002083,-0.0002083) Metadata: AREA_OR_POINT=Point Corner Coordinates: Upper Left (-133.7501042, 59.2501042) (133d45'0.37"W, 59d15'0.38"N) Lower Left (-133.7501042, 58.9998958) (133d45'0.37"W, 58d59'59.63"N) Upper Right (-133.4998958, 59.2501042) (133d29'59.62"W, 59d15'0.38"N) Lower Right (-133.4998958, 58.9998958) (133d29'59.62"W, 58d59'59.63"N) Center (-133.625, 59.125) (133d37'30.00"W, 59d 7'30.00"N) Band 1 Block=1201x1201 Type=Int16, ColorInterp=Undefined NoData Value=-32767 Unit Type: m I don't know what to write in my command line except --geocentric so that this works, I tried several things but it doesn't work. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29720#29720 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] .tif and .tfw
Hi, I have a file of elevation data DTED and an orthoimage .tif with a .tfw file. A .tfw file is used to georeference a .tif file. When I use "osgdem -d data.dt1 -l 3 -o data.osg", I get a terrain model without texture and when I use "osgdem -d data.dt1 -t data.tif -l 3 -o data.osg", the projection of the orthoimage isn't correct. Does anyone know how to use .tif with .tfw with VPB? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29792#29792 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Hi, I tried everything you told me but the projection does not work. When I run "gdal_info data.tif", I get : Driver: GTiff/GeoTIFF Files: data.tif Size is 18470, 8809 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (5.694386514419802,43.459004007623271) Pixel Size = (0.56757675771,-0.56757675771) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( 5.6943865, 43.4590040) ( 5d41'39.79"E, 43d27'32.41"N) Lower Left ( 5.6943865, 42.9590256) ( 5d41'39.79"E, 42d57'32.49"N) Upper Right ( 6.7427008, 43.4590040) ( 6d44'33.72"E, 43d27'32.41"N) Lower Right ( 6.7427008, 42.9590256) ( 6d44'33.72"E, 42d57'32.49"N) Center ( 6.2185437, 43.2090148) ( 6d13'6.76"E, 43d12'32.45"N) Band 1 Block=18470x1 Type=Byte, ColorInterp=Red Band 2 Block=18470x1 Type=Byte, ColorInterp=Green Band 3 Block=18470x1 Type=Byte, ColorInterp=Blue and when I run "gdal_info data.dt1", I get : Driver: DTED/DTED Elevation Raster Files: data.dt1 data.aux Size is 1201, 1201 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (4.9995834,44.0004166) Pixel Size = (0.0008333,-0.0008333) Metadata: DTED_VerticalAccuracy_UHL=0010 DTED_VerticalAccuracy_ACC=0010 DTED_SecurityCode_UHL=U DTED_SecurityCode_DSI=U DTED_UniqueRef_UHL= DTED_UniqueRef_DSI=000 DTED_DataEdition=01 DTED_MatchMergeVersion=A DTED_MaintenanceDate= DTED_MatchMergeDate= DTED_MaintenanceDescription=B124 DTED_Producer=FRDGACEL DTED_VerticalDatum=MSL DTED_HorizontalDatum=WGS84 DTED_DigitizingSystem=IGNAUTOMAT DTED_CompilationDate=8410 DTED_HorizontalAccuracy=0060 DTED_RelHorizontalAccuracy=NA DTED_RelVerticalAccuracy=NA AREA_OR_POINT=Point Corner Coordinates: Upper Left ( 4.9995833, 44.0004167) ( 4d59'58.50"E, 44d 0'1.50"N) Lower Left ( 4.9995833, 42.9995833) ( 4d59'58.50"E, 42d59'58.50"N) Upper Right ( 6.0004167, 44.0004167) ( 6d 0'1.50"E, 44d 0'1.50"N) Lower Right ( 6.0004167, 42.9995833) ( 6d 0'1.50"E, 42d59'58.50"N) Center ( 5.500, 43.500) ( 5d30'0.00"E, 43d30'0.00"N) Band 1 Block=1x1201 Type=Int16, ColorInterp=Undefined NoData Value=-32767 Unit Type: m Metadata: LAYER_TYPE=athematic Can you help me, please? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29817#29817 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Hi, I also tried with dem and orthoimage downloaded at: http://www.geobase.ca/geobase/en/index.html I get the same problem, the projection doesn't work. With "gdal_info data.dem", I get : Driver: USGSDEM/USGS Optional ASCII DEM (and CDED) Files: 013c07_0100_deme.dem Size is 1201, 1201 Coordinate System is: GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AXIS["Lat",NORTH], AXIS["Long",EAST], AUTHORITY["EPSG","4269"]] Origin = (-60.75010416667,52.50010416667) Pixel Size = (0.0002083,-0.0002083) Metadata: AREA_OR_POINT=Point Corner Coordinates: Upper Left ( -60.7501042, 52.5001042) ( 60d45'0.38"W, 52d30'0.38"N) Lower Left ( -60.7501042, 52.2498958) ( 60d45'0.38"W, 52d14'59.63"N) Upper Right ( -60.4998958, 52.5001042) ( 60d29'59.63"W, 52d30'0.38"N) Lower Right ( -60.4998958, 52.2498958) ( 60d29'59.63"W, 52d14'59.63"N) Center ( -60.625, 52.375) ( 60d37'30.00"W, 52d22'30.00"N) Band 1 Block=1201x1201 Type=Int16, ColorInterp=Undefined NoData Value=-32767 Unit Type: m and with "gdal_info data.tif", I get : Driver: GTiff/GeoTIFF Files: S4_06032_5215_20061018_m20_1_utm20.tif Size is 3826, 3622 Coordinate System is: PROJCS["unnamed", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-63], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",50], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26920"]] Origin = (630040.000,5828260.000) Pixel Size = (20.000,-20.000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 630040.000, 5828260.000) ( 61d 4'49.40"W, 52d35'19.68"N) Lower Left ( 630040.000, 5755820.000) ( 61d 6'29.89"W, 51d56'16.38"N) Upper Right ( 706560.000, 5828260.000) ( 59d57'8.07"W, 52d33'54.44"N) Lower Right ( 706560.000, 5755820.000) ( 59d59'47.44"W, 51d54'53.11"N) Center ( 668300.000, 5792040.000) ( 60d32'3.63"W, 52d15'10.72"N) Band 1 Block=3826x2 Type=Byte, ColorInterp=Gray I don't understand why it doesn't work. I tried with --geocentric and without. I'm sending you what I obtain with "osgdem --geocentric -d data.dem -t data.tif -l 3 -o data.osg" in attachment. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29838#29838 Attachments: http://forum.openscenegraph.org//files/terrain_328.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Hello Pierre, I send you in attachment what I get in my console with "OSG_NOTIFY_LEVEL = INFO" when I run "osgdem --geocentric -d data.dem -t data.tif -l 3 -o data.osg" and when I run "osgviewer data.osg". Otherwise, I use osg-2.8.2, VPB 0.9.10 and gdal 1.5. I will try to use Boston data. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29858#29858 Attachments: http://forum.openscenegraph.org//files/run_osgviewer_830.txt http://forum.openscenegraph.org//files/run_osgdem_171.txt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Hi, I tested the boston example but I'm not sure that the projection has worked well. I run "osgdem.exe --geocentric -d boston-dem-downtown-5m-utm19n-meters.tif -t boston-10m-utm19n-meters.tif -l 5 -o test2.osg". I send what I obtain in attachment. Can you tell me if it worked well? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29863#29863 Attachments: http://forum.openscenegraph.org//files/boston_184.jpg http://forum.openscenegraph.org//files/boston_171.rar ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Hi, In fact, now it seems to work, I had a problem in my data input. Otherwise, I have a model of terrain larger than my orthoimage, do you know how to cut the terrain model to obtain only the part with the orthoimage? Are there any options of VPB for this? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29953#29953 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] convert .osg in another format
Hi, Is it possible to convert a terrain database .osg build with VirtualPlanetBuilder in another format like .3ds,.obj,.vrml, etc.? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29963#29963 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] intersections
Hello, I use osg:: LineSegment to perform an intersection between a ray starting from a wand and the objects in my scene. Here is my code: osg::Vec3 wandpt1; osg::Vec3 wandpt2; line = new osg::LineSegment(wandpt1,wandpt2); osg::BoundingBox modelbox; modelbox.expandBy(modelTransf->getBound()); if(line->intersect(modelbox)){ std::cout << "intersection with the cow" << std::endl; } The problem is that detection is not very precise. Do you know another solution in openscenegraph for this? Thank you! lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30105#30105 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Retrieve MatrixTransform of a loaded model
Hi, I load a 3D model of terrain in my scenegraph and I want to retrieve the data of the MatrixTransform of my model in my code. What should I do? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30160#30160 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Retrieve MatrixTransform of a loaded model
Hi, I know how to create a node visitor but I don't know how to traverse the node and simultaneously retrieve and store the MatrixTransform. Can you help me? Thank you! lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30163#30163 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Retrieve MatrixTransform of a loaded model
Hi, Thank you for your help. It works well! lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30173#30173 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Calculate latitude, longitude, height with intersection point
Hi, I want to obtain the latitude, longitude and height when I click with the mouse. Here is my code : osgGA::GUIEventAdapter& ea; osgUtil::LineSegmentIntersector::Intersections intersections; std::string gdlist=""; float x = ea.getX(); float y = ea.getY(); osg::ref_ptr< osgUtil::LineSegmentIntersector > picker = new osgUtil::LineSegmentIntersector(osgUtil::Intersector::WINDOW, x, y); osgUtil::IntersectionVisitor iv(picker.get()); view->getCamera()->accept(iv); if (picker->containsIntersections()) { intersections = picker->getIntersections(); for(osgUtil::LineSegmentIntersector::Intersections::iterator hitr = intersections.begin(); hitr != intersections.end(); ++hitr) { std::ostringstream os; if (!hitr->nodePath.empty() && !(hitr->nodePath.back()->getName().empty())) { // the geodes are identified by name. os<<"Object \""getName()<<"\"" className()<<"\"" addChild(TerrainNode); os<<"local coords vertex("<< hitr->getLocalIntersectPoint()<<")" getEllipsoidModel()->convertXYZToLatLongHeight(point.x(),point.y(),point.z(),latitude,longitude,height); latitude = osg::RadiansToDegrees(latitude); longitude = osg::RadiansToDegrees(longitude); os<<"lat,long,height("<< latitude << "," << longitude << "," << height << ")" < group = new osg::Group; osg::ref_ptr mat = new osg::MatrixTransform; group->addChild(mat); mat->addChild(TerrainNode); osg::Matrix trans; trans.makeTranslate(osg::Vec3f(1000,5000,1500)); mat->preMult(trans); the values of latitude, longitude and height are false and it's normal. I would prefer to use local point "hitr->getLocalIntersectPoint()", which does not change when I make a translation, to calculate the latitude, longitude and height but I don't how to do this. Can you help me? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30174#30174 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Calculate latitude, longitude, height with intersection point
Hi, Can you help me please? I am blocked on my project. I just want to know how to obtain the latitude, longitude and height from the local coordinates of the point of intersection. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30190#30190 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Calculate latitude, longitude, height with intersection point
Hi, I also have wrong values when I use the world coordinates of the intersection when I make a translation. It's normal? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30197#30197 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Intersection with a ray
Hi, I use osgUtil::LineSegmentIntersector to obtain the intersections between a mouse or a ray starting from a wand and a terrain generated with VirtualPlanetBuilder and to display the latitude, longitude and height of the intersection point. When I use the LineSegmentIntersector with the mouse and I use the camera which accept the IntersectionVisitor, the values of latitude, longitude and height are correct. Here is my code : osg::ref_ptr< osgUtil::LineSegmentIntersector > picker = new osgUtil::LineSegmentIntersector(osgUtil::Intersector::WINDOW, x, y); osgUtil::IntersectionVisitor iv(picker.get()); view->getCamera()->accept(iv); if (picker->containsIntersections()) { intersections = picker->getIntersections(); for(osgUtil::LineSegmentIntersector::Intersections::iterator hitr = intersections.begin(); hitr != intersections.end(); ++hitr) { osg::CoordinateSystemNode* csn = new osg::CoordinateSystemNode; csn->setEllipsoidModel(new osg::EllipsoidModel()); csn->addChild(group); point = hitr->getWorldIntersectPoint(); double latitude; double longitude; double height; csn->getEllipsoidModel()->convertXYZToLatLongHeight(point.x(),point.y(),point.z(),latitude,longitude,height); latitude = osg::RadiansToDegrees(latitude); longitude = osg::RadiansToDegrees(longitude); std::cout <<"lat,long,height("<< latitude << "," << longitude << "," << height << ")" << std::endl; } } But, my goal is to obtain the intersections of the terrain with a ray starting from a wand. I use here LineSegmentIntersector with the start point of a wand and the end point and I use the rootNode which accept the IntersectionVisitor. But in this case, the values of latitude, longitude and height are false. Here is my code : osg::Vec3 wandp1; osg::Vec3 wandp2; osg::ref_ptr< osgUtil::LineSegmentIntersector > picker = new osgUtil::LineSegmentIntersector(wandp1,wandp2); osgUtil::LineSegmentIntersector::Intersections intersections; osgUtil::IntersectionVisitor iv(line.get()); rootNode->accept(iv); if(picker->containsIntersections()){ //same code as before } In red are the differences between the two methods. I don't understand what is the problem. Can you help me, please? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30262#30262 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intersection with a ray
Hi, Thank you for your reply. I have initialized my two points depending on the position of my wand into space so the error was not this. In fact, I found an error in my code and now it works. Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30283#30283 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Virtual reality application (head-tracking, stereo, immersive displays)
Hi, I want to create a virtual reality application with OSG in an immersive environment (workbench cf. attached file) with head-tracking and stereoscopy, ... I want to implement the head-tracking with the stereoscopy. I get the values of position and orientation of the head-tracker with VRPN. How do I proceed to update the view? What should I update for the camera (view matrix, projection matrix, etc.) according to the data of the head-tracker? What should I change otherwise knowing that I must take into account the stereoscopy? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31278#31278 Attachments: http://forum.openscenegraph.org//files/workbench_374.bmp ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Virtual reality application (head-tracking, stereo, immersive displays)
Hi, Thank you for your reply! I didn't specify that I used the mode QUAD_BUFFER for the stereo. I don't understand why would I need two cameras per surface, why one would not suffice? Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31282#31282 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Virtual reality application (head-tracking, stereo, immersive displays)
Hi, Thank you very much for your replies. I'll try to get along with your indications. Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31309#31309 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Virtual reality application (head-tracking, stereo, immersive displays)
Hi, Thank you for your reply. How can I download the sources of VRMeer in your site? He asks me for a login and password. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31379#31379 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] release of osg
Hi, I wanted to know what is the latest version of openscenegraph? I wanted to know if there is a correspondence between the stable releases and the developer releases ? The stable release 2.8.3 is it more recent than the 2.9.6 developer release ? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31443#31443 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgQt error
Hi, When I compile osgQt, I have this error : 1>moc_QGraphicsViewAdapter.cxx 1>.\__\__\include\osgQt\moc_QGraphicsViewAdapter.cxx(11) : fatal error C1189: #error : "The header file 'QGraphicsViewAdapter' doesn't include ." How do I solve it? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31468#31468 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgQt error
Hi, I use Windows and Visual Studio 2008. I try to compile the developer release 2.9.8. What should I do? Which file should I remove? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31471#31471 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgQt error
Hi, When I remove moc_QGraphicsViewAdapter.cxx and recreate a new one, I have the same error. And when I add the required header file (), I still have the same error. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31472#31472 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgQt error
Hi, Ok, it works. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31475#31475 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgWidget
Hi, I use VRJuggler and OSG to create an application on a VR system and I want to use osgWidget. But VRJuggler uses osgUtil::SceneView instead of osgViewer, I wanted to know if it is possible to use osgWidget with osgUtil::SceneView? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31957#31957 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget
Hi, In fact, I succeed to display widgets with osgUtil::SceneView replacing the first parameter "osgViewer::View" by 0 in osgWidget::WindowManager. I use my application in an immersive system (two screens) but my problem is that the widgets appears in each window representing each screen of my immersive system. I want to display widgets in a particular window but not all windows. I don't know how to do this. Do you have an idea? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31978#31978 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget
Hi, Thank you Jean-Sébastien for your devices. Indeed, I put the WindowManager's ortho camera under the root of my scene graph. With VRJuggler, I can't access to the cameras because the cameras aren't included in the scene graph. So I don't know how to do this. Would you have other suggestions? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31988#31988 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] convertLatLongHeightToXYZ
Hi, Can you explain me a little the function osg::EllipsoidModel::convertXYZToLatLongHeight? I don't understand why x and y are calculated based on height. If I changed the height of a model and I don't change the latitude and longitude, x and y change. Why? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32166#32166 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] convertLatLongHeightToXYZ
Hi, I understood that the XYZ are in Earth Center Earth Fixed coordinates. So is it normal that X,Y are calculated based on height? In fact, I put a latitude, longitude and height on a model, I use osg::EllipsoidModel::convertLatLongHeightToXYZ to obtain the position x,y,z and I transform my point with the MatrixTransforms applied on the terrain model and I place my model with the transformed point. Is it the step to be followed? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32170#32170 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] convertLatLongHeightToXYZ
Hi, Thank you for your reply. I will look at this. Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32173#32173 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] convertLatLongHeightToXYZ
Hi, Thank you for your replies! This helps me a lot! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32203#32203 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] convertLatLongHeightToXYZ
Hi, The function ellipsoid->computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadians(lat),osg::DegreesToRadians(lon), altitude, position); give me the same values of X,Y,Z as if I use directly the function ellipsoid->convertLatLongHeightToXYZ(osg::DegreesToRadians(lat),osg::DegreesToRadians(lon), altitude, position); I don't understand. Can you clear up me? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32232#32232 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] convertLatLongHeightToXYZ
Hi, In fact, my model is not spheroid, it is a flat terrain. That's why I need simply the position. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32257#32257 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] convertLatLongHeightToXYZ
Hi, Thank you everyone for your replies. In fact, I made a mistake because I built my terrain with VPB with the option --geocentric so my terrain is geocentric. I didn't remember anymore. In fact, I rotate the terrain and that's why it seem flat. But your answers helped me a lot because I might build flat terrain. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32343#32343 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] render a node last
Hi, How to render a node in my scene always last? I want this object is over the other objects in my scene. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32531#32531 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] render a node last
Hi, I put this line of code for render my model last : mModel = osgDB::readNodeFile(mFileToLoad); osg::StateSet* state = mModel->getOrCreateStateSet(); state->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF); state->setRenderBinDetails(20,"Render_Bin"); But I get a odd render (see attachment). I am trying to put the sphere over the plane. Did I miss something in my code? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32559#32559 Attachments: http://forum.openscenegraph.org//files/render_172.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgWidget
Hi, Is it possible in osgWidget to get the coordinates of widget in meters or centimeters instead of pixels? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33090#33090 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Terrain tiles disappears
Hi, I use osg and VRJugggler (for Virtual reality application) to display a terrain generated with VirtualPlanetBuilder. I load the terrain in VRJuggler using osg::DatabasePager. The load works well. I use head tracking in VRJuggler. But when I move the head or I move the terrain in my scene, some tiles doesn't appear on the screen while these tiles should be displayed. This does not come from the near plane because some near tiles appear and some further tiles doesn't appear. Can you help me please? Thank you. Lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33168#33168 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Terrain tiles disappears
Hi, In fact, I obtain the same thing with osgViewer (cf. attachment). What is the problem? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33169#33169 Attachments: http://forum.openscenegraph.org//files/image_165.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Terrain tiles disappears
Hi, The problem is only when I am rendering the back (the underside of the terrain). Is it normal? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33177#33177 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Terrain tiles disappears
Hi, Thank you for your reply. I have change the CullSettings and it works well. Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33186#33186 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Semi-transparency
Hi, How to render an imported model semi-transparent? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33670#33670 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Semi-transparency
Hi, Thank you, it works well! lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33750#33750 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] change model dynamically
Hi, I want to change the 3D model dynamically at the runtime. I have inatialize my node at : _model = new osg::Node(); _model = osgDB::readNodeFile("model1.osg"); and when I do a particular action, I would like that the 3D model changes, I write this : _model = osgDB::readNodeFile("model2.osg"); But it doesn't work! Would you have an idea? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34707#34707 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] draw a curve and a curved pive
Hi, I want to draw a curve from a list of points (osg::Vec3f). I looked at osgModeling but I can't draw a curve, I used the class Curve. This gives me an edge between the points and does not calculate a curve. Can you help me, please? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34889#34889 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] draw a 3D pipe
Hi, I want to draw a 3D curved pipe from a list of points. I looked at osgModeling but I don't know how to do this. Would you have an idea using osgModeling or something else? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35083#35083 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] draw a partial torus and a half sphere
Hi, I want to draw a partial torus, I know the center, the starting angle, the angle of arrival, the minimum radius and maximum radius. I want to draw also a half sphere! Can you help me? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35268#35268 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VirtualPlanetBuilder ETOPO5
Hi, I would like to build a digital terrain model with underwater data with VirtualPlanetBuilder. I would like to read the format ETOPO5 with VirtualplanetBuilder. Is it possible? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35498#35498 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] draw a half cone
Hi, I want to draw a half cone. I have the code to draw an entire cone : osg::ref_ptr geom = new osg::Geometry(); osg::Vec3Array* normals = new osg::Vec3Array; osg::Vec2Array* tcoords = new osg::Vec2Array; osg::Vec3Array* vertices = new osg::Vec3Array; unsigned int numSegments = 20; unsigned int numRows = 10; float ratio = 1.0f; float r = rayon; float h = hauteur; float normalz = r/(sqrtf(r*r+h*h)); float normalRatio = 1.0f/(sqrtf(1.0f+normalz*normalz)); normalz *= normalRatio; float angleDelta = 2.0f*osg::PI/(float)numSegments; float texCoordHorzDelta = 1.0/(float)numSegments; float texCoordRowDelta = 1.0/(float)numRows; float hDelta = hauteur/(float)numRows; float rDelta = rayon/(float)numRows; float topz=hauteur; float topr=0.0f; float topv=1.0f; float basez=topz-hDelta; float baser=rDelta; float basev=topv-texCoordRowDelta; float angle; float texCoord; for(unsigned int rowi=0; rowipush_back(osg::Vec3f(c*normalRatio,s*normalRatio,normalz)); tcoords->push_back(osg::Vec2f(texCoord,topv)); vertices->push_back(osg::Vec3f(c*topr,s*topr,topz)); tcoords->push_back(osg::Vec2f(texCoord,basev)); vertices->push_back(osg::Vec3f(c*baser,s*baser,basez)); } normals->push_back(osg::Vec3f(normalRatio,0.0f,normalz)); tcoords->push_back(osg::Vec2f(1.0f,topv)); vertices->push_back(osg::Vec3f(topr,0.0f,topz)); tcoords->push_back(osg::Vec2f(1.0f,basev)); vertices->push_back(osg::Vec3f(baser,0.0f,basez)); } geom->setVertexArray(vertices); osg::Vec4Array* colors = new osg::Vec4Array; colors->push_back(osg::Vec4f(0.0,1.0,1.0,1.0)); geom->setColorArray(colors); geom->setColorBinding(osg::Geometry::BIND_OVERALL); geom->setNormalArray(normals); geom->setTexCoordArray(0,tcoords); geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUAD_STRIP,0,vertices->size())); But I can't draw a half-cone. Can you help me? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35703#35703 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] draw a half cone
Hi, It seemed like I had already tried this but I try again and it works. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35709#35709 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg::Quat
Hi, >From a quaternion, how to get the angle of rotation on each axis? I saw that it exists the function getRotate(...) but it gives the angle according to all axes. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35852#35852 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Quat
Hi, Ok, Thank you for your reply! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35910#35910 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] disable mipmapping
Hi, How to disable mipmapping on a texture? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36745#36745 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] ATI cards and textures issues
Hi, I developed an application that loads textures dynamically. I tested my application with a NVidia card and my application works fine but when I test my application on ATI card, the textures doesn't change. Can you help me? Does anyone have had this problem? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44292#44292 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ATI cards and textures issues
Hi, Thanks for your reply! I work with an ATI FirePro v8800 on Windows 7. Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44303#44303 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] rotate ortho camera
Hi, I have an application where I have some widgets under an ortho camera. I want to rotate these widgets upside down (180 degrees rotation) because I have a screen upside down. I tried to change the projection matrix of the ortho camera by reversing left/right and bottom/top : double m_left; double m_right; double m_top; double m_bottom; double m_near; double m_far; _camOrtho->getProjectionMatrixAsOrtho(m_left,m_right,m_bottom,m_top,m_near,m_far); _camOrtho->setProjectionMatrixAsOrtho(m_right,m_left,m_top,m_bottom,m_near,m_far); But it doesn't work. Can you help me? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45988#45988 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] ffmpeg plugin
Hi, I wand to play video in my application but I don't have ffmpeg plugin dll. I have OpenSceneGraph-3.0.1. Could someone send me this dll? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48196#48196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mouse events with osgUtil::SceneView
Hi, I must use osgUtil::SceneView because I use VRJuggler. I want to use mouse events with osgUtil::SceneView. With osgViewer, we can write this : viewer.addEventHandler(new osgWidget::MouseHandler(wm)); Is it possible to use this with osgUtil::SceneView? How do I do? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48404#48404 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] center camera on click
Hello, I click on a point in my node. I get a world intersection point (hitr->getWorldIntersectPoint()). I want to center my camera on this point that is to say this point becomes the pivot point of the rotation of the camera. Can you help me please? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52100#52100 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Spherical Manipulator problem
Hello, I use Spherical Manipulator for navigation. When I want to forward with the right mouse button, at a given time the navigation go down instead of go forward. What is the cause? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52124#52124 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Plugin vrml
Hello, I compiled OpenSceneGraph-3.0.1 with the vrml plugin with Visual Studio 2010. I compiled openvrml-0.18.9 with boost_1_47. When I try to load a vrml model (osgviewer.exe object.wrl), I have this error : FindFileInPath() : trying C:\Osg_Source\OpenSceneGraph\bin\osgPlugins-3.0.1\osgdb_vrml.dll ... FindFileInPath() : USING C:\Osg_Source\OpenSceneGraph\bin\osgPlugins-3.0.1\osgdb_vrml.dll DynamicLibrary::failed loading "osgPlugins-3.0.1/osgdb_vrml.dll" Warning: Could not find plugin to read objects from file "C:\Osg_Source\OpenSceneGraph\bin\object.wrl". Previously,I compiled OpenSceneGraph-3.0.1 with the vrml plugin with Visual Studio 2008. I compiled openvrml-0.17.12 with boost_1_38. The loading of vrml files worked fine. Does someone compile OpenSceneGraph-3.0.1 with the vrml plugin with visual studio 2010?With which version of OpenVRML and boost? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52291#52291 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Plugin vrml
Hi, I have all the dependancies dll that I need in my path. I think that a openvrml.dll has a bug because I tested the sdl-viewer.exe in the openvrml visual studio project and it crashes. Does someone compile OpenVrml with Visual Studio 2010 without problem?With which version of OpenVrml? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52303#52303 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Plugin vrml
I compiled openvrml-0.17.12 with visual studio 2008 without problem. When I try to compile openvrml-0.17.12 with visual studio 2010, I have this error in compilation several times : "typename cannot be used outside a template declaration" Does that tell you something? I will try to get some responses on OpenVRML mailing list. Thank you! lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52307#52307 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] loading of a large number of files
Hi, I created an application with WPF and osgViewer which load multiples 3D models (up to 1420 files) with an OpenFileDialog. When I load a large number of files, the osg application crash. Is osg be limited to a specific number of vertex? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52532#52532 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] loading of a large number of files
Hi, My folder of 3D models contains 26.5 megabytes. it does not seem to be much though! What do you think? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52535#52535 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] loading of a large number of files
Hi, The issue is I use a wrapper c++ to c# to create a window with osgviewer in a WPF application and the application throws an unhandled exception, I haven't other informations on the exception. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52594#52594 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] delete scene osg
Hi, I want to delete a complete scene. I use root->removeChildren(0,root->getNumChildren()); Does it destroys the objects in the scene? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52918#52918 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg crashes when remove child
Hi, I embed osg in wpf application with this code : http://www.openscenegraph.org/projects/osg/wiki/Support/FAQ#HowdoIembedanOSGviewerina.NETcontrol I load a scene of vrml files. osg::Group* root = new osgGroup(); for(int i = 0; i < listFichiers.size(); i++){ osg::Node* node = osgDB::readNodeFile(listFichiers[i]); node->setDataVariance(osg::Object::DYNAMIC); root->addChild(node); } When I want to remove scene to load another scene (root->removeChildren(0,root->getNumChildren())), osg crashes with error : Debug assertion failed : Expression:("this->_Has_container()",0) ... The call stack is stop on this : osg80-osgd.dll!std::_Vector_const_iterator,std::allocator > >::operator++() Ligne 116 + 0x3a octetsC++ osg80-osgd.dll!std::_Vector_iterator,std::allocator > >::operator++() Ligne 350C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) Ligne 60 + 0x8 octets C++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node & node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node & node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node & node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node & node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node & node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node & node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node & node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Switch::traverse(osg::NodeVisitor & nv={...}) Ligne 40 + 0x77 octets C++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dl
Re: [osg-users] osg crashes when remove child
David, I don't have access to the viewer frame functions because I use a wrapper c# to c++ (I created a dll c++ with osg functions that I call in my wpf (c#) application). Thank you! lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52995#52995 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg crashes when remove child
Paul, The DataVariance for root is also DYNAMIC. The ThreadingModel is not set, when I display the variable : std::cout << "threading model : " <<_viewer->getThreadingModel(); It returns 2 -> ThreadPerContext. Thank you! lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52996#52996 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg crashes when remove child
With SingleThreaded, osg also crashes with the same error. lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52997#52997 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg crashes when remove child
Hi, Thank you for your reply! I will try the first solution. lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53023#53023 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org