From dd8a2dabd02e1d412da11a11796538fbdf4b84ec Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Wed, 11 Nov 2015 17:06:39 -0500 Subject: [PATCH 01/11] Fix iOS Build. --- QGCApplication.pro | 22 ++-- QGCCommon.pri | 79 +++---------- QGCLocationPlugin.pro | 45 -------- ios/AppIcon29x29.png | Bin 0 -> 17956 bytes ios/AppIcon29x29@2x.png | Bin 0 -> 23996 bytes ios/AppIcon29x29@2x~ipad.png | Bin 0 -> 23996 bytes ios/AppIcon29x29~ipad.png | Bin 0 -> 17956 bytes ios/AppIcon40x40@2x.png | Bin 0 -> 29585 bytes ios/AppIcon40x40@2x~ipad.png | Bin 0 -> 29585 bytes ios/AppIcon40x40~ipad.png | Bin 0 -> 19929 bytes ios/AppIcon50x50@2x~ipad.png | Bin 0 -> 37071 bytes ios/AppIcon50x50~ipad.png | Bin 0 -> 22215 bytes ios/AppIcon57x57.png | Bin 0 -> 23902 bytes ios/AppIcon57x57@2x.png | Bin 0 -> 42021 bytes ios/AppIcon60x60@2x.png | Bin 0 -> 45517 bytes ios/AppIcon72x72@2x~ipad.png | Bin 0 -> 55025 bytes ios/AppIcon72x72~ipad.png | Bin 0 -> 27988 bytes ios/AppIcon76x76@2x~ipad.png | Bin 0 -> 58129 bytes ios/AppIcon76x76~ipad.png | Bin 0 -> 28992 bytes ios/LaunchScreen.xib | 45 ++++++++ ios/iOS-Info.plist | 106 +++++++++++++----- qgroundcontrol.pro | 18 ++- src/QtLocationPlugin/QGCLocationPlugin.pro | 46 ++++++++ .../qgeoserviceproviderpluginqgc.cpp | 10 ++ .../qgeoserviceproviderpluginqgc.h | 8 +- .../qgeotiledmappingmanagerengineqgc.cpp | 1 - .../QtLocationPlugin}/qtlocation/README.md | 0 .../5.5.1/QtLocation/private/qcache3q_p.h | 0 .../private/qgeocameracapabilities_p.h | 0 .../QtLocation/private/qgeocameradata_p.h | 0 .../QtLocation/private/qgeocameratiles_p.h | 0 .../QtLocation/private/qgeocodereply_p.h | 0 .../QtLocation/private/qgeocodingmanager_p.h | 0 .../private/qgeocodingmanagerengine_p.h | 0 .../5.5.1/QtLocation/private/qgeomaneuver_p.h | 0 .../5.5.1/QtLocation/private/qgeomap_p.h | 0 .../5.5.1/QtLocation/private/qgeomap_p_p.h | 0 .../QtLocation/private/qgeomapcontroller_p.h | 0 .../QtLocation/private/qgeomappingmanager_p.h | 0 .../private/qgeomappingmanager_p_p.h | 0 .../private/qgeomappingmanagerengine_p.h | 0 .../private/qgeomappingmanagerengine_p_p.h | 0 .../5.5.1/QtLocation/private/qgeomapscene_p.h | 0 .../5.5.1/QtLocation/private/qgeomaptype_p.h | 0 .../QtLocation/private/qgeomaptype_p_p.h | 0 .../5.5.1/QtLocation/private/qgeoroute_p.h | 0 .../QtLocation/private/qgeoroutereply_p.h | 0 .../QtLocation/private/qgeorouterequest_p.h | 0 .../QtLocation/private/qgeoroutesegment_p.h | 0 .../QtLocation/private/qgeoroutingmanager_p.h | 0 .../private/qgeoroutingmanagerengine_p.h | 0 .../private/qgeoserviceprovider_p.h | 0 .../QtLocation/private/qgeotilecache_p.h | 0 .../5.5.1/QtLocation/private/qgeotiledmap_p.h | 0 .../QtLocation/private/qgeotiledmap_p_p.h | 0 .../private/qgeotiledmappingmanagerengine_p.h | 0 .../qgeotiledmappingmanagerengine_p_p.h | 0 .../QtLocation/private/qgeotiledmapreply_p.h | 0 .../private/qgeotiledmapreply_p_p.h | 0 .../QtLocation/private/qgeotilefetcher_p.h | 0 .../QtLocation/private/qgeotilefetcher_p_p.h | 0 .../private/qgeotilerequestmanager_p.h | 0 .../5.5.1/QtLocation/private/qgeotilespec_p.h | 0 .../QtLocation/private/qgeotilespec_p_p.h | 0 .../5.5.1/QtLocation/private/qplace_p.h | 0 .../QtLocation/private/qplaceattribute_p.h | 0 .../QtLocation/private/qplacecategory_p.h | 0 .../private/qplacecontactdetail_p.h | 0 .../QtLocation/private/qplacecontent_p.h | 0 .../private/qplacecontentrequest_p.h | 0 .../QtLocation/private/qplaceeditorial_p.h | 0 .../5.5.1/QtLocation/private/qplaceicon_p.h | 0 .../5.5.1/QtLocation/private/qplaceimage_p.h | 0 .../private/qplacemanagerengine_p.h | 0 .../private/qplaceproposedsearchresult_p.h | 0 .../QtLocation/private/qplaceratings_p.h | 0 .../5.5.1/QtLocation/private/qplacereply_p.h | 0 .../5.5.1/QtLocation/private/qplaceresult_p.h | 0 .../5.5.1/QtLocation/private/qplacereview_p.h | 0 .../QtLocation/private/qplacesearchresult_p.h | 0 .../QtLocation/private/qplacesupplier_p.h | 0 .../5.5.1/QtLocation/private/qplaceuser_p.h | 0 .../QtLocation/private/unsupportedreplies_p.h | 0 .../include/QtLocation/QGeoCodeReply | 0 .../include/QtLocation/QGeoCodingManager | 0 .../QtLocation/QGeoCodingManagerEngine | 0 .../include/QtLocation/QGeoManeuver | 0 .../qtlocation/include/QtLocation/QGeoRoute | 0 .../include/QtLocation/QGeoRouteReply | 0 .../include/QtLocation/QGeoRouteRequest | 0 .../include/QtLocation/QGeoRouteSegment | 0 .../include/QtLocation/QGeoRoutingManager | 0 .../QtLocation/QGeoRoutingManagerEngine | 0 .../include/QtLocation/QGeoServiceProvider | 0 .../QtLocation/QGeoServiceProviderFactory | 0 .../qtlocation/include/QtLocation/QLocation | 0 .../qtlocation/include/QtLocation/QPlace | 0 .../include/QtLocation/QPlaceAttribute | 0 .../include/QtLocation/QPlaceCategory | 0 .../include/QtLocation/QPlaceContactDetail | 0 .../include/QtLocation/QPlaceContent | 0 .../include/QtLocation/QPlaceContentReply | 0 .../include/QtLocation/QPlaceContentRequest | 0 .../include/QtLocation/QPlaceDetailsReply | 0 .../include/QtLocation/QPlaceEditorial | 0 .../qtlocation/include/QtLocation/QPlaceIcon | 0 .../include/QtLocation/QPlaceIdReply | 0 .../qtlocation/include/QtLocation/QPlaceImage | 0 .../include/QtLocation/QPlaceManager | 0 .../include/QtLocation/QPlaceManagerEngine | 0 .../include/QtLocation/QPlaceMatchReply | 0 .../include/QtLocation/QPlaceMatchRequest | 0 .../QtLocation/QPlaceProposedSearchResult | 0 .../include/QtLocation/QPlaceRatings | 0 .../qtlocation/include/QtLocation/QPlaceReply | 0 .../include/QtLocation/QPlaceResult | 0 .../include/QtLocation/QPlaceReview | 0 .../include/QtLocation/QPlaceSearchReply | 0 .../include/QtLocation/QPlaceSearchRequest | 0 .../include/QtLocation/QPlaceSearchResult | 0 .../QtLocation/QPlaceSearchSuggestionReply | 0 .../include/QtLocation/QPlaceSupplier | 0 .../qtlocation/include/QtLocation/QPlaceUser | 0 .../qtlocation/include/QtLocation/QtLocation | 0 .../include/QtLocation/QtLocationVersion | 0 .../include/QtLocation/placemacro.h | 0 .../include/QtLocation/qgeocodereply.h | 0 .../include/QtLocation/qgeocodingmanager.h | 0 .../QtLocation/qgeocodingmanagerengine.h | 0 .../include/QtLocation/qgeomaneuver.h | 0 .../qtlocation/include/QtLocation/qgeoroute.h | 0 .../include/QtLocation/qgeoroutereply.h | 0 .../include/QtLocation/qgeorouterequest.h | 0 .../include/QtLocation/qgeoroutesegment.h | 0 .../include/QtLocation/qgeoroutingmanager.h | 0 .../QtLocation/qgeoroutingmanagerengine.h | 0 .../include/QtLocation/qgeoserviceprovider.h | 0 .../QtLocation/qgeoserviceproviderfactory.h | 0 .../qtlocation/include/QtLocation/qlocation.h | 0 .../include/QtLocation/qlocationglobal.h | 0 .../qtlocation/include/QtLocation/qplace.h | 0 .../include/QtLocation/qplaceattribute.h | 0 .../include/QtLocation/qplacecategory.h | 0 .../include/QtLocation/qplacecontactdetail.h | 0 .../include/QtLocation/qplacecontent.h | 0 .../include/QtLocation/qplacecontentreply.h | 0 .../include/QtLocation/qplacecontentrequest.h | 0 .../include/QtLocation/qplacedetailsreply.h | 0 .../include/QtLocation/qplaceeditorial.h | 0 .../include/QtLocation/qplaceicon.h | 0 .../include/QtLocation/qplaceidreply.h | 0 .../include/QtLocation/qplaceimage.h | 0 .../include/QtLocation/qplacemanager.h | 0 .../include/QtLocation/qplacemanagerengine.h | 0 .../include/QtLocation/qplacematchreply.h | 0 .../include/QtLocation/qplacematchrequest.h | 0 .../QtLocation/qplaceproposedsearchresult.h | 0 .../include/QtLocation/qplaceratings.h | 0 .../include/QtLocation/qplacereply.h | 0 .../include/QtLocation/qplaceresult.h | 0 .../include/QtLocation/qplacereview.h | 0 .../include/QtLocation/qplacesearchreply.h | 0 .../include/QtLocation/qplacesearchrequest.h | 0 .../include/QtLocation/qplacesearchresult.h | 0 .../QtLocation/qplacesearchsuggestionreply.h | 0 .../include/QtLocation/qplacesupplier.h | 0 .../include/QtLocation/qplaceuser.h | 0 .../include/QtLocation/qtlocationversion.h | 0 .../private/qdeclarativegeoaddress_p.h | 0 .../private/qdeclarativegeolocation_p.h | 0 .../QtPositioning/private/qdoublevector2d_p.h | 0 .../QtPositioning/private/qdoublevector3d_p.h | 0 .../QtPositioning/private/qgeoaddress_p.h | 0 .../QtPositioning/private/qgeocircle_p.h | 0 .../QtPositioning/private/qgeocoordinate_p.h | 0 .../QtPositioning/private/qgeolocation_p.h | 0 .../private/qgeopositioninfosource_p.h | 0 .../QtPositioning/private/qgeoprojection_p.h | 0 .../QtPositioning/private/qgeorectangle_p.h | 0 .../5.5.1/QtPositioning/private/qgeoshape_p.h | 0 .../QtPositioning/private/qlocationutils_p.h | 0 .../private/qnmeapositioninfosource_p.h | 0 .../include/QtPositioning/QGeoAddress | 0 .../include/QtPositioning/QGeoAreaMonitorInfo | 0 .../QtPositioning/QGeoAreaMonitorSource | 0 .../include/QtPositioning/QGeoCircle | 0 .../include/QtPositioning/QGeoCoordinate | 0 .../include/QtPositioning/QGeoLocation | 0 .../include/QtPositioning/QGeoPositionInfo | 0 .../QtPositioning/QGeoPositionInfoSource | 0 .../QGeoPositionInfoSourceFactory | 0 .../include/QtPositioning/QGeoRectangle | 0 .../include/QtPositioning/QGeoSatelliteInfo | 0 .../QtPositioning/QGeoSatelliteInfoSource | 0 .../include/QtPositioning/QGeoShape | 0 .../QtPositioning/QNmeaPositionInfoSource | 0 .../include/QtPositioning/QtPositioning | 0 .../QtPositioning/QtPositioningVersion | 0 .../include/QtPositioning/qgeoaddress.h | 0 .../QtPositioning/qgeoareamonitorinfo.h | 0 .../QtPositioning/qgeoareamonitorsource.h | 0 .../include/QtPositioning/qgeocircle.h | 0 .../include/QtPositioning/qgeocoordinate.h | 0 .../include/QtPositioning/qgeolocation.h | 0 .../include/QtPositioning/qgeopositioninfo.h | 0 .../QtPositioning/qgeopositioninfosource.h | 0 .../qgeopositioninfosourcefactory.h | 0 .../include/QtPositioning/qgeorectangle.h | 0 .../include/QtPositioning/qgeosatelliteinfo.h | 0 .../QtPositioning/qgeosatelliteinfosource.h | 0 .../include/QtPositioning/qgeoshape.h | 0 .../QtPositioning/qnmeapositioninfosource.h | 0 .../QtPositioning/qpositioningglobal.h | 0 .../QtPositioning/qtpositioningversion.h | 0 .../qtlocation/src/location/maps/maps.pri | 0 .../qtlocation/src/location/maps/qcache3q_p.h | 0 .../location/maps/qgeocameracapabilities_p.h | 0 .../src/location/maps/qgeocameradata_p.h | 0 .../src/location/maps/qgeocameratiles_p.h | 0 .../src/location/maps/qgeocodereply.h | 0 .../src/location/maps/qgeocodereply_p.h | 0 .../src/location/maps/qgeocodingmanager.h | 0 .../src/location/maps/qgeocodingmanager_p.h | 0 .../location/maps/qgeocodingmanagerengine.h | 0 .../location/maps/qgeocodingmanagerengine_p.h | 0 .../src/location/maps/qgeomaneuver.h | 0 .../src/location/maps/qgeomaneuver_p.h | 0 .../qtlocation/src/location/maps/qgeomap_p.h | 0 .../src/location/maps/qgeomap_p_p.h | 0 .../src/location/maps/qgeomapcontroller_p.h | 0 .../src/location/maps/qgeomappingmanager_p.h | 0 .../location/maps/qgeomappingmanager_p_p.h | 0 .../maps/qgeomappingmanagerengine_p.h | 0 .../maps/qgeomappingmanagerengine_p_p.h | 0 .../src/location/maps/qgeomapscene_p.h | 0 .../src/location/maps/qgeomaptype_p.h | 0 .../src/location/maps/qgeomaptype_p_p.h | 0 .../qtlocation/src/location/maps/qgeoroute.h | 0 .../src/location/maps/qgeoroute_p.h | 0 .../src/location/maps/qgeoroutereply.h | 0 .../src/location/maps/qgeoroutereply_p.h | 0 .../src/location/maps/qgeorouterequest.h | 0 .../src/location/maps/qgeorouterequest_p.h | 0 .../src/location/maps/qgeoroutesegment.h | 0 .../src/location/maps/qgeoroutesegment_p.h | 0 .../src/location/maps/qgeoroutingmanager.h | 0 .../src/location/maps/qgeoroutingmanager_p.h | 0 .../location/maps/qgeoroutingmanagerengine.h | 0 .../maps/qgeoroutingmanagerengine_p.h | 0 .../src/location/maps/qgeoserviceprovider.h | 0 .../src/location/maps/qgeoserviceprovider_p.h | 0 .../maps/qgeoserviceproviderfactory.h | 0 .../src/location/maps/qgeotilecache_p.h | 0 .../src/location/maps/qgeotiledmap_p.h | 0 .../src/location/maps/qgeotiledmap_p_p.h | 0 .../maps/qgeotiledmappingmanagerengine_p.h | 0 .../maps/qgeotiledmappingmanagerengine_p_p.h | 0 .../src/location/maps/qgeotiledmapreply_p.h | 0 .../src/location/maps/qgeotiledmapreply_p_p.h | 0 .../src/location/maps/qgeotilefetcher_p.h | 0 .../src/location/maps/qgeotilefetcher_p_p.h | 0 .../location/maps/qgeotilerequestmanager_p.h | 0 .../src/location/maps/qgeotilespec_p.h | 0 .../src/location/maps/qgeotilespec_p_p.h | 0 .../qtlocation/src/location/qlocation.h | 0 .../qtlocation/src/location/qlocationglobal.h | 0 .../positioning/qdeclarativegeoaddress_p.h | 0 .../positioning/qdeclarativegeolocation_p.h | 0 .../src/positioning/qdoublevector2d_p.h | 0 .../src/positioning/qdoublevector3d_p.h | 0 .../qtlocation/src/positioning/qgeoaddress.h | 0 .../src/positioning/qgeoaddress_p.h | 0 .../src/positioning/qgeoareamonitorinfo.h | 0 .../src/positioning/qgeoareamonitorsource.h | 0 .../qtlocation/src/positioning/qgeocircle.h | 0 .../qtlocation/src/positioning/qgeocircle_p.h | 0 .../src/positioning/qgeocoordinate.h | 0 .../src/positioning/qgeocoordinate_p.h | 0 .../qtlocation/src/positioning/qgeolocation.h | 0 .../src/positioning/qgeolocation_p.h | 0 .../src/positioning/qgeopositioninfo.h | 0 .../src/positioning/qgeopositioninfosource.h | 0 .../positioning/qgeopositioninfosource_p.h | 0 .../qgeopositioninfosourcefactory.h | 0 .../src/positioning/qgeoprojection_p.h | 0 .../src/positioning/qgeorectangle.h | 0 .../src/positioning/qgeorectangle_p.h | 0 .../src/positioning/qgeosatelliteinfo.h | 0 .../src/positioning/qgeosatelliteinfosource.h | 0 .../qtlocation/src/positioning/qgeoshape.h | 0 .../qtlocation/src/positioning/qgeoshape_p.h | 0 .../src/positioning/qlocationutils_p.h | 0 .../src/positioning/qnmeapositioninfosource.h | 0 .../positioning/qnmeapositioninfosource_p.h | 0 .../src/positioning/qpositioningglobal.h | 0 src/main.cc | 4 +- 296 files changed, 224 insertions(+), 160 deletions(-) delete mode 100644 QGCLocationPlugin.pro create mode 100644 ios/AppIcon29x29.png create mode 100644 ios/AppIcon29x29@2x.png create mode 100644 ios/AppIcon29x29@2x~ipad.png create mode 100644 ios/AppIcon29x29~ipad.png create mode 100644 ios/AppIcon40x40@2x.png create mode 100644 ios/AppIcon40x40@2x~ipad.png create mode 100644 ios/AppIcon40x40~ipad.png create mode 100644 ios/AppIcon50x50@2x~ipad.png create mode 100644 ios/AppIcon50x50~ipad.png create mode 100644 ios/AppIcon57x57.png create mode 100644 ios/AppIcon57x57@2x.png create mode 100644 ios/AppIcon60x60@2x.png create mode 100644 ios/AppIcon72x72@2x~ipad.png create mode 100644 ios/AppIcon72x72~ipad.png create mode 100644 ios/AppIcon76x76@2x~ipad.png create mode 100644 ios/AppIcon76x76~ipad.png create mode 100644 ios/LaunchScreen.xib create mode 100644 src/QtLocationPlugin/QGCLocationPlugin.pro rename {libs => src/QtLocationPlugin}/qtlocation/README.md (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qcache3q_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameracapabilities_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameradata_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameratiles_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodereply_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanager_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaneuver_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapcontroller_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapscene_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroute_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutereply_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeorouterequest_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutesegment_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanager_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoserviceprovider_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilecache_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilerequestmanager_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplace_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceattribute_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecategory_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontactdetail_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontent_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontentrequest_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceeditorial_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceicon_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceimage_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacemanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceproposedsearchresult_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceratings_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereply_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceresult_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereview_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesearchresult_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesupplier_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceuser_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/5.5.1/QtLocation/private/unsupportedreplies_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoCodeReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoCodingManager (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoCodingManagerEngine (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoManeuver (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoRoute (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoRouteReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoRouteRequest (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoRouteSegment (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoRoutingManager (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoRoutingManagerEngine (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoServiceProvider (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QGeoServiceProviderFactory (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QLocation (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlace (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceAttribute (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceCategory (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceContactDetail (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceContent (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceContentReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceContentRequest (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceDetailsReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceEditorial (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceIcon (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceIdReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceImage (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceManager (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceManagerEngine (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceMatchReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceMatchRequest (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceProposedSearchResult (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceRatings (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceResult (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceReview (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceSearchReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceSearchRequest (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceSearchResult (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceSearchSuggestionReply (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceSupplier (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QPlaceUser (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QtLocation (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/QtLocationVersion (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/placemacro.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeocodereply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeocodingmanager.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeocodingmanagerengine.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeomaneuver.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeoroute.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeoroutereply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeorouterequest.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeoroutesegment.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeoroutingmanager.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeoroutingmanagerengine.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeoserviceprovider.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qgeoserviceproviderfactory.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qlocation.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qlocationglobal.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplace.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceattribute.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacecategory.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacecontactdetail.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacecontent.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacecontentreply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacecontentrequest.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacedetailsreply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceeditorial.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceicon.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceidreply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceimage.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacemanager.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacemanagerengine.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacematchreply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacematchrequest.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceproposedsearchresult.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceratings.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacereply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceresult.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacereview.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacesearchreply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacesearchrequest.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacesearchresult.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacesearchsuggestionreply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplacesupplier.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qplaceuser.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtLocation/qtlocationversion.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeoaddress_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeolocation_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector2d_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector3d_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoaddress_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocircle_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocoordinate_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeolocation_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeopositioninfosource_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoprojection_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeorectangle_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoshape_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qlocationutils_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qnmeapositioninfosource_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoAddress (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoAreaMonitorInfo (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoAreaMonitorSource (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoCircle (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoCoordinate (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoLocation (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoPositionInfo (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoPositionInfoSource (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoPositionInfoSourceFactory (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoRectangle (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoSatelliteInfo (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoSatelliteInfoSource (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QGeoShape (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QNmeaPositionInfoSource (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QtPositioning (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/QtPositioningVersion (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeoaddress.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeoareamonitorinfo.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeoareamonitorsource.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeocircle.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeocoordinate.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeolocation.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeopositioninfo.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeopositioninfosource.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeopositioninfosourcefactory.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeorectangle.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeosatelliteinfo.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeosatelliteinfosource.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qgeoshape.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qnmeapositioninfosource.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qpositioningglobal.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/include/QtPositioning/qtpositioningversion.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/maps.pri (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qcache3q_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocameracapabilities_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocameradata_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocameratiles_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocodereply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocodereply_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocodingmanager.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocodingmanager_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocodingmanagerengine.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeocodingmanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomaneuver.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomaneuver_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomap_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomap_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomapcontroller_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomappingmanager_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomappingmanager_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomappingmanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomappingmanagerengine_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomapscene_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomaptype_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeomaptype_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroute.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroute_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroutereply.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroutereply_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeorouterequest.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeorouterequest_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroutesegment.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroutesegment_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroutingmanager.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroutingmanager_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroutingmanagerengine.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoroutingmanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoserviceprovider.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoserviceprovider_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeoserviceproviderfactory.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotilecache_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotiledmap_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotiledmap_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotiledmapreply_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotiledmapreply_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotilefetcher_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotilefetcher_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotilerequestmanager_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotilespec_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/maps/qgeotilespec_p_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/qlocation.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/location/qlocationglobal.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qdeclarativegeoaddress_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qdeclarativegeolocation_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qdoublevector2d_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qdoublevector3d_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeoaddress.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeoaddress_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeoareamonitorinfo.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeoareamonitorsource.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeocircle.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeocircle_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeocoordinate.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeocoordinate_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeolocation.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeolocation_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeopositioninfo.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeopositioninfosource.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeopositioninfosource_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeopositioninfosourcefactory.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeoprojection_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeorectangle.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeorectangle_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeosatelliteinfo.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeosatelliteinfosource.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeoshape.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qgeoshape_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qlocationutils_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qnmeapositioninfosource.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qnmeapositioninfosource_p.h (100%) rename {libs => src/QtLocationPlugin}/qtlocation/src/positioning/qpositioningglobal.h (100%) diff --git a/QGCApplication.pro b/QGCApplication.pro index 012a15bf9..5a87bd608 100644 --- a/QGCApplication.pro +++ b/QGCApplication.pro @@ -19,8 +19,9 @@ include(QGCCommon.pri) -TARGET = qgroundcontrol +TARGET = qgroundcontrol TEMPLATE = app +DESTDIR = $${OUT_PWD}/build # Load additional config flags from user_config.pri exists(user_config.pri):infile(user_config.pri, CONFIG) { @@ -34,13 +35,9 @@ LinuxBuild { # QGC QtLocation plugin -LIBS += -L$${LOCATION_PLUGIN_DESTDIR} -LIBS += -l$${LOCATION_PLUGIN_NAME} - -WindowsBuild { - PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/$${LOCATION_PLUGIN_NAME}.lib -} else { - PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}.a +!ios { + LIBS += -L$${LOCATION_PLUGIN_DESTDIR} + LIBS += -l$${LOCATION_PLUGIN_NAME} } # Qt configuration @@ -88,8 +85,12 @@ MacBuild { iOSBuild { QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist - ICON = $${BASEDIR}/resources/icons/macx.icns - OTHER_FILES += $${BASEDIR}/iOS-Info.plist + OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist + ios_icon.files = $$files($$PWD/ios/AppIcon*.png) + QMAKE_BUNDLE_DATA += ios_icon + app_launch_images.files = $$PWD/ios/LaunchScreen.xib + QMAKE_BUNDLE_DATA += app_launch_images + #-- TODO: Add iTunesArtwork } LinuxBuild { @@ -278,7 +279,6 @@ WindowsBuild { HEADERS += src/stable_headers.h } - !iOSBuild { HEADERS += \ src/comm/SerialLink.h \ diff --git a/QGCCommon.pri b/QGCCommon.pri index f67098d4b..d3638e881 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -30,10 +30,13 @@ linux { linux-g++ | linux-g++-64 { message("Linux build") CONFIG += LinuxBuild + DEFINES += __STDC_LIMIT_MACROS } else : android-g++ { message("Android build") CONFIG += AndroidBuild MobileBuild DEFINES += __android__ + DEFINES += __STDC_LIMIT_MACROS + target.path = $$DESTDIR warning("Android build is experimental and not fully functional") } else { error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported") @@ -42,6 +45,7 @@ linux { win32-msvc2010 | win32-msvc2012 | win32-msvc2013 { message("Windows build") CONFIG += WindowsBuild + DEFINES += __STDC_LIMIT_MACROS } else { error("Unsupported Windows toolchain, only Visual Studio 2010, 2012, and 2013 are supported") } @@ -49,6 +53,10 @@ linux { macx-clang | macx-llvm { message("Mac build") CONFIG += MacBuild + CONFIG += x86_64 + CONFIG -= x86 + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 + QMAKE_MAC_SDK = macosx10.11 QMAKE_CXXFLAGS += -fvisibility=hidden } else { error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported") @@ -60,6 +68,9 @@ linux { message("iOS build") CONFIG += iOSBuild MobileBuild app_bundle DEFINES += __ios__ + QMAKE_IOS_DEPLOYMENT_TARGET = 8.0 + QMAKE_IOS_TARGETED_DEVICE_FAMILY = 2 #- iPad only for now + QMAKE_LFLAGS += -Wl,-no_pie warning("iOS build is experimental and not yet fully functional") } else { error("Unsupported build platform, only Linux, Windows, Android and Mac (Mac OS and iOS) are supported") @@ -109,76 +120,22 @@ win32:debug_and_release { # Setup our build directories BASEDIR = $$IN_PWD -DESTDIR = $${OUT_PWD}/debug -BUILDDIR = $${OUT_PWD}/build-debug -ReleaseBuild { - DESTDIR = $${OUT_PWD}/release - BUILDDIR = $${OUT_PWD}/build-release -} - -iOSBuild { - # For whatever reason, the iOS build fails with these set. Some files have the full, - # properly concatenaded path and file name while others have only the second portion, - # as if BUILDDIR was empty. - OBJECTS_DIR = $$(HOME)/tmp/qgcfoo - MOC_DIR = $$(HOME)/tmp/qgcfoo - UI_DIR = $$(HOME)/tmp/qgcfoo - RCC_DIR = $$(HOME)/tmp/qgcfoo -} else { - OBJECTS_DIR = $${BUILDDIR}/obj - MOC_DIR = $${BUILDDIR}/moc - UI_DIR = $${BUILDDIR}/ui - RCC_DIR = $${BUILDDIR}/rcc +!ios { + OBJECTS_DIR = $${OUT_PWD}/obj + MOC_DIR = $${OUT_PWD}/moc + UI_DIR = $${OUT_PWD}/ui + RCC_DIR = $${OUT_PWD}/rcc } LANGUAGE = C++ -AndroidBuild { - target.path = $$DESTDIR -} - -# We place the created plugin lib into the objects dir so that make clean will clean it as well -iOSBuild { - LOCATION_PLUGIN_DESTDIR = $$(HOME)/tmp/qgcfoo -} else { - LOCATION_PLUGIN_DESTDIR = $$OBJECTS_DIR -} - -LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC - -message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET OUTPUT $$OUT_PWD) +LOCATION_PLUGIN_DESTDIR = $${OUT_PWD}/src/QtLocationPlugin +LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC # Turn off serial port warnings DEFINES += _TTY_NOWARN_ -# -# OS Specific settings -# - -AndroidBuild { - DEFINES += __STDC_LIMIT_MACROS -} - -iOSBuild { - QMAKE_IOS_DEPLOYMENT_TARGET = 7.0 -} - -MacBuild { - CONFIG += x86_64 - CONFIG -= x86 - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 - QMAKE_MAC_SDK = macosx10.11 -} - -LinuxBuild { - DEFINES += __STDC_LIMIT_MACROS -} - -WindowsBuild { - DEFINES += __STDC_LIMIT_MACROS -} - # # By default warnings as errors are turned off. Even so, in order for a pull request # to be accepted you must compile cleanly with warnings as errors turned on the default diff --git a/QGCLocationPlugin.pro b/QGCLocationPlugin.pro deleted file mode 100644 index 740ff8590..000000000 --- a/QGCLocationPlugin.pro +++ /dev/null @@ -1,45 +0,0 @@ -include(QGCCommon.pri) - -TEMPLATE = lib -TARGET = QGeoServiceProviderFactoryQGC -CONFIG += plugin static -QT += location-private positioning-private network -PLUGIN_TYPE = geoservices - -DESTDIR = $${LOCATION_PLUGIN_DESTDIR} - -contains(QT_VERSION, 5.5.1) { - - message(Using Local QtLocation headers for Qt 5.5.1) - - INCLUDEPATH += \ - libs/qtlocation/include \ - -} else { - - message(Using Default QtLocation headers) - - INCLUDEPATH += $$QT.location.includes - -} - -HEADERS += \ - src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h \ - src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.h \ - src/QtLocationPlugin/qgeotilefetcherqgc.h \ - src/QtLocationPlugin/qgeomapreplyqgc.h \ - src/QtLocationPlugin/qgeocodingmanagerengineqgc.h \ - src/QtLocationPlugin/qgeocodereplyqgc.h \ - src/QtLocationPlugin/OpenPilotMaps.h - -SOURCES += \ - src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp \ - src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp \ - src/QtLocationPlugin/qgeotilefetcherqgc.cpp \ - src/QtLocationPlugin/qgeomapreplyqgc.cpp \ - src/QtLocationPlugin/qgeocodingmanagerengineqgc.cpp \ - src/QtLocationPlugin/qgeocodereplyqgc.cpp \ - src/QtLocationPlugin/OpenPilotMaps.cc - -OTHER_FILES += \ - src/QtLocationPlugin/qgc_maps_plugin.json diff --git a/ios/AppIcon29x29.png b/ios/AppIcon29x29.png new file mode 100644 index 0000000000000000000000000000000000000000..22b02b2c44904b5a30990489a5d75aab9216c2d1 GIT binary patch literal 17956 zcmeI4c~lcwv%vGlQAY$c;KC?M49KE}EF^@4O(ftlgk1!L!7LpJOA?a+2?!{Hv50R{P9(-}lZt@15k3bn4cvs=mLf zTiyAi+2QQCQcY!^3Ic&pTfK_r3LY0I-rr3DKRuHCXMl%kf>mB31Y)|T;{9KUlvFJQ z!n}~{?kV=9J5X8t5Mu_L&jgGmAp&qV0%2h-5inRmfEdLD{JA_!w5+lkjpDK`(d$Tb z99>`w1aMbH2m!YUM|W045R1Y_TU)7ENT{HL5J1d8NkW2oBC5m^J>r)Nepd`*(WsFr z;vh@3jUph*lkSYNFX1SR4UMAYi~57?G4G zW=JqRk?yFIkA7%?h$Z9-#9TfPrSQvO@cVzb6<1fjyn0`SBl&<_7aJ3#=?oT^r{HR2frT24XMEfr zKx2pjD@8?O@QQMD$D2^`reH;4a6~E&H^Is1Oo$IUpUve+C-}f)@OXF70f9m#nPG6G zF&`6VLVbWch|Lf){*jl7b0_#=v#1=tFoYqt;)XE%0jz-MZ-E^joG^2&uBf*BV7?GM zEx^je0{f-m305PuMqSMli5WZ=u$pEC4j6N}Y^oU!M`Ex{i5Mc8!omboxZ|&s@{^tWd>%0bP%_7B-&+x*tC+mI;Lb5ZNpYi$bJ;kjZ8k z3WZ4mqp?^_GlChBMPPpnG{ML%33Uus^GI)V12%p-`cVVJay*JFeS z06e(uHR@_)*4Leg_#AOKLkQUTgB9}6_Wr2fPYs~~EU=2}K`{4!AQd7;*uR$u6H`2c zL`G1kS(cSoIXZ+Z0KkuX#irWh+*oDE4z!>R%cnj=j zW8+mbI^R>#O@l*6=939H@P)-IK0laFR6|X@;7up0p{C=OYk6F;72!iP$nXR!#XZpI z<=G9qT?ed8NhA}J1r|CCwQ%N2fM8D=7rc&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`iVUG`V)%LvSrC#FV-}q@9q$LAbGEy zy?g4|`FhU_Y*co7R)#G&!}}}CAjyUnu*2?%xpY5m*|zOC0`;1??5u5t0X@UA-RH^la=15_G799$P!>jhs^G zSAApW?4>i27us>T?mL}P%h#! zuk*WaCuIcdA(7{7Vj=~qffhC&Lh*|6MpL&rl$CqG}R{eU+sHsi(TR=kH)2^;# zMMa73OY9;e%@^*Sid>X&Q{GZ9|F!V>#jckcLBYp<&(lz!to8kmdx}mxnp?S!b|U|( z&IXBOW~JN7!lrn)(tY!_4Vo-tJ@PXP%cktDvn?(?C@^!dSZJWJOVILQ&@P9GK1~*$7yK%icH*j=j{T$6=vFlleJa9-9gjM zxaU+lbFV3DZGkwn3};1kT)jhTLnFRgnpf<3t#Hq7wWO4pZ;ffsx}Uj(06#mNDd7aGl?hu($lU$I20z^n*t9sK8xWj6 zoNZ5TJm@&@tXeJeI_RgRwPkgv_}2Y&^xY==Wlg(V8#Xtz*UAcj4Y-?m_oE#aXM-2* zMb(ToTV~y`XBF*TxpLdp&OhR|(*JC3ZVPK}mq+vtz6a~G+}HSCA1N-@>P_)qyZ038 zFLc`E<9_PMY@}WEPp>#7kKOg=oJ*?*p7vb-qw%iI`k>gRCatSwb1KZuyXrYtI*V(W zy{(4`-A2f(^)l}*v);Ya@|bn~gg5V~TyoYwc1xSkP`g4yecK^Rp6vVlwP|jka(kQ| jO+`f|rl)e)1aWKd!Iu3g>z^zBkIQO1M_S>E4YB_M)cVCy literal 0 HcmV?d00001 diff --git a/ios/AppIcon29x29@2x.png b/ios/AppIcon29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..8bccfc00730d5b8d4564e6fb3c1989c326d25edc GIT binary patch literal 23996 zcmeI42Q-}B*XSkjiijT3>kuUvy|)-$v>>804I_*)dW1w5Er?EZA|fIpS_IJ|h!(v? z3qpwAxsT*6`Fr2j`qurvyY9Mov4)v*_St)%=Xdtm=RD_GBUnpAi2#op4+{&6Kt)+z z8+aE#`o+Zo{*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zk4sX_3o>9oz!o>pn4%G>c10yuCrcZpowp`~oj7_2eKiG?q8hEns*jTFGr540Ry*;A)UWiC3mCT+hieN>K*Z?Xc!4JS@FjAkm za>NH%kw6V|3tuxTa|1ty6FLqoC}}Sjd+yAsC}(Q}bKG%&%OoYm$#t`%vr|Qowhmeh zFE)CZ;kC0PK}l0^Bma|1{UyNJrXMle-B+V~nQ0JQhewLpUIMgu0+N!g84B=6s&$BB zzCG#l!bwySLkg0yS-F*Q?>=MsLu90+q?}xwBU@(PPrpnxyEy}n77XjNXxuJ()~@t$py?>9(%&efO_y9j* zVc(34Ur@63`*+@R=gv(zx}UwzD_nUgq~SsPG$;jEXLc#el!H%?A+zHavIJvXrnCGBdxV*_YM_`jeJ*}IhHO0!;Gq4XhSIXTaX&Y?4LOZQobR<7 zO-XX*=(g^GPIXI5q7jo3CuirVHj5yIN$j&sv>I%BAtXr+KJ80PF@ysBL+Vw=P@89p z<;E;2AECkqz}n-An}GX%nt$1h@M?6kjNeVXgrjGrW@~P5oLro=xniI6-PX-VDhA-p zE`A`^^uxuL5*=|#26GYyUaoBO89~>Mzkp-k-?%)x_!UH=`Ps$2V}5WGI1irp zBleF#+aEN^%ABDEjf3=PpeR)U%XHm`~H?qfw-0snbCsV%bI^sY@@*$HiJo^9YDhe9%&mrbM{|g^NUj6_8 literal 0 HcmV?d00001 diff --git a/ios/AppIcon29x29@2x~ipad.png b/ios/AppIcon29x29@2x~ipad.png new file mode 100644 index 0000000000000000000000000000000000000000..7d993b049638973dd874d0c6d72884a6eef23caf GIT binary patch literal 23996 zcmeI42Q-|`+wdjvh=?B1>k=hcy|?HkS`g9MU5gb~*;OMXx@bXkq7xAj5z!)u7D2SA zt3(Szh~D{b$y4(8e;((5zW4pkci#8dvvzmpn(LaG-&}Le+;g8>h_Mzj#sI%178;$RSZ#BSQjrH{hh%|N}ScFkT49q7aA|fcl#mLXgC&a@mz$3uR%`YG>$SW?$&-nWbB#j6B zl61DT64y~s`n@_JB?YoUqaD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IHq$BTq} z(mbxou`kGg{Qz71JY%Y6l=>CbJl$*^giijN40h7!9pu$iP^wytI;(1qE^t3kTtYkq zn|Z*_)$5E1ohe6??d7l2)FJMqu}1rG>Z}i(6HWGZWiLM<;#}^cF5UTN!=je2m;LsM zoVm}89JR!=t#h*cgS2$1rc=&?)#>@wQQL0W^K6ekW~=5&+c5(koK;d1s?O>+Hq(qO zCC2xdU2GLFD$?QUS83F>DIF>cAXaX*yr{oNbl=-DN=h}Wx0)hEi6btM%2@CNuo;Xp zAg&tm1y&?bP@Yb|ffi3U3sAQf;^dRJQ3)%y#$H=w4R39In$Nr5tYoT08+s$+k>I*dw)i z%M!jl>GQ(LRFN1($++yis`z)Gu>#~|q@<+Kt}aonGw-KgrkPzYxi~uibs@VfFX%w- zKJb42oIbOQj49O*wm z7V1CgdkWO3CjT4W{s`J_ro~#ZGdM5 zaH6Pw>lRU+1y)wqTBXh)I*S-o=Ef^`AaiCX#8g=pSi16h=Qhesz@RAHRJsv-awYc5 z%1<7(K2n1}oyLoG4sgy_0KC$O<3@g5zW!Ccg3D_4%=jCZXBWSMNVGn?dUVbYZ35@P z^ZvvEkx0jbW?7jtw7^kztFe(0ve!mXYtZgB(cXQmC>!8Ek0-ZBb+|ojby=v^n`ew~ zk5bDCQGf#dw-d&kr!L$8PWZkUUsh{$W>T1qxn*!TpN>~y!cP7%s%6?aO%81S>|rZS zJ2!VfLNJNjsL-{*tY{1_NS!7~iLdp#tZb=!9&OxvwKpy|H+LTJDS6g-ZgROTe`5X$ j==l2U!>gT#GFS*_X(3-Sg`%VXudb@7sqkFR!uS6GVuE2M literal 0 HcmV?d00001 diff --git a/ios/AppIcon29x29~ipad.png b/ios/AppIcon29x29~ipad.png new file mode 100644 index 0000000000000000000000000000000000000000..9f4d3566bbe997b5745753575c2fde6a69df9179 GIT binary patch literal 17956 zcmeI4c~lcwv%vGlQAY$c;KC?M49KE}EF^@4O(ftlgk1!L!7L4gC5cIZBnT*iv50R{P9(-}lZt@15k3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uKCOeTl<)JWEa0#np-#{>C~D132*O|>)$*dRcRK@-~XUhN_Lu>C+VNQ-fSSk zsdwl`NjT#jMOQLvF{X@RH z@gw>7&n){+<*mtVs=bwsefdZyCSGm6X>oLezaY4I5p}_BpLAAEr{rBBX;V(j=DOyB zj`|1E^vgGlYuQ<{k_h>4k!Maz;B$z z`RlIy{ThY#TsFtS-{k5ct*7k;;(NwH`P#&Rv#+1XldnIa7%f|t-1TBjL;CIxkq46d z+S$9Oj-9Xfyue0fr)OpOf-~H|vJ8@JXn{NIj+jgK)0S=9jw4X7naj@FRv6F|?SHt{ zc_F0q_?<~{^Sg`8Q}r}lq|yo_L&MaWNY1Olqc2od|916yT+_3$BbeWz5_W9utT%E> zpwrxCN(?i9qmN^ zRh7(re-waJxZ;J23ybAuvutP;L*ym#@z-vHSsA*o>Ys%4+q(Cfin;%K z%O81@`bryXJFe4okt;H1w)2yn4QYDXix%?EcZA<=>vIjt&$-rKBkOZ<4MH83=^wuC z=6*u^;IQtV^UlSmrGd$>uc`msBuHW5J<1HW+aIT)@hdWM=bg9n^;Vc^4^Gxr{dNaU zH{+gD>CC;RthEKAuriz#)p7L>i4BeTYH41v=e5E;yVa7ehBHd?%YC@s8U=butFwx< z5}jh^sZ5?0zk+rg35o?*J-juhJ?nnv5(@n6aHhmRM6FEFNz~)@+$|!=6>Ncjd}$S3CcR+e-hlxw$R8xm_;p9efYgXSuKOy*^T0tks+1zjp5_ z)L-bd$;bWFk=aPQ=$~HsmppdYn{zI$9(dYw{g1}GHtU09o0_z)md&X!H}9(VztUM; z%j|7EMCdj`UagmTZ<+P(otDR}>nFUqN9E$P0kK=!1curb8tU5)S#o9H=dVq31C`t3 k>}V<~Dlt8k!zPGZgAcasPg(z5@qb)a+d0w-S8Ry=7gfB)xc~qF literal 0 HcmV?d00001 diff --git a/ios/AppIcon40x40@2x.png b/ios/AppIcon40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..85b0f543d39c7943ae61eda226dc402dcbb28891 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x^fs9?5Zd;H!FVsfXRW#D9>jHW5KfsP0*VQ%_2A1loLyw*o2BxjJkY$ z6`|x?>G|?3HK{{IRl|GXA0ATA!P*zrCsxC@CvqGfxaeRF6*78S)xJw)cIn5@-xz5r z{Qc_h|LPv>N^JdosQ@Sy(~vOXOI2ThsB-}pv*gStldPrnL~`#hz5+3ru$g-~*F6v; z?Fo7XLGNFBM^hjOXor5e)_w<6;OQ0?9)Hv$Gia4SRIoQ>QzB&H- zh(|;<>+(k>t|u@U_bUzk6Hk8WjRrC%CZt#)*`X>)sP^lxzk(qy3Uf__4SoMIQvlR5(h{a35}92p)Jwy)22{#ep7 zO;)G-<%Z~+8s#Z6Y%@BFEs7_RP%t=v5olrw{0x+_-dFoNz&LU5Ou!5)9j>f^w|s9_ zX_-*Q;$IuCHMAke&FU16P|h=iPlHL_(t%ztQ~)}zuf(+68&OR7s&krG|~Sm?o! ztjnx77KPnQ4mq5(i?4DBV2;oZZrK^RSEKUfX?u^FZ47J;*i9bnY1Aiyu|MwDKSU>2cWq7S>IC9Wa366jYffMa& z6A(f`!DWE1b)=g51$2Xv87l7tct)MS8xZG6QId2dGywk#p1H#}I2Amm~Z@vDxq9fy3JseP>pJVqmaD7n< zc&hkgcf)p?h8I-DmZnz2mctvts0+AFz@+9>?AxUR@TQWXg`o3n5zkXeP$r z-?w)`!{28w%6LFSND}z>Jw6^f4?>K22*?c+F;VbK{DEl2ax4Fn1hP`6K>^fjK|#S< zpkV43a_fAx;8KSLTD}6UNecX~TBou`&?s>?`09-X8SrjN{`}`8^}E6pY)$nJdFIRB fYo3+;!#ugi{}r0-8qWu1v^gyzuX literal 0 HcmV?d00001 diff --git a/ios/AppIcon50x50~ipad.png b/ios/AppIcon50x50~ipad.png new file mode 100644 index 0000000000000000000000000000000000000000..cd3b929a54d1e702eb2f198a538b40011eb5f4ee GIT binary patch literal 22215 zcmeI42UJtp*XS9Qj!2Ux0!C3lLP!WLG=Ttu(vjXm5+Jn1&^wA!1*AzA=^_du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?yM*;Ki38K z_rD_3mUfE|K|oMet_SJxpIQZ4t-hvkwpMPIUN9Me?vXaM%pe`E z{TfC$=vAqm_Y`B7%arK=0LWH}wTmOIWU${|Bs{LN5RS literal 0 HcmV?d00001 diff --git a/ios/AppIcon76x76~ipad.png b/ios/AppIcon76x76~ipad.png new file mode 100644 index 0000000000000000000000000000000000000000..a5651fe9d823d36b7732ff79e714681af4dae4d9 GIT binary patch literal 28992 zcmeIb2UL^K_AU&9fb=HPqzgz(=n$IHMFd!8xpj)rMLRY(Zw39+!SNN%Yr zY6G9@zy1jDfOmAl9bVw$l9TFv7c49ys$YNDST9m&v9P4x+34!K>T9S&V2%y~rsj@j z76Kj)PC#iaENM9pCsUZ6g)57hg_R9lhHa&?mW{>6T!!tQs0LWWNx{O}M%4>pq2mSB zg?ZV*B+c36WC^7`Ab2&JMR1otumey8d6+tZ z1O>pL|DYstyV_X(Jvjej z>6hfcw%x+R=D(=@lKigrn=AZ2LefBAAqof!Q&&fXuA`&9?C)Nt^(TZZ3JSk@6$`h9 zDa;1`3)kz?pwmi!kNDsAEEG*$Eo6UrB){M}q(OgY{-fkyeg#o*w0A@R&9aacmInQ&?0;ze=4+5!a2HooILzXfqAZXh zU}Iwrv5*iK6f!px;ujSY6Xq8Y1-?mGg3bBOB*ej@LZ*UZLZ)KBfvBPJPxXH@t>_4I z`!!zx)4x-Txg!iP|97**U>3q+A}~vSn52j#0J69Qzoev@D8H#G3}z-FBq0J5GXJxp ze;E6>iZl^60P~sJ|D(*WzL*1*NeGIG!9+zR`7L1*mi!_TV&eQ}q84KO!eE%WsfD?@ zB*0#OR`DOq{99G3HZFj_dj7+Y0dM||+jK0P|26kdfxXRd9OYz+aIyF`17+C$oPvLm z+FzXYOXs(l3^9fMVmDdXuL)uSpztrbe>dwd%|Fy^{(U(AXAt~u{~zlAy$*M43;0>n z>vvPXmHO{STpTT3-Axe|H?05<`Jc`G-|haZ;^_*cLBG}mdz=3chQh@Z`M)+0!eWA^ zqT&{k{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git a/ios/LaunchScreen.xib b/ios/LaunchScreen.xib new file mode 100644 index 000000000..326beab38 --- /dev/null +++ b/ios/LaunchScreen.xib @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/iOS-Info.plist b/ios/iOS-Info.plist index 977556aa2..884b7b5b5 100644 --- a/ios/iOS-Info.plist +++ b/ios/iOS-Info.plist @@ -2,36 +2,82 @@ - CFBundleIconFile - - CFBundlePackageType - APPL - CFBundleGetInfoString - Created by Qt/QMake - CFBundleSignature - ???? - CFBundleExecutable + CFBundleDisplayName + QGroundControl + CFBundleExecutable qgroundcontrol - CFBundleIdentifier - org.qgroundcontrol.${PRODUCT_NAME:rfc1034identifier} - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleName - ${PRODUCT_NAME} - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UISupportedInterfaceOrientations - - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NOTE - This file was generated by Qt/QMake. + CFBundleGetInfoString + Created by Qt/QMake + CFBundleIconFile + + CFBundleIdentifier + com.grubba.qgroundcontrol + CFBundleName + QGroundControl + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NOTE + This file was generated by Qt/QMake. + UILaunchStoryboardName + LaunchScreen.xib + UIRequiresFullScreen + + CFBundleInfoDictionaryVersion + 6.0 + ForAppStore + Yes + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon29x29.png + AppIcon29x29@2x.png + AppIcon40x40@2x.png + AppIcon57x57.png + AppIcon57x57@2x.png + AppIcon60x60@2x.png + + + + CFBundleIcons~ipad + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon29x29.png + AppIcon29x29@2x.png + AppIcon40x40@2x.png + AppIcon57x57.png + AppIcon57x57@2x.png + AppIcon60x60@2x.png + AppIcon29x29~ipad.png + AppIcon29x29@2x~ipad.png + AppIcon40x40~ipad.png + AppIcon40x40@2x~ipad.png + AppIcon50x50~ipad.png + AppIcon50x50@2x~ipad.png + AppIcon72x72~ipad.png + AppIcon72x72@2x~ipad.png + AppIcon76x76~ipad.png + AppIcon76x76@2x~ipad.png + + + diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 6928aadf9..259878f7e 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -17,12 +17,9 @@ # along with QGroundControl. If not, see . # ------------------------------------------------- -TEMPLATE = subdirs -CONFIG += ordered -SUBDIRS = ./QGCLocationPlugin.pro -SUBDIRS += ./QGCApplication.pro - -QGCApplication.depends = QGCLocationPlugin +equals(OUT_PWD, $$IN_PWD) { + error("You must use shadow build.") +} message(Qt version $$[QT_VERSION]) @@ -30,3 +27,12 @@ message(Qt version $$[QT_VERSION]) error("Unsupported Qt version, 5.4+ is required") } +ios { + include($$PWD/src/QtLocationPlugin/QGCLocationPlugin.pro) + include($$PWD/QGCApplication.pro) +} else { + TEMPLATE = subdirs + SUBDIRS = ./src/QtLocationPlugin/QGCLocationPlugin.pro + SUBDIRS += ./QGCApplication.pro + QGCApplication.depends = QGCLocationPlugin +} diff --git a/src/QtLocationPlugin/QGCLocationPlugin.pro b/src/QtLocationPlugin/QGCLocationPlugin.pro new file mode 100644 index 000000000..f7d617d0a --- /dev/null +++ b/src/QtLocationPlugin/QGCLocationPlugin.pro @@ -0,0 +1,46 @@ + +!ios { + include($$PWD/../../QGCCommon.pri) + TEMPLATE = lib + TARGET = QGeoServiceProviderFactoryQGC + CONFIG += plugin static + PLUGIN_TYPE = geoservices +} + +QT += location-private positioning-private network + +contains(QT_VERSION, 5.5.1) { + + message(Using Local QtLocation headers for Qt 5.5.1) + + INCLUDEPATH += \ + $$PWD/qtlocation/include \ + +} else { + + message(Using Default QtLocation headers) + + INCLUDEPATH += $$QT.location.includes + +} + +HEADERS += \ + $$PWD/qgeoserviceproviderpluginqgc.h \ + $$PWD/qgeotiledmappingmanagerengineqgc.h \ + $$PWD/qgeotilefetcherqgc.h \ + $$PWD/qgeomapreplyqgc.h \ + $$PWD/qgeocodingmanagerengineqgc.h \ + $$PWD/qgeocodereplyqgc.h \ + $$PWD/OpenPilotMaps.h + +SOURCES += \ + $$PWD/qgeoserviceproviderpluginqgc.cpp \ + $$PWD/qgeotiledmappingmanagerengineqgc.cpp \ + $$PWD/qgeotilefetcherqgc.cpp \ + $$PWD/qgeomapreplyqgc.cpp \ + $$PWD/qgeocodingmanagerengineqgc.cpp \ + $$PWD/qgeocodereplyqgc.cpp \ + $$PWD/OpenPilotMaps.cc + +OTHER_FILES += \ + $$PWD/qgc_maps_plugin.json diff --git a/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp b/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp index 446ea2f9a..c47c846de 100644 --- a/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp +++ b/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp @@ -51,6 +51,16 @@ #include "qgeotiledmappingmanagerengineqgc.h" #include "qgeocodingmanagerengineqgc.h" +#if defined (__ios__) +Q_EXTERN_C Q_DECL_EXPORT const char *qt_plugin_query_metadata(); +Q_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance(); +const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_QGeoServiceProviderFactoryQGC() +{ + QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance, qt_plugin_query_metadata}; + return plugin; +} +#endif + QGeoCodingManagerEngine *QGeoServiceProviderFactoryQGC::createGeocodingManagerEngine( const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const { diff --git a/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h b/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h index a4d86e8fe..49f598b23 100644 --- a/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h +++ b/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h @@ -58,10 +58,10 @@ class QGeoServiceProviderFactoryQGC: public QObject, public QGeoServiceProviderF Q_PLUGIN_METADATA(IID "org.qt-project.qt.geoservice.serviceproviderfactory/5.0" FILE "qgc_maps_plugin.json") public: - QGeoCodingManagerEngine* createGeocodingManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; - QGeoMappingManagerEngine* createMappingManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; - QGeoRoutingManagerEngine* createRoutingManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; - QPlaceManagerEngine* createPlaceManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; + QGeoCodingManagerEngine* createGeocodingManagerEngine (const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; + QGeoMappingManagerEngine* createMappingManagerEngine (const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; + QGeoRoutingManagerEngine* createRoutingManagerEngine (const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; + QPlaceManagerEngine* createPlaceManagerEngine (const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; }; #endif // QGEOSERVICEPROVIDER_GOOGLE_H diff --git a/src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp b/src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp index 1422f5555..37d359d2c 100644 --- a/src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp +++ b/src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp @@ -58,7 +58,6 @@ #include "qgeotilefetcherqgc.h" #include "OpenPilotMaps.h" - #if QT_VERSION >= 0x050500 QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject *parent) : QGeoTiledMap(engine, parent) diff --git a/libs/qtlocation/README.md b/src/QtLocationPlugin/qtlocation/README.md similarity index 100% rename from libs/qtlocation/README.md rename to src/QtLocationPlugin/qtlocation/README.md diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qcache3q_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qcache3q_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qcache3q_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qcache3q_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameracapabilities_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameracapabilities_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameracapabilities_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameracapabilities_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameradata_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameradata_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameradata_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameradata_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameratiles_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameratiles_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameratiles_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocameratiles_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodereply_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodereply_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodereply_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodereply_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanager_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanager_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanager_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanager_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanagerengine_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanagerengine_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeocodingmanagerengine_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaneuver_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaneuver_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaneuver_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaneuver_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomap_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapcontroller_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapcontroller_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapcontroller_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapcontroller_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanager_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomappingmanagerengine_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapscene_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapscene_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapscene_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomapscene_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeomaptype_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroute_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroute_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroute_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroute_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutereply_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutereply_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutereply_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutereply_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeorouterequest_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeorouterequest_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeorouterequest_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeorouterequest_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutesegment_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutesegment_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutesegment_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutesegment_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanager_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanager_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanager_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanager_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanagerengine_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanagerengine_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoroutingmanagerengine_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoserviceprovider_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoserviceprovider_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoserviceprovider_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeoserviceprovider_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilecache_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilecache_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilecache_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilecache_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmap_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmappingmanagerengine_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotiledmapreply_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilefetcher_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilerequestmanager_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilerequestmanager_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilerequestmanager_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilerequestmanager_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qgeotilespec_p_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplace_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplace_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplace_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplace_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceattribute_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceattribute_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceattribute_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceattribute_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecategory_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecategory_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecategory_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecategory_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontactdetail_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontactdetail_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontactdetail_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontactdetail_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontent_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontent_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontent_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontent_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontentrequest_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontentrequest_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontentrequest_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacecontentrequest_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceeditorial_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceeditorial_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceeditorial_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceeditorial_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceicon_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceicon_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceicon_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceicon_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceimage_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceimage_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceimage_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceimage_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacemanagerengine_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacemanagerengine_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacemanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacemanagerengine_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceproposedsearchresult_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceproposedsearchresult_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceproposedsearchresult_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceproposedsearchresult_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceratings_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceratings_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceratings_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceratings_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereply_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereply_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereply_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereply_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceresult_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceresult_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceresult_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceresult_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereview_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereview_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereview_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacereview_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesearchresult_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesearchresult_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesearchresult_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesearchresult_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesupplier_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesupplier_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesupplier_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplacesupplier_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceuser_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceuser_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceuser_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/qplaceuser_p.h diff --git a/libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/unsupportedreplies_p.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/unsupportedreplies_p.h similarity index 100% rename from libs/qtlocation/include/QtLocation/5.5.1/QtLocation/private/unsupportedreplies_p.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1/QtLocation/private/unsupportedreplies_p.h diff --git a/libs/qtlocation/include/QtLocation/QGeoCodeReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoCodeReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoCodeReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoCodeReply diff --git a/libs/qtlocation/include/QtLocation/QGeoCodingManager b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoCodingManager similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoCodingManager rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoCodingManager diff --git a/libs/qtlocation/include/QtLocation/QGeoCodingManagerEngine b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoCodingManagerEngine similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoCodingManagerEngine rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoCodingManagerEngine diff --git a/libs/qtlocation/include/QtLocation/QGeoManeuver b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoManeuver similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoManeuver rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoManeuver diff --git a/libs/qtlocation/include/QtLocation/QGeoRoute b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRoute similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoRoute rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRoute diff --git a/libs/qtlocation/include/QtLocation/QGeoRouteReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRouteReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoRouteReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRouteReply diff --git a/libs/qtlocation/include/QtLocation/QGeoRouteRequest b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRouteRequest similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoRouteRequest rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRouteRequest diff --git a/libs/qtlocation/include/QtLocation/QGeoRouteSegment b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRouteSegment similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoRouteSegment rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRouteSegment diff --git a/libs/qtlocation/include/QtLocation/QGeoRoutingManager b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRoutingManager similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoRoutingManager rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRoutingManager diff --git a/libs/qtlocation/include/QtLocation/QGeoRoutingManagerEngine b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRoutingManagerEngine similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoRoutingManagerEngine rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoRoutingManagerEngine diff --git a/libs/qtlocation/include/QtLocation/QGeoServiceProvider b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoServiceProvider similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoServiceProvider rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoServiceProvider diff --git a/libs/qtlocation/include/QtLocation/QGeoServiceProviderFactory b/src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoServiceProviderFactory similarity index 100% rename from libs/qtlocation/include/QtLocation/QGeoServiceProviderFactory rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QGeoServiceProviderFactory diff --git a/libs/qtlocation/include/QtLocation/QLocation b/src/QtLocationPlugin/qtlocation/include/QtLocation/QLocation similarity index 100% rename from libs/qtlocation/include/QtLocation/QLocation rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QLocation diff --git a/libs/qtlocation/include/QtLocation/QPlace b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlace similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlace rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlace diff --git a/libs/qtlocation/include/QtLocation/QPlaceAttribute b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceAttribute similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceAttribute rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceAttribute diff --git a/libs/qtlocation/include/QtLocation/QPlaceCategory b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceCategory similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceCategory rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceCategory diff --git a/libs/qtlocation/include/QtLocation/QPlaceContactDetail b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceContactDetail similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceContactDetail rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceContactDetail diff --git a/libs/qtlocation/include/QtLocation/QPlaceContent b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceContent similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceContent rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceContent diff --git a/libs/qtlocation/include/QtLocation/QPlaceContentReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceContentReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceContentReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceContentReply diff --git a/libs/qtlocation/include/QtLocation/QPlaceContentRequest b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceContentRequest similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceContentRequest rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceContentRequest diff --git a/libs/qtlocation/include/QtLocation/QPlaceDetailsReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceDetailsReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceDetailsReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceDetailsReply diff --git a/libs/qtlocation/include/QtLocation/QPlaceEditorial b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceEditorial similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceEditorial rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceEditorial diff --git a/libs/qtlocation/include/QtLocation/QPlaceIcon b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceIcon similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceIcon rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceIcon diff --git a/libs/qtlocation/include/QtLocation/QPlaceIdReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceIdReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceIdReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceIdReply diff --git a/libs/qtlocation/include/QtLocation/QPlaceImage b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceImage similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceImage rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceImage diff --git a/libs/qtlocation/include/QtLocation/QPlaceManager b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceManager similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceManager rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceManager diff --git a/libs/qtlocation/include/QtLocation/QPlaceManagerEngine b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceManagerEngine similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceManagerEngine rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceManagerEngine diff --git a/libs/qtlocation/include/QtLocation/QPlaceMatchReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceMatchReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceMatchReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceMatchReply diff --git a/libs/qtlocation/include/QtLocation/QPlaceMatchRequest b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceMatchRequest similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceMatchRequest rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceMatchRequest diff --git a/libs/qtlocation/include/QtLocation/QPlaceProposedSearchResult b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceProposedSearchResult similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceProposedSearchResult rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceProposedSearchResult diff --git a/libs/qtlocation/include/QtLocation/QPlaceRatings b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceRatings similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceRatings rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceRatings diff --git a/libs/qtlocation/include/QtLocation/QPlaceReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceReply diff --git a/libs/qtlocation/include/QtLocation/QPlaceResult b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceResult similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceResult rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceResult diff --git a/libs/qtlocation/include/QtLocation/QPlaceReview b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceReview similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceReview rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceReview diff --git a/libs/qtlocation/include/QtLocation/QPlaceSearchReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSearchReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceSearchReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSearchReply diff --git a/libs/qtlocation/include/QtLocation/QPlaceSearchRequest b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSearchRequest similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceSearchRequest rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSearchRequest diff --git a/libs/qtlocation/include/QtLocation/QPlaceSearchResult b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSearchResult similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceSearchResult rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSearchResult diff --git a/libs/qtlocation/include/QtLocation/QPlaceSearchSuggestionReply b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSearchSuggestionReply similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceSearchSuggestionReply rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSearchSuggestionReply diff --git a/libs/qtlocation/include/QtLocation/QPlaceSupplier b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSupplier similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceSupplier rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceSupplier diff --git a/libs/qtlocation/include/QtLocation/QPlaceUser b/src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceUser similarity index 100% rename from libs/qtlocation/include/QtLocation/QPlaceUser rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QPlaceUser diff --git a/libs/qtlocation/include/QtLocation/QtLocation b/src/QtLocationPlugin/qtlocation/include/QtLocation/QtLocation similarity index 100% rename from libs/qtlocation/include/QtLocation/QtLocation rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QtLocation diff --git a/libs/qtlocation/include/QtLocation/QtLocationVersion b/src/QtLocationPlugin/qtlocation/include/QtLocation/QtLocationVersion similarity index 100% rename from libs/qtlocation/include/QtLocation/QtLocationVersion rename to src/QtLocationPlugin/qtlocation/include/QtLocation/QtLocationVersion diff --git a/libs/qtlocation/include/QtLocation/placemacro.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/placemacro.h similarity index 100% rename from libs/qtlocation/include/QtLocation/placemacro.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/placemacro.h diff --git a/libs/qtlocation/include/QtLocation/qgeocodereply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeocodereply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeocodereply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeocodereply.h diff --git a/libs/qtlocation/include/QtLocation/qgeocodingmanager.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeocodingmanager.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeocodingmanager.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeocodingmanager.h diff --git a/libs/qtlocation/include/QtLocation/qgeocodingmanagerengine.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeocodingmanagerengine.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeocodingmanagerengine.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeocodingmanagerengine.h diff --git a/libs/qtlocation/include/QtLocation/qgeomaneuver.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeomaneuver.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeomaneuver.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeomaneuver.h diff --git a/libs/qtlocation/include/QtLocation/qgeoroute.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroute.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeoroute.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroute.h diff --git a/libs/qtlocation/include/QtLocation/qgeoroutereply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroutereply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeoroutereply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroutereply.h diff --git a/libs/qtlocation/include/QtLocation/qgeorouterequest.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeorouterequest.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeorouterequest.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeorouterequest.h diff --git a/libs/qtlocation/include/QtLocation/qgeoroutesegment.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroutesegment.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeoroutesegment.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroutesegment.h diff --git a/libs/qtlocation/include/QtLocation/qgeoroutingmanager.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroutingmanager.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeoroutingmanager.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroutingmanager.h diff --git a/libs/qtlocation/include/QtLocation/qgeoroutingmanagerengine.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroutingmanagerengine.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeoroutingmanagerengine.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoroutingmanagerengine.h diff --git a/libs/qtlocation/include/QtLocation/qgeoserviceprovider.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoserviceprovider.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeoserviceprovider.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoserviceprovider.h diff --git a/libs/qtlocation/include/QtLocation/qgeoserviceproviderfactory.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoserviceproviderfactory.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qgeoserviceproviderfactory.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qgeoserviceproviderfactory.h diff --git a/libs/qtlocation/include/QtLocation/qlocation.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qlocation.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qlocation.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qlocation.h diff --git a/libs/qtlocation/include/QtLocation/qlocationglobal.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qlocationglobal.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qlocationglobal.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qlocationglobal.h diff --git a/libs/qtlocation/include/QtLocation/qplace.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplace.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplace.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplace.h diff --git a/libs/qtlocation/include/QtLocation/qplaceattribute.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceattribute.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceattribute.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceattribute.h diff --git a/libs/qtlocation/include/QtLocation/qplacecategory.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecategory.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacecategory.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecategory.h diff --git a/libs/qtlocation/include/QtLocation/qplacecontactdetail.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecontactdetail.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacecontactdetail.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecontactdetail.h diff --git a/libs/qtlocation/include/QtLocation/qplacecontent.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecontent.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacecontent.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecontent.h diff --git a/libs/qtlocation/include/QtLocation/qplacecontentreply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecontentreply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacecontentreply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecontentreply.h diff --git a/libs/qtlocation/include/QtLocation/qplacecontentrequest.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecontentrequest.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacecontentrequest.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacecontentrequest.h diff --git a/libs/qtlocation/include/QtLocation/qplacedetailsreply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacedetailsreply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacedetailsreply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacedetailsreply.h diff --git a/libs/qtlocation/include/QtLocation/qplaceeditorial.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceeditorial.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceeditorial.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceeditorial.h diff --git a/libs/qtlocation/include/QtLocation/qplaceicon.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceicon.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceicon.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceicon.h diff --git a/libs/qtlocation/include/QtLocation/qplaceidreply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceidreply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceidreply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceidreply.h diff --git a/libs/qtlocation/include/QtLocation/qplaceimage.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceimage.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceimage.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceimage.h diff --git a/libs/qtlocation/include/QtLocation/qplacemanager.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacemanager.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacemanager.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacemanager.h diff --git a/libs/qtlocation/include/QtLocation/qplacemanagerengine.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacemanagerengine.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacemanagerengine.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacemanagerengine.h diff --git a/libs/qtlocation/include/QtLocation/qplacematchreply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacematchreply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacematchreply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacematchreply.h diff --git a/libs/qtlocation/include/QtLocation/qplacematchrequest.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacematchrequest.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacematchrequest.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacematchrequest.h diff --git a/libs/qtlocation/include/QtLocation/qplaceproposedsearchresult.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceproposedsearchresult.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceproposedsearchresult.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceproposedsearchresult.h diff --git a/libs/qtlocation/include/QtLocation/qplaceratings.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceratings.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceratings.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceratings.h diff --git a/libs/qtlocation/include/QtLocation/qplacereply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacereply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacereply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacereply.h diff --git a/libs/qtlocation/include/QtLocation/qplaceresult.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceresult.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceresult.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceresult.h diff --git a/libs/qtlocation/include/QtLocation/qplacereview.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacereview.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacereview.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacereview.h diff --git a/libs/qtlocation/include/QtLocation/qplacesearchreply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesearchreply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacesearchreply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesearchreply.h diff --git a/libs/qtlocation/include/QtLocation/qplacesearchrequest.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesearchrequest.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacesearchrequest.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesearchrequest.h diff --git a/libs/qtlocation/include/QtLocation/qplacesearchresult.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesearchresult.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacesearchresult.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesearchresult.h diff --git a/libs/qtlocation/include/QtLocation/qplacesearchsuggestionreply.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesearchsuggestionreply.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacesearchsuggestionreply.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesearchsuggestionreply.h diff --git a/libs/qtlocation/include/QtLocation/qplacesupplier.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesupplier.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplacesupplier.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplacesupplier.h diff --git a/libs/qtlocation/include/QtLocation/qplaceuser.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceuser.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qplaceuser.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qplaceuser.h diff --git a/libs/qtlocation/include/QtLocation/qtlocationversion.h b/src/QtLocationPlugin/qtlocation/include/QtLocation/qtlocationversion.h similarity index 100% rename from libs/qtlocation/include/QtLocation/qtlocationversion.h rename to src/QtLocationPlugin/qtlocation/include/QtLocation/qtlocationversion.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeoaddress_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeoaddress_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeoaddress_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeoaddress_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeolocation_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeolocation_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeolocation_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdeclarativegeolocation_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector2d_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector2d_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector2d_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector2d_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector3d_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector3d_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector3d_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qdoublevector3d_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoaddress_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoaddress_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoaddress_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoaddress_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocircle_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocircle_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocircle_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocircle_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocoordinate_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocoordinate_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocoordinate_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeocoordinate_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeolocation_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeolocation_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeolocation_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeolocation_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeopositioninfosource_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeopositioninfosource_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeopositioninfosource_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeopositioninfosource_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoprojection_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoprojection_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoprojection_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoprojection_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeorectangle_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeorectangle_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeorectangle_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeorectangle_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoshape_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoshape_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoshape_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qgeoshape_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qlocationutils_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qlocationutils_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qlocationutils_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qlocationutils_p.h diff --git a/libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qnmeapositioninfosource_p.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qnmeapositioninfosource_p.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qnmeapositioninfosource_p.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1/QtPositioning/private/qnmeapositioninfosource_p.h diff --git a/libs/qtlocation/include/QtPositioning/QGeoAddress b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoAddress similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoAddress rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoAddress diff --git a/libs/qtlocation/include/QtPositioning/QGeoAreaMonitorInfo b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoAreaMonitorInfo similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoAreaMonitorInfo rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoAreaMonitorInfo diff --git a/libs/qtlocation/include/QtPositioning/QGeoAreaMonitorSource b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoAreaMonitorSource similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoAreaMonitorSource rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoAreaMonitorSource diff --git a/libs/qtlocation/include/QtPositioning/QGeoCircle b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoCircle similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoCircle rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoCircle diff --git a/libs/qtlocation/include/QtPositioning/QGeoCoordinate b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoCoordinate similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoCoordinate rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoCoordinate diff --git a/libs/qtlocation/include/QtPositioning/QGeoLocation b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoLocation similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoLocation rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoLocation diff --git a/libs/qtlocation/include/QtPositioning/QGeoPositionInfo b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoPositionInfo similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoPositionInfo rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoPositionInfo diff --git a/libs/qtlocation/include/QtPositioning/QGeoPositionInfoSource b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoPositionInfoSource similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoPositionInfoSource rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoPositionInfoSource diff --git a/libs/qtlocation/include/QtPositioning/QGeoPositionInfoSourceFactory b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoPositionInfoSourceFactory similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoPositionInfoSourceFactory rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoPositionInfoSourceFactory diff --git a/libs/qtlocation/include/QtPositioning/QGeoRectangle b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoRectangle similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoRectangle rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoRectangle diff --git a/libs/qtlocation/include/QtPositioning/QGeoSatelliteInfo b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoSatelliteInfo similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoSatelliteInfo rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoSatelliteInfo diff --git a/libs/qtlocation/include/QtPositioning/QGeoSatelliteInfoSource b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoSatelliteInfoSource similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoSatelliteInfoSource rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoSatelliteInfoSource diff --git a/libs/qtlocation/include/QtPositioning/QGeoShape b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoShape similarity index 100% rename from libs/qtlocation/include/QtPositioning/QGeoShape rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QGeoShape diff --git a/libs/qtlocation/include/QtPositioning/QNmeaPositionInfoSource b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QNmeaPositionInfoSource similarity index 100% rename from libs/qtlocation/include/QtPositioning/QNmeaPositionInfoSource rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QNmeaPositionInfoSource diff --git a/libs/qtlocation/include/QtPositioning/QtPositioning b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QtPositioning similarity index 100% rename from libs/qtlocation/include/QtPositioning/QtPositioning rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QtPositioning diff --git a/libs/qtlocation/include/QtPositioning/QtPositioningVersion b/src/QtLocationPlugin/qtlocation/include/QtPositioning/QtPositioningVersion similarity index 100% rename from libs/qtlocation/include/QtPositioning/QtPositioningVersion rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/QtPositioningVersion diff --git a/libs/qtlocation/include/QtPositioning/qgeoaddress.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeoaddress.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeoaddress.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeoaddress.h diff --git a/libs/qtlocation/include/QtPositioning/qgeoareamonitorinfo.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeoareamonitorinfo.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeoareamonitorinfo.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeoareamonitorinfo.h diff --git a/libs/qtlocation/include/QtPositioning/qgeoareamonitorsource.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeoareamonitorsource.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeoareamonitorsource.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeoareamonitorsource.h diff --git a/libs/qtlocation/include/QtPositioning/qgeocircle.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeocircle.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeocircle.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeocircle.h diff --git a/libs/qtlocation/include/QtPositioning/qgeocoordinate.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeocoordinate.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeocoordinate.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeocoordinate.h diff --git a/libs/qtlocation/include/QtPositioning/qgeolocation.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeolocation.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeolocation.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeolocation.h diff --git a/libs/qtlocation/include/QtPositioning/qgeopositioninfo.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeopositioninfo.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeopositioninfo.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeopositioninfo.h diff --git a/libs/qtlocation/include/QtPositioning/qgeopositioninfosource.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeopositioninfosource.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeopositioninfosource.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeopositioninfosource.h diff --git a/libs/qtlocation/include/QtPositioning/qgeopositioninfosourcefactory.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeopositioninfosourcefactory.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeopositioninfosourcefactory.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeopositioninfosourcefactory.h diff --git a/libs/qtlocation/include/QtPositioning/qgeorectangle.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeorectangle.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeorectangle.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeorectangle.h diff --git a/libs/qtlocation/include/QtPositioning/qgeosatelliteinfo.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeosatelliteinfo.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeosatelliteinfo.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeosatelliteinfo.h diff --git a/libs/qtlocation/include/QtPositioning/qgeosatelliteinfosource.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeosatelliteinfosource.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeosatelliteinfosource.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeosatelliteinfosource.h diff --git a/libs/qtlocation/include/QtPositioning/qgeoshape.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeoshape.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qgeoshape.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qgeoshape.h diff --git a/libs/qtlocation/include/QtPositioning/qnmeapositioninfosource.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qnmeapositioninfosource.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qnmeapositioninfosource.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qnmeapositioninfosource.h diff --git a/libs/qtlocation/include/QtPositioning/qpositioningglobal.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qpositioningglobal.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qpositioningglobal.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qpositioningglobal.h diff --git a/libs/qtlocation/include/QtPositioning/qtpositioningversion.h b/src/QtLocationPlugin/qtlocation/include/QtPositioning/qtpositioningversion.h similarity index 100% rename from libs/qtlocation/include/QtPositioning/qtpositioningversion.h rename to src/QtLocationPlugin/qtlocation/include/QtPositioning/qtpositioningversion.h diff --git a/libs/qtlocation/src/location/maps/maps.pri b/src/QtLocationPlugin/qtlocation/src/location/maps/maps.pri similarity index 100% rename from libs/qtlocation/src/location/maps/maps.pri rename to src/QtLocationPlugin/qtlocation/src/location/maps/maps.pri diff --git a/libs/qtlocation/src/location/maps/qcache3q_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qcache3q_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qcache3q_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qcache3q_p.h diff --git a/libs/qtlocation/src/location/maps/qgeocameracapabilities_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocameracapabilities_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocameracapabilities_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocameracapabilities_p.h diff --git a/libs/qtlocation/src/location/maps/qgeocameradata_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocameradata_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocameradata_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocameradata_p.h diff --git a/libs/qtlocation/src/location/maps/qgeocameratiles_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocameratiles_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocameratiles_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocameratiles_p.h diff --git a/libs/qtlocation/src/location/maps/qgeocodereply.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodereply.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocodereply.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodereply.h diff --git a/libs/qtlocation/src/location/maps/qgeocodereply_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodereply_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocodereply_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodereply_p.h diff --git a/libs/qtlocation/src/location/maps/qgeocodingmanager.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodingmanager.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocodingmanager.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodingmanager.h diff --git a/libs/qtlocation/src/location/maps/qgeocodingmanager_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodingmanager_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocodingmanager_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodingmanager_p.h diff --git a/libs/qtlocation/src/location/maps/qgeocodingmanagerengine.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodingmanagerengine.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocodingmanagerengine.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodingmanagerengine.h diff --git a/libs/qtlocation/src/location/maps/qgeocodingmanagerengine_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodingmanagerengine_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeocodingmanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeocodingmanagerengine_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomaneuver.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomaneuver.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomaneuver.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomaneuver.h diff --git a/libs/qtlocation/src/location/maps/qgeomaneuver_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomaneuver_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomaneuver_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomaneuver_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomap_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomap_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomap_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomap_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomap_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomap_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomap_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomap_p_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomapcontroller_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomapcontroller_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomapcontroller_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomapcontroller_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomappingmanager_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomappingmanager_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomappingmanager_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomappingmanager_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomappingmanager_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomappingmanager_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomappingmanager_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomappingmanager_p_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomappingmanagerengine_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomappingmanagerengine_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomappingmanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomappingmanagerengine_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomappingmanagerengine_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomappingmanagerengine_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomappingmanagerengine_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomappingmanagerengine_p_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomapscene_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomapscene_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomapscene_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomapscene_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomaptype_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomaptype_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomaptype_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomaptype_p.h diff --git a/libs/qtlocation/src/location/maps/qgeomaptype_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeomaptype_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeomaptype_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeomaptype_p_p.h diff --git a/libs/qtlocation/src/location/maps/qgeoroute.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroute.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroute.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroute.h diff --git a/libs/qtlocation/src/location/maps/qgeoroute_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroute_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroute_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroute_p.h diff --git a/libs/qtlocation/src/location/maps/qgeoroutereply.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutereply.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroutereply.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutereply.h diff --git a/libs/qtlocation/src/location/maps/qgeoroutereply_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutereply_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroutereply_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutereply_p.h diff --git a/libs/qtlocation/src/location/maps/qgeorouterequest.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeorouterequest.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeorouterequest.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeorouterequest.h diff --git a/libs/qtlocation/src/location/maps/qgeorouterequest_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeorouterequest_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeorouterequest_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeorouterequest_p.h diff --git a/libs/qtlocation/src/location/maps/qgeoroutesegment.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutesegment.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroutesegment.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutesegment.h diff --git a/libs/qtlocation/src/location/maps/qgeoroutesegment_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutesegment_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroutesegment_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutesegment_p.h diff --git a/libs/qtlocation/src/location/maps/qgeoroutingmanager.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutingmanager.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroutingmanager.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutingmanager.h diff --git a/libs/qtlocation/src/location/maps/qgeoroutingmanager_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutingmanager_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroutingmanager_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutingmanager_p.h diff --git a/libs/qtlocation/src/location/maps/qgeoroutingmanagerengine.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutingmanagerengine.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroutingmanagerengine.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutingmanagerengine.h diff --git a/libs/qtlocation/src/location/maps/qgeoroutingmanagerengine_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutingmanagerengine_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoroutingmanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoroutingmanagerengine_p.h diff --git a/libs/qtlocation/src/location/maps/qgeoserviceprovider.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoserviceprovider.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoserviceprovider.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoserviceprovider.h diff --git a/libs/qtlocation/src/location/maps/qgeoserviceprovider_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoserviceprovider_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoserviceprovider_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoserviceprovider_p.h diff --git a/libs/qtlocation/src/location/maps/qgeoserviceproviderfactory.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeoserviceproviderfactory.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeoserviceproviderfactory.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeoserviceproviderfactory.h diff --git a/libs/qtlocation/src/location/maps/qgeotilecache_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilecache_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotilecache_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilecache_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotiledmap_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmap_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotiledmap_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmap_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotiledmap_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmap_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotiledmap_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmap_p_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmappingmanagerengine_p_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotiledmapreply_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmapreply_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotiledmapreply_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmapreply_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotiledmapreply_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmapreply_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotiledmapreply_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotiledmapreply_p_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotilefetcher_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilefetcher_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotilefetcher_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilefetcher_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotilefetcher_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilefetcher_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotilefetcher_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilefetcher_p_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotilerequestmanager_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilerequestmanager_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotilerequestmanager_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilerequestmanager_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotilespec_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilespec_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotilespec_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilespec_p.h diff --git a/libs/qtlocation/src/location/maps/qgeotilespec_p_p.h b/src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilespec_p_p.h similarity index 100% rename from libs/qtlocation/src/location/maps/qgeotilespec_p_p.h rename to src/QtLocationPlugin/qtlocation/src/location/maps/qgeotilespec_p_p.h diff --git a/libs/qtlocation/src/location/qlocation.h b/src/QtLocationPlugin/qtlocation/src/location/qlocation.h similarity index 100% rename from libs/qtlocation/src/location/qlocation.h rename to src/QtLocationPlugin/qtlocation/src/location/qlocation.h diff --git a/libs/qtlocation/src/location/qlocationglobal.h b/src/QtLocationPlugin/qtlocation/src/location/qlocationglobal.h similarity index 100% rename from libs/qtlocation/src/location/qlocationglobal.h rename to src/QtLocationPlugin/qtlocation/src/location/qlocationglobal.h diff --git a/libs/qtlocation/src/positioning/qdeclarativegeoaddress_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qdeclarativegeoaddress_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qdeclarativegeoaddress_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qdeclarativegeoaddress_p.h diff --git a/libs/qtlocation/src/positioning/qdeclarativegeolocation_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qdeclarativegeolocation_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qdeclarativegeolocation_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qdeclarativegeolocation_p.h diff --git a/libs/qtlocation/src/positioning/qdoublevector2d_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qdoublevector2d_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qdoublevector2d_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qdoublevector2d_p.h diff --git a/libs/qtlocation/src/positioning/qdoublevector3d_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qdoublevector3d_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qdoublevector3d_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qdoublevector3d_p.h diff --git a/libs/qtlocation/src/positioning/qgeoaddress.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeoaddress.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeoaddress.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeoaddress.h diff --git a/libs/qtlocation/src/positioning/qgeoaddress_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeoaddress_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeoaddress_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeoaddress_p.h diff --git a/libs/qtlocation/src/positioning/qgeoareamonitorinfo.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeoareamonitorinfo.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeoareamonitorinfo.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeoareamonitorinfo.h diff --git a/libs/qtlocation/src/positioning/qgeoareamonitorsource.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeoareamonitorsource.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeoareamonitorsource.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeoareamonitorsource.h diff --git a/libs/qtlocation/src/positioning/qgeocircle.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeocircle.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeocircle.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeocircle.h diff --git a/libs/qtlocation/src/positioning/qgeocircle_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeocircle_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeocircle_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeocircle_p.h diff --git a/libs/qtlocation/src/positioning/qgeocoordinate.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeocoordinate.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeocoordinate.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeocoordinate.h diff --git a/libs/qtlocation/src/positioning/qgeocoordinate_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeocoordinate_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeocoordinate_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeocoordinate_p.h diff --git a/libs/qtlocation/src/positioning/qgeolocation.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeolocation.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeolocation.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeolocation.h diff --git a/libs/qtlocation/src/positioning/qgeolocation_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeolocation_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeolocation_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeolocation_p.h diff --git a/libs/qtlocation/src/positioning/qgeopositioninfo.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeopositioninfo.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeopositioninfo.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeopositioninfo.h diff --git a/libs/qtlocation/src/positioning/qgeopositioninfosource.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeopositioninfosource.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeopositioninfosource.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeopositioninfosource.h diff --git a/libs/qtlocation/src/positioning/qgeopositioninfosource_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeopositioninfosource_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeopositioninfosource_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeopositioninfosource_p.h diff --git a/libs/qtlocation/src/positioning/qgeopositioninfosourcefactory.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeopositioninfosourcefactory.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeopositioninfosourcefactory.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeopositioninfosourcefactory.h diff --git a/libs/qtlocation/src/positioning/qgeoprojection_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeoprojection_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeoprojection_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeoprojection_p.h diff --git a/libs/qtlocation/src/positioning/qgeorectangle.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeorectangle.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeorectangle.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeorectangle.h diff --git a/libs/qtlocation/src/positioning/qgeorectangle_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeorectangle_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeorectangle_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeorectangle_p.h diff --git a/libs/qtlocation/src/positioning/qgeosatelliteinfo.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeosatelliteinfo.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeosatelliteinfo.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeosatelliteinfo.h diff --git a/libs/qtlocation/src/positioning/qgeosatelliteinfosource.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeosatelliteinfosource.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeosatelliteinfosource.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeosatelliteinfosource.h diff --git a/libs/qtlocation/src/positioning/qgeoshape.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeoshape.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeoshape.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeoshape.h diff --git a/libs/qtlocation/src/positioning/qgeoshape_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qgeoshape_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qgeoshape_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qgeoshape_p.h diff --git a/libs/qtlocation/src/positioning/qlocationutils_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qlocationutils_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qlocationutils_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qlocationutils_p.h diff --git a/libs/qtlocation/src/positioning/qnmeapositioninfosource.h b/src/QtLocationPlugin/qtlocation/src/positioning/qnmeapositioninfosource.h similarity index 100% rename from libs/qtlocation/src/positioning/qnmeapositioninfosource.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qnmeapositioninfosource.h diff --git a/libs/qtlocation/src/positioning/qnmeapositioninfosource_p.h b/src/QtLocationPlugin/qtlocation/src/positioning/qnmeapositioninfosource_p.h similarity index 100% rename from libs/qtlocation/src/positioning/qnmeapositioninfosource_p.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qnmeapositioninfosource_p.h diff --git a/libs/qtlocation/src/positioning/qpositioningglobal.h b/src/QtLocationPlugin/qtlocation/src/positioning/qpositioningglobal.h similarity index 100% rename from libs/qtlocation/src/positioning/qpositioningglobal.h rename to src/QtLocationPlugin/qtlocation/src/positioning/qpositioningglobal.h diff --git a/src/main.cc b/src/main.cc index 3fa649377..a3a156750 100644 --- a/src/main.cc +++ b/src/main.cc @@ -140,8 +140,8 @@ int main(int argc, char *argv[]) #ifndef __mobile__ qRegisterMetaType(); #endif - - // We statically link to the google QtLocation plugin + + // We statically link our own QtLocation plugin #ifdef Q_OS_WIN // In Windows, the compiler doesn't see the use of the class created by Q_IMPORT_PLUGIN -- GitLab From b1940863bc62a57136a8a1551cfad9dd6ce16bf9 Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Wed, 11 Nov 2015 20:47:33 -0500 Subject: [PATCH 02/11] Done for the time being --- QGCApplication.pro | 8 +++----- qgroundcontrol.pro | 6 ++++++ src/QGCApplication.cc | 8 ++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/QGCApplication.pro b/QGCApplication.pro index 5a87bd608..c92bb9426 100644 --- a/QGCApplication.pro +++ b/QGCApplication.pro @@ -33,7 +33,7 @@ LinuxBuild { CONFIG += link_pkgconfig } -# QGC QtLocation plugin +# QGC QtLocation plugin (for ios, it's all compiled in with the rest.) !ios { LIBS += -L$${LOCATION_PLUGIN_DESTDIR} @@ -86,10 +86,8 @@ MacBuild { iOSBuild { QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist - ios_icon.files = $$files($$PWD/ios/AppIcon*.png) - QMAKE_BUNDLE_DATA += ios_icon - app_launch_images.files = $$PWD/ios/LaunchScreen.xib - QMAKE_BUNDLE_DATA += app_launch_images + BUNDLE.files = $$files($$PWD/ios/AppIcon*.png) $$PWD/ios/LaunchScreen.xib + QMAKE_BUNDLE_DATA += BUNDLE #-- TODO: Add iTunesArtwork } diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 259878f7e..2293821b9 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -28,9 +28,15 @@ message(Qt version $$[QT_VERSION]) } ios { + #-- Qmake can't handle a project within a project when generating + # an Xcode project. You end up with one project for the app and + # nothing for the location plugin. include($$PWD/src/QtLocationPlugin/QGCLocationPlugin.pro) include($$PWD/QGCApplication.pro) } else { + #-- The rest (make files or Visual Studio projects) works. Note + # that by default, we're using make files for Mac OS too. If + # you want an Xcode project, the same above applies. TEMPLATE = subdirs SUBDIRS = ./src/QtLocationPlugin/QGCLocationPlugin.pro SUBDIRS += ./QGCApplication.pro diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index 899327f93..1d0e4d62b 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -291,7 +291,15 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) this->setApplicationVersion(versionString); // Set settings format +#if !defined(__mobile__) && !defined(__macos__) QSettings::setDefaultFormat(QSettings::IniFormat); +#else + QString settingsLocation = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation); + if(!settingsLocation.isEmpty()) + { + QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, settingsLocation); + } +#endif QSettings settings; qDebug() << "Settings location" << settings.fileName() << settings.isWritable(); -- GitLab From 25a7957503972f2abf093cb9467a564f36b12868 Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Thu, 12 Nov 2015 12:10:59 -0500 Subject: [PATCH 03/11] Done for now --- QGCApplication.pro | 44 +- QGCCommon.pri | 2 +- QGCInstaller.pri | 26 +- QGCSetup.pri | 136 +- android_environment.sh | 16 +- ios/{LaunchScreen.xib => QGCLaunchScreen.xib} | 0 ios/iOS-Info.plist | 6 +- ios/iOSForAppStore-Info.plist | 83 + libs/lib/lib.pro | 1 - libs/lib/mac32/frameworks/.gitignore | 2 - libs/lib/mac32/frameworks/README | 3 - libs/lib/mac32/include/OpenThreads/Atomic | 287 -- libs/lib/mac32/include/OpenThreads/Barrier | 100 - libs/lib/mac32/include/OpenThreads/Block | 177 -- libs/lib/mac32/include/OpenThreads/Condition | 93 - libs/lib/mac32/include/OpenThreads/Config | 34 - libs/lib/mac32/include/OpenThreads/Exports | 44 - libs/lib/mac32/include/OpenThreads/Mutex | 100 - .../mac32/include/OpenThreads/ReadWriteMutex | 114 - .../mac32/include/OpenThreads/ReentrantMutex | 34 - libs/lib/mac32/include/OpenThreads/ScopedLock | 70 - libs/lib/mac32/include/OpenThreads/Thread | 389 --- libs/lib/mac32/include/OpenThreads/Version | 38 - libs/lib/mac32/include/osg/AlphaFunc | 102 - libs/lib/mac32/include/osg/AnimationPath | 314 -- libs/lib/mac32/include/osg/ApplicationUsage | 122 - libs/lib/mac32/include/osg/ArgumentParser | 213 -- libs/lib/mac32/include/osg/Array | 491 --- libs/lib/mac32/include/osg/ArrayDispatchers | 138 - libs/lib/mac32/include/osg/AudioStream | 86 - libs/lib/mac32/include/osg/AutoTransform | 161 - libs/lib/mac32/include/osg/Billboard | 132 - libs/lib/mac32/include/osg/BlendColor | 125 - libs/lib/mac32/include/osg/BlendEquation | 161 - libs/lib/mac32/include/osg/BlendFunc | 221 -- libs/lib/mac32/include/osg/BoundingBox | 243 -- libs/lib/mac32/include/osg/BoundingSphere | 306 -- libs/lib/mac32/include/osg/BoundsChecking | 216 -- libs/lib/mac32/include/osg/BufferIndexBinding | 134 - libs/lib/mac32/include/osg/BufferObject | 828 ----- libs/lib/mac32/include/osg/Camera | 674 ----- libs/lib/mac32/include/osg/CameraNode | 27 - libs/lib/mac32/include/osg/CameraView | 105 - libs/lib/mac32/include/osg/ClampColor | 139 - libs/lib/mac32/include/osg/ClearNode | 75 - libs/lib/mac32/include/osg/ClipNode | 113 - libs/lib/mac32/include/osg/ClipPlane | 127 - .../mac32/include/osg/ClusterCullingCallback | 75 - .../mac32/include/osg/CollectOccludersVisitor | 109 - libs/lib/mac32/include/osg/ColorMask | 100 - libs/lib/mac32/include/osg/ColorMatrix | 72 - .../mac32/include/osg/ComputeBoundsVisitor | 61 - libs/lib/mac32/include/osg/Config | 47 - .../mac32/include/osg/ConvexPlanarOccluder | 67 - .../lib/mac32/include/osg/ConvexPlanarPolygon | 49 - .../mac32/include/osg/CoordinateSystemNode | 248 -- libs/lib/mac32/include/osg/CopyOp | 93 - libs/lib/mac32/include/osg/CullFace | 79 - libs/lib/mac32/include/osg/CullSettings | 274 -- libs/lib/mac32/include/osg/CullStack | 302 -- libs/lib/mac32/include/osg/CullingSet | 350 --- libs/lib/mac32/include/osg/DeleteHandler | 88 - libs/lib/mac32/include/osg/Depth | 112 - libs/lib/mac32/include/osg/DisplaySettings | 337 --- libs/lib/mac32/include/osg/DrawPixels | 80 - libs/lib/mac32/include/osg/Drawable | 920 ------ libs/lib/mac32/include/osg/Endian | 85 - libs/lib/mac32/include/osg/Export | 72 - libs/lib/mac32/include/osg/Fog | 146 - libs/lib/mac32/include/osg/FragmentProgram | 312 -- libs/lib/mac32/include/osg/FrameBufferObject | 518 ---- libs/lib/mac32/include/osg/FrameStamp | 91 - libs/lib/mac32/include/osg/FrontFace | 70 - libs/lib/mac32/include/osg/GL | 221 -- libs/lib/mac32/include/osg/GL2Extensions | 791 ----- libs/lib/mac32/include/osg/GLBeginEndAdapter | 164 - libs/lib/mac32/include/osg/GLExtensions | 155 - libs/lib/mac32/include/osg/GLObjects | 42 - libs/lib/mac32/include/osg/GLU | 186 -- libs/lib/mac32/include/osg/Geode | 167 - libs/lib/mac32/include/osg/Geometry | 463 --- libs/lib/mac32/include/osg/GraphicsContext | 530 ---- .../mac32/include/osg/GraphicsCostEstimator | 142 - libs/lib/mac32/include/osg/GraphicsThread | 136 - libs/lib/mac32/include/osg/Group | 172 -- libs/lib/mac32/include/osg/Hint | 81 - libs/lib/mac32/include/osg/Image | 433 --- libs/lib/mac32/include/osg/ImageSequence | 151 - libs/lib/mac32/include/osg/ImageStream | 111 - libs/lib/mac32/include/osg/ImageUtils | 160 - libs/lib/mac32/include/osg/KdTree | 198 -- libs/lib/mac32/include/osg/LOD | 140 - libs/lib/mac32/include/osg/Light | 199 -- libs/lib/mac32/include/osg/LightModel | 95 - libs/lib/mac32/include/osg/LightSource | 93 - libs/lib/mac32/include/osg/LineSegment | 101 - libs/lib/mac32/include/osg/LineStipple | 83 - libs/lib/mac32/include/osg/LineWidth | 64 - libs/lib/mac32/include/osg/LogicOp | 113 - libs/lib/mac32/include/osg/Material | 205 -- libs/lib/mac32/include/osg/Math | 254 -- libs/lib/mac32/include/osg/Matrix | 34 - libs/lib/mac32/include/osg/MatrixTransform | 84 - libs/lib/mac32/include/osg/Matrixd | 815 ----- libs/lib/mac32/include/osg/Matrixf | 914 ------ libs/lib/mac32/include/osg/MixinVector | 199 -- libs/lib/mac32/include/osg/Multisample | 158 - libs/lib/mac32/include/osg/Node | 465 --- libs/lib/mac32/include/osg/NodeCallback | 98 - .../lib/mac32/include/osg/NodeTrackerCallback | 54 - libs/lib/mac32/include/osg/NodeVisitor | 369 --- libs/lib/mac32/include/osg/Notify | 145 - libs/lib/mac32/include/osg/Object | 267 -- libs/lib/mac32/include/osg/Observer | 77 - libs/lib/mac32/include/osg/ObserverNodePath | 76 - libs/lib/mac32/include/osg/OccluderNode | 59 - libs/lib/mac32/include/osg/OcclusionQueryNode | 202 -- libs/lib/mac32/include/osg/OperationThread | 227 -- libs/lib/mac32/include/osg/PagedLOD | 160 - libs/lib/mac32/include/osg/Plane | 362 --- libs/lib/mac32/include/osg/Point | 157 - libs/lib/mac32/include/osg/PointSprite | 80 - libs/lib/mac32/include/osg/PolygonMode | 90 - libs/lib/mac32/include/osg/PolygonOffset | 99 - libs/lib/mac32/include/osg/PolygonStipple | 68 - libs/lib/mac32/include/osg/Polytope | 406 --- .../include/osg/PositionAttitudeTransform | 78 - libs/lib/mac32/include/osg/PrimitiveSet | 565 ---- libs/lib/mac32/include/osg/Program | 406 --- libs/lib/mac32/include/osg/Projection | 61 - libs/lib/mac32/include/osg/ProxyNode | 141 - libs/lib/mac32/include/osg/Quat | 393 --- libs/lib/mac32/include/osg/Referenced | 210 -- libs/lib/mac32/include/osg/RenderInfo | 79 - libs/lib/mac32/include/osg/Scissor | 110 - libs/lib/mac32/include/osg/Sequence | 252 -- libs/lib/mac32/include/osg/ShadeModel | 77 - libs/lib/mac32/include/osg/Shader | 311 -- libs/lib/mac32/include/osg/ShaderAttribute | 79 - libs/lib/mac32/include/osg/ShaderComposer | 58 - .../mac32/include/osg/ShadowVolumeOccluder | 172 -- libs/lib/mac32/include/osg/Shape | 651 ---- libs/lib/mac32/include/osg/ShapeDrawable | 201 -- libs/lib/mac32/include/osg/State | 2676 ----------------- libs/lib/mac32/include/osg/StateAttribute | 358 --- .../mac32/include/osg/StateAttributeCallback | 39 - libs/lib/mac32/include/osg/StateSet | 520 ---- libs/lib/mac32/include/osg/Stats | 125 - libs/lib/mac32/include/osg/Stencil | 228 -- libs/lib/mac32/include/osg/StencilTwoSided | 231 -- libs/lib/mac32/include/osg/Switch | 98 - .../include/osg/TemplatePrimitiveFunctor | 317 -- libs/lib/mac32/include/osg/TexEnv | 95 - libs/lib/mac32/include/osg/TexEnvCombine | 287 -- libs/lib/mac32/include/osg/TexEnvFilter | 70 - libs/lib/mac32/include/osg/TexGen | 142 - libs/lib/mac32/include/osg/TexGenNode | 78 - libs/lib/mac32/include/osg/TexMat | 89 - libs/lib/mac32/include/osg/Texture | 1284 -------- libs/lib/mac32/include/osg/Texture1D | 162 - libs/lib/mac32/include/osg/Texture2D | 172 -- libs/lib/mac32/include/osg/Texture2DArray | 230 -- .../mac32/include/osg/Texture2DMultisample | 95 - libs/lib/mac32/include/osg/Texture3D | 230 -- libs/lib/mac32/include/osg/TextureCubeMap | 188 -- libs/lib/mac32/include/osg/TextureRectangle | 148 - libs/lib/mac32/include/osg/Timer | 153 - libs/lib/mac32/include/osg/TransferFunction | 128 - libs/lib/mac32/include/osg/Transform | 167 - libs/lib/mac32/include/osg/TriangleFunctor | 397 --- .../mac32/include/osg/TriangleIndexFunctor | 344 --- libs/lib/mac32/include/osg/Uniform | 518 ---- libs/lib/mac32/include/osg/UserDataContainer | 192 -- libs/lib/mac32/include/osg/ValueObject | 207 -- libs/lib/mac32/include/osg/Vec2 | 25 - libs/lib/mac32/include/osg/Vec2b | 155 - libs/lib/mac32/include/osg/Vec2d | 193 -- libs/lib/mac32/include/osg/Vec2f | 190 -- libs/lib/mac32/include/osg/Vec2s | 149 - libs/lib/mac32/include/osg/Vec3 | 25 - libs/lib/mac32/include/osg/Vec3b | 160 - libs/lib/mac32/include/osg/Vec3d | 225 -- libs/lib/mac32/include/osg/Vec3f | 224 -- libs/lib/mac32/include/osg/Vec3s | 171 -- libs/lib/mac32/include/osg/Vec4 | 25 - libs/lib/mac32/include/osg/Vec4b | 170 -- libs/lib/mac32/include/osg/Vec4d | 299 -- libs/lib/mac32/include/osg/Vec4f | 269 -- libs/lib/mac32/include/osg/Vec4s | 193 -- libs/lib/mac32/include/osg/Vec4ub | 161 - libs/lib/mac32/include/osg/Version | 73 - libs/lib/mac32/include/osg/VertexProgram | 320 -- libs/lib/mac32/include/osg/View | 185 -- libs/lib/mac32/include/osg/Viewport | 137 - libs/lib/mac32/include/osg/buffered_value | 132 - libs/lib/mac32/include/osg/fast_back_stack | 97 - libs/lib/mac32/include/osg/io_utils | 338 --- libs/lib/mac32/include/osg/observer_ptr | 159 - libs/lib/mac32/include/osg/ref_ptr | 138 - libs/lib/mac32/include/osgAnimation/Action | 147 - .../include/osgAnimation/ActionAnimation | 41 - .../mac32/include/osgAnimation/ActionBlendIn | 44 - .../mac32/include/osgAnimation/ActionBlendOut | 45 - .../mac32/include/osgAnimation/ActionCallback | 41 - .../include/osgAnimation/ActionStripAnimation | 57 - .../mac32/include/osgAnimation/ActionVisitor | 117 - libs/lib/mac32/include/osgAnimation/Animation | 104 - .../include/osgAnimation/AnimationManagerBase | 70 - .../osgAnimation/AnimationUpdateCallback | 72 - .../osgAnimation/BasicAnimationManager | 53 - libs/lib/mac32/include/osgAnimation/Bone | 61 - .../mac32/include/osgAnimation/BoneMapVisitor | 42 - libs/lib/mac32/include/osgAnimation/Channel | 185 -- .../mac32/include/osgAnimation/CubicBezier | 79 - .../lib/mac32/include/osgAnimation/EaseMotion | 530 ---- libs/lib/mac32/include/osgAnimation/Export | 67 - .../mac32/include/osgAnimation/FrameAction | 26 - .../mac32/include/osgAnimation/Interpolator | 240 -- libs/lib/mac32/include/osgAnimation/Keyframe | 141 - .../mac32/include/osgAnimation/LinkVisitor | 56 - .../mac32/include/osgAnimation/MorphGeometry | 154 - .../mac32/include/osgAnimation/RigGeometry | 136 - .../mac32/include/osgAnimation/RigTransform | 36 - .../include/osgAnimation/RigTransformHardware | 85 - .../include/osgAnimation/RigTransformSoftware | 172 -- libs/lib/mac32/include/osgAnimation/Sampler | 138 - libs/lib/mac32/include/osgAnimation/Skeleton | 49 - .../include/osgAnimation/StackedMatrixElement | 54 - .../osgAnimation/StackedQuaternionElement | 54 - .../osgAnimation/StackedRotateAxisElement | 59 - .../include/osgAnimation/StackedScaleElement | 56 - .../include/osgAnimation/StackedTransform | 42 - .../osgAnimation/StackedTransformElement | 42 - .../osgAnimation/StackedTranslateElement | 54 - .../mac32/include/osgAnimation/StatsHandler | 113 - .../mac32/include/osgAnimation/StatsVisitor | 53 - libs/lib/mac32/include/osgAnimation/Target | 134 - libs/lib/mac32/include/osgAnimation/Timeline | 122 - .../osgAnimation/TimelineAnimationManager | 44 - .../lib/mac32/include/osgAnimation/UpdateBone | 36 - .../mac32/include/osgAnimation/UpdateMaterial | 46 - .../osgAnimation/UpdateMatrixTransform | 48 - .../lib/mac32/include/osgAnimation/Vec3Packed | 119 - .../include/osgAnimation/VertexInfluence | 103 - libs/lib/mac32/include/osgDB/Archive | 86 - .../lib/mac32/include/osgDB/AuthenticationMap | 79 - libs/lib/mac32/include/osgDB/Callbacks | 110 - libs/lib/mac32/include/osgDB/ConvertUTF | 52 - libs/lib/mac32/include/osgDB/DataTypes | 135 - libs/lib/mac32/include/osgDB/DatabasePager | 476 --- .../lib/mac32/include/osgDB/DatabaseRevisions | 133 - libs/lib/mac32/include/osgDB/DotOsgWrapper | 171 -- libs/lib/mac32/include/osgDB/DynamicLibrary | 79 - libs/lib/mac32/include/osgDB/Export | 51 - .../mac32/include/osgDB/ExternalFileWriter | 106 - libs/lib/mac32/include/osgDB/FileCache | 77 - libs/lib/mac32/include/osgDB/FileNameUtils | 86 - libs/lib/mac32/include/osgDB/FileUtils | 137 - libs/lib/mac32/include/osgDB/ImageOptions | 149 - libs/lib/mac32/include/osgDB/ImagePager | 175 -- libs/lib/mac32/include/osgDB/ImageProcessor | 54 - libs/lib/mac32/include/osgDB/Input | 306 -- libs/lib/mac32/include/osgDB/InputStream | 196 -- libs/lib/mac32/include/osgDB/ObjectWrapper | 181 -- libs/lib/mac32/include/osgDB/Options | 273 -- libs/lib/mac32/include/osgDB/Output | 141 - libs/lib/mac32/include/osgDB/OutputStream | 196 -- libs/lib/mac32/include/osgDB/ParameterOutput | 186 -- libs/lib/mac32/include/osgDB/PluginQuery | 57 - libs/lib/mac32/include/osgDB/ReadFile | 284 -- libs/lib/mac32/include/osgDB/ReaderWriter | 266 -- libs/lib/mac32/include/osgDB/Registry | 724 ----- libs/lib/mac32/include/osgDB/Serializer | 985 ------ .../mac32/include/osgDB/SharedStateManager | 141 - libs/lib/mac32/include/osgDB/StreamOperator | 111 - libs/lib/mac32/include/osgDB/Version | 46 - libs/lib/mac32/include/osgDB/WriteFile | 130 - libs/lib/mac32/include/osgDB/XmlParser | 156 - libs/lib/mac32/include/osgDB/fstream | 69 - .../mac32/include/osgFX/AnisotropicLighting | 122 - libs/lib/mac32/include/osgFX/BumpMapping | 198 -- libs/lib/mac32/include/osgFX/Cartoon | 122 - libs/lib/mac32/include/osgFX/Effect | 217 -- libs/lib/mac32/include/osgFX/Export | 40 - .../mac32/include/osgFX/MultiTextureControl | 53 - libs/lib/mac32/include/osgFX/Outline | 97 - libs/lib/mac32/include/osgFX/Registry | 74 - libs/lib/mac32/include/osgFX/Scribe | 101 - .../mac32/include/osgFX/SpecularHighlights | 138 - libs/lib/mac32/include/osgFX/Technique | 158 - libs/lib/mac32/include/osgFX/Validator | 75 - libs/lib/mac32/include/osgFX/Version | 46 - .../include/osgGA/AnimationPathManipulator | 121 - .../lib/mac32/include/osgGA/CameraManipulator | 188 -- .../include/osgGA/CameraViewSwitchManipulator | 79 - libs/lib/mac32/include/osgGA/DriveManipulator | 123 - libs/lib/mac32/include/osgGA/EventQueue | 239 -- libs/lib/mac32/include/osgGA/EventVisitor | 146 - libs/lib/mac32/include/osgGA/Export | 74 - .../include/osgGA/FirstPersonManipulator | 112 - .../lib/mac32/include/osgGA/FlightManipulator | 83 - libs/lib/mac32/include/osgGA/GUIActionAdapter | 91 - libs/lib/mac32/include/osgGA/GUIEventAdapter | 630 ---- libs/lib/mac32/include/osgGA/GUIEventHandler | 138 - .../include/osgGA/KeySwitchMatrixManipulator | 136 - .../osgGA/MultiTouchTrackballManipulator | 47 - .../include/osgGA/NodeTrackerManipulator | 107 - libs/lib/mac32/include/osgGA/OrbitManipulator | 127 - .../mac32/include/osgGA/SphericalManipulator | 178 -- .../mac32/include/osgGA/StandardManipulator | 203 -- .../mac32/include/osgGA/StateSetManipulator | 110 - .../mac32/include/osgGA/TerrainManipulator | 64 - .../mac32/include/osgGA/TrackballManipulator | 40 - libs/lib/mac32/include/osgGA/UFOManipulator | 188 -- libs/lib/mac32/include/osgGA/Version | 48 - .../mac32/include/osgManipulator/AntiSquish | 84 - libs/lib/mac32/include/osgManipulator/Command | 318 -- .../include/osgManipulator/CommandManager | 83 - .../mac32/include/osgManipulator/Constraint | 99 - libs/lib/mac32/include/osgManipulator/Dragger | 345 --- libs/lib/mac32/include/osgManipulator/Export | 44 - .../mac32/include/osgManipulator/Projector | 302 -- .../osgManipulator/RotateCylinderDragger | 73 - .../osgManipulator/RotateSphereDragger | 72 - .../include/osgManipulator/Scale1DDragger | 99 - .../include/osgManipulator/Scale2DDragger | 117 - .../include/osgManipulator/ScaleAxisDragger | 48 - .../mac32/include/osgManipulator/Selection | 29 - .../include/osgManipulator/TabBoxDragger | 49 - .../osgManipulator/TabBoxTrackballDragger | 48 - .../include/osgManipulator/TabPlaneDragger | 58 - .../osgManipulator/TabPlaneTrackballDragger | 50 - .../include/osgManipulator/TrackballDragger | 50 - .../include/osgManipulator/Translate1DDragger | 70 - .../include/osgManipulator/Translate2DDragger | 68 - .../osgManipulator/TranslateAxisDragger | 48 - .../osgManipulator/TranslatePlaneDragger | 57 - libs/lib/mac32/include/osgManipulator/Version | 48 - .../mac32/include/osgParticle/AccelOperator | 108 - .../include/osgParticle/AngularAccelOperator | 99 - .../osgParticle/AngularDampingOperator | 94 - .../mac32/include/osgParticle/BounceOperator | 78 - libs/lib/mac32/include/osgParticle/BoxPlacer | 174 -- .../mac32/include/osgParticle/CenteredPlacer | 84 - .../mac32/include/osgParticle/CompositePlacer | 104 - .../osgParticle/ConnectedParticleSystem | 79 - .../include/osgParticle/ConstantRateCounter | 77 - libs/lib/mac32/include/osgParticle/Counter | 54 - .../mac32/include/osgParticle/DampingOperator | 94 - .../mac32/include/osgParticle/DomainOperator | 235 -- libs/lib/mac32/include/osgParticle/Emitter | 105 - .../include/osgParticle/ExplosionDebrisEffect | 56 - .../mac32/include/osgParticle/ExplosionEffect | 56 - .../include/osgParticle/ExplosionOperator | 127 - libs/lib/mac32/include/osgParticle/Export | 51 - libs/lib/mac32/include/osgParticle/FireEffect | 57 - .../include/osgParticle/FluidFrictionOperator | 148 - .../mac32/include/osgParticle/FluidProgram | 114 - .../mac32/include/osgParticle/ForceOperator | 98 - .../mac32/include/osgParticle/Interpolator | 87 - .../include/osgParticle/LinearInterpolator | 51 - .../mac32/include/osgParticle/ModularEmitter | 158 - .../mac32/include/osgParticle/ModularProgram | 99 - .../include/osgParticle/MultiSegmentPlacer | 144 - libs/lib/mac32/include/osgParticle/Operator | 115 - .../mac32/include/osgParticle/OrbitOperator | 112 - libs/lib/mac32/include/osgParticle/Particle | 636 ---- .../mac32/include/osgParticle/ParticleEffect | 118 - .../include/osgParticle/ParticleProcessor | 340 --- .../mac32/include/osgParticle/ParticleSystem | 527 ---- .../include/osgParticle/ParticleSystemUpdater | 134 - libs/lib/mac32/include/osgParticle/Placer | 68 - .../lib/mac32/include/osgParticle/PointPlacer | 78 - .../include/osgParticle/PrecipitationEffect | 265 -- libs/lib/mac32/include/osgParticle/Program | 68 - .../mac32/include/osgParticle/RadialShooter | 196 -- .../include/osgParticle/RandomRateCounter | 76 - .../mac32/include/osgParticle/SectorPlacer | 149 - .../mac32/include/osgParticle/SegmentPlacer | 144 - libs/lib/mac32/include/osgParticle/Shooter | 64 - .../mac32/include/osgParticle/SinkOperator | 100 - .../lib/mac32/include/osgParticle/SmokeEffect | 56 - .../include/osgParticle/SmokeTrailEffect | 56 - .../include/osgParticle/VariableRateCounter | 77 - libs/lib/mac32/include/osgParticle/Version | 48 - libs/lib/mac32/include/osgParticle/range | 89 - .../include/osgPresentation/AnimationMaterial | 173 -- .../osgPresentation/CompileSlideCallback | 45 - libs/lib/mac32/include/osgPresentation/Export | 49 - .../include/osgPresentation/PickEventHandler | 71 - .../include/osgPresentation/SlideEventHandler | 323 -- .../osgPresentation/SlideShowConstructor | 520 ---- .../mac32/include/osgShadow/ConvexPolyhedron | 123 - .../mac32/include/osgShadow/DebugShadowMap | 192 -- libs/lib/mac32/include/osgShadow/Export | 49 - .../osgShadow/LightSpacePerspectiveShadowMap | 122 - .../osgShadow/MinimalCullBoundsShadowMap | 82 - .../osgShadow/MinimalDrawBoundsShadowMap | 128 - .../mac32/include/osgShadow/MinimalShadowMap | 164 - .../mac32/include/osgShadow/OccluderGeometry | 259 -- .../include/osgShadow/ParallelSplitShadowMap | 216 -- .../include/osgShadow/ProjectionShadowMap | 85 - libs/lib/mac32/include/osgShadow/ShadowMap | 123 - .../mac32/include/osgShadow/ShadowTechnique | 87 - .../lib/mac32/include/osgShadow/ShadowTexture | 68 - libs/lib/mac32/include/osgShadow/ShadowVolume | 83 - .../lib/mac32/include/osgShadow/ShadowedScene | 68 - .../lib/mac32/include/osgShadow/SoftShadowMap | 92 - .../mac32/include/osgShadow/StandardShadowMap | 200 -- libs/lib/mac32/include/osgShadow/Version | 46 - .../osgShadow/ViewDependentShadowTechnique | 232 -- libs/lib/mac32/include/osgSim/BlinkSequence | 185 -- libs/lib/mac32/include/osgSim/ColorRange | 66 - libs/lib/mac32/include/osgSim/DOFTransform | 175 -- libs/lib/mac32/include/osgSim/ElevationSlice | 101 - libs/lib/mac32/include/osgSim/Export | 59 - .../mac32/include/osgSim/GeographicLocation | 87 - .../mac32/include/osgSim/HeightAboveTerrain | 116 - libs/lib/mac32/include/osgSim/Impostor | 121 - libs/lib/mac32/include/osgSim/ImpostorSprite | 241 -- .../include/osgSim/InsertImpostorsVisitor | 68 - libs/lib/mac32/include/osgSim/LightPoint | 72 - libs/lib/mac32/include/osgSim/LightPointNode | 114 - .../lib/mac32/include/osgSim/LightPointSystem | 63 - libs/lib/mac32/include/osgSim/LineOfSight | 129 - libs/lib/mac32/include/osgSim/MultiSwitch | 107 - .../lib/mac32/include/osgSim/ObjectRecordData | 73 - libs/lib/mac32/include/osgSim/OverlayNode | 195 -- libs/lib/mac32/include/osgSim/ScalarBar | 248 -- libs/lib/mac32/include/osgSim/ScalarsToColors | 53 - libs/lib/mac32/include/osgSim/Sector | 314 -- libs/lib/mac32/include/osgSim/ShapeAttribute | 128 - libs/lib/mac32/include/osgSim/SphereSegment | 317 -- libs/lib/mac32/include/osgSim/Version | 46 - libs/lib/mac32/include/osgSim/VisibilityGroup | 76 - libs/lib/mac32/include/osgTerrain/Export | 49 - .../include/osgTerrain/GeometryTechnique | 116 - libs/lib/mac32/include/osgTerrain/Layer | 611 ---- libs/lib/mac32/include/osgTerrain/Locator | 132 - libs/lib/mac32/include/osgTerrain/Terrain | 122 - .../mac32/include/osgTerrain/TerrainTechnique | 105 - libs/lib/mac32/include/osgTerrain/TerrainTile | 293 -- .../include/osgTerrain/ValidDataOperator | 74 - libs/lib/mac32/include/osgTerrain/Version | 46 - libs/lib/mac32/include/osgText/Export | 49 - libs/lib/mac32/include/osgText/FadeText | 63 - libs/lib/mac32/include/osgText/Font | 247 -- libs/lib/mac32/include/osgText/Font3D | 55 - libs/lib/mac32/include/osgText/Glyph | 296 -- libs/lib/mac32/include/osgText/KerningType | 30 - libs/lib/mac32/include/osgText/String | 95 - libs/lib/mac32/include/osgText/Style | 113 - libs/lib/mac32/include/osgText/Text | 411 --- libs/lib/mac32/include/osgText/Text3D | 157 - libs/lib/mac32/include/osgText/TextBase | 336 --- libs/lib/mac32/include/osgText/Version | 46 - libs/lib/mac32/include/osgUtil/ConvertVec | 139 - .../mac32/include/osgUtil/CubeMapGenerator | 121 - libs/lib/mac32/include/osgUtil/CullVisitor | 456 --- .../include/osgUtil/DelaunayTriangulator | 182 -- .../osgUtil/DisplayRequirementsVisitor | 61 - .../include/osgUtil/DrawElementTypeSimplifier | 42 - libs/lib/mac32/include/osgUtil/EdgeCollector | 210 -- libs/lib/mac32/include/osgUtil/Export | 52 - .../mac32/include/osgUtil/GLObjectsVisitor | 137 - .../mac32/include/osgUtil/HalfWayMapGenerator | 53 - .../include/osgUtil/HighlightMapGenerator | 63 - .../osgUtil/IncrementalCompileOperation | 324 -- .../mac32/include/osgUtil/IntersectVisitor | 228 -- .../mac32/include/osgUtil/IntersectionVisitor | 289 -- .../include/osgUtil/LineSegmentIntersector | 113 - libs/lib/mac32/include/osgUtil/MeshOptimizers | 101 - .../include/osgUtil/OperationArrayFunctor | 116 - libs/lib/mac32/include/osgUtil/Optimizer | 881 ------ .../mac32/include/osgUtil/PlaneIntersector | 108 - .../mac32/include/osgUtil/PolytopeIntersector | 134 - .../include/osgUtil/PositionalStateContainer | 77 - libs/lib/mac32/include/osgUtil/PrintVisitor | 53 - .../include/osgUtil/ReflectionMapGenerator | 55 - libs/lib/mac32/include/osgUtil/RenderBin | 181 -- libs/lib/mac32/include/osgUtil/RenderLeaf | 118 - libs/lib/mac32/include/osgUtil/RenderStage | 318 -- .../include/osgUtil/ReversePrimitiveFunctor | 60 - .../mac32/include/osgUtil/SceneGraphBuilder | 186 -- libs/lib/mac32/include/osgUtil/SceneView | 560 ---- libs/lib/mac32/include/osgUtil/ShaderGen | 84 - libs/lib/mac32/include/osgUtil/Simplifier | 121 - .../mac32/include/osgUtil/SmoothingVisitor | 55 - libs/lib/mac32/include/osgUtil/StateGraph | 317 -- libs/lib/mac32/include/osgUtil/Statistics | 232 -- .../include/osgUtil/TangentSpaceGenerator | 78 - libs/lib/mac32/include/osgUtil/Tessellator | 246 -- .../include/osgUtil/TransformAttributeFunctor | 46 - .../mac32/include/osgUtil/TransformCallback | 51 - .../lib/mac32/include/osgUtil/TriStripVisitor | 91 - libs/lib/mac32/include/osgUtil/UpdateVisitor | 114 - libs/lib/mac32/include/osgUtil/Version | 48 - .../mac32/include/osgViewer/CompositeViewer | 144 - libs/lib/mac32/include/osgViewer/Export | 57 - .../mac32/include/osgViewer/GraphicsWindow | 294 -- libs/lib/mac32/include/osgViewer/Renderer | 122 - libs/lib/mac32/include/osgViewer/Scene | 75 - libs/lib/mac32/include/osgViewer/Version | 48 - libs/lib/mac32/include/osgViewer/View | 267 -- libs/lib/mac32/include/osgViewer/Viewer | 130 - libs/lib/mac32/include/osgViewer/ViewerBase | 330 -- .../include/osgViewer/ViewerEventHandlers | 544 ---- .../osgViewer/api/X11/GraphicsHandleX11 | 80 - .../osgViewer/api/X11/GraphicsWindowX11 | 204 -- .../include/osgViewer/api/X11/PixelBufferX11 | 90 - libs/lib/mac32/include/osgVolume/Export | 49 - .../include/osgVolume/FixedFunctionTechnique | 60 - libs/lib/mac32/include/osgVolume/Layer | 275 -- libs/lib/mac32/include/osgVolume/Locator | 100 - libs/lib/mac32/include/osgVolume/Property | 416 --- .../include/osgVolume/RayTracedTechnique | 60 - libs/lib/mac32/include/osgVolume/Version | 46 - libs/lib/mac32/include/osgVolume/Volume | 79 - .../mac32/include/osgVolume/VolumeTechnique | 68 - libs/lib/mac32/include/osgVolume/VolumeTile | 157 - libs/lib/mac32/include/osgWidget/Box | 61 - libs/lib/mac32/include/osgWidget/Browser | 90 - libs/lib/mac32/include/osgWidget/Canvas | 42 - .../mac32/include/osgWidget/EventInterface | 412 --- libs/lib/mac32/include/osgWidget/Export | 52 - libs/lib/mac32/include/osgWidget/Frame | 254 -- libs/lib/mac32/include/osgWidget/Input | 112 - libs/lib/mac32/include/osgWidget/Label | 66 - libs/lib/mac32/include/osgWidget/Lua | 46 - libs/lib/mac32/include/osgWidget/PdfReader | 147 - libs/lib/mac32/include/osgWidget/Python | 42 - libs/lib/mac32/include/osgWidget/ScriptEngine | 42 - .../mac32/include/osgWidget/StyleInterface | 42 - libs/lib/mac32/include/osgWidget/StyleManager | 208 -- libs/lib/mac32/include/osgWidget/Table | 78 - libs/lib/mac32/include/osgWidget/Types | 48 - .../mac32/include/osgWidget/UIObjectParent | 130 - libs/lib/mac32/include/osgWidget/Util | 83 - libs/lib/mac32/include/osgWidget/Version | 35 - .../include/osgWidget/ViewerEventHandlers | 125 - libs/lib/mac32/include/osgWidget/VncClient | 63 - libs/lib/mac32/include/osgWidget/Widget | 651 ---- libs/lib/mac32/include/osgWidget/Window | 662 ---- .../lib/mac32/include/osgWidget/WindowManager | 389 --- libs/lib/mac32/lib/libOpenThreads.dylib | Bin 38692 -> 0 bytes libs/lib/mac32/lib/libcurl.4.dylib | Bin 323032 -> 0 bytes libs/lib/mac32/lib/libcurl.a | Bin 469576 -> 0 bytes libs/lib/mac32/lib/libcurl.dylib | 1 - libs/lib/mac32/lib/libcurl.la | 41 - libs/lib/mac32/lib/libexpat.1.5.2.dylib | Bin 168472 -> 0 bytes libs/lib/mac32/lib/libexpat.1.dylib | 1 - libs/lib/mac32/lib/libexpat.a | Bin 501552 -> 0 bytes libs/lib/mac32/lib/libexpat.dylib | 1 - libs/lib/mac32/lib/libexpat.la | 35 - libs/lib/mac32/lib/libosg.dylib | Bin 3386780 -> 0 bytes libs/lib/mac32/lib/libosgAnimation.dylib | Bin 690196 -> 0 bytes libs/lib/mac32/lib/libosgDB.dylib | Bin 1243100 -> 0 bytes libs/lib/mac32/lib/libosgFX.dylib | Bin 241136 -> 0 bytes libs/lib/mac32/lib/libosgGA.dylib | Bin 440920 -> 0 bytes libs/lib/mac32/lib/libosgManipulator.dylib | Bin 347352 -> 0 bytes libs/lib/mac32/lib/libosgParticle.dylib | Bin 433356 -> 0 bytes libs/lib/mac32/lib/libosgPresentation.dylib | Bin 392220 -> 0 bytes libs/lib/mac32/lib/libosgShadow.dylib | Bin 629224 -> 0 bytes libs/lib/mac32/lib/libosgSim.dylib | Bin 764996 -> 0 bytes libs/lib/mac32/lib/libosgTerrain.dylib | Bin 296636 -> 0 bytes libs/lib/mac32/lib/libosgText.dylib | Bin 469012 -> 0 bytes libs/lib/mac32/lib/libosgUtil.dylib | Bin 2144692 -> 0 bytes libs/lib/mac32/lib/libosgViewer.dylib | Bin 936988 -> 0 bytes libs/lib/mac32/lib/libosgVolume.dylib | Bin 346092 -> 0 bytes libs/lib/mac32/lib/libosgWidget.dylib | Bin 475052 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_3dc.so | Bin 75632 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_3ds.so | Bin 353580 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_QTKit.so | Bin 86672 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_ac.so | Bin 218848 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_bmp.so | Bin 53860 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_bsp.so | Bin 249176 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_bvh.so | Bin 140000 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_cfg.so | Bin 191560 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_curl.so | Bin 100364 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_dds.so | Bin 63908 -> 0 bytes .../osgPlugins-3.0.1/osgdb_deprecated_osg.so | Bin 828564 -> 0 bytes .../osgdb_deprecated_osganimation.so | Bin 243492 -> 0 bytes .../osgdb_deprecated_osgfx.so | Bin 63412 -> 0 bytes .../osgdb_deprecated_osgparticle.so | Bin 257936 -> 0 bytes .../osgdb_deprecated_osgshadow.so | Bin 40060 -> 0 bytes .../osgdb_deprecated_osgsim.so | Bin 115232 -> 0 bytes .../osgdb_deprecated_osgterrain.so | Bin 92988 -> 0 bytes .../osgdb_deprecated_osgtext.so | Bin 64420 -> 0 bytes .../osgdb_deprecated_osgviewer.so | Bin 57560 -> 0 bytes .../osgdb_deprecated_osgvolume.so | Bin 94200 -> 0 bytes .../osgdb_deprecated_osgwidget.so | Bin 88444 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_dicom.so | Bin 5636256 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_dot.so | Bin 77212 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_dw.so | Bin 108472 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_dxf.so | Bin 344500 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_freetype.so | Bin 97444 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_geo.so | Bin 282100 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_glsl.so | Bin 51776 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_gz.so | Bin 68380 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_hdr.so | Bin 61624 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_imageio.so | Bin 80216 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_ive.so | Bin 998436 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_logo.so | Bin 69460 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_lwo.so | Bin 515424 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_lws.so | Bin 121664 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_md2.so | Bin 92488 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_mdl.so | Bin 135332 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_normals.so | Bin 96080 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_obj.so | Bin 244256 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_openflight.so | Bin 747816 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_osg.so | Bin 220660 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_osga.so | Bin 127152 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_osgshadow.so | Bin 48968 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_osgterrain.so | Bin 63220 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_osgtgz.so | Bin 56212 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_osgviewer.so | Bin 60500 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_p3d.so | Bin 301084 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_pic.so | Bin 43908 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_ply.so | Bin 121304 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_pnm.so | Bin 57000 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_pov.so | Bin 139768 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_pvr.so | Bin 50832 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_qt.so | Bin 204620 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_revisions.so | Bin 61128 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_rgb.so | Bin 53828 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_rot.so | Bin 44400 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_scale.so | Bin 44736 -> 0 bytes .../osgPlugins-3.0.1/osgdb_serializers_osg.so | Bin 2030008 -> 0 bytes .../osgdb_serializers_osganimation.so | Bin 609620 -> 0 bytes .../osgdb_serializers_osgfx.so | Bin 129604 -> 0 bytes .../osgdb_serializers_osgmanipulator.so | Bin 169148 -> 0 bytes .../osgdb_serializers_osgparticle.so | Bin 594996 -> 0 bytes .../osgdb_serializers_osgshadow.so | Bin 283068 -> 0 bytes .../osgdb_serializers_osgsim.so | Bin 387140 -> 0 bytes .../osgdb_serializers_osgterrain.so | Bin 257708 -> 0 bytes .../osgdb_serializers_osgtext.so | Bin 191692 -> 0 bytes .../osgdb_serializers_osgvolume.so | Bin 240924 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_shp.so | Bin 200124 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_stl.so | Bin 100524 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_tga.so | Bin 49148 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_tgz.so | Bin 60276 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_trans.so | Bin 44416 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_txf.so | Bin 62868 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_txp.so | Bin 1012664 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_vtf.so | Bin 58756 -> 0 bytes .../lib/mac32/lib/osgPlugins-3.0.1/osgdb_x.so | Bin 146884 -> 0 bytes .../mac32/lib/osgPlugins-3.0.1/osgdb_zip.so | Bin 164900 -> 0 bytes libs/lib/mac64/include/OpenThreads/Atomic | 287 -- libs/lib/mac64/include/OpenThreads/Barrier | 100 - libs/lib/mac64/include/OpenThreads/Block | 177 -- libs/lib/mac64/include/OpenThreads/Condition | 93 - libs/lib/mac64/include/OpenThreads/Config | 34 - libs/lib/mac64/include/OpenThreads/Exports | 44 - libs/lib/mac64/include/OpenThreads/Mutex | 100 - .../mac64/include/OpenThreads/ReadWriteMutex | 114 - .../mac64/include/OpenThreads/ReentrantMutex | 34 - libs/lib/mac64/include/OpenThreads/ScopedLock | 70 - libs/lib/mac64/include/OpenThreads/Thread | 389 --- libs/lib/mac64/include/OpenThreads/Version | 38 - libs/lib/mac64/include/osg/AlphaFunc | 102 - libs/lib/mac64/include/osg/AnimationPath | 314 -- libs/lib/mac64/include/osg/ApplicationUsage | 122 - libs/lib/mac64/include/osg/ArgumentParser | 213 -- libs/lib/mac64/include/osg/Array | 491 --- libs/lib/mac64/include/osg/ArrayDispatchers | 138 - libs/lib/mac64/include/osg/AudioStream | 86 - libs/lib/mac64/include/osg/AutoTransform | 161 - libs/lib/mac64/include/osg/Billboard | 132 - libs/lib/mac64/include/osg/BlendColor | 125 - libs/lib/mac64/include/osg/BlendEquation | 161 - libs/lib/mac64/include/osg/BlendFunc | 221 -- libs/lib/mac64/include/osg/BoundingBox | 243 -- libs/lib/mac64/include/osg/BoundingSphere | 306 -- libs/lib/mac64/include/osg/BoundsChecking | 216 -- libs/lib/mac64/include/osg/BufferIndexBinding | 134 - libs/lib/mac64/include/osg/BufferObject | 828 ----- libs/lib/mac64/include/osg/Camera | 674 ----- libs/lib/mac64/include/osg/CameraNode | 27 - libs/lib/mac64/include/osg/CameraView | 105 - libs/lib/mac64/include/osg/ClampColor | 139 - libs/lib/mac64/include/osg/ClearNode | 75 - libs/lib/mac64/include/osg/ClipNode | 113 - libs/lib/mac64/include/osg/ClipPlane | 127 - .../mac64/include/osg/ClusterCullingCallback | 75 - .../mac64/include/osg/CollectOccludersVisitor | 109 - libs/lib/mac64/include/osg/ColorMask | 100 - libs/lib/mac64/include/osg/ColorMatrix | 72 - .../mac64/include/osg/ComputeBoundsVisitor | 61 - libs/lib/mac64/include/osg/Config | 47 - .../mac64/include/osg/ConvexPlanarOccluder | 67 - .../lib/mac64/include/osg/ConvexPlanarPolygon | 49 - .../mac64/include/osg/CoordinateSystemNode | 248 -- libs/lib/mac64/include/osg/CopyOp | 93 - libs/lib/mac64/include/osg/CullFace | 79 - libs/lib/mac64/include/osg/CullSettings | 274 -- libs/lib/mac64/include/osg/CullStack | 302 -- libs/lib/mac64/include/osg/CullingSet | 350 --- libs/lib/mac64/include/osg/DeleteHandler | 88 - libs/lib/mac64/include/osg/Depth | 112 - libs/lib/mac64/include/osg/DisplaySettings | 337 --- libs/lib/mac64/include/osg/DrawPixels | 80 - libs/lib/mac64/include/osg/Drawable | 920 ------ libs/lib/mac64/include/osg/Endian | 85 - libs/lib/mac64/include/osg/Export | 72 - libs/lib/mac64/include/osg/Fog | 146 - libs/lib/mac64/include/osg/FragmentProgram | 312 -- libs/lib/mac64/include/osg/FrameBufferObject | 518 ---- libs/lib/mac64/include/osg/FrameStamp | 91 - libs/lib/mac64/include/osg/FrontFace | 70 - libs/lib/mac64/include/osg/GL | 221 -- libs/lib/mac64/include/osg/GL2Extensions | 791 ----- libs/lib/mac64/include/osg/GLBeginEndAdapter | 164 - libs/lib/mac64/include/osg/GLExtensions | 155 - libs/lib/mac64/include/osg/GLObjects | 42 - libs/lib/mac64/include/osg/GLU | 186 -- libs/lib/mac64/include/osg/Geode | 167 - libs/lib/mac64/include/osg/Geometry | 463 --- libs/lib/mac64/include/osg/GraphicsContext | 530 ---- .../mac64/include/osg/GraphicsCostEstimator | 142 - libs/lib/mac64/include/osg/GraphicsThread | 136 - libs/lib/mac64/include/osg/Group | 172 -- libs/lib/mac64/include/osg/Hint | 81 - libs/lib/mac64/include/osg/Image | 433 --- libs/lib/mac64/include/osg/ImageSequence | 151 - libs/lib/mac64/include/osg/ImageStream | 111 - libs/lib/mac64/include/osg/ImageUtils | 160 - libs/lib/mac64/include/osg/KdTree | 198 -- libs/lib/mac64/include/osg/LOD | 140 - libs/lib/mac64/include/osg/Light | 199 -- libs/lib/mac64/include/osg/LightModel | 95 - libs/lib/mac64/include/osg/LightSource | 93 - libs/lib/mac64/include/osg/LineSegment | 101 - libs/lib/mac64/include/osg/LineStipple | 83 - libs/lib/mac64/include/osg/LineWidth | 64 - libs/lib/mac64/include/osg/LogicOp | 113 - libs/lib/mac64/include/osg/Material | 205 -- libs/lib/mac64/include/osg/Math | 254 -- libs/lib/mac64/include/osg/Matrix | 34 - libs/lib/mac64/include/osg/MatrixTransform | 84 - libs/lib/mac64/include/osg/Matrixd | 815 ----- libs/lib/mac64/include/osg/Matrixf | 914 ------ libs/lib/mac64/include/osg/MixinVector | 199 -- libs/lib/mac64/include/osg/Multisample | 158 - libs/lib/mac64/include/osg/Node | 465 --- libs/lib/mac64/include/osg/NodeCallback | 98 - .../lib/mac64/include/osg/NodeTrackerCallback | 54 - libs/lib/mac64/include/osg/NodeVisitor | 369 --- libs/lib/mac64/include/osg/Notify | 145 - libs/lib/mac64/include/osg/Object | 267 -- libs/lib/mac64/include/osg/Observer | 77 - libs/lib/mac64/include/osg/ObserverNodePath | 76 - libs/lib/mac64/include/osg/OccluderNode | 59 - libs/lib/mac64/include/osg/OcclusionQueryNode | 202 -- libs/lib/mac64/include/osg/OperationThread | 227 -- libs/lib/mac64/include/osg/PagedLOD | 160 - libs/lib/mac64/include/osg/Plane | 362 --- libs/lib/mac64/include/osg/Point | 157 - libs/lib/mac64/include/osg/PointSprite | 80 - libs/lib/mac64/include/osg/PolygonMode | 90 - libs/lib/mac64/include/osg/PolygonOffset | 99 - libs/lib/mac64/include/osg/PolygonStipple | 68 - libs/lib/mac64/include/osg/Polytope | 406 --- .../include/osg/PositionAttitudeTransform | 78 - libs/lib/mac64/include/osg/PrimitiveSet | 565 ---- libs/lib/mac64/include/osg/Program | 406 --- libs/lib/mac64/include/osg/Projection | 61 - libs/lib/mac64/include/osg/ProxyNode | 141 - libs/lib/mac64/include/osg/Quat | 393 --- libs/lib/mac64/include/osg/Referenced | 210 -- libs/lib/mac64/include/osg/RenderInfo | 79 - libs/lib/mac64/include/osg/Scissor | 110 - libs/lib/mac64/include/osg/Sequence | 252 -- libs/lib/mac64/include/osg/ShadeModel | 77 - libs/lib/mac64/include/osg/Shader | 311 -- libs/lib/mac64/include/osg/ShaderAttribute | 79 - libs/lib/mac64/include/osg/ShaderComposer | 58 - .../mac64/include/osg/ShadowVolumeOccluder | 172 -- libs/lib/mac64/include/osg/Shape | 651 ---- libs/lib/mac64/include/osg/ShapeDrawable | 201 -- libs/lib/mac64/include/osg/State | 2676 ----------------- libs/lib/mac64/include/osg/StateAttribute | 358 --- .../mac64/include/osg/StateAttributeCallback | 39 - libs/lib/mac64/include/osg/StateSet | 520 ---- libs/lib/mac64/include/osg/Stats | 125 - libs/lib/mac64/include/osg/Stencil | 228 -- libs/lib/mac64/include/osg/StencilTwoSided | 231 -- libs/lib/mac64/include/osg/Switch | 98 - .../include/osg/TemplatePrimitiveFunctor | 317 -- libs/lib/mac64/include/osg/TexEnv | 95 - libs/lib/mac64/include/osg/TexEnvCombine | 287 -- libs/lib/mac64/include/osg/TexEnvFilter | 70 - libs/lib/mac64/include/osg/TexGen | 142 - libs/lib/mac64/include/osg/TexGenNode | 78 - libs/lib/mac64/include/osg/TexMat | 89 - libs/lib/mac64/include/osg/Texture | 1284 -------- libs/lib/mac64/include/osg/Texture1D | 162 - libs/lib/mac64/include/osg/Texture2D | 172 -- libs/lib/mac64/include/osg/Texture2DArray | 230 -- .../mac64/include/osg/Texture2DMultisample | 95 - libs/lib/mac64/include/osg/Texture3D | 230 -- libs/lib/mac64/include/osg/TextureCubeMap | 188 -- libs/lib/mac64/include/osg/TextureRectangle | 148 - libs/lib/mac64/include/osg/Timer | 153 - libs/lib/mac64/include/osg/TransferFunction | 128 - libs/lib/mac64/include/osg/Transform | 167 - libs/lib/mac64/include/osg/TriangleFunctor | 397 --- .../mac64/include/osg/TriangleIndexFunctor | 344 --- libs/lib/mac64/include/osg/Uniform | 518 ---- libs/lib/mac64/include/osg/UserDataContainer | 192 -- libs/lib/mac64/include/osg/ValueObject | 207 -- libs/lib/mac64/include/osg/Vec2 | 25 - libs/lib/mac64/include/osg/Vec2b | 155 - libs/lib/mac64/include/osg/Vec2d | 193 -- libs/lib/mac64/include/osg/Vec2f | 190 -- libs/lib/mac64/include/osg/Vec2s | 149 - libs/lib/mac64/include/osg/Vec3 | 25 - libs/lib/mac64/include/osg/Vec3b | 160 - libs/lib/mac64/include/osg/Vec3d | 225 -- libs/lib/mac64/include/osg/Vec3f | 224 -- libs/lib/mac64/include/osg/Vec3s | 171 -- libs/lib/mac64/include/osg/Vec4 | 25 - libs/lib/mac64/include/osg/Vec4b | 170 -- libs/lib/mac64/include/osg/Vec4d | 299 -- libs/lib/mac64/include/osg/Vec4f | 269 -- libs/lib/mac64/include/osg/Vec4s | 193 -- libs/lib/mac64/include/osg/Vec4ub | 161 - libs/lib/mac64/include/osg/Version | 73 - libs/lib/mac64/include/osg/VertexProgram | 320 -- libs/lib/mac64/include/osg/View | 185 -- libs/lib/mac64/include/osg/Viewport | 137 - libs/lib/mac64/include/osg/buffered_value | 132 - libs/lib/mac64/include/osg/fast_back_stack | 97 - libs/lib/mac64/include/osg/io_utils | 338 --- libs/lib/mac64/include/osg/observer_ptr | 159 - libs/lib/mac64/include/osg/ref_ptr | 138 - libs/lib/mac64/include/osgAnimation/Action | 147 - .../include/osgAnimation/ActionAnimation | 41 - .../mac64/include/osgAnimation/ActionBlendIn | 44 - .../mac64/include/osgAnimation/ActionBlendOut | 45 - .../mac64/include/osgAnimation/ActionCallback | 41 - .../include/osgAnimation/ActionStripAnimation | 57 - .../mac64/include/osgAnimation/ActionVisitor | 117 - libs/lib/mac64/include/osgAnimation/Animation | 104 - .../include/osgAnimation/AnimationManagerBase | 70 - .../osgAnimation/AnimationUpdateCallback | 72 - .../osgAnimation/BasicAnimationManager | 53 - libs/lib/mac64/include/osgAnimation/Bone | 61 - .../mac64/include/osgAnimation/BoneMapVisitor | 42 - libs/lib/mac64/include/osgAnimation/Channel | 185 -- .../mac64/include/osgAnimation/CubicBezier | 79 - .../lib/mac64/include/osgAnimation/EaseMotion | 530 ---- libs/lib/mac64/include/osgAnimation/Export | 67 - .../mac64/include/osgAnimation/FrameAction | 26 - .../mac64/include/osgAnimation/Interpolator | 240 -- libs/lib/mac64/include/osgAnimation/Keyframe | 141 - .../mac64/include/osgAnimation/LinkVisitor | 56 - .../mac64/include/osgAnimation/MorphGeometry | 154 - .../mac64/include/osgAnimation/RigGeometry | 136 - .../mac64/include/osgAnimation/RigTransform | 36 - .../include/osgAnimation/RigTransformHardware | 85 - .../include/osgAnimation/RigTransformSoftware | 172 -- libs/lib/mac64/include/osgAnimation/Sampler | 138 - libs/lib/mac64/include/osgAnimation/Skeleton | 49 - .../include/osgAnimation/StackedMatrixElement | 54 - .../osgAnimation/StackedQuaternionElement | 54 - .../osgAnimation/StackedRotateAxisElement | 59 - .../include/osgAnimation/StackedScaleElement | 56 - .../include/osgAnimation/StackedTransform | 42 - .../osgAnimation/StackedTransformElement | 42 - .../osgAnimation/StackedTranslateElement | 54 - .../mac64/include/osgAnimation/StatsHandler | 113 - .../mac64/include/osgAnimation/StatsVisitor | 53 - libs/lib/mac64/include/osgAnimation/Target | 134 - libs/lib/mac64/include/osgAnimation/Timeline | 122 - .../osgAnimation/TimelineAnimationManager | 44 - .../lib/mac64/include/osgAnimation/UpdateBone | 36 - .../mac64/include/osgAnimation/UpdateMaterial | 46 - .../osgAnimation/UpdateMatrixTransform | 48 - .../lib/mac64/include/osgAnimation/Vec3Packed | 119 - .../include/osgAnimation/VertexInfluence | 103 - libs/lib/mac64/include/osgDB/Archive | 86 - .../lib/mac64/include/osgDB/AuthenticationMap | 79 - libs/lib/mac64/include/osgDB/Callbacks | 110 - libs/lib/mac64/include/osgDB/ConvertUTF | 52 - libs/lib/mac64/include/osgDB/DataTypes | 135 - libs/lib/mac64/include/osgDB/DatabasePager | 476 --- .../lib/mac64/include/osgDB/DatabaseRevisions | 133 - libs/lib/mac64/include/osgDB/DotOsgWrapper | 171 -- libs/lib/mac64/include/osgDB/DynamicLibrary | 79 - libs/lib/mac64/include/osgDB/Export | 51 - .../mac64/include/osgDB/ExternalFileWriter | 106 - libs/lib/mac64/include/osgDB/FileCache | 77 - libs/lib/mac64/include/osgDB/FileNameUtils | 86 - libs/lib/mac64/include/osgDB/FileUtils | 137 - libs/lib/mac64/include/osgDB/ImageOptions | 149 - libs/lib/mac64/include/osgDB/ImagePager | 175 -- libs/lib/mac64/include/osgDB/ImageProcessor | 54 - libs/lib/mac64/include/osgDB/Input | 306 -- libs/lib/mac64/include/osgDB/InputStream | 196 -- libs/lib/mac64/include/osgDB/ObjectWrapper | 181 -- libs/lib/mac64/include/osgDB/Options | 273 -- libs/lib/mac64/include/osgDB/Output | 141 - libs/lib/mac64/include/osgDB/OutputStream | 196 -- libs/lib/mac64/include/osgDB/ParameterOutput | 186 -- libs/lib/mac64/include/osgDB/PluginQuery | 57 - libs/lib/mac64/include/osgDB/ReadFile | 284 -- libs/lib/mac64/include/osgDB/ReaderWriter | 266 -- libs/lib/mac64/include/osgDB/Registry | 724 ----- libs/lib/mac64/include/osgDB/Serializer | 985 ------ .../mac64/include/osgDB/SharedStateManager | 141 - libs/lib/mac64/include/osgDB/StreamOperator | 111 - libs/lib/mac64/include/osgDB/Version | 46 - libs/lib/mac64/include/osgDB/WriteFile | 130 - libs/lib/mac64/include/osgDB/XmlParser | 156 - libs/lib/mac64/include/osgDB/fstream | 69 - .../mac64/include/osgFX/AnisotropicLighting | 122 - libs/lib/mac64/include/osgFX/BumpMapping | 198 -- libs/lib/mac64/include/osgFX/Cartoon | 122 - libs/lib/mac64/include/osgFX/Effect | 217 -- libs/lib/mac64/include/osgFX/Export | 40 - .../mac64/include/osgFX/MultiTextureControl | 53 - libs/lib/mac64/include/osgFX/Outline | 97 - libs/lib/mac64/include/osgFX/Registry | 74 - libs/lib/mac64/include/osgFX/Scribe | 101 - .../mac64/include/osgFX/SpecularHighlights | 138 - libs/lib/mac64/include/osgFX/Technique | 158 - libs/lib/mac64/include/osgFX/Validator | 75 - libs/lib/mac64/include/osgFX/Version | 46 - .../include/osgGA/AnimationPathManipulator | 121 - .../lib/mac64/include/osgGA/CameraManipulator | 188 -- .../include/osgGA/CameraViewSwitchManipulator | 79 - libs/lib/mac64/include/osgGA/DriveManipulator | 123 - libs/lib/mac64/include/osgGA/EventQueue | 239 -- libs/lib/mac64/include/osgGA/EventVisitor | 146 - libs/lib/mac64/include/osgGA/Export | 74 - .../include/osgGA/FirstPersonManipulator | 112 - .../lib/mac64/include/osgGA/FlightManipulator | 83 - libs/lib/mac64/include/osgGA/GUIActionAdapter | 91 - libs/lib/mac64/include/osgGA/GUIEventAdapter | 630 ---- libs/lib/mac64/include/osgGA/GUIEventHandler | 138 - .../include/osgGA/KeySwitchMatrixManipulator | 136 - .../osgGA/MultiTouchTrackballManipulator | 47 - .../include/osgGA/NodeTrackerManipulator | 107 - libs/lib/mac64/include/osgGA/OrbitManipulator | 127 - .../mac64/include/osgGA/SphericalManipulator | 178 -- .../mac64/include/osgGA/StandardManipulator | 203 -- .../mac64/include/osgGA/StateSetManipulator | 110 - .../mac64/include/osgGA/TerrainManipulator | 64 - .../mac64/include/osgGA/TrackballManipulator | 40 - libs/lib/mac64/include/osgGA/UFOManipulator | 188 -- libs/lib/mac64/include/osgGA/Version | 48 - .../mac64/include/osgManipulator/AntiSquish | 84 - libs/lib/mac64/include/osgManipulator/Command | 318 -- .../include/osgManipulator/CommandManager | 83 - .../mac64/include/osgManipulator/Constraint | 99 - libs/lib/mac64/include/osgManipulator/Dragger | 345 --- libs/lib/mac64/include/osgManipulator/Export | 44 - .../mac64/include/osgManipulator/Projector | 302 -- .../osgManipulator/RotateCylinderDragger | 73 - .../osgManipulator/RotateSphereDragger | 72 - .../include/osgManipulator/Scale1DDragger | 99 - .../include/osgManipulator/Scale2DDragger | 117 - .../include/osgManipulator/ScaleAxisDragger | 48 - .../mac64/include/osgManipulator/Selection | 29 - .../include/osgManipulator/TabBoxDragger | 49 - .../osgManipulator/TabBoxTrackballDragger | 48 - .../include/osgManipulator/TabPlaneDragger | 58 - .../osgManipulator/TabPlaneTrackballDragger | 50 - .../include/osgManipulator/TrackballDragger | 50 - .../include/osgManipulator/Translate1DDragger | 70 - .../include/osgManipulator/Translate2DDragger | 68 - .../osgManipulator/TranslateAxisDragger | 48 - .../osgManipulator/TranslatePlaneDragger | 57 - libs/lib/mac64/include/osgManipulator/Version | 48 - .../mac64/include/osgParticle/AccelOperator | 108 - .../include/osgParticle/AngularAccelOperator | 99 - .../osgParticle/AngularDampingOperator | 94 - .../mac64/include/osgParticle/BounceOperator | 78 - libs/lib/mac64/include/osgParticle/BoxPlacer | 174 -- .../mac64/include/osgParticle/CenteredPlacer | 84 - .../mac64/include/osgParticle/CompositePlacer | 104 - .../osgParticle/ConnectedParticleSystem | 79 - .../include/osgParticle/ConstantRateCounter | 77 - libs/lib/mac64/include/osgParticle/Counter | 54 - .../mac64/include/osgParticle/DampingOperator | 94 - .../mac64/include/osgParticle/DomainOperator | 235 -- libs/lib/mac64/include/osgParticle/Emitter | 105 - .../include/osgParticle/ExplosionDebrisEffect | 56 - .../mac64/include/osgParticle/ExplosionEffect | 56 - .../include/osgParticle/ExplosionOperator | 127 - libs/lib/mac64/include/osgParticle/Export | 51 - libs/lib/mac64/include/osgParticle/FireEffect | 57 - .../include/osgParticle/FluidFrictionOperator | 148 - .../mac64/include/osgParticle/FluidProgram | 114 - .../mac64/include/osgParticle/ForceOperator | 98 - .../mac64/include/osgParticle/Interpolator | 87 - .../include/osgParticle/LinearInterpolator | 51 - .../mac64/include/osgParticle/ModularEmitter | 158 - .../mac64/include/osgParticle/ModularProgram | 99 - .../include/osgParticle/MultiSegmentPlacer | 144 - libs/lib/mac64/include/osgParticle/Operator | 115 - .../mac64/include/osgParticle/OrbitOperator | 112 - libs/lib/mac64/include/osgParticle/Particle | 636 ---- .../mac64/include/osgParticle/ParticleEffect | 118 - .../include/osgParticle/ParticleProcessor | 340 --- .../mac64/include/osgParticle/ParticleSystem | 527 ---- .../include/osgParticle/ParticleSystemUpdater | 134 - libs/lib/mac64/include/osgParticle/Placer | 68 - .../lib/mac64/include/osgParticle/PointPlacer | 78 - .../include/osgParticle/PrecipitationEffect | 265 -- libs/lib/mac64/include/osgParticle/Program | 68 - .../mac64/include/osgParticle/RadialShooter | 196 -- .../include/osgParticle/RandomRateCounter | 76 - .../mac64/include/osgParticle/SectorPlacer | 149 - .../mac64/include/osgParticle/SegmentPlacer | 144 - libs/lib/mac64/include/osgParticle/Shooter | 64 - .../mac64/include/osgParticle/SinkOperator | 100 - .../lib/mac64/include/osgParticle/SmokeEffect | 56 - .../include/osgParticle/SmokeTrailEffect | 56 - .../include/osgParticle/VariableRateCounter | 77 - libs/lib/mac64/include/osgParticle/Version | 48 - libs/lib/mac64/include/osgParticle/range | 89 - .../include/osgPresentation/AnimationMaterial | 173 -- .../osgPresentation/CompileSlideCallback | 45 - libs/lib/mac64/include/osgPresentation/Export | 49 - .../include/osgPresentation/PickEventHandler | 71 - .../include/osgPresentation/SlideEventHandler | 323 -- .../osgPresentation/SlideShowConstructor | 520 ---- .../mac64/include/osgShadow/ConvexPolyhedron | 123 - .../mac64/include/osgShadow/DebugShadowMap | 192 -- libs/lib/mac64/include/osgShadow/Export | 49 - .../osgShadow/LightSpacePerspectiveShadowMap | 122 - .../osgShadow/MinimalCullBoundsShadowMap | 82 - .../osgShadow/MinimalDrawBoundsShadowMap | 128 - .../mac64/include/osgShadow/MinimalShadowMap | 164 - .../mac64/include/osgShadow/OccluderGeometry | 259 -- .../include/osgShadow/ParallelSplitShadowMap | 216 -- .../include/osgShadow/ProjectionShadowMap | 85 - libs/lib/mac64/include/osgShadow/ShadowMap | 123 - .../mac64/include/osgShadow/ShadowTechnique | 87 - .../lib/mac64/include/osgShadow/ShadowTexture | 68 - libs/lib/mac64/include/osgShadow/ShadowVolume | 83 - .../lib/mac64/include/osgShadow/ShadowedScene | 68 - .../lib/mac64/include/osgShadow/SoftShadowMap | 92 - .../mac64/include/osgShadow/StandardShadowMap | 200 -- libs/lib/mac64/include/osgShadow/Version | 46 - .../osgShadow/ViewDependentShadowTechnique | 232 -- libs/lib/mac64/include/osgSim/BlinkSequence | 185 -- libs/lib/mac64/include/osgSim/ColorRange | 66 - libs/lib/mac64/include/osgSim/DOFTransform | 175 -- libs/lib/mac64/include/osgSim/ElevationSlice | 101 - libs/lib/mac64/include/osgSim/Export | 59 - .../mac64/include/osgSim/GeographicLocation | 87 - .../mac64/include/osgSim/HeightAboveTerrain | 116 - libs/lib/mac64/include/osgSim/Impostor | 121 - libs/lib/mac64/include/osgSim/ImpostorSprite | 241 -- .../include/osgSim/InsertImpostorsVisitor | 68 - libs/lib/mac64/include/osgSim/LightPoint | 72 - libs/lib/mac64/include/osgSim/LightPointNode | 114 - .../lib/mac64/include/osgSim/LightPointSystem | 63 - libs/lib/mac64/include/osgSim/LineOfSight | 129 - libs/lib/mac64/include/osgSim/MultiSwitch | 107 - .../lib/mac64/include/osgSim/ObjectRecordData | 73 - libs/lib/mac64/include/osgSim/OverlayNode | 195 -- libs/lib/mac64/include/osgSim/ScalarBar | 248 -- libs/lib/mac64/include/osgSim/ScalarsToColors | 53 - libs/lib/mac64/include/osgSim/Sector | 314 -- libs/lib/mac64/include/osgSim/ShapeAttribute | 128 - libs/lib/mac64/include/osgSim/SphereSegment | 317 -- libs/lib/mac64/include/osgSim/Version | 46 - libs/lib/mac64/include/osgSim/VisibilityGroup | 76 - libs/lib/mac64/include/osgTerrain/Export | 49 - .../include/osgTerrain/GeometryTechnique | 116 - libs/lib/mac64/include/osgTerrain/Layer | 611 ---- libs/lib/mac64/include/osgTerrain/Locator | 132 - libs/lib/mac64/include/osgTerrain/Terrain | 122 - .../mac64/include/osgTerrain/TerrainTechnique | 105 - libs/lib/mac64/include/osgTerrain/TerrainTile | 293 -- .../include/osgTerrain/ValidDataOperator | 74 - libs/lib/mac64/include/osgTerrain/Version | 46 - libs/lib/mac64/include/osgText/Export | 49 - libs/lib/mac64/include/osgText/FadeText | 63 - libs/lib/mac64/include/osgText/Font | 247 -- libs/lib/mac64/include/osgText/Font3D | 55 - libs/lib/mac64/include/osgText/Glyph | 296 -- libs/lib/mac64/include/osgText/KerningType | 30 - libs/lib/mac64/include/osgText/String | 95 - libs/lib/mac64/include/osgText/Style | 113 - libs/lib/mac64/include/osgText/Text | 411 --- libs/lib/mac64/include/osgText/Text3D | 157 - libs/lib/mac64/include/osgText/TextBase | 336 --- libs/lib/mac64/include/osgText/Version | 46 - libs/lib/mac64/include/osgUtil/ConvertVec | 139 - .../mac64/include/osgUtil/CubeMapGenerator | 121 - libs/lib/mac64/include/osgUtil/CullVisitor | 456 --- .../include/osgUtil/DelaunayTriangulator | 182 -- .../osgUtil/DisplayRequirementsVisitor | 61 - .../include/osgUtil/DrawElementTypeSimplifier | 42 - libs/lib/mac64/include/osgUtil/EdgeCollector | 210 -- libs/lib/mac64/include/osgUtil/Export | 52 - .../mac64/include/osgUtil/GLObjectsVisitor | 137 - .../mac64/include/osgUtil/HalfWayMapGenerator | 53 - .../include/osgUtil/HighlightMapGenerator | 63 - .../osgUtil/IncrementalCompileOperation | 324 -- .../mac64/include/osgUtil/IntersectVisitor | 228 -- .../mac64/include/osgUtil/IntersectionVisitor | 289 -- .../include/osgUtil/LineSegmentIntersector | 113 - libs/lib/mac64/include/osgUtil/MeshOptimizers | 101 - .../include/osgUtil/OperationArrayFunctor | 116 - libs/lib/mac64/include/osgUtil/Optimizer | 881 ------ .../mac64/include/osgUtil/PlaneIntersector | 108 - .../mac64/include/osgUtil/PolytopeIntersector | 134 - .../include/osgUtil/PositionalStateContainer | 77 - libs/lib/mac64/include/osgUtil/PrintVisitor | 53 - .../include/osgUtil/ReflectionMapGenerator | 55 - libs/lib/mac64/include/osgUtil/RenderBin | 181 -- libs/lib/mac64/include/osgUtil/RenderLeaf | 118 - libs/lib/mac64/include/osgUtil/RenderStage | 318 -- .../include/osgUtil/ReversePrimitiveFunctor | 60 - .../mac64/include/osgUtil/SceneGraphBuilder | 186 -- libs/lib/mac64/include/osgUtil/SceneView | 560 ---- libs/lib/mac64/include/osgUtil/ShaderGen | 84 - libs/lib/mac64/include/osgUtil/Simplifier | 121 - .../mac64/include/osgUtil/SmoothingVisitor | 55 - libs/lib/mac64/include/osgUtil/StateGraph | 317 -- libs/lib/mac64/include/osgUtil/Statistics | 232 -- .../include/osgUtil/TangentSpaceGenerator | 78 - libs/lib/mac64/include/osgUtil/Tessellator | 246 -- .../include/osgUtil/TransformAttributeFunctor | 46 - .../mac64/include/osgUtil/TransformCallback | 51 - .../lib/mac64/include/osgUtil/TriStripVisitor | 91 - libs/lib/mac64/include/osgUtil/UpdateVisitor | 114 - libs/lib/mac64/include/osgUtil/Version | 48 - .../mac64/include/osgViewer/CompositeViewer | 144 - libs/lib/mac64/include/osgViewer/Export | 57 - .../mac64/include/osgViewer/GraphicsWindow | 294 -- libs/lib/mac64/include/osgViewer/Renderer | 122 - libs/lib/mac64/include/osgViewer/Scene | 75 - libs/lib/mac64/include/osgViewer/Version | 48 - libs/lib/mac64/include/osgViewer/View | 267 -- libs/lib/mac64/include/osgViewer/Viewer | 130 - libs/lib/mac64/include/osgViewer/ViewerBase | 330 -- .../include/osgViewer/ViewerEventHandlers | 544 ---- .../osgViewer/api/Carbon/GraphicsHandleCarbon | 50 - .../osgViewer/api/Carbon/GraphicsWindowCarbon | 181 -- .../osgViewer/api/Carbon/PixelBufferCarbon | 116 - libs/lib/mac64/include/osgVolume/Export | 49 - .../include/osgVolume/FixedFunctionTechnique | 60 - libs/lib/mac64/include/osgVolume/Layer | 275 -- libs/lib/mac64/include/osgVolume/Locator | 100 - libs/lib/mac64/include/osgVolume/Property | 416 --- .../include/osgVolume/RayTracedTechnique | 60 - libs/lib/mac64/include/osgVolume/Version | 46 - libs/lib/mac64/include/osgVolume/Volume | 79 - .../mac64/include/osgVolume/VolumeTechnique | 68 - libs/lib/mac64/include/osgVolume/VolumeTile | 157 - libs/lib/mac64/include/osgWidget/Box | 61 - libs/lib/mac64/include/osgWidget/Browser | 90 - libs/lib/mac64/include/osgWidget/Canvas | 42 - .../mac64/include/osgWidget/EventInterface | 412 --- libs/lib/mac64/include/osgWidget/Export | 52 - libs/lib/mac64/include/osgWidget/Frame | 254 -- libs/lib/mac64/include/osgWidget/Input | 112 - libs/lib/mac64/include/osgWidget/Label | 66 - libs/lib/mac64/include/osgWidget/Lua | 46 - libs/lib/mac64/include/osgWidget/PdfReader | 147 - libs/lib/mac64/include/osgWidget/Python | 42 - libs/lib/mac64/include/osgWidget/ScriptEngine | 42 - .../mac64/include/osgWidget/StyleInterface | 42 - libs/lib/mac64/include/osgWidget/StyleManager | 208 -- libs/lib/mac64/include/osgWidget/Table | 78 - libs/lib/mac64/include/osgWidget/Types | 48 - .../mac64/include/osgWidget/UIObjectParent | 130 - libs/lib/mac64/include/osgWidget/Util | 83 - libs/lib/mac64/include/osgWidget/Version | 35 - .../include/osgWidget/ViewerEventHandlers | 125 - libs/lib/mac64/include/osgWidget/VncClient | 63 - libs/lib/mac64/include/osgWidget/Widget | 651 ---- libs/lib/mac64/include/osgWidget/Window | 662 ---- .../lib/mac64/include/osgWidget/WindowManager | 389 --- libs/lib/mac64/lib/libOpenThreads.dylib | Bin 39216 -> 0 bytes libs/lib/mac64/lib/libosg.dylib | Bin 3536704 -> 0 bytes libs/lib/mac64/lib/libosgAnimation.dylib | Bin 738856 -> 0 bytes libs/lib/mac64/lib/libosgDB.dylib | Bin 1285944 -> 0 bytes libs/lib/mac64/lib/libosgFX.dylib | Bin 252392 -> 0 bytes libs/lib/mac64/lib/libosgGA.dylib | Bin 474440 -> 0 bytes libs/lib/mac64/lib/libosgManipulator.dylib | Bin 367552 -> 0 bytes libs/lib/mac64/lib/libosgParticle.dylib | Bin 454544 -> 0 bytes libs/lib/mac64/lib/libosgPresentation.dylib | Bin 404376 -> 0 bytes libs/lib/mac64/lib/libosgShadow.dylib | Bin 638608 -> 0 bytes libs/lib/mac64/lib/libosgSim.dylib | Bin 783992 -> 0 bytes libs/lib/mac64/lib/libosgTerrain.dylib | Bin 307944 -> 0 bytes libs/lib/mac64/lib/libosgText.dylib | Bin 493280 -> 0 bytes libs/lib/mac64/lib/libosgUtil.dylib | Bin 2249984 -> 0 bytes libs/lib/mac64/lib/libosgViewer.dylib | Bin 899136 -> 0 bytes libs/lib/mac64/lib/libosgVolume.dylib | Bin 366296 -> 0 bytes libs/lib/mac64/lib/libosgWidget.dylib | Bin 496000 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_3dc.so | Bin 80600 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_3ds.so | Bin 369344 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_ac.so | Bin 224904 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_bmp.so | Bin 54392 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_bsp.so | Bin 260064 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_bvh.so | Bin 145736 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_cfg.so | Bin 202040 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_curl.so | Bin 101192 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_dds.so | Bin 64536 -> 0 bytes .../osgPlugins-3.0.1/osgdb_deprecated_osg.so | Bin 852376 -> 0 bytes .../osgdb_deprecated_osganimation.so | Bin 254240 -> 0 bytes .../osgdb_deprecated_osgfx.so | Bin 64328 -> 0 bytes .../osgdb_deprecated_osgparticle.so | Bin 274992 -> 0 bytes .../osgdb_deprecated_osgshadow.so | Bin 44680 -> 0 bytes .../osgdb_deprecated_osgsim.so | Bin 121008 -> 0 bytes .../osgdb_deprecated_osgterrain.so | Bin 98304 -> 0 bytes .../osgdb_deprecated_osgtext.so | Bin 65008 -> 0 bytes .../osgdb_deprecated_osgviewer.so | Bin 62264 -> 0 bytes .../osgdb_deprecated_osgvolume.so | Bin 99792 -> 0 bytes .../osgdb_deprecated_osgwidget.so | Bin 93744 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_dicom.so | Bin 5524080 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_dot.so | Bin 78152 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_dw.so | Bin 109544 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_dxf.so | Bin 355856 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_freetype.so | Bin 102672 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_geo.so | Bin 288648 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_glsl.so | Bin 52296 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_gz.so | Bin 69048 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_hdr.so | Bin 62416 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_imageio.so | Bin 80960 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_ive.so | Bin 1025344 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_logo.so | Bin 70280 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_lwo.so | Bin 540584 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_lws.so | Bin 122760 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_md2.so | Bin 101632 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_mdl.so | Bin 141096 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_normals.so | Bin 97312 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_obj.so | Bin 250400 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_openflight.so | Bin 781488 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_osg.so | Bin 226464 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_osga.so | Bin 128520 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_osgshadow.so | Bin 49448 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_osgterrain.so | Bin 63808 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_osgtgz.so | Bin 56776 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_osgviewer.so | Bin 65104 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_p3d.so | Bin 310984 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_pic.so | Bin 44440 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_ply.so | Bin 122648 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_pnm.so | Bin 57528 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_pov.so | Bin 149744 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_pvr.so | Bin 51352 -> 0 bytes .../lib/osgPlugins-3.0.1/osgdb_revisions.so | Bin 61672 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_rgb.so | Bin 54344 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_rot.so | Bin 44872 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_scale.so | Bin 45216 -> 0 bytes .../osgPlugins-3.0.1/osgdb_serializers_osg.so | Bin 2121776 -> 0 bytes .../osgdb_serializers_osganimation.so | Bin 641064 -> 0 bytes .../osgdb_serializers_osgfx.so | Bin 131240 -> 0 bytes .../osgdb_serializers_osgmanipulator.so | Bin 183784 -> 0 bytes .../osgdb_serializers_osgparticle.so | Bin 631376 -> 0 bytes .../osgdb_serializers_osgshadow.so | Bin 298576 -> 0 bytes .../osgdb_serializers_osgsim.so | Bin 404000 -> 0 bytes .../osgdb_serializers_osgterrain.so | Bin 272664 -> 0 bytes .../osgdb_serializers_osgtext.so | Bin 202176 -> 0 bytes .../osgdb_serializers_osgvolume.so | Bin 256352 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_shp.so | Bin 210184 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_stl.so | Bin 101736 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_tga.so | Bin 49712 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_tgz.so | Bin 60856 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_trans.so | Bin 44896 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_txf.so | Bin 63584 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_txp.so | Bin 1068656 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_vtf.so | Bin 55216 -> 0 bytes .../lib/mac64/lib/osgPlugins-3.0.1/osgdb_x.so | Bin 152040 -> 0 bytes .../mac64/lib/osgPlugins-3.0.1/osgdb_zip.so | Bin 170368 -> 0 bytes qgroundcontrol.pro | 2 +- src/QGCApplication.cc | 40 +- src/VideoStreaming/VideoStreaming.cc | 12 + src/ui/MainWindow.cc | 6 - tools/prepare_gstreamer_framework.sh | 10 +- 1277 files changed, 185 insertions(+), 179048 deletions(-) rename ios/{LaunchScreen.xib => QGCLaunchScreen.xib} (100%) create mode 100644 ios/iOSForAppStore-Info.plist delete mode 100644 libs/lib/lib.pro delete mode 100644 libs/lib/mac32/frameworks/.gitignore delete mode 100644 libs/lib/mac32/frameworks/README delete mode 100644 libs/lib/mac32/include/OpenThreads/Atomic delete mode 100644 libs/lib/mac32/include/OpenThreads/Barrier delete mode 100644 libs/lib/mac32/include/OpenThreads/Block delete mode 100644 libs/lib/mac32/include/OpenThreads/Condition delete mode 100644 libs/lib/mac32/include/OpenThreads/Config delete mode 100644 libs/lib/mac32/include/OpenThreads/Exports delete mode 100644 libs/lib/mac32/include/OpenThreads/Mutex delete mode 100644 libs/lib/mac32/include/OpenThreads/ReadWriteMutex delete mode 100644 libs/lib/mac32/include/OpenThreads/ReentrantMutex delete mode 100644 libs/lib/mac32/include/OpenThreads/ScopedLock delete mode 100644 libs/lib/mac32/include/OpenThreads/Thread delete mode 100644 libs/lib/mac32/include/OpenThreads/Version delete mode 100644 libs/lib/mac32/include/osg/AlphaFunc delete mode 100644 libs/lib/mac32/include/osg/AnimationPath delete mode 100644 libs/lib/mac32/include/osg/ApplicationUsage delete mode 100644 libs/lib/mac32/include/osg/ArgumentParser delete mode 100644 libs/lib/mac32/include/osg/Array delete mode 100644 libs/lib/mac32/include/osg/ArrayDispatchers delete mode 100644 libs/lib/mac32/include/osg/AudioStream delete mode 100644 libs/lib/mac32/include/osg/AutoTransform delete mode 100644 libs/lib/mac32/include/osg/Billboard delete mode 100644 libs/lib/mac32/include/osg/BlendColor delete mode 100644 libs/lib/mac32/include/osg/BlendEquation delete mode 100644 libs/lib/mac32/include/osg/BlendFunc delete mode 100644 libs/lib/mac32/include/osg/BoundingBox delete mode 100644 libs/lib/mac32/include/osg/BoundingSphere delete mode 100644 libs/lib/mac32/include/osg/BoundsChecking delete mode 100644 libs/lib/mac32/include/osg/BufferIndexBinding delete mode 100644 libs/lib/mac32/include/osg/BufferObject delete mode 100644 libs/lib/mac32/include/osg/Camera delete mode 100644 libs/lib/mac32/include/osg/CameraNode delete mode 100644 libs/lib/mac32/include/osg/CameraView delete mode 100644 libs/lib/mac32/include/osg/ClampColor delete mode 100644 libs/lib/mac32/include/osg/ClearNode delete mode 100644 libs/lib/mac32/include/osg/ClipNode delete mode 100644 libs/lib/mac32/include/osg/ClipPlane delete mode 100644 libs/lib/mac32/include/osg/ClusterCullingCallback delete mode 100644 libs/lib/mac32/include/osg/CollectOccludersVisitor delete mode 100644 libs/lib/mac32/include/osg/ColorMask delete mode 100644 libs/lib/mac32/include/osg/ColorMatrix delete mode 100644 libs/lib/mac32/include/osg/ComputeBoundsVisitor delete mode 100644 libs/lib/mac32/include/osg/Config delete mode 100644 libs/lib/mac32/include/osg/ConvexPlanarOccluder delete mode 100644 libs/lib/mac32/include/osg/ConvexPlanarPolygon delete mode 100644 libs/lib/mac32/include/osg/CoordinateSystemNode delete mode 100644 libs/lib/mac32/include/osg/CopyOp delete mode 100644 libs/lib/mac32/include/osg/CullFace delete mode 100644 libs/lib/mac32/include/osg/CullSettings delete mode 100644 libs/lib/mac32/include/osg/CullStack delete mode 100644 libs/lib/mac32/include/osg/CullingSet delete mode 100644 libs/lib/mac32/include/osg/DeleteHandler delete mode 100644 libs/lib/mac32/include/osg/Depth delete mode 100644 libs/lib/mac32/include/osg/DisplaySettings delete mode 100644 libs/lib/mac32/include/osg/DrawPixels delete mode 100644 libs/lib/mac32/include/osg/Drawable delete mode 100644 libs/lib/mac32/include/osg/Endian delete mode 100644 libs/lib/mac32/include/osg/Export delete mode 100644 libs/lib/mac32/include/osg/Fog delete mode 100644 libs/lib/mac32/include/osg/FragmentProgram delete mode 100644 libs/lib/mac32/include/osg/FrameBufferObject delete mode 100644 libs/lib/mac32/include/osg/FrameStamp delete mode 100644 libs/lib/mac32/include/osg/FrontFace delete mode 100644 libs/lib/mac32/include/osg/GL delete mode 100644 libs/lib/mac32/include/osg/GL2Extensions delete mode 100644 libs/lib/mac32/include/osg/GLBeginEndAdapter delete mode 100644 libs/lib/mac32/include/osg/GLExtensions delete mode 100644 libs/lib/mac32/include/osg/GLObjects delete mode 100644 libs/lib/mac32/include/osg/GLU delete mode 100644 libs/lib/mac32/include/osg/Geode delete mode 100644 libs/lib/mac32/include/osg/Geometry delete mode 100644 libs/lib/mac32/include/osg/GraphicsContext delete mode 100644 libs/lib/mac32/include/osg/GraphicsCostEstimator delete mode 100644 libs/lib/mac32/include/osg/GraphicsThread delete mode 100644 libs/lib/mac32/include/osg/Group delete mode 100644 libs/lib/mac32/include/osg/Hint delete mode 100644 libs/lib/mac32/include/osg/Image delete mode 100644 libs/lib/mac32/include/osg/ImageSequence delete mode 100644 libs/lib/mac32/include/osg/ImageStream delete mode 100644 libs/lib/mac32/include/osg/ImageUtils delete mode 100644 libs/lib/mac32/include/osg/KdTree delete mode 100644 libs/lib/mac32/include/osg/LOD delete mode 100644 libs/lib/mac32/include/osg/Light delete mode 100644 libs/lib/mac32/include/osg/LightModel delete mode 100644 libs/lib/mac32/include/osg/LightSource delete mode 100644 libs/lib/mac32/include/osg/LineSegment delete mode 100644 libs/lib/mac32/include/osg/LineStipple delete mode 100644 libs/lib/mac32/include/osg/LineWidth delete mode 100644 libs/lib/mac32/include/osg/LogicOp delete mode 100644 libs/lib/mac32/include/osg/Material delete mode 100644 libs/lib/mac32/include/osg/Math delete mode 100644 libs/lib/mac32/include/osg/Matrix delete mode 100644 libs/lib/mac32/include/osg/MatrixTransform delete mode 100644 libs/lib/mac32/include/osg/Matrixd delete mode 100644 libs/lib/mac32/include/osg/Matrixf delete mode 100644 libs/lib/mac32/include/osg/MixinVector delete mode 100644 libs/lib/mac32/include/osg/Multisample delete mode 100644 libs/lib/mac32/include/osg/Node delete mode 100644 libs/lib/mac32/include/osg/NodeCallback delete mode 100644 libs/lib/mac32/include/osg/NodeTrackerCallback delete mode 100644 libs/lib/mac32/include/osg/NodeVisitor delete mode 100644 libs/lib/mac32/include/osg/Notify delete mode 100644 libs/lib/mac32/include/osg/Object delete mode 100644 libs/lib/mac32/include/osg/Observer delete mode 100644 libs/lib/mac32/include/osg/ObserverNodePath delete mode 100644 libs/lib/mac32/include/osg/OccluderNode delete mode 100644 libs/lib/mac32/include/osg/OcclusionQueryNode delete mode 100644 libs/lib/mac32/include/osg/OperationThread delete mode 100644 libs/lib/mac32/include/osg/PagedLOD delete mode 100644 libs/lib/mac32/include/osg/Plane delete mode 100644 libs/lib/mac32/include/osg/Point delete mode 100644 libs/lib/mac32/include/osg/PointSprite delete mode 100644 libs/lib/mac32/include/osg/PolygonMode delete mode 100644 libs/lib/mac32/include/osg/PolygonOffset delete mode 100644 libs/lib/mac32/include/osg/PolygonStipple delete mode 100644 libs/lib/mac32/include/osg/Polytope delete mode 100644 libs/lib/mac32/include/osg/PositionAttitudeTransform delete mode 100644 libs/lib/mac32/include/osg/PrimitiveSet delete mode 100644 libs/lib/mac32/include/osg/Program delete mode 100644 libs/lib/mac32/include/osg/Projection delete mode 100644 libs/lib/mac32/include/osg/ProxyNode delete mode 100644 libs/lib/mac32/include/osg/Quat delete mode 100644 libs/lib/mac32/include/osg/Referenced delete mode 100644 libs/lib/mac32/include/osg/RenderInfo delete mode 100644 libs/lib/mac32/include/osg/Scissor delete mode 100644 libs/lib/mac32/include/osg/Sequence delete mode 100644 libs/lib/mac32/include/osg/ShadeModel delete mode 100644 libs/lib/mac32/include/osg/Shader delete mode 100644 libs/lib/mac32/include/osg/ShaderAttribute delete mode 100644 libs/lib/mac32/include/osg/ShaderComposer delete mode 100644 libs/lib/mac32/include/osg/ShadowVolumeOccluder delete mode 100644 libs/lib/mac32/include/osg/Shape delete mode 100644 libs/lib/mac32/include/osg/ShapeDrawable delete mode 100644 libs/lib/mac32/include/osg/State delete mode 100644 libs/lib/mac32/include/osg/StateAttribute delete mode 100644 libs/lib/mac32/include/osg/StateAttributeCallback delete mode 100644 libs/lib/mac32/include/osg/StateSet delete mode 100644 libs/lib/mac32/include/osg/Stats delete mode 100644 libs/lib/mac32/include/osg/Stencil delete mode 100644 libs/lib/mac32/include/osg/StencilTwoSided delete mode 100644 libs/lib/mac32/include/osg/Switch delete mode 100644 libs/lib/mac32/include/osg/TemplatePrimitiveFunctor delete mode 100644 libs/lib/mac32/include/osg/TexEnv delete mode 100644 libs/lib/mac32/include/osg/TexEnvCombine delete mode 100644 libs/lib/mac32/include/osg/TexEnvFilter delete mode 100644 libs/lib/mac32/include/osg/TexGen delete mode 100644 libs/lib/mac32/include/osg/TexGenNode delete mode 100644 libs/lib/mac32/include/osg/TexMat delete mode 100644 libs/lib/mac32/include/osg/Texture delete mode 100644 libs/lib/mac32/include/osg/Texture1D delete mode 100644 libs/lib/mac32/include/osg/Texture2D delete mode 100644 libs/lib/mac32/include/osg/Texture2DArray delete mode 100644 libs/lib/mac32/include/osg/Texture2DMultisample delete mode 100644 libs/lib/mac32/include/osg/Texture3D delete mode 100644 libs/lib/mac32/include/osg/TextureCubeMap delete mode 100644 libs/lib/mac32/include/osg/TextureRectangle delete mode 100644 libs/lib/mac32/include/osg/Timer delete mode 100644 libs/lib/mac32/include/osg/TransferFunction delete mode 100644 libs/lib/mac32/include/osg/Transform delete mode 100644 libs/lib/mac32/include/osg/TriangleFunctor delete mode 100644 libs/lib/mac32/include/osg/TriangleIndexFunctor delete mode 100644 libs/lib/mac32/include/osg/Uniform delete mode 100644 libs/lib/mac32/include/osg/UserDataContainer delete mode 100644 libs/lib/mac32/include/osg/ValueObject delete mode 100644 libs/lib/mac32/include/osg/Vec2 delete mode 100644 libs/lib/mac32/include/osg/Vec2b delete mode 100644 libs/lib/mac32/include/osg/Vec2d delete mode 100644 libs/lib/mac32/include/osg/Vec2f delete mode 100644 libs/lib/mac32/include/osg/Vec2s delete mode 100644 libs/lib/mac32/include/osg/Vec3 delete mode 100644 libs/lib/mac32/include/osg/Vec3b delete mode 100644 libs/lib/mac32/include/osg/Vec3d delete mode 100644 libs/lib/mac32/include/osg/Vec3f delete mode 100644 libs/lib/mac32/include/osg/Vec3s delete mode 100644 libs/lib/mac32/include/osg/Vec4 delete mode 100644 libs/lib/mac32/include/osg/Vec4b delete mode 100644 libs/lib/mac32/include/osg/Vec4d delete mode 100644 libs/lib/mac32/include/osg/Vec4f delete mode 100644 libs/lib/mac32/include/osg/Vec4s delete mode 100644 libs/lib/mac32/include/osg/Vec4ub delete mode 100644 libs/lib/mac32/include/osg/Version delete mode 100644 libs/lib/mac32/include/osg/VertexProgram delete mode 100644 libs/lib/mac32/include/osg/View delete mode 100644 libs/lib/mac32/include/osg/Viewport delete mode 100644 libs/lib/mac32/include/osg/buffered_value delete mode 100644 libs/lib/mac32/include/osg/fast_back_stack delete mode 100644 libs/lib/mac32/include/osg/io_utils delete mode 100644 libs/lib/mac32/include/osg/observer_ptr delete mode 100644 libs/lib/mac32/include/osg/ref_ptr delete mode 100644 libs/lib/mac32/include/osgAnimation/Action delete mode 100644 libs/lib/mac32/include/osgAnimation/ActionAnimation delete mode 100644 libs/lib/mac32/include/osgAnimation/ActionBlendIn delete mode 100644 libs/lib/mac32/include/osgAnimation/ActionBlendOut delete mode 100644 libs/lib/mac32/include/osgAnimation/ActionCallback delete mode 100644 libs/lib/mac32/include/osgAnimation/ActionStripAnimation delete mode 100644 libs/lib/mac32/include/osgAnimation/ActionVisitor delete mode 100644 libs/lib/mac32/include/osgAnimation/Animation delete mode 100644 libs/lib/mac32/include/osgAnimation/AnimationManagerBase delete mode 100644 libs/lib/mac32/include/osgAnimation/AnimationUpdateCallback delete mode 100644 libs/lib/mac32/include/osgAnimation/BasicAnimationManager delete mode 100644 libs/lib/mac32/include/osgAnimation/Bone delete mode 100644 libs/lib/mac32/include/osgAnimation/BoneMapVisitor delete mode 100644 libs/lib/mac32/include/osgAnimation/Channel delete mode 100644 libs/lib/mac32/include/osgAnimation/CubicBezier delete mode 100644 libs/lib/mac32/include/osgAnimation/EaseMotion delete mode 100644 libs/lib/mac32/include/osgAnimation/Export delete mode 100644 libs/lib/mac32/include/osgAnimation/FrameAction delete mode 100644 libs/lib/mac32/include/osgAnimation/Interpolator delete mode 100644 libs/lib/mac32/include/osgAnimation/Keyframe delete mode 100644 libs/lib/mac32/include/osgAnimation/LinkVisitor delete mode 100644 libs/lib/mac32/include/osgAnimation/MorphGeometry delete mode 100644 libs/lib/mac32/include/osgAnimation/RigGeometry delete mode 100644 libs/lib/mac32/include/osgAnimation/RigTransform delete mode 100644 libs/lib/mac32/include/osgAnimation/RigTransformHardware delete mode 100644 libs/lib/mac32/include/osgAnimation/RigTransformSoftware delete mode 100644 libs/lib/mac32/include/osgAnimation/Sampler delete mode 100644 libs/lib/mac32/include/osgAnimation/Skeleton delete mode 100644 libs/lib/mac32/include/osgAnimation/StackedMatrixElement delete mode 100644 libs/lib/mac32/include/osgAnimation/StackedQuaternionElement delete mode 100644 libs/lib/mac32/include/osgAnimation/StackedRotateAxisElement delete mode 100644 libs/lib/mac32/include/osgAnimation/StackedScaleElement delete mode 100644 libs/lib/mac32/include/osgAnimation/StackedTransform delete mode 100644 libs/lib/mac32/include/osgAnimation/StackedTransformElement delete mode 100644 libs/lib/mac32/include/osgAnimation/StackedTranslateElement delete mode 100644 libs/lib/mac32/include/osgAnimation/StatsHandler delete mode 100644 libs/lib/mac32/include/osgAnimation/StatsVisitor delete mode 100644 libs/lib/mac32/include/osgAnimation/Target delete mode 100644 libs/lib/mac32/include/osgAnimation/Timeline delete mode 100644 libs/lib/mac32/include/osgAnimation/TimelineAnimationManager delete mode 100644 libs/lib/mac32/include/osgAnimation/UpdateBone delete mode 100644 libs/lib/mac32/include/osgAnimation/UpdateMaterial delete mode 100644 libs/lib/mac32/include/osgAnimation/UpdateMatrixTransform delete mode 100644 libs/lib/mac32/include/osgAnimation/Vec3Packed delete mode 100644 libs/lib/mac32/include/osgAnimation/VertexInfluence delete mode 100644 libs/lib/mac32/include/osgDB/Archive delete mode 100644 libs/lib/mac32/include/osgDB/AuthenticationMap delete mode 100644 libs/lib/mac32/include/osgDB/Callbacks delete mode 100644 libs/lib/mac32/include/osgDB/ConvertUTF delete mode 100644 libs/lib/mac32/include/osgDB/DataTypes delete mode 100644 libs/lib/mac32/include/osgDB/DatabasePager delete mode 100644 libs/lib/mac32/include/osgDB/DatabaseRevisions delete mode 100644 libs/lib/mac32/include/osgDB/DotOsgWrapper delete mode 100644 libs/lib/mac32/include/osgDB/DynamicLibrary delete mode 100644 libs/lib/mac32/include/osgDB/Export delete mode 100644 libs/lib/mac32/include/osgDB/ExternalFileWriter delete mode 100644 libs/lib/mac32/include/osgDB/FileCache delete mode 100644 libs/lib/mac32/include/osgDB/FileNameUtils delete mode 100644 libs/lib/mac32/include/osgDB/FileUtils delete mode 100644 libs/lib/mac32/include/osgDB/ImageOptions delete mode 100644 libs/lib/mac32/include/osgDB/ImagePager delete mode 100644 libs/lib/mac32/include/osgDB/ImageProcessor delete mode 100644 libs/lib/mac32/include/osgDB/Input delete mode 100644 libs/lib/mac32/include/osgDB/InputStream delete mode 100644 libs/lib/mac32/include/osgDB/ObjectWrapper delete mode 100644 libs/lib/mac32/include/osgDB/Options delete mode 100644 libs/lib/mac32/include/osgDB/Output delete mode 100644 libs/lib/mac32/include/osgDB/OutputStream delete mode 100644 libs/lib/mac32/include/osgDB/ParameterOutput delete mode 100644 libs/lib/mac32/include/osgDB/PluginQuery delete mode 100644 libs/lib/mac32/include/osgDB/ReadFile delete mode 100644 libs/lib/mac32/include/osgDB/ReaderWriter delete mode 100644 libs/lib/mac32/include/osgDB/Registry delete mode 100644 libs/lib/mac32/include/osgDB/Serializer delete mode 100644 libs/lib/mac32/include/osgDB/SharedStateManager delete mode 100644 libs/lib/mac32/include/osgDB/StreamOperator delete mode 100644 libs/lib/mac32/include/osgDB/Version delete mode 100644 libs/lib/mac32/include/osgDB/WriteFile delete mode 100644 libs/lib/mac32/include/osgDB/XmlParser delete mode 100644 libs/lib/mac32/include/osgDB/fstream delete mode 100644 libs/lib/mac32/include/osgFX/AnisotropicLighting delete mode 100644 libs/lib/mac32/include/osgFX/BumpMapping delete mode 100644 libs/lib/mac32/include/osgFX/Cartoon delete mode 100644 libs/lib/mac32/include/osgFX/Effect delete mode 100644 libs/lib/mac32/include/osgFX/Export delete mode 100644 libs/lib/mac32/include/osgFX/MultiTextureControl delete mode 100644 libs/lib/mac32/include/osgFX/Outline delete mode 100644 libs/lib/mac32/include/osgFX/Registry delete mode 100644 libs/lib/mac32/include/osgFX/Scribe delete mode 100644 libs/lib/mac32/include/osgFX/SpecularHighlights delete mode 100644 libs/lib/mac32/include/osgFX/Technique delete mode 100644 libs/lib/mac32/include/osgFX/Validator delete mode 100644 libs/lib/mac32/include/osgFX/Version delete mode 100644 libs/lib/mac32/include/osgGA/AnimationPathManipulator delete mode 100644 libs/lib/mac32/include/osgGA/CameraManipulator delete mode 100644 libs/lib/mac32/include/osgGA/CameraViewSwitchManipulator delete mode 100644 libs/lib/mac32/include/osgGA/DriveManipulator delete mode 100644 libs/lib/mac32/include/osgGA/EventQueue delete mode 100644 libs/lib/mac32/include/osgGA/EventVisitor delete mode 100644 libs/lib/mac32/include/osgGA/Export delete mode 100644 libs/lib/mac32/include/osgGA/FirstPersonManipulator delete mode 100644 libs/lib/mac32/include/osgGA/FlightManipulator delete mode 100644 libs/lib/mac32/include/osgGA/GUIActionAdapter delete mode 100644 libs/lib/mac32/include/osgGA/GUIEventAdapter delete mode 100644 libs/lib/mac32/include/osgGA/GUIEventHandler delete mode 100644 libs/lib/mac32/include/osgGA/KeySwitchMatrixManipulator delete mode 100644 libs/lib/mac32/include/osgGA/MultiTouchTrackballManipulator delete mode 100644 libs/lib/mac32/include/osgGA/NodeTrackerManipulator delete mode 100644 libs/lib/mac32/include/osgGA/OrbitManipulator delete mode 100644 libs/lib/mac32/include/osgGA/SphericalManipulator delete mode 100644 libs/lib/mac32/include/osgGA/StandardManipulator delete mode 100644 libs/lib/mac32/include/osgGA/StateSetManipulator delete mode 100644 libs/lib/mac32/include/osgGA/TerrainManipulator delete mode 100644 libs/lib/mac32/include/osgGA/TrackballManipulator delete mode 100644 libs/lib/mac32/include/osgGA/UFOManipulator delete mode 100644 libs/lib/mac32/include/osgGA/Version delete mode 100644 libs/lib/mac32/include/osgManipulator/AntiSquish delete mode 100644 libs/lib/mac32/include/osgManipulator/Command delete mode 100644 libs/lib/mac32/include/osgManipulator/CommandManager delete mode 100644 libs/lib/mac32/include/osgManipulator/Constraint delete mode 100644 libs/lib/mac32/include/osgManipulator/Dragger delete mode 100644 libs/lib/mac32/include/osgManipulator/Export delete mode 100644 libs/lib/mac32/include/osgManipulator/Projector delete mode 100644 libs/lib/mac32/include/osgManipulator/RotateCylinderDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/RotateSphereDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/Scale1DDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/Scale2DDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/ScaleAxisDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/Selection delete mode 100644 libs/lib/mac32/include/osgManipulator/TabBoxDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/TabBoxTrackballDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/TabPlaneDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/TabPlaneTrackballDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/TrackballDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/Translate1DDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/Translate2DDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/TranslateAxisDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/TranslatePlaneDragger delete mode 100644 libs/lib/mac32/include/osgManipulator/Version delete mode 100644 libs/lib/mac32/include/osgParticle/AccelOperator delete mode 100644 libs/lib/mac32/include/osgParticle/AngularAccelOperator delete mode 100644 libs/lib/mac32/include/osgParticle/AngularDampingOperator delete mode 100644 libs/lib/mac32/include/osgParticle/BounceOperator delete mode 100644 libs/lib/mac32/include/osgParticle/BoxPlacer delete mode 100644 libs/lib/mac32/include/osgParticle/CenteredPlacer delete mode 100644 libs/lib/mac32/include/osgParticle/CompositePlacer delete mode 100644 libs/lib/mac32/include/osgParticle/ConnectedParticleSystem delete mode 100644 libs/lib/mac32/include/osgParticle/ConstantRateCounter delete mode 100644 libs/lib/mac32/include/osgParticle/Counter delete mode 100644 libs/lib/mac32/include/osgParticle/DampingOperator delete mode 100644 libs/lib/mac32/include/osgParticle/DomainOperator delete mode 100644 libs/lib/mac32/include/osgParticle/Emitter delete mode 100644 libs/lib/mac32/include/osgParticle/ExplosionDebrisEffect delete mode 100644 libs/lib/mac32/include/osgParticle/ExplosionEffect delete mode 100644 libs/lib/mac32/include/osgParticle/ExplosionOperator delete mode 100644 libs/lib/mac32/include/osgParticle/Export delete mode 100644 libs/lib/mac32/include/osgParticle/FireEffect delete mode 100644 libs/lib/mac32/include/osgParticle/FluidFrictionOperator delete mode 100644 libs/lib/mac32/include/osgParticle/FluidProgram delete mode 100644 libs/lib/mac32/include/osgParticle/ForceOperator delete mode 100644 libs/lib/mac32/include/osgParticle/Interpolator delete mode 100644 libs/lib/mac32/include/osgParticle/LinearInterpolator delete mode 100644 libs/lib/mac32/include/osgParticle/ModularEmitter delete mode 100644 libs/lib/mac32/include/osgParticle/ModularProgram delete mode 100644 libs/lib/mac32/include/osgParticle/MultiSegmentPlacer delete mode 100644 libs/lib/mac32/include/osgParticle/Operator delete mode 100644 libs/lib/mac32/include/osgParticle/OrbitOperator delete mode 100644 libs/lib/mac32/include/osgParticle/Particle delete mode 100644 libs/lib/mac32/include/osgParticle/ParticleEffect delete mode 100644 libs/lib/mac32/include/osgParticle/ParticleProcessor delete mode 100644 libs/lib/mac32/include/osgParticle/ParticleSystem delete mode 100644 libs/lib/mac32/include/osgParticle/ParticleSystemUpdater delete mode 100644 libs/lib/mac32/include/osgParticle/Placer delete mode 100644 libs/lib/mac32/include/osgParticle/PointPlacer delete mode 100644 libs/lib/mac32/include/osgParticle/PrecipitationEffect delete mode 100644 libs/lib/mac32/include/osgParticle/Program delete mode 100644 libs/lib/mac32/include/osgParticle/RadialShooter delete mode 100644 libs/lib/mac32/include/osgParticle/RandomRateCounter delete mode 100644 libs/lib/mac32/include/osgParticle/SectorPlacer delete mode 100644 libs/lib/mac32/include/osgParticle/SegmentPlacer delete mode 100644 libs/lib/mac32/include/osgParticle/Shooter delete mode 100644 libs/lib/mac32/include/osgParticle/SinkOperator delete mode 100644 libs/lib/mac32/include/osgParticle/SmokeEffect delete mode 100644 libs/lib/mac32/include/osgParticle/SmokeTrailEffect delete mode 100644 libs/lib/mac32/include/osgParticle/VariableRateCounter delete mode 100644 libs/lib/mac32/include/osgParticle/Version delete mode 100644 libs/lib/mac32/include/osgParticle/range delete mode 100644 libs/lib/mac32/include/osgPresentation/AnimationMaterial delete mode 100644 libs/lib/mac32/include/osgPresentation/CompileSlideCallback delete mode 100644 libs/lib/mac32/include/osgPresentation/Export delete mode 100644 libs/lib/mac32/include/osgPresentation/PickEventHandler delete mode 100644 libs/lib/mac32/include/osgPresentation/SlideEventHandler delete mode 100644 libs/lib/mac32/include/osgPresentation/SlideShowConstructor delete mode 100644 libs/lib/mac32/include/osgShadow/ConvexPolyhedron delete mode 100644 libs/lib/mac32/include/osgShadow/DebugShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/Export delete mode 100644 libs/lib/mac32/include/osgShadow/LightSpacePerspectiveShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/MinimalCullBoundsShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/MinimalDrawBoundsShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/MinimalShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/OccluderGeometry delete mode 100644 libs/lib/mac32/include/osgShadow/ParallelSplitShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/ProjectionShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/ShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/ShadowTechnique delete mode 100644 libs/lib/mac32/include/osgShadow/ShadowTexture delete mode 100644 libs/lib/mac32/include/osgShadow/ShadowVolume delete mode 100644 libs/lib/mac32/include/osgShadow/ShadowedScene delete mode 100644 libs/lib/mac32/include/osgShadow/SoftShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/StandardShadowMap delete mode 100644 libs/lib/mac32/include/osgShadow/Version delete mode 100644 libs/lib/mac32/include/osgShadow/ViewDependentShadowTechnique delete mode 100644 libs/lib/mac32/include/osgSim/BlinkSequence delete mode 100644 libs/lib/mac32/include/osgSim/ColorRange delete mode 100644 libs/lib/mac32/include/osgSim/DOFTransform delete mode 100644 libs/lib/mac32/include/osgSim/ElevationSlice delete mode 100644 libs/lib/mac32/include/osgSim/Export delete mode 100644 libs/lib/mac32/include/osgSim/GeographicLocation delete mode 100644 libs/lib/mac32/include/osgSim/HeightAboveTerrain delete mode 100644 libs/lib/mac32/include/osgSim/Impostor delete mode 100644 libs/lib/mac32/include/osgSim/ImpostorSprite delete mode 100644 libs/lib/mac32/include/osgSim/InsertImpostorsVisitor delete mode 100644 libs/lib/mac32/include/osgSim/LightPoint delete mode 100644 libs/lib/mac32/include/osgSim/LightPointNode delete mode 100644 libs/lib/mac32/include/osgSim/LightPointSystem delete mode 100644 libs/lib/mac32/include/osgSim/LineOfSight delete mode 100644 libs/lib/mac32/include/osgSim/MultiSwitch delete mode 100644 libs/lib/mac32/include/osgSim/ObjectRecordData delete mode 100644 libs/lib/mac32/include/osgSim/OverlayNode delete mode 100644 libs/lib/mac32/include/osgSim/ScalarBar delete mode 100644 libs/lib/mac32/include/osgSim/ScalarsToColors delete mode 100644 libs/lib/mac32/include/osgSim/Sector delete mode 100644 libs/lib/mac32/include/osgSim/ShapeAttribute delete mode 100644 libs/lib/mac32/include/osgSim/SphereSegment delete mode 100644 libs/lib/mac32/include/osgSim/Version delete mode 100644 libs/lib/mac32/include/osgSim/VisibilityGroup delete mode 100644 libs/lib/mac32/include/osgTerrain/Export delete mode 100644 libs/lib/mac32/include/osgTerrain/GeometryTechnique delete mode 100644 libs/lib/mac32/include/osgTerrain/Layer delete mode 100644 libs/lib/mac32/include/osgTerrain/Locator delete mode 100644 libs/lib/mac32/include/osgTerrain/Terrain delete mode 100644 libs/lib/mac32/include/osgTerrain/TerrainTechnique delete mode 100644 libs/lib/mac32/include/osgTerrain/TerrainTile delete mode 100644 libs/lib/mac32/include/osgTerrain/ValidDataOperator delete mode 100644 libs/lib/mac32/include/osgTerrain/Version delete mode 100644 libs/lib/mac32/include/osgText/Export delete mode 100644 libs/lib/mac32/include/osgText/FadeText delete mode 100644 libs/lib/mac32/include/osgText/Font delete mode 100644 libs/lib/mac32/include/osgText/Font3D delete mode 100644 libs/lib/mac32/include/osgText/Glyph delete mode 100644 libs/lib/mac32/include/osgText/KerningType delete mode 100644 libs/lib/mac32/include/osgText/String delete mode 100644 libs/lib/mac32/include/osgText/Style delete mode 100644 libs/lib/mac32/include/osgText/Text delete mode 100644 libs/lib/mac32/include/osgText/Text3D delete mode 100644 libs/lib/mac32/include/osgText/TextBase delete mode 100644 libs/lib/mac32/include/osgText/Version delete mode 100644 libs/lib/mac32/include/osgUtil/ConvertVec delete mode 100644 libs/lib/mac32/include/osgUtil/CubeMapGenerator delete mode 100644 libs/lib/mac32/include/osgUtil/CullVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/DelaunayTriangulator delete mode 100644 libs/lib/mac32/include/osgUtil/DisplayRequirementsVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/DrawElementTypeSimplifier delete mode 100644 libs/lib/mac32/include/osgUtil/EdgeCollector delete mode 100644 libs/lib/mac32/include/osgUtil/Export delete mode 100644 libs/lib/mac32/include/osgUtil/GLObjectsVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/HalfWayMapGenerator delete mode 100644 libs/lib/mac32/include/osgUtil/HighlightMapGenerator delete mode 100644 libs/lib/mac32/include/osgUtil/IncrementalCompileOperation delete mode 100644 libs/lib/mac32/include/osgUtil/IntersectVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/IntersectionVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/LineSegmentIntersector delete mode 100644 libs/lib/mac32/include/osgUtil/MeshOptimizers delete mode 100644 libs/lib/mac32/include/osgUtil/OperationArrayFunctor delete mode 100644 libs/lib/mac32/include/osgUtil/Optimizer delete mode 100644 libs/lib/mac32/include/osgUtil/PlaneIntersector delete mode 100644 libs/lib/mac32/include/osgUtil/PolytopeIntersector delete mode 100644 libs/lib/mac32/include/osgUtil/PositionalStateContainer delete mode 100644 libs/lib/mac32/include/osgUtil/PrintVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/ReflectionMapGenerator delete mode 100644 libs/lib/mac32/include/osgUtil/RenderBin delete mode 100644 libs/lib/mac32/include/osgUtil/RenderLeaf delete mode 100644 libs/lib/mac32/include/osgUtil/RenderStage delete mode 100644 libs/lib/mac32/include/osgUtil/ReversePrimitiveFunctor delete mode 100644 libs/lib/mac32/include/osgUtil/SceneGraphBuilder delete mode 100644 libs/lib/mac32/include/osgUtil/SceneView delete mode 100644 libs/lib/mac32/include/osgUtil/ShaderGen delete mode 100644 libs/lib/mac32/include/osgUtil/Simplifier delete mode 100644 libs/lib/mac32/include/osgUtil/SmoothingVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/StateGraph delete mode 100644 libs/lib/mac32/include/osgUtil/Statistics delete mode 100644 libs/lib/mac32/include/osgUtil/TangentSpaceGenerator delete mode 100644 libs/lib/mac32/include/osgUtil/Tessellator delete mode 100644 libs/lib/mac32/include/osgUtil/TransformAttributeFunctor delete mode 100644 libs/lib/mac32/include/osgUtil/TransformCallback delete mode 100644 libs/lib/mac32/include/osgUtil/TriStripVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/UpdateVisitor delete mode 100644 libs/lib/mac32/include/osgUtil/Version delete mode 100644 libs/lib/mac32/include/osgViewer/CompositeViewer delete mode 100644 libs/lib/mac32/include/osgViewer/Export delete mode 100644 libs/lib/mac32/include/osgViewer/GraphicsWindow delete mode 100644 libs/lib/mac32/include/osgViewer/Renderer delete mode 100644 libs/lib/mac32/include/osgViewer/Scene delete mode 100644 libs/lib/mac32/include/osgViewer/Version delete mode 100644 libs/lib/mac32/include/osgViewer/View delete mode 100644 libs/lib/mac32/include/osgViewer/Viewer delete mode 100644 libs/lib/mac32/include/osgViewer/ViewerBase delete mode 100644 libs/lib/mac32/include/osgViewer/ViewerEventHandlers delete mode 100644 libs/lib/mac32/include/osgViewer/api/X11/GraphicsHandleX11 delete mode 100644 libs/lib/mac32/include/osgViewer/api/X11/GraphicsWindowX11 delete mode 100644 libs/lib/mac32/include/osgViewer/api/X11/PixelBufferX11 delete mode 100644 libs/lib/mac32/include/osgVolume/Export delete mode 100644 libs/lib/mac32/include/osgVolume/FixedFunctionTechnique delete mode 100644 libs/lib/mac32/include/osgVolume/Layer delete mode 100644 libs/lib/mac32/include/osgVolume/Locator delete mode 100644 libs/lib/mac32/include/osgVolume/Property delete mode 100644 libs/lib/mac32/include/osgVolume/RayTracedTechnique delete mode 100644 libs/lib/mac32/include/osgVolume/Version delete mode 100644 libs/lib/mac32/include/osgVolume/Volume delete mode 100644 libs/lib/mac32/include/osgVolume/VolumeTechnique delete mode 100644 libs/lib/mac32/include/osgVolume/VolumeTile delete mode 100644 libs/lib/mac32/include/osgWidget/Box delete mode 100644 libs/lib/mac32/include/osgWidget/Browser delete mode 100644 libs/lib/mac32/include/osgWidget/Canvas delete mode 100644 libs/lib/mac32/include/osgWidget/EventInterface delete mode 100644 libs/lib/mac32/include/osgWidget/Export delete mode 100644 libs/lib/mac32/include/osgWidget/Frame delete mode 100644 libs/lib/mac32/include/osgWidget/Input delete mode 100644 libs/lib/mac32/include/osgWidget/Label delete mode 100644 libs/lib/mac32/include/osgWidget/Lua delete mode 100644 libs/lib/mac32/include/osgWidget/PdfReader delete mode 100644 libs/lib/mac32/include/osgWidget/Python delete mode 100644 libs/lib/mac32/include/osgWidget/ScriptEngine delete mode 100644 libs/lib/mac32/include/osgWidget/StyleInterface delete mode 100644 libs/lib/mac32/include/osgWidget/StyleManager delete mode 100644 libs/lib/mac32/include/osgWidget/Table delete mode 100644 libs/lib/mac32/include/osgWidget/Types delete mode 100644 libs/lib/mac32/include/osgWidget/UIObjectParent delete mode 100644 libs/lib/mac32/include/osgWidget/Util delete mode 100644 libs/lib/mac32/include/osgWidget/Version delete mode 100644 libs/lib/mac32/include/osgWidget/ViewerEventHandlers delete mode 100644 libs/lib/mac32/include/osgWidget/VncClient delete mode 100644 libs/lib/mac32/include/osgWidget/Widget delete mode 100644 libs/lib/mac32/include/osgWidget/Window delete mode 100644 libs/lib/mac32/include/osgWidget/WindowManager delete mode 100755 libs/lib/mac32/lib/libOpenThreads.dylib delete mode 100755 libs/lib/mac32/lib/libcurl.4.dylib delete mode 100644 libs/lib/mac32/lib/libcurl.a delete mode 120000 libs/lib/mac32/lib/libcurl.dylib delete mode 100755 libs/lib/mac32/lib/libcurl.la delete mode 100755 libs/lib/mac32/lib/libexpat.1.5.2.dylib delete mode 120000 libs/lib/mac32/lib/libexpat.1.dylib delete mode 100644 libs/lib/mac32/lib/libexpat.a delete mode 120000 libs/lib/mac32/lib/libexpat.dylib delete mode 100755 libs/lib/mac32/lib/libexpat.la delete mode 100755 libs/lib/mac32/lib/libosg.dylib delete mode 100755 libs/lib/mac32/lib/libosgAnimation.dylib delete mode 100755 libs/lib/mac32/lib/libosgDB.dylib delete mode 100755 libs/lib/mac32/lib/libosgFX.dylib delete mode 100755 libs/lib/mac32/lib/libosgGA.dylib delete mode 100755 libs/lib/mac32/lib/libosgManipulator.dylib delete mode 100755 libs/lib/mac32/lib/libosgParticle.dylib delete mode 100755 libs/lib/mac32/lib/libosgPresentation.dylib delete mode 100755 libs/lib/mac32/lib/libosgShadow.dylib delete mode 100755 libs/lib/mac32/lib/libosgSim.dylib delete mode 100755 libs/lib/mac32/lib/libosgTerrain.dylib delete mode 100755 libs/lib/mac32/lib/libosgText.dylib delete mode 100755 libs/lib/mac32/lib/libosgUtil.dylib delete mode 100755 libs/lib/mac32/lib/libosgViewer.dylib delete mode 100755 libs/lib/mac32/lib/libosgVolume.dylib delete mode 100755 libs/lib/mac32/lib/libosgWidget.dylib delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_3dc.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_3ds.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_QTKit.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_ac.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_bmp.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_bsp.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_bvh.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_cfg.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_curl.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_dds.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osg.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osganimation.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgfx.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgparticle.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgshadow.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgsim.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgterrain.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgtext.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgviewer.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgvolume.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_deprecated_osgwidget.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_dicom.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_dot.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_dw.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_dxf.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_freetype.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_geo.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_glsl.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_gz.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_hdr.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_imageio.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_ive.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_logo.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_lwo.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_lws.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_md2.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_mdl.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_normals.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_obj.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_openflight.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_osg.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_osga.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_osgshadow.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_osgterrain.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_osgtgz.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_osgviewer.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_p3d.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_pic.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_ply.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_pnm.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_pov.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_pvr.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_qt.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_revisions.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_rgb.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_rot.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_scale.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osg.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osganimation.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osgfx.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osgmanipulator.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osgparticle.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osgshadow.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osgsim.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osgterrain.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osgtext.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_serializers_osgvolume.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_shp.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_stl.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_tga.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_tgz.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_trans.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_txf.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_txp.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_vtf.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_x.so delete mode 100755 libs/lib/mac32/lib/osgPlugins-3.0.1/osgdb_zip.so delete mode 100644 libs/lib/mac64/include/OpenThreads/Atomic delete mode 100644 libs/lib/mac64/include/OpenThreads/Barrier delete mode 100644 libs/lib/mac64/include/OpenThreads/Block delete mode 100644 libs/lib/mac64/include/OpenThreads/Condition delete mode 100644 libs/lib/mac64/include/OpenThreads/Config delete mode 100644 libs/lib/mac64/include/OpenThreads/Exports delete mode 100644 libs/lib/mac64/include/OpenThreads/Mutex delete mode 100644 libs/lib/mac64/include/OpenThreads/ReadWriteMutex delete mode 100644 libs/lib/mac64/include/OpenThreads/ReentrantMutex delete mode 100644 libs/lib/mac64/include/OpenThreads/ScopedLock delete mode 100644 libs/lib/mac64/include/OpenThreads/Thread delete mode 100644 libs/lib/mac64/include/OpenThreads/Version delete mode 100644 libs/lib/mac64/include/osg/AlphaFunc delete mode 100644 libs/lib/mac64/include/osg/AnimationPath delete mode 100644 libs/lib/mac64/include/osg/ApplicationUsage delete mode 100644 libs/lib/mac64/include/osg/ArgumentParser delete mode 100644 libs/lib/mac64/include/osg/Array delete mode 100644 libs/lib/mac64/include/osg/ArrayDispatchers delete mode 100644 libs/lib/mac64/include/osg/AudioStream delete mode 100644 libs/lib/mac64/include/osg/AutoTransform delete mode 100644 libs/lib/mac64/include/osg/Billboard delete mode 100644 libs/lib/mac64/include/osg/BlendColor delete mode 100644 libs/lib/mac64/include/osg/BlendEquation delete mode 100644 libs/lib/mac64/include/osg/BlendFunc delete mode 100644 libs/lib/mac64/include/osg/BoundingBox delete mode 100644 libs/lib/mac64/include/osg/BoundingSphere delete mode 100644 libs/lib/mac64/include/osg/BoundsChecking delete mode 100644 libs/lib/mac64/include/osg/BufferIndexBinding delete mode 100644 libs/lib/mac64/include/osg/BufferObject delete mode 100644 libs/lib/mac64/include/osg/Camera delete mode 100644 libs/lib/mac64/include/osg/CameraNode delete mode 100644 libs/lib/mac64/include/osg/CameraView delete mode 100644 libs/lib/mac64/include/osg/ClampColor delete mode 100644 libs/lib/mac64/include/osg/ClearNode delete mode 100644 libs/lib/mac64/include/osg/ClipNode delete mode 100644 libs/lib/mac64/include/osg/ClipPlane delete mode 100644 libs/lib/mac64/include/osg/ClusterCullingCallback delete mode 100644 libs/lib/mac64/include/osg/CollectOccludersVisitor delete mode 100644 libs/lib/mac64/include/osg/ColorMask delete mode 100644 libs/lib/mac64/include/osg/ColorMatrix delete mode 100644 libs/lib/mac64/include/osg/ComputeBoundsVisitor delete mode 100644 libs/lib/mac64/include/osg/Config delete mode 100644 libs/lib/mac64/include/osg/ConvexPlanarOccluder delete mode 100644 libs/lib/mac64/include/osg/ConvexPlanarPolygon delete mode 100644 libs/lib/mac64/include/osg/CoordinateSystemNode delete mode 100644 libs/lib/mac64/include/osg/CopyOp delete mode 100644 libs/lib/mac64/include/osg/CullFace delete mode 100644 libs/lib/mac64/include/osg/CullSettings delete mode 100644 libs/lib/mac64/include/osg/CullStack delete mode 100644 libs/lib/mac64/include/osg/CullingSet delete mode 100644 libs/lib/mac64/include/osg/DeleteHandler delete mode 100644 libs/lib/mac64/include/osg/Depth delete mode 100644 libs/lib/mac64/include/osg/DisplaySettings delete mode 100644 libs/lib/mac64/include/osg/DrawPixels delete mode 100644 libs/lib/mac64/include/osg/Drawable delete mode 100644 libs/lib/mac64/include/osg/Endian delete mode 100644 libs/lib/mac64/include/osg/Export delete mode 100644 libs/lib/mac64/include/osg/Fog delete mode 100644 libs/lib/mac64/include/osg/FragmentProgram delete mode 100644 libs/lib/mac64/include/osg/FrameBufferObject delete mode 100644 libs/lib/mac64/include/osg/FrameStamp delete mode 100644 libs/lib/mac64/include/osg/FrontFace delete mode 100644 libs/lib/mac64/include/osg/GL delete mode 100644 libs/lib/mac64/include/osg/GL2Extensions delete mode 100644 libs/lib/mac64/include/osg/GLBeginEndAdapter delete mode 100644 libs/lib/mac64/include/osg/GLExtensions delete mode 100644 libs/lib/mac64/include/osg/GLObjects delete mode 100644 libs/lib/mac64/include/osg/GLU delete mode 100644 libs/lib/mac64/include/osg/Geode delete mode 100644 libs/lib/mac64/include/osg/Geometry delete mode 100644 libs/lib/mac64/include/osg/GraphicsContext delete mode 100644 libs/lib/mac64/include/osg/GraphicsCostEstimator delete mode 100644 libs/lib/mac64/include/osg/GraphicsThread delete mode 100644 libs/lib/mac64/include/osg/Group delete mode 100644 libs/lib/mac64/include/osg/Hint delete mode 100644 libs/lib/mac64/include/osg/Image delete mode 100644 libs/lib/mac64/include/osg/ImageSequence delete mode 100644 libs/lib/mac64/include/osg/ImageStream delete mode 100644 libs/lib/mac64/include/osg/ImageUtils delete mode 100644 libs/lib/mac64/include/osg/KdTree delete mode 100644 libs/lib/mac64/include/osg/LOD delete mode 100644 libs/lib/mac64/include/osg/Light delete mode 100644 libs/lib/mac64/include/osg/LightModel delete mode 100644 libs/lib/mac64/include/osg/LightSource delete mode 100644 libs/lib/mac64/include/osg/LineSegment delete mode 100644 libs/lib/mac64/include/osg/LineStipple delete mode 100644 libs/lib/mac64/include/osg/LineWidth delete mode 100644 libs/lib/mac64/include/osg/LogicOp delete mode 100644 libs/lib/mac64/include/osg/Material delete mode 100644 libs/lib/mac64/include/osg/Math delete mode 100644 libs/lib/mac64/include/osg/Matrix delete mode 100644 libs/lib/mac64/include/osg/MatrixTransform delete mode 100644 libs/lib/mac64/include/osg/Matrixd delete mode 100644 libs/lib/mac64/include/osg/Matrixf delete mode 100644 libs/lib/mac64/include/osg/MixinVector delete mode 100644 libs/lib/mac64/include/osg/Multisample delete mode 100644 libs/lib/mac64/include/osg/Node delete mode 100644 libs/lib/mac64/include/osg/NodeCallback delete mode 100644 libs/lib/mac64/include/osg/NodeTrackerCallback delete mode 100644 libs/lib/mac64/include/osg/NodeVisitor delete mode 100644 libs/lib/mac64/include/osg/Notify delete mode 100644 libs/lib/mac64/include/osg/Object delete mode 100644 libs/lib/mac64/include/osg/Observer delete mode 100644 libs/lib/mac64/include/osg/ObserverNodePath delete mode 100644 libs/lib/mac64/include/osg/OccluderNode delete mode 100644 libs/lib/mac64/include/osg/OcclusionQueryNode delete mode 100644 libs/lib/mac64/include/osg/OperationThread delete mode 100644 libs/lib/mac64/include/osg/PagedLOD delete mode 100644 libs/lib/mac64/include/osg/Plane delete mode 100644 libs/lib/mac64/include/osg/Point delete mode 100644 libs/lib/mac64/include/osg/PointSprite delete mode 100644 libs/lib/mac64/include/osg/PolygonMode delete mode 100644 libs/lib/mac64/include/osg/PolygonOffset delete mode 100644 libs/lib/mac64/include/osg/PolygonStipple delete mode 100644 libs/lib/mac64/include/osg/Polytope delete mode 100644 libs/lib/mac64/include/osg/PositionAttitudeTransform delete mode 100644 libs/lib/mac64/include/osg/PrimitiveSet delete mode 100644 libs/lib/mac64/include/osg/Program delete mode 100644 libs/lib/mac64/include/osg/Projection delete mode 100644 libs/lib/mac64/include/osg/ProxyNode delete mode 100644 libs/lib/mac64/include/osg/Quat delete mode 100644 libs/lib/mac64/include/osg/Referenced delete mode 100644 libs/lib/mac64/include/osg/RenderInfo delete mode 100644 libs/lib/mac64/include/osg/Scissor delete mode 100644 libs/lib/mac64/include/osg/Sequence delete mode 100644 libs/lib/mac64/include/osg/ShadeModel delete mode 100644 libs/lib/mac64/include/osg/Shader delete mode 100644 libs/lib/mac64/include/osg/ShaderAttribute delete mode 100644 libs/lib/mac64/include/osg/ShaderComposer delete mode 100644 libs/lib/mac64/include/osg/ShadowVolumeOccluder delete mode 100644 libs/lib/mac64/include/osg/Shape delete mode 100644 libs/lib/mac64/include/osg/ShapeDrawable delete mode 100644 libs/lib/mac64/include/osg/State delete mode 100644 libs/lib/mac64/include/osg/StateAttribute delete mode 100644 libs/lib/mac64/include/osg/StateAttributeCallback delete mode 100644 libs/lib/mac64/include/osg/StateSet delete mode 100644 libs/lib/mac64/include/osg/Stats delete mode 100644 libs/lib/mac64/include/osg/Stencil delete mode 100644 libs/lib/mac64/include/osg/StencilTwoSided delete mode 100644 libs/lib/mac64/include/osg/Switch delete mode 100644 libs/lib/mac64/include/osg/TemplatePrimitiveFunctor delete mode 100644 libs/lib/mac64/include/osg/TexEnv delete mode 100644 libs/lib/mac64/include/osg/TexEnvCombine delete mode 100644 libs/lib/mac64/include/osg/TexEnvFilter delete mode 100644 libs/lib/mac64/include/osg/TexGen delete mode 100644 libs/lib/mac64/include/osg/TexGenNode delete mode 100644 libs/lib/mac64/include/osg/TexMat delete mode 100644 libs/lib/mac64/include/osg/Texture delete mode 100644 libs/lib/mac64/include/osg/Texture1D delete mode 100644 libs/lib/mac64/include/osg/Texture2D delete mode 100644 libs/lib/mac64/include/osg/Texture2DArray delete mode 100644 libs/lib/mac64/include/osg/Texture2DMultisample delete mode 100644 libs/lib/mac64/include/osg/Texture3D delete mode 100644 libs/lib/mac64/include/osg/TextureCubeMap delete mode 100644 libs/lib/mac64/include/osg/TextureRectangle delete mode 100644 libs/lib/mac64/include/osg/Timer delete mode 100644 libs/lib/mac64/include/osg/TransferFunction delete mode 100644 libs/lib/mac64/include/osg/Transform delete mode 100644 libs/lib/mac64/include/osg/TriangleFunctor delete mode 100644 libs/lib/mac64/include/osg/TriangleIndexFunctor delete mode 100644 libs/lib/mac64/include/osg/Uniform delete mode 100644 libs/lib/mac64/include/osg/UserDataContainer delete mode 100644 libs/lib/mac64/include/osg/ValueObject delete mode 100644 libs/lib/mac64/include/osg/Vec2 delete mode 100644 libs/lib/mac64/include/osg/Vec2b delete mode 100644 libs/lib/mac64/include/osg/Vec2d delete mode 100644 libs/lib/mac64/include/osg/Vec2f delete mode 100644 libs/lib/mac64/include/osg/Vec2s delete mode 100644 libs/lib/mac64/include/osg/Vec3 delete mode 100644 libs/lib/mac64/include/osg/Vec3b delete mode 100644 libs/lib/mac64/include/osg/Vec3d delete mode 100644 libs/lib/mac64/include/osg/Vec3f delete mode 100644 libs/lib/mac64/include/osg/Vec3s delete mode 100644 libs/lib/mac64/include/osg/Vec4 delete mode 100644 libs/lib/mac64/include/osg/Vec4b delete mode 100644 libs/lib/mac64/include/osg/Vec4d delete mode 100644 libs/lib/mac64/include/osg/Vec4f delete mode 100644 libs/lib/mac64/include/osg/Vec4s delete mode 100644 libs/lib/mac64/include/osg/Vec4ub delete mode 100644 libs/lib/mac64/include/osg/Version delete mode 100644 libs/lib/mac64/include/osg/VertexProgram delete mode 100644 libs/lib/mac64/include/osg/View delete mode 100644 libs/lib/mac64/include/osg/Viewport delete mode 100644 libs/lib/mac64/include/osg/buffered_value delete mode 100644 libs/lib/mac64/include/osg/fast_back_stack delete mode 100644 libs/lib/mac64/include/osg/io_utils delete mode 100644 libs/lib/mac64/include/osg/observer_ptr delete mode 100644 libs/lib/mac64/include/osg/ref_ptr delete mode 100644 libs/lib/mac64/include/osgAnimation/Action delete mode 100644 libs/lib/mac64/include/osgAnimation/ActionAnimation delete mode 100644 libs/lib/mac64/include/osgAnimation/ActionBlendIn delete mode 100644 libs/lib/mac64/include/osgAnimation/ActionBlendOut delete mode 100644 libs/lib/mac64/include/osgAnimation/ActionCallback delete mode 100644 libs/lib/mac64/include/osgAnimation/ActionStripAnimation delete mode 100644 libs/lib/mac64/include/osgAnimation/ActionVisitor delete mode 100644 libs/lib/mac64/include/osgAnimation/Animation delete mode 100644 libs/lib/mac64/include/osgAnimation/AnimationManagerBase delete mode 100644 libs/lib/mac64/include/osgAnimation/AnimationUpdateCallback delete mode 100644 libs/lib/mac64/include/osgAnimation/BasicAnimationManager delete mode 100644 libs/lib/mac64/include/osgAnimation/Bone delete mode 100644 libs/lib/mac64/include/osgAnimation/BoneMapVisitor delete mode 100644 libs/lib/mac64/include/osgAnimation/Channel delete mode 100644 libs/lib/mac64/include/osgAnimation/CubicBezier delete mode 100644 libs/lib/mac64/include/osgAnimation/EaseMotion delete mode 100644 libs/lib/mac64/include/osgAnimation/Export delete mode 100644 libs/lib/mac64/include/osgAnimation/FrameAction delete mode 100644 libs/lib/mac64/include/osgAnimation/Interpolator delete mode 100644 libs/lib/mac64/include/osgAnimation/Keyframe delete mode 100644 libs/lib/mac64/include/osgAnimation/LinkVisitor delete mode 100644 libs/lib/mac64/include/osgAnimation/MorphGeometry delete mode 100644 libs/lib/mac64/include/osgAnimation/RigGeometry delete mode 100644 libs/lib/mac64/include/osgAnimation/RigTransform delete mode 100644 libs/lib/mac64/include/osgAnimation/RigTransformHardware delete mode 100644 libs/lib/mac64/include/osgAnimation/RigTransformSoftware delete mode 100644 libs/lib/mac64/include/osgAnimation/Sampler delete mode 100644 libs/lib/mac64/include/osgAnimation/Skeleton delete mode 100644 libs/lib/mac64/include/osgAnimation/StackedMatrixElement delete mode 100644 libs/lib/mac64/include/osgAnimation/StackedQuaternionElement delete mode 100644 libs/lib/mac64/include/osgAnimation/StackedRotateAxisElement delete mode 100644 libs/lib/mac64/include/osgAnimation/StackedScaleElement delete mode 100644 libs/lib/mac64/include/osgAnimation/StackedTransform delete mode 100644 libs/lib/mac64/include/osgAnimation/StackedTransformElement delete mode 100644 libs/lib/mac64/include/osgAnimation/StackedTranslateElement delete mode 100644 libs/lib/mac64/include/osgAnimation/StatsHandler delete mode 100644 libs/lib/mac64/include/osgAnimation/StatsVisitor delete mode 100644 libs/lib/mac64/include/osgAnimation/Target delete mode 100644 libs/lib/mac64/include/osgAnimation/Timeline delete mode 100644 libs/lib/mac64/include/osgAnimation/TimelineAnimationManager delete mode 100644 libs/lib/mac64/include/osgAnimation/UpdateBone delete mode 100644 libs/lib/mac64/include/osgAnimation/UpdateMaterial delete mode 100644 libs/lib/mac64/include/osgAnimation/UpdateMatrixTransform delete mode 100644 libs/lib/mac64/include/osgAnimation/Vec3Packed delete mode 100644 libs/lib/mac64/include/osgAnimation/VertexInfluence delete mode 100644 libs/lib/mac64/include/osgDB/Archive delete mode 100644 libs/lib/mac64/include/osgDB/AuthenticationMap delete mode 100644 libs/lib/mac64/include/osgDB/Callbacks delete mode 100644 libs/lib/mac64/include/osgDB/ConvertUTF delete mode 100644 libs/lib/mac64/include/osgDB/DataTypes delete mode 100644 libs/lib/mac64/include/osgDB/DatabasePager delete mode 100644 libs/lib/mac64/include/osgDB/DatabaseRevisions delete mode 100644 libs/lib/mac64/include/osgDB/DotOsgWrapper delete mode 100644 libs/lib/mac64/include/osgDB/DynamicLibrary delete mode 100644 libs/lib/mac64/include/osgDB/Export delete mode 100644 libs/lib/mac64/include/osgDB/ExternalFileWriter delete mode 100644 libs/lib/mac64/include/osgDB/FileCache delete mode 100644 libs/lib/mac64/include/osgDB/FileNameUtils delete mode 100644 libs/lib/mac64/include/osgDB/FileUtils delete mode 100644 libs/lib/mac64/include/osgDB/ImageOptions delete mode 100644 libs/lib/mac64/include/osgDB/ImagePager delete mode 100644 libs/lib/mac64/include/osgDB/ImageProcessor delete mode 100644 libs/lib/mac64/include/osgDB/Input delete mode 100644 libs/lib/mac64/include/osgDB/InputStream delete mode 100644 libs/lib/mac64/include/osgDB/ObjectWrapper delete mode 100644 libs/lib/mac64/include/osgDB/Options delete mode 100644 libs/lib/mac64/include/osgDB/Output delete mode 100644 libs/lib/mac64/include/osgDB/OutputStream delete mode 100644 libs/lib/mac64/include/osgDB/ParameterOutput delete mode 100644 libs/lib/mac64/include/osgDB/PluginQuery delete mode 100644 libs/lib/mac64/include/osgDB/ReadFile delete mode 100644 libs/lib/mac64/include/osgDB/ReaderWriter delete mode 100644 libs/lib/mac64/include/osgDB/Registry delete mode 100644 libs/lib/mac64/include/osgDB/Serializer delete mode 100644 libs/lib/mac64/include/osgDB/SharedStateManager delete mode 100644 libs/lib/mac64/include/osgDB/StreamOperator delete mode 100644 libs/lib/mac64/include/osgDB/Version delete mode 100644 libs/lib/mac64/include/osgDB/WriteFile delete mode 100644 libs/lib/mac64/include/osgDB/XmlParser delete mode 100644 libs/lib/mac64/include/osgDB/fstream delete mode 100644 libs/lib/mac64/include/osgFX/AnisotropicLighting delete mode 100644 libs/lib/mac64/include/osgFX/BumpMapping delete mode 100644 libs/lib/mac64/include/osgFX/Cartoon delete mode 100644 libs/lib/mac64/include/osgFX/Effect delete mode 100644 libs/lib/mac64/include/osgFX/Export delete mode 100644 libs/lib/mac64/include/osgFX/MultiTextureControl delete mode 100644 libs/lib/mac64/include/osgFX/Outline delete mode 100644 libs/lib/mac64/include/osgFX/Registry delete mode 100644 libs/lib/mac64/include/osgFX/Scribe delete mode 100644 libs/lib/mac64/include/osgFX/SpecularHighlights delete mode 100644 libs/lib/mac64/include/osgFX/Technique delete mode 100644 libs/lib/mac64/include/osgFX/Validator delete mode 100644 libs/lib/mac64/include/osgFX/Version delete mode 100644 libs/lib/mac64/include/osgGA/AnimationPathManipulator delete mode 100644 libs/lib/mac64/include/osgGA/CameraManipulator delete mode 100644 libs/lib/mac64/include/osgGA/CameraViewSwitchManipulator delete mode 100644 libs/lib/mac64/include/osgGA/DriveManipulator delete mode 100644 libs/lib/mac64/include/osgGA/EventQueue delete mode 100644 libs/lib/mac64/include/osgGA/EventVisitor delete mode 100644 libs/lib/mac64/include/osgGA/Export delete mode 100644 libs/lib/mac64/include/osgGA/FirstPersonManipulator delete mode 100644 libs/lib/mac64/include/osgGA/FlightManipulator delete mode 100644 libs/lib/mac64/include/osgGA/GUIActionAdapter delete mode 100644 libs/lib/mac64/include/osgGA/GUIEventAdapter delete mode 100644 libs/lib/mac64/include/osgGA/GUIEventHandler delete mode 100644 libs/lib/mac64/include/osgGA/KeySwitchMatrixManipulator delete mode 100644 libs/lib/mac64/include/osgGA/MultiTouchTrackballManipulator delete mode 100644 libs/lib/mac64/include/osgGA/NodeTrackerManipulator delete mode 100644 libs/lib/mac64/include/osgGA/OrbitManipulator delete mode 100644 libs/lib/mac64/include/osgGA/SphericalManipulator delete mode 100644 libs/lib/mac64/include/osgGA/StandardManipulator delete mode 100644 libs/lib/mac64/include/osgGA/StateSetManipulator delete mode 100644 libs/lib/mac64/include/osgGA/TerrainManipulator delete mode 100644 libs/lib/mac64/include/osgGA/TrackballManipulator delete mode 100644 libs/lib/mac64/include/osgGA/UFOManipulator delete mode 100644 libs/lib/mac64/include/osgGA/Version delete mode 100644 libs/lib/mac64/include/osgManipulator/AntiSquish delete mode 100644 libs/lib/mac64/include/osgManipulator/Command delete mode 100644 libs/lib/mac64/include/osgManipulator/CommandManager delete mode 100644 libs/lib/mac64/include/osgManipulator/Constraint delete mode 100644 libs/lib/mac64/include/osgManipulator/Dragger delete mode 100644 libs/lib/mac64/include/osgManipulator/Export delete mode 100644 libs/lib/mac64/include/osgManipulator/Projector delete mode 100644 libs/lib/mac64/include/osgManipulator/RotateCylinderDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/RotateSphereDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/Scale1DDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/Scale2DDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/ScaleAxisDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/Selection delete mode 100644 libs/lib/mac64/include/osgManipulator/TabBoxDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/TabBoxTrackballDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/TabPlaneDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/TabPlaneTrackballDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/TrackballDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/Translate1DDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/Translate2DDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/TranslateAxisDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/TranslatePlaneDragger delete mode 100644 libs/lib/mac64/include/osgManipulator/Version delete mode 100644 libs/lib/mac64/include/osgParticle/AccelOperator delete mode 100644 libs/lib/mac64/include/osgParticle/AngularAccelOperator delete mode 100644 libs/lib/mac64/include/osgParticle/AngularDampingOperator delete mode 100644 libs/lib/mac64/include/osgParticle/BounceOperator delete mode 100644 libs/lib/mac64/include/osgParticle/BoxPlacer delete mode 100644 libs/lib/mac64/include/osgParticle/CenteredPlacer delete mode 100644 libs/lib/mac64/include/osgParticle/CompositePlacer delete mode 100644 libs/lib/mac64/include/osgParticle/ConnectedParticleSystem delete mode 100644 libs/lib/mac64/include/osgParticle/ConstantRateCounter delete mode 100644 libs/lib/mac64/include/osgParticle/Counter delete mode 100644 libs/lib/mac64/include/osgParticle/DampingOperator delete mode 100644 libs/lib/mac64/include/osgParticle/DomainOperator delete mode 100644 libs/lib/mac64/include/osgParticle/Emitter delete mode 100644 libs/lib/mac64/include/osgParticle/ExplosionDebrisEffect delete mode 100644 libs/lib/mac64/include/osgParticle/ExplosionEffect delete mode 100644 libs/lib/mac64/include/osgParticle/ExplosionOperator delete mode 100644 libs/lib/mac64/include/osgParticle/Export delete mode 100644 libs/lib/mac64/include/osgParticle/FireEffect delete mode 100644 libs/lib/mac64/include/osgParticle/FluidFrictionOperator delete mode 100644 libs/lib/mac64/include/osgParticle/FluidProgram delete mode 100644 libs/lib/mac64/include/osgParticle/ForceOperator delete mode 100644 libs/lib/mac64/include/osgParticle/Interpolator delete mode 100644 libs/lib/mac64/include/osgParticle/LinearInterpolator delete mode 100644 libs/lib/mac64/include/osgParticle/ModularEmitter delete mode 100644 libs/lib/mac64/include/osgParticle/ModularProgram delete mode 100644 libs/lib/mac64/include/osgParticle/MultiSegmentPlacer delete mode 100644 libs/lib/mac64/include/osgParticle/Operator delete mode 100644 libs/lib/mac64/include/osgParticle/OrbitOperator delete mode 100644 libs/lib/mac64/include/osgParticle/Particle delete mode 100644 libs/lib/mac64/include/osgParticle/ParticleEffect delete mode 100644 libs/lib/mac64/include/osgParticle/ParticleProcessor delete mode 100644 libs/lib/mac64/include/osgParticle/ParticleSystem delete mode 100644 libs/lib/mac64/include/osgParticle/ParticleSystemUpdater delete mode 100644 libs/lib/mac64/include/osgParticle/Placer delete mode 100644 libs/lib/mac64/include/osgParticle/PointPlacer delete mode 100644 libs/lib/mac64/include/osgParticle/PrecipitationEffect delete mode 100644 libs/lib/mac64/include/osgParticle/Program delete mode 100644 libs/lib/mac64/include/osgParticle/RadialShooter delete mode 100644 libs/lib/mac64/include/osgParticle/RandomRateCounter delete mode 100644 libs/lib/mac64/include/osgParticle/SectorPlacer delete mode 100644 libs/lib/mac64/include/osgParticle/SegmentPlacer delete mode 100644 libs/lib/mac64/include/osgParticle/Shooter delete mode 100644 libs/lib/mac64/include/osgParticle/SinkOperator delete mode 100644 libs/lib/mac64/include/osgParticle/SmokeEffect delete mode 100644 libs/lib/mac64/include/osgParticle/SmokeTrailEffect delete mode 100644 libs/lib/mac64/include/osgParticle/VariableRateCounter delete mode 100644 libs/lib/mac64/include/osgParticle/Version delete mode 100644 libs/lib/mac64/include/osgParticle/range delete mode 100644 libs/lib/mac64/include/osgPresentation/AnimationMaterial delete mode 100644 libs/lib/mac64/include/osgPresentation/CompileSlideCallback delete mode 100644 libs/lib/mac64/include/osgPresentation/Export delete mode 100644 libs/lib/mac64/include/osgPresentation/PickEventHandler delete mode 100644 libs/lib/mac64/include/osgPresentation/SlideEventHandler delete mode 100644 libs/lib/mac64/include/osgPresentation/SlideShowConstructor delete mode 100644 libs/lib/mac64/include/osgShadow/ConvexPolyhedron delete mode 100644 libs/lib/mac64/include/osgShadow/DebugShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/Export delete mode 100644 libs/lib/mac64/include/osgShadow/LightSpacePerspectiveShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/MinimalCullBoundsShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/MinimalDrawBoundsShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/MinimalShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/OccluderGeometry delete mode 100644 libs/lib/mac64/include/osgShadow/ParallelSplitShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/ProjectionShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/ShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/ShadowTechnique delete mode 100644 libs/lib/mac64/include/osgShadow/ShadowTexture delete mode 100644 libs/lib/mac64/include/osgShadow/ShadowVolume delete mode 100644 libs/lib/mac64/include/osgShadow/ShadowedScene delete mode 100644 libs/lib/mac64/include/osgShadow/SoftShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/StandardShadowMap delete mode 100644 libs/lib/mac64/include/osgShadow/Version delete mode 100644 libs/lib/mac64/include/osgShadow/ViewDependentShadowTechnique delete mode 100644 libs/lib/mac64/include/osgSim/BlinkSequence delete mode 100644 libs/lib/mac64/include/osgSim/ColorRange delete mode 100644 libs/lib/mac64/include/osgSim/DOFTransform delete mode 100644 libs/lib/mac64/include/osgSim/ElevationSlice delete mode 100644 libs/lib/mac64/include/osgSim/Export delete mode 100644 libs/lib/mac64/include/osgSim/GeographicLocation delete mode 100644 libs/lib/mac64/include/osgSim/HeightAboveTerrain delete mode 100644 libs/lib/mac64/include/osgSim/Impostor delete mode 100644 libs/lib/mac64/include/osgSim/ImpostorSprite delete mode 100644 libs/lib/mac64/include/osgSim/InsertImpostorsVisitor delete mode 100644 libs/lib/mac64/include/osgSim/LightPoint delete mode 100644 libs/lib/mac64/include/osgSim/LightPointNode delete mode 100644 libs/lib/mac64/include/osgSim/LightPointSystem delete mode 100644 libs/lib/mac64/include/osgSim/LineOfSight delete mode 100644 libs/lib/mac64/include/osgSim/MultiSwitch delete mode 100644 libs/lib/mac64/include/osgSim/ObjectRecordData delete mode 100644 libs/lib/mac64/include/osgSim/OverlayNode delete mode 100644 libs/lib/mac64/include/osgSim/ScalarBar delete mode 100644 libs/lib/mac64/include/osgSim/ScalarsToColors delete mode 100644 libs/lib/mac64/include/osgSim/Sector delete mode 100644 libs/lib/mac64/include/osgSim/ShapeAttribute delete mode 100644 libs/lib/mac64/include/osgSim/SphereSegment delete mode 100644 libs/lib/mac64/include/osgSim/Version delete mode 100644 libs/lib/mac64/include/osgSim/VisibilityGroup delete mode 100644 libs/lib/mac64/include/osgTerrain/Export delete mode 100644 libs/lib/mac64/include/osgTerrain/GeometryTechnique delete mode 100644 libs/lib/mac64/include/osgTerrain/Layer delete mode 100644 libs/lib/mac64/include/osgTerrain/Locator delete mode 100644 libs/lib/mac64/include/osgTerrain/Terrain delete mode 100644 libs/lib/mac64/include/osgTerrain/TerrainTechnique delete mode 100644 libs/lib/mac64/include/osgTerrain/TerrainTile delete mode 100644 libs/lib/mac64/include/osgTerrain/ValidDataOperator delete mode 100644 libs/lib/mac64/include/osgTerrain/Version delete mode 100644 libs/lib/mac64/include/osgText/Export delete mode 100644 libs/lib/mac64/include/osgText/FadeText delete mode 100644 libs/lib/mac64/include/osgText/Font delete mode 100644 libs/lib/mac64/include/osgText/Font3D delete mode 100644 libs/lib/mac64/include/osgText/Glyph delete mode 100644 libs/lib/mac64/include/osgText/KerningType delete mode 100644 libs/lib/mac64/include/osgText/String delete mode 100644 libs/lib/mac64/include/osgText/Style delete mode 100644 libs/lib/mac64/include/osgText/Text delete mode 100644 libs/lib/mac64/include/osgText/Text3D delete mode 100644 libs/lib/mac64/include/osgText/TextBase delete mode 100644 libs/lib/mac64/include/osgText/Version delete mode 100644 libs/lib/mac64/include/osgUtil/ConvertVec delete mode 100644 libs/lib/mac64/include/osgUtil/CubeMapGenerator delete mode 100644 libs/lib/mac64/include/osgUtil/CullVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/DelaunayTriangulator delete mode 100644 libs/lib/mac64/include/osgUtil/DisplayRequirementsVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/DrawElementTypeSimplifier delete mode 100644 libs/lib/mac64/include/osgUtil/EdgeCollector delete mode 100644 libs/lib/mac64/include/osgUtil/Export delete mode 100644 libs/lib/mac64/include/osgUtil/GLObjectsVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/HalfWayMapGenerator delete mode 100644 libs/lib/mac64/include/osgUtil/HighlightMapGenerator delete mode 100644 libs/lib/mac64/include/osgUtil/IncrementalCompileOperation delete mode 100644 libs/lib/mac64/include/osgUtil/IntersectVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/IntersectionVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/LineSegmentIntersector delete mode 100644 libs/lib/mac64/include/osgUtil/MeshOptimizers delete mode 100644 libs/lib/mac64/include/osgUtil/OperationArrayFunctor delete mode 100644 libs/lib/mac64/include/osgUtil/Optimizer delete mode 100644 libs/lib/mac64/include/osgUtil/PlaneIntersector delete mode 100644 libs/lib/mac64/include/osgUtil/PolytopeIntersector delete mode 100644 libs/lib/mac64/include/osgUtil/PositionalStateContainer delete mode 100644 libs/lib/mac64/include/osgUtil/PrintVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/ReflectionMapGenerator delete mode 100644 libs/lib/mac64/include/osgUtil/RenderBin delete mode 100644 libs/lib/mac64/include/osgUtil/RenderLeaf delete mode 100644 libs/lib/mac64/include/osgUtil/RenderStage delete mode 100644 libs/lib/mac64/include/osgUtil/ReversePrimitiveFunctor delete mode 100644 libs/lib/mac64/include/osgUtil/SceneGraphBuilder delete mode 100644 libs/lib/mac64/include/osgUtil/SceneView delete mode 100644 libs/lib/mac64/include/osgUtil/ShaderGen delete mode 100644 libs/lib/mac64/include/osgUtil/Simplifier delete mode 100644 libs/lib/mac64/include/osgUtil/SmoothingVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/StateGraph delete mode 100644 libs/lib/mac64/include/osgUtil/Statistics delete mode 100644 libs/lib/mac64/include/osgUtil/TangentSpaceGenerator delete mode 100644 libs/lib/mac64/include/osgUtil/Tessellator delete mode 100644 libs/lib/mac64/include/osgUtil/TransformAttributeFunctor delete mode 100644 libs/lib/mac64/include/osgUtil/TransformCallback delete mode 100644 libs/lib/mac64/include/osgUtil/TriStripVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/UpdateVisitor delete mode 100644 libs/lib/mac64/include/osgUtil/Version delete mode 100644 libs/lib/mac64/include/osgViewer/CompositeViewer delete mode 100644 libs/lib/mac64/include/osgViewer/Export delete mode 100644 libs/lib/mac64/include/osgViewer/GraphicsWindow delete mode 100644 libs/lib/mac64/include/osgViewer/Renderer delete mode 100644 libs/lib/mac64/include/osgViewer/Scene delete mode 100644 libs/lib/mac64/include/osgViewer/Version delete mode 100644 libs/lib/mac64/include/osgViewer/View delete mode 100644 libs/lib/mac64/include/osgViewer/Viewer delete mode 100644 libs/lib/mac64/include/osgViewer/ViewerBase delete mode 100644 libs/lib/mac64/include/osgViewer/ViewerEventHandlers delete mode 100644 libs/lib/mac64/include/osgViewer/api/Carbon/GraphicsHandleCarbon delete mode 100644 libs/lib/mac64/include/osgViewer/api/Carbon/GraphicsWindowCarbon delete mode 100644 libs/lib/mac64/include/osgViewer/api/Carbon/PixelBufferCarbon delete mode 100644 libs/lib/mac64/include/osgVolume/Export delete mode 100644 libs/lib/mac64/include/osgVolume/FixedFunctionTechnique delete mode 100644 libs/lib/mac64/include/osgVolume/Layer delete mode 100644 libs/lib/mac64/include/osgVolume/Locator delete mode 100644 libs/lib/mac64/include/osgVolume/Property delete mode 100644 libs/lib/mac64/include/osgVolume/RayTracedTechnique delete mode 100644 libs/lib/mac64/include/osgVolume/Version delete mode 100644 libs/lib/mac64/include/osgVolume/Volume delete mode 100644 libs/lib/mac64/include/osgVolume/VolumeTechnique delete mode 100644 libs/lib/mac64/include/osgVolume/VolumeTile delete mode 100644 libs/lib/mac64/include/osgWidget/Box delete mode 100644 libs/lib/mac64/include/osgWidget/Browser delete mode 100644 libs/lib/mac64/include/osgWidget/Canvas delete mode 100644 libs/lib/mac64/include/osgWidget/EventInterface delete mode 100644 libs/lib/mac64/include/osgWidget/Export delete mode 100644 libs/lib/mac64/include/osgWidget/Frame delete mode 100644 libs/lib/mac64/include/osgWidget/Input delete mode 100644 libs/lib/mac64/include/osgWidget/Label delete mode 100644 libs/lib/mac64/include/osgWidget/Lua delete mode 100644 libs/lib/mac64/include/osgWidget/PdfReader delete mode 100644 libs/lib/mac64/include/osgWidget/Python delete mode 100644 libs/lib/mac64/include/osgWidget/ScriptEngine delete mode 100644 libs/lib/mac64/include/osgWidget/StyleInterface delete mode 100644 libs/lib/mac64/include/osgWidget/StyleManager delete mode 100644 libs/lib/mac64/include/osgWidget/Table delete mode 100644 libs/lib/mac64/include/osgWidget/Types delete mode 100644 libs/lib/mac64/include/osgWidget/UIObjectParent delete mode 100644 libs/lib/mac64/include/osgWidget/Util delete mode 100644 libs/lib/mac64/include/osgWidget/Version delete mode 100644 libs/lib/mac64/include/osgWidget/ViewerEventHandlers delete mode 100644 libs/lib/mac64/include/osgWidget/VncClient delete mode 100644 libs/lib/mac64/include/osgWidget/Widget delete mode 100644 libs/lib/mac64/include/osgWidget/Window delete mode 100644 libs/lib/mac64/include/osgWidget/WindowManager delete mode 100755 libs/lib/mac64/lib/libOpenThreads.dylib delete mode 100755 libs/lib/mac64/lib/libosg.dylib delete mode 100755 libs/lib/mac64/lib/libosgAnimation.dylib delete mode 100755 libs/lib/mac64/lib/libosgDB.dylib delete mode 100755 libs/lib/mac64/lib/libosgFX.dylib delete mode 100755 libs/lib/mac64/lib/libosgGA.dylib delete mode 100755 libs/lib/mac64/lib/libosgManipulator.dylib delete mode 100755 libs/lib/mac64/lib/libosgParticle.dylib delete mode 100755 libs/lib/mac64/lib/libosgPresentation.dylib delete mode 100755 libs/lib/mac64/lib/libosgShadow.dylib delete mode 100755 libs/lib/mac64/lib/libosgSim.dylib delete mode 100755 libs/lib/mac64/lib/libosgTerrain.dylib delete mode 100755 libs/lib/mac64/lib/libosgText.dylib delete mode 100755 libs/lib/mac64/lib/libosgUtil.dylib delete mode 100755 libs/lib/mac64/lib/libosgViewer.dylib delete mode 100755 libs/lib/mac64/lib/libosgVolume.dylib delete mode 100755 libs/lib/mac64/lib/libosgWidget.dylib delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_3dc.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_3ds.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_ac.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_bmp.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_bsp.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_bvh.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_cfg.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_curl.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_dds.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osg.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osganimation.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgfx.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgparticle.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgshadow.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgsim.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgterrain.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgtext.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgviewer.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgvolume.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_deprecated_osgwidget.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_dicom.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_dot.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_dw.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_dxf.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_freetype.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_geo.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_glsl.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_gz.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_hdr.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_imageio.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_ive.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_logo.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_lwo.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_lws.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_md2.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_mdl.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_normals.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_obj.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_openflight.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_osg.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_osga.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_osgshadow.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_osgterrain.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_osgtgz.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_osgviewer.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_p3d.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_pic.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_ply.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_pnm.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_pov.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_pvr.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_revisions.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_rgb.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_rot.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_scale.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osg.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osganimation.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osgfx.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osgmanipulator.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osgparticle.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osgshadow.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osgsim.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osgterrain.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osgtext.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_serializers_osgvolume.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_shp.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_stl.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_tga.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_tgz.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_trans.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_txf.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_txp.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_vtf.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_x.so delete mode 100755 libs/lib/mac64/lib/osgPlugins-3.0.1/osgdb_zip.so diff --git a/QGCApplication.pro b/QGCApplication.pro index 8198081cf..8a6093534 100644 --- a/QGCApplication.pro +++ b/QGCApplication.pro @@ -21,7 +21,12 @@ include(QGCCommon.pri) TARGET = qgroundcontrol TEMPLATE = app -DESTDIR = $${OUT_PWD}/build + +DebugBuild { + DESTDIR = $${OUT_PWD}/debug +} else { + DESTDIR = $${OUT_PWD}/release +} # Load additional config flags from user_config.pri exists(user_config.pri):infile(user_config.pri, CONFIG) { @@ -35,7 +40,7 @@ LinuxBuild { # QGC QtLocation plugin (for ios, it's all compiled in with the rest.) -!ios { +!iOSBuild { LIBS += -L$${LOCATION_PLUGIN_DESTDIR} LIBS += -l$${LOCATION_PLUGIN_NAME} } @@ -78,18 +83,25 @@ QT += testlib # MacBuild { - QMAKE_INFO_PLIST = Custom-Info.plist - ICON = $${BASEDIR}/resources/icons/macx.icns - OTHER_FILES += Custom-Info.plist + QMAKE_INFO_PLIST = Custom-Info.plist + ICON = $${BASEDIR}/resources/icons/macx.icns + OTHER_FILES += Custom-Info.plist } iOSBuild { - QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist - OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist - BUNDLE.files = $$files($$PWD/ios/AppIcon*.png) $$PWD/ios/LaunchScreen.xib + BUNDLE.files = $$files($$PWD/ios/AppIcon*.png) $$PWD/ios/QGCLaunchScreen.xib QMAKE_BUNDLE_DATA += BUNDLE LIBS += -framework AVFoundation OBJECTIVE_SOURCES += src/audio/QGCAudioWorker_iOS.mm + #-- Info.plist (need an "official" one for the App Store) + ForAppStore { + message(App Store Build) + QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOSForAppStore-Info.plist + OTHER_FILES += $${BASEDIR}/ios/iOSForAppStore-Info.plist + } else { + QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist + OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist + } #-- TODO: Add iTunesArtwork } @@ -662,6 +674,14 @@ AndroidBuild { $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \ $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java \ $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbIoManager.java + + DISTFILES += \ + android/gradle/wrapper/gradle-wrapper.jar \ + android/gradlew \ + android/res/values/libs.xml \ + android/build.gradle \ + android/gradle/wrapper/gradle-wrapper.properties \ + android/gradlew.bat } #------------------------------------------------------------------------------------- @@ -676,11 +696,3 @@ include(QGCSetup.pri) # include(QGCInstaller.pri) - -DISTFILES += \ - android/gradle/wrapper/gradle-wrapper.jar \ - android/gradlew \ - android/res/values/libs.xml \ - android/build.gradle \ - android/gradle/wrapper/gradle-wrapper.properties \ - android/gradlew.bat diff --git a/QGCCommon.pri b/QGCCommon.pri index 809dd9672..ef571bdfa 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -122,7 +122,7 @@ win32:debug_and_release { BASEDIR = $$IN_PWD -!ios { +!iOSBuild { OBJECTS_DIR = $${OUT_PWD}/obj MOC_DIR = $${OUT_PWD}/moc UI_DIR = $${OUT_PWD}/ui diff --git a/QGCInstaller.pri b/QGCInstaller.pri index 553916cc1..84f36d83a 100644 --- a/QGCInstaller.pri +++ b/QGCInstaller.pri @@ -23,39 +23,41 @@ installer { VideoEnabled { # Install the gstreamer framework # This will: - # Copy from the original distibution into libs/lib/Framworks (if not already there) + # Copy from the original distibution into DESTDIR/gstwork (if not already there) # Prune the framework, removing stuff we don't need # Relocate all dylibs so they can work under @executable_path/... # Copy the result into the app bundle # Make sure qgroundcontrol can find them message("Preparing GStreamer Framework") - QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $$BASEDIR/libs/lib/Frameworks/ $$DESTDIR/$${TARGET}.app $${TARGET} + QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET} } else { message("Skipping GStreamer Framework") } # We cd to release directory so we can run macdeployqt without a path to the # qgroundcontrol.app file. If you specify a path to the .app file the symbolic # links to plugins will not be created correctly. - QMAKE_POST_LINK += && cd release && mkdir package - QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt qgroundcontrol.app -verbose=2 -qmldir=../src - QMAKE_POST_LINK += && cd .. + QMAKE_POST_LINK += && cd $${DESTDIR} && mkdir package + QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt qgroundcontrol.app -verbose=2 -qmldir=$${BASEDIR}/src + QMAKE_POST_LINK += && cd $${OUT_PWD} QMAKE_POST_LINK += && hdiutil create -layout SPUD -srcfolder $${DESTDIR}/qgroundcontrol.app -volname QGroundControl $${DESTDIR}/package/qgroundcontrol.dmg } WindowsBuild { - # The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much - # easier to debug user crashes. - #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\qgroundcontrol.pdb - #QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\qgroundcontrol.pdb + # The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much + # easier to debug user crashes. + #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\qgroundcontrol.pdb + #QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\qgroundcontrol.pdb QMAKE_POST_LINK += $$escape_expand(\\n) $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\qgroundcontrol-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi") - #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY qgroundcontrol.pdb $${DESTDIR_WIN} - #QMAKE_POST_LINK += $$escape_expand(\\n) del qgroundcontrol.pdb + #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY qgroundcontrol.pdb $${DESTDIR_WIN} + #QMAKE_POST_LINK += $$escape_expand(\\n) del qgroundcontrol.pdb OTHER_FILES += deploy/qgroundcontrol_installer.nsi } LinuxBuild { + #-- TODO: This uses hardcoded paths. It should use $${DESTDIR} QMAKE_POST_LINK += && mkdir -p release/package - QMAKE_POST_LINK += && tar -cjf release/package/qgroundcontrol.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/' + QMAKE_POST_LINK += && tar -cjf release/package/qgroundcontrol.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/' } AndroidBuild { + #-- TODO: This uses hardcoded paths. It should use $${DESTDIR} QMAKE_POST_LINK += && mkdir -p release/package QMAKE_POST_LINK += && make install INSTALL_ROOT=release/android-build/ QMAKE_POST_LINK += && androiddeployqt --input android-libqgroundcontrol.so-deployment-settings.json --output release/android-build --deployment bundled --gradle --sign android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS) diff --git a/QGCSetup.pri b/QGCSetup.pri index edc628869..02020d452 100644 --- a/QGCSetup.pri +++ b/QGCSetup.pri @@ -51,106 +51,10 @@ WindowsBuild { # MacBuild { - - # Copy non-standard libraries and frameworks into app package - QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/libs/lib/mac64/lib $$DESTDIR/$${TARGET}.app/Contents/libs + # Copy non-standard frameworks into app package QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/ - - # Fix library paths inside executable - - INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET} - INSTALL_NAME_LIB_LIST = \ - libOpenThreads.dylib \ - libosg.dylib \ - libosgViewer.dylib \ - libosgGA.dylib \ - libosgDB.dylib \ - libosgText.dylib \ - libosgWidget.dylib - for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) { - QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET - } - - # Fix library paths within libraries (inter-library dependencies) - - # OSG GA LIBRARY - INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib - INSTALL_NAME_LIB_LIST = \ - libOpenThreads.dylib \ - libosg.dylib \ - libosgGA.dylib \ - libosgDB.dylib \ - libosgUtil.dylib - for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) { - QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET - } - - # OSG DB LIBRARY - INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib - INSTALL_NAME_LIB_LIST = \ - libOpenThreads.dylib \ - libosg.dylib \ - libosgDB.dylib \ - libosgUtil.dylib - for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) { - QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET - } - - # OSG TEXT LIBRARY - INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgText.dylib - INSTALL_NAME_LIB_LIST = \ - libOpenThreads.dylib \ - libosg.dylib \ - libosgDB.dylib \ - libosgUtil.dylib \ - libosgText.dylib - for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) { - QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET - } - - # OSG UTIL LIBRARY - INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgUtil.dylib - INSTALL_NAME_LIB_LIST = \ - libOpenThreads.dylib \ - libosg.dylib - for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) { - QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET - } - - - # OSG VIEWER LIBRARY - INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib - INSTALL_NAME_LIB_LIST = \ - libOpenThreads.dylib \ - libosg.dylib \ - libosgGA.dylib \ - libosgDB.dylib \ - libosgUtil.dylib \ - libosgText.dylib - for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) { - QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET - } - - # OSG WIDGET LIBRARY - INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib - INSTALL_NAME_LIB_LIST = \ - libOpenThreads.dylib \ - libosg.dylib \ - libosgGA.dylib \ - libosgDB.dylib \ - libosgUtil.dylib \ - libosgText.dylib \ - libosgViewer.dylib - for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) { - QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET - } - - # CORE OSG LIBRARY - QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$DESTDIR/$${TARGET}.app/Contents/libs/libosg.dylib - # SDL Framework QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET} - } WindowsBuild { @@ -165,29 +69,29 @@ WindowsBuild { $$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll for(COPY_FILE, COPY_FILE_LIST) { - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\" + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\" } ReleaseBuild { - # Copy Visual Studio DLLs - # Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed. - win32-msvc2010 { - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp100.dll\" \"$$DESTDIR_WIN\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr100.dll\" \"$$DESTDIR_WIN\" - } - else:win32-msvc2012 { - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp110.dll\" \"$$DESTDIR_WIN\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr110.dll\" \"$$DESTDIR_WIN\" - } - else:win32-msvc2013 { - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp120.dll\" \"$$DESTDIR_WIN\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr120.dll\" \"$$DESTDIR_WIN\" - } - else { - error("Visual studio version not supported, installation cannot be completed.") - } - } + # Copy Visual Studio DLLs + # Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed. + win32-msvc2010 { + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp100.dll\" \"$$DESTDIR_WIN\" + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr100.dll\" \"$$DESTDIR_WIN\" + } + else:win32-msvc2012 { + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp110.dll\" \"$$DESTDIR_WIN\" + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr110.dll\" \"$$DESTDIR_WIN\" + } + else:win32-msvc2013 { + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp120.dll\" \"$$DESTDIR_WIN\" + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr120.dll\" \"$$DESTDIR_WIN\" + } + else { + error("Visual studio version not supported, installation cannot be completed.") + } + } DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR_WIN\\$${TARGET}.exe)) QMAKE_POST_LINK += $$escape_expand(\\n) windeployqt --no-compiler-runtime --qmldir=$${BASEDIR_WIN}\\src $${DEPLOY_TARGET} diff --git a/android_environment.sh b/android_environment.sh index 477c0dbd1..04abee5d5 100644 --- a/android_environment.sh +++ b/android_environment.sh @@ -1,7 +1,7 @@ #!/bin/bash #---------------------------------------------------------- # You will need: -# - Qt 5.4 android_armv7 kit +# - Qt 5.5.x android_armv7 kit # - Android SDK # - Androig NDK # - Current Java @@ -10,7 +10,7 @@ # Update with correct location for these export ANDROID_HOME=~/Library/Android/sdk export ANDROID_SDK_ROOT=~/Library/Android/sdk -export ANDROID_NDK_ROOT=~/Library/Android/ndk +export ANDROID_NDK_ROOT=~/Library/Android/sdk/ndk-bundle export ANDROID_NDK_HOST=darwin-x86_64 export ANDROID_NDK_PLATFORM=/android-9 export ANDROID_NDK_TOOLCHAIN_PREFIX=arm-linux-androideabi @@ -19,19 +19,11 @@ export ANDROID_NDK_TOOLS_PREFIX=arm-linux-androideabi #---------------------------------------------------------- # To build it, run (replacing the path with where you have Qt installed) # -# For a shadow build: (strongly recomended) -# # >source android_environment.sh # cd ../ # mkdir android_build # cd android_build # >~/local/Qt/5.4/android_armv7/bin/qmake -r -spec android-g++ CONFIG+=debug ../qgroundcontrol/qgroundcontrol.pro -# >make -j24 -# >~/local/Qt/5.4/android_armv7/bin/androiddeployqt --input ./android-libqgroundcontrol.so-deployment-settings.json --output ./android-build --deployment bundled --android-platform android-22 --jdk /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home --verbose --ant /opt/local/bin/ant -# -# For an in place build (not recomended) +# >make -j24 install INSTALL_ROOT=./android-build/ +# >~/local/Qt/5.4/android_armv7/bin/androiddeployqt --input ./android-libqgroundcontrol.so-deployment-settings.json --output ./android-build --deployment bundled --android-platform android-22 --jdk /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home --verbose --ant /usr/local/bin/ant # -# >source android_environment.sh -# >~/local/Qt/5.4/android_armv7/bin/qmake -r -spec android-g++ CONFIG+=debug qgroundcontrol.pro -# >make -j24 -# >~/local/Qt/5.4/android_armv7/bin/androiddeployqt --input ./android-libqgroundcontrol.so-deployment-settings.json --output ./android-build --deployment bundled --android-platform android-22 --jdk /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home --verbose --ant /opt/local/bin/ant diff --git a/ios/LaunchScreen.xib b/ios/QGCLaunchScreen.xib similarity index 100% rename from ios/LaunchScreen.xib rename to ios/QGCLaunchScreen.xib diff --git a/ios/iOS-Info.plist b/ios/iOS-Info.plist index 884b7b5b5..cef6abd54 100644 --- a/ios/iOS-Info.plist +++ b/ios/iOS-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.grubba.qgroundcontrol + org.mavlink.qgroundcontrol CFBundleName QGroundControl CFBundlePackageType @@ -27,13 +27,13 @@ NOTE This file was generated by Qt/QMake. UILaunchStoryboardName - LaunchScreen.xib + QGCLaunchScreen UIRequiresFullScreen CFBundleInfoDictionaryVersion 6.0 ForAppStore - Yes + No UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft diff --git a/ios/iOSForAppStore-Info.plist b/ios/iOSForAppStore-Info.plist new file mode 100644 index 000000000..f7da58475 --- /dev/null +++ b/ios/iOSForAppStore-Info.plist @@ -0,0 +1,83 @@ + + + + + CFBundleDisplayName + QGroundControl + CFBundleExecutable + qgroundcontrol + CFBundleGetInfoString + Created by Qt/QMake + CFBundleIconFile + + CFBundleIdentifier + com.grubba.qgroundcontrol + CFBundleName + QGroundControl + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NOTE + This file was generated by Qt/QMake. + UILaunchStoryboardName + QGCLaunchScreen + UIRequiresFullScreen + + CFBundleInfoDictionaryVersion + 6.0 + ForAppStore + Yes + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon29x29.png + AppIcon29x29@2x.png + AppIcon40x40@2x.png + AppIcon57x57.png + AppIcon57x57@2x.png + AppIcon60x60@2x.png + + + + CFBundleIcons~ipad + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon29x29.png + AppIcon29x29@2x.png + AppIcon40x40@2x.png + AppIcon57x57.png + AppIcon57x57@2x.png + AppIcon60x60@2x.png + AppIcon29x29~ipad.png + AppIcon29x29@2x~ipad.png + AppIcon40x40~ipad.png + AppIcon40x40@2x~ipad.png + AppIcon50x50~ipad.png + AppIcon50x50@2x~ipad.png + AppIcon72x72~ipad.png + AppIcon72x72@2x~ipad.png + AppIcon76x76~ipad.png + AppIcon76x76@2x~ipad.png + + + + + diff --git a/libs/lib/lib.pro b/libs/lib/lib.pro deleted file mode 100644 index a60585f02..000000000 --- a/libs/lib/lib.pro +++ /dev/null @@ -1 +0,0 @@ -TEMPLATE = subdirs \ No newline at end of file diff --git a/libs/lib/mac32/frameworks/.gitignore b/libs/lib/mac32/frameworks/.gitignore deleted file mode 100644 index 39aa80676..000000000 --- a/libs/lib/mac32/frameworks/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.framework -osgPlugins* diff --git a/libs/lib/mac32/frameworks/README b/libs/lib/mac32/frameworks/README deleted file mode 100644 index 2436e3d15..000000000 --- a/libs/lib/mac32/frameworks/README +++ /dev/null @@ -1,3 +0,0 @@ -For instructions how to download or build the frameworks necessary to get OSG / osgEarth support, please refer to the QGroundControl wiki: - -http://qgroundcontrol.org/dev/open_scene_graph diff --git a/libs/lib/mac32/include/OpenThreads/Atomic b/libs/lib/mac32/include/OpenThreads/Atomic deleted file mode 100644 index 8b8ac4de3..000000000 --- a/libs/lib/mac32/include/OpenThreads/Atomic +++ /dev/null @@ -1,287 +0,0 @@ -/* -*-c++-*- OpenThreads library, Copyright (C) 2008 The Open Thread Group - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef _OPENTHREADS_ATOMIC_ -#define _OPENTHREADS_ATOMIC_ - -#include -#include - -#if defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) -# include -# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES -#elif defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) && defined(__i386__) -# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES -#elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED) -# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) -# include -# include "Mutex" -# include "ScopedLock" -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) -# include "Mutex" -# include "ScopedLock" -#endif - -#if defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES) -#define _OPENTHREADS_ATOMIC_INLINE -#else -#define _OPENTHREADS_ATOMIC_INLINE inline -#endif - -namespace OpenThreads { - -/** - * @class Atomic - * @brief This class provides an atomic increment and decrement operation. - */ -class OPENTHREAD_EXPORT_DIRECTIVE Atomic { - public: - Atomic(unsigned value = 0) : _value(value) - { } - _OPENTHREADS_ATOMIC_INLINE unsigned operator++(); - _OPENTHREADS_ATOMIC_INLINE unsigned operator--(); - _OPENTHREADS_ATOMIC_INLINE unsigned AND(unsigned value); - _OPENTHREADS_ATOMIC_INLINE unsigned OR(unsigned value); - _OPENTHREADS_ATOMIC_INLINE unsigned XOR(unsigned value); - _OPENTHREADS_ATOMIC_INLINE unsigned exchange(unsigned value = 0); - _OPENTHREADS_ATOMIC_INLINE operator unsigned() const; - private: - - Atomic(const Atomic&); - Atomic& operator=(const Atomic&); - -#if defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - mutable Mutex _mutex; -#endif -#if defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED) - volatile long _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) - volatile int32_t _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - volatile uint_t _value; - mutable Mutex _mutex; // needed for xor -#else - volatile unsigned _value; -#endif -}; - -/** - * @class AtomicPtr - * @brief This class provides an atomic pointer assignment using cas operations. - */ -class OPENTHREAD_EXPORT_DIRECTIVE AtomicPtr { -public: - AtomicPtr(void* ptr = 0) : _ptr(ptr) - { } - ~AtomicPtr() - { _ptr = 0; } - - // assigns a new pointer - _OPENTHREADS_ATOMIC_INLINE bool assign(void* ptrNew, const void* const ptrOld); - _OPENTHREADS_ATOMIC_INLINE void* get() const; - -private: - AtomicPtr(const AtomicPtr&); - AtomicPtr& operator=(const AtomicPtr&); - -#if defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - mutable Mutex _mutex; -#endif - void* volatile _ptr; -}; - -#if !defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES) - -_OPENTHREADS_ATOMIC_INLINE unsigned -Atomic::operator++() -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_add_and_fetch(&_value, 1); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __add_and_fetch(&_value, 1); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_inc_uint_nv(&_value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - return ++_value; -#else - return ++_value; -#endif -} - -_OPENTHREADS_ATOMIC_INLINE unsigned -Atomic::operator--() -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_sub_and_fetch(&_value, 1); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __sub_and_fetch(&_value, 1); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_dec_uint_nv(&_value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - return --_value; -#else - return --_value; -#endif -} - -_OPENTHREADS_ATOMIC_INLINE unsigned -Atomic::AND(unsigned value) -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_fetch_and_and(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __and_and_fetch(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_and_uint_nv(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - _value &= value; - return _value; -#else - _value &= value; - return _value; -#endif -} - -_OPENTHREADS_ATOMIC_INLINE unsigned -Atomic::OR(unsigned value) -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_fetch_and_or(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __or_and_fetch(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_or_uint_nv(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - _value |= value; - return _value; -#else - _value |= value; - return _value; -#endif -} - -_OPENTHREADS_ATOMIC_INLINE unsigned -Atomic::XOR(unsigned value) -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_fetch_and_xor(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __xor_and_fetch(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - ScopedLock lock(_mutex); - _value ^= value; - return _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - _value ^= value; - return _value; -#else - _value ^= value; - return _value; -#endif -} - -_OPENTHREADS_ATOMIC_INLINE unsigned -Atomic::exchange(unsigned value) -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_lock_test_and_set(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __compare_and_swap(&_value, _value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_cas_uint(&_value, _value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - unsigned oldval = _value; - _value = value; - return oldval; -#else - unsigned oldval = _value; - _value = value; - return oldval; -#endif -} - -_OPENTHREADS_ATOMIC_INLINE -Atomic::operator unsigned() const -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - __sync_synchronize(); - return _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - __synchronize(); - return _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - membar_consumer(); // Hmm, do we need??? - return _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - return _value; -#else - return _value; -#endif -} - -_OPENTHREADS_ATOMIC_INLINE bool -AtomicPtr::assign(void* ptrNew, const void* const ptrOld) -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __compare_and_swap((unsigned long*)&_ptr, (unsigned long)ptrOld, (unsigned long)ptrNew); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return ptrOld == atomic_cas_ptr(&_ptr, const_cast(ptrOld), ptrNew); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - if (_ptr != ptrOld) - return false; - _ptr = ptrNew; - return true; -#else - if (_ptr != ptrOld) - return false; - _ptr = ptrNew; - return true; -#endif -} - -_OPENTHREADS_ATOMIC_INLINE void* -AtomicPtr::get() const -{ -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - __sync_synchronize(); - return _ptr; -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - __synchronize(); - return _ptr; -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - membar_consumer(); // Hmm, do we need??? - return _ptr; -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock lock(_mutex); - return _ptr; -#else - return _ptr; -#endif -} - -#endif // !defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES) - -} - -#endif // _OPENTHREADS_ATOMIC_ diff --git a/libs/lib/mac32/include/OpenThreads/Barrier b/libs/lib/mac32/include/OpenThreads/Barrier deleted file mode 100644 index 663d198f1..000000000 --- a/libs/lib/mac32/include/OpenThreads/Barrier +++ /dev/null @@ -1,100 +0,0 @@ -/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - - -// -// Barrier - C++ barrier class -// ~~~~~~~ -// - -#ifndef _OPENTHREADS_BARRIER_ -#define _OPENTHREADS_BARRIER_ - -#include - -namespace OpenThreads { - - -/** - * @class Barrier - * @brief This class provides an object-oriented thread barrier interface - * - * @warning It is unwise to use the construct "Barrier barrier" in the - * global namespace on sgi's. The object "barrier" - * will confilict with the c-library sproc function "barrier" and - * unpredictable results may occur. You have been warned. - */ -class OPENTHREAD_EXPORT_DIRECTIVE Barrier { - -public: - - /** - * Constructor - */ - Barrier(int numThreads=0); - - /** - * Destructor - */ - virtual ~Barrier(); - - /** - * Reset the barrier to it's original state. - */ - virtual void reset(); - - /** - * Block until numThreads threads have entered the barrier. - */ - virtual void block(unsigned int numThreads=0); - - /** - * Release the barrier, now. - */ - virtual void release(); - - /** - * Return the number of threads currently blocked in the barrier, - * Return -1 if error. - */ - virtual int numThreadsCurrentlyBlocked(); - - - void invalidate(); - -private: - - /** - * Private copy constructor, to prevent tampering. - */ - Barrier(const Barrier &/*b*/) {}; - - /** - * Private copy assignment, to prevent tampering. - */ - Barrier &operator=(const Barrier &/*b*/) {return *(this);}; - - /** - * Implementation-specific private data. - */ - void *_prvData; - - - bool _valid; - -}; - -} - -#endif // !_OPENTHREADS_BARRIER_ - diff --git a/libs/lib/mac32/include/OpenThreads/Block b/libs/lib/mac32/include/OpenThreads/Block deleted file mode 100644 index 0b821e4ed..000000000 --- a/libs/lib/mac32/include/OpenThreads/Block +++ /dev/null @@ -1,177 +0,0 @@ -/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef _OPENTHREADS_BLOCK_ -#define _OPENTHREADS_BLOCK_ - -#include -#include -#include -#include - -namespace OpenThreads { - -/** Block is a block that can be used to halt a thread that is waiting another thread to release it.*/ -class Block -{ - public: - - Block(): - _released(false) {} - - ~Block() - { - release(); - } - - inline bool block() - { - ScopedLock mutlock(_mut); - if( !_released ) - { - return _cond.wait(&_mut)==0; - } - else - { - return true; - } - } - - inline bool block(unsigned long timeout) - { - ScopedLock mutlock(_mut); - if( !_released ) - { - return _cond.wait(&_mut, timeout)==0; - } - else - { - return true; - } - } - - inline void release() - { - ScopedLock mutlock(_mut); - if (!_released) - { - _released = true; - _cond.broadcast(); - } - } - - inline void reset() - { - ScopedLock mutlock(_mut); - _released = false; - } - - inline void set(bool doRelease) - { - if (doRelease!=_released) - { - if (doRelease) release(); - else reset(); - } - } - - protected: - - Mutex _mut; - Condition _cond; - bool _released; - - private: - - Block(const Block&) {} -}; - -/** BlockCount is a block that can be used to halt a thread that is waiting for a specified number of operations to be completed.*/ -class BlockCount -{ - public: - - BlockCount(unsigned int blockCount): - _blockCount(blockCount), - _currentCount(0) {} - - ~BlockCount() - { - _blockCount = 0; - release(); - } - - inline void completed() - { - OpenThreads::ScopedLock mutlock(_mut); - if (_currentCount>0) - { - --_currentCount; - - if (_currentCount==0) - { - // osg::notify(osg::NOTICE)<<"Released"< mutlock(_mut); - if (_currentCount) - _cond.wait(&_mut); - } - - inline void reset() - { - OpenThreads::ScopedLock mutlock(_mut); - if (_currentCount!=_blockCount) - { - if (_blockCount==0) _cond.broadcast(); - _currentCount = _blockCount; - } - } - - inline void release() - { - OpenThreads::ScopedLock mutlock(_mut); - if (_currentCount) - { - _currentCount = 0; - _cond.broadcast(); - } - } - - inline void setBlockCount(unsigned int blockCount) { _blockCount = blockCount; } - - inline unsigned int getBlockCount() const { return _blockCount; } - - inline unsigned int getCurrentCount() const { return _currentCount; } - - protected: - - OpenThreads::Mutex _mut; - OpenThreads::Condition _cond; - unsigned int _blockCount; - unsigned int _currentCount; - - private: - - BlockCount(const BlockCount&) {} - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/OpenThreads/Condition b/libs/lib/mac32/include/OpenThreads/Condition deleted file mode 100644 index 454c079d3..000000000 --- a/libs/lib/mac32/include/OpenThreads/Condition +++ /dev/null @@ -1,93 +0,0 @@ -/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - - -// -// Condition - C++ condition class -// ~~~~~~~~~ -// - -#ifndef _OPENTHREADS_CONDITION_ -#define _OPENTHREADS_CONDITION_ - -#include -#include - -namespace OpenThreads { - -/** - * @class Condition - * @brief This class provides an object-oriented thread condition interface. - */ -class OPENTHREAD_EXPORT_DIRECTIVE Condition { - -public: - - /** - * Constructor - */ - Condition(); - - /** - * Destructor - */ - virtual ~Condition(); - - /** - * Wait on a mutex. - */ - virtual int wait(Mutex *mutex); - - /** - * Wait on a mutex for a given amount of time (ms) - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - virtual int wait(Mutex *mutex, unsigned long int ms); - - /** - * Signal a SINGLE thread to wake if it's waiting. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - virtual int signal(); - - /** - * Wake all threads waiting on this condition. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - virtual int broadcast(); - -private: - - /** - * Private copy constructor, to prevent tampering. - */ - Condition(const Condition &/*c*/) {}; - - /** - * Private copy assignment, to prevent tampering. - */ - Condition &operator=(const Condition &/*c*/) {return *(this);}; - - /** - * Implementation-specific data - */ - void *_prvData; - -}; - -} - -#endif // !_OPENTHREADS_CONDITION_ diff --git a/libs/lib/mac32/include/OpenThreads/Config b/libs/lib/mac32/include/OpenThreads/Config deleted file mode 100644 index 1e6a68679..000000000 --- a/libs/lib/mac32/include/OpenThreads/Config +++ /dev/null @@ -1,34 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -/**************************************************************************** - * THIS FILE IS AUTOGENERATED BY CMAKE. DO NOT EDIT! - ****************************************************************************/ - -/* Changes to the configuration reflected here can be made with ccmake on - * unix or with cmake-gui on windows. Alternatively you can use cmake's -D - * or -P switches to set some configuration values at cmake configuration time. - */ - -#ifndef _OPENTHREADS_CONFIG -#define _OPENTHREADS_CONFIG - -#define _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS -/* #undef _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS */ -/* #undef _OPENTHREADS_ATOMIC_USE_SUN */ -/* #undef _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED */ -#define _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC -/* #undef _OPENTHREADS_ATOMIC_USE_MUTEX */ -/* #undef OT_LIBRARY_STATIC */ - -#endif diff --git a/libs/lib/mac32/include/OpenThreads/Exports b/libs/lib/mac32/include/OpenThreads/Exports deleted file mode 100644 index 2a5414424..000000000 --- a/libs/lib/mac32/include/OpenThreads/Exports +++ /dev/null @@ -1,44 +0,0 @@ -/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef _OPENTHREAD_EXPORTS_H_ -#define _OPENTHREAD_EXPORTS_H_ - -#include - -#ifndef WIN32 - #define OPENTHREAD_EXPORT_DIRECTIVE -#else - #if defined( OT_LIBRARY_STATIC ) - #define OPENTHREAD_EXPORT_DIRECTIVE - #elif defined( OPENTHREADS_EXPORTS ) - #define OPENTHREAD_EXPORT_DIRECTIVE __declspec(dllexport) - #else - #define OPENTHREAD_EXPORT_DIRECTIVE __declspec(dllimport) - - #if 0 // Commented out for now - - #ifdef _MSC_VER - #ifdef _DEBUG - #pragma comment(lib ,"OpenThreadsWin32d") - #else - #pragma comment(lib, "OpenThreadsWin32") - #endif - #endif - #endif - #endif -#endif - -#endif - - diff --git a/libs/lib/mac32/include/OpenThreads/Mutex b/libs/lib/mac32/include/OpenThreads/Mutex deleted file mode 100644 index e13ad189f..000000000 --- a/libs/lib/mac32/include/OpenThreads/Mutex +++ /dev/null @@ -1,100 +0,0 @@ -/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - - -// -// Mutex - C++ mutex class -// ~~~~~ -// - -#ifndef _OPENTHREADS_MUTEX_ -#define _OPENTHREADS_MUTEX_ - -#include - -namespace OpenThreads { - -/** - * @class Mutex - * @brief This class provides an object-oriented thread mutex interface. - */ -class OPENTHREAD_EXPORT_DIRECTIVE Mutex { - - friend class Condition; - -public: - - enum MutexType - { - MUTEX_NORMAL, - MUTEX_RECURSIVE - }; - - /** - * Constructor - */ - Mutex(MutexType type=MUTEX_NORMAL); - - /** - * Destructor - */ - virtual ~Mutex(); - - - MutexType getMutexType() const { return _mutexType; } - - - /** - * Lock the mutex - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - virtual int lock(); - - /** - * Unlock the mutex - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - virtual int unlock(); - - /** - * Test if mutex can be locked. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - virtual int trylock(); - -private: - - /** - * Private copy constructor, to prevent tampering. - */ - Mutex(const Mutex &/*m*/) {}; - - /** - * Private copy assignment, to prevent tampering. - */ - Mutex &operator=(const Mutex &/*m*/) {return *(this);}; - - /** - * Implementation-specific private data. - */ - void *_prvData; - MutexType _mutexType; - -}; - -} - -#endif // _OPENTHREADS_MUTEX_ diff --git a/libs/lib/mac32/include/OpenThreads/ReadWriteMutex b/libs/lib/mac32/include/OpenThreads/ReadWriteMutex deleted file mode 100644 index c78a651d6..000000000 --- a/libs/lib/mac32/include/OpenThreads/ReadWriteMutex +++ /dev/null @@ -1,114 +0,0 @@ -/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef _OPENTHREADS_READWRITEMUTEX_ -#define _OPENTHREADS_READWRITEMUTEX_ - -#include -#include - -namespace OpenThreads { - -class ReadWriteMutex -{ - public: - - ReadWriteMutex(): - _readCount(0) {} - - virtual ~ReadWriteMutex() {} - - virtual int readLock() - { - OpenThreads::ScopedLock lock(_readCountMutex); - int result = 0; - if (_readCount==0) - { - result = _readWriteMutex.lock(); - } - ++_readCount; - return result; - } - - - virtual int readUnlock() - { - OpenThreads::ScopedLock lock(_readCountMutex); - int result = 0; - if (_readCount>0) - { - --_readCount; - if (_readCount==0) - { - result = _readWriteMutex.unlock(); - } - } - return result; - } - - virtual int writeLock() - { - return _readWriteMutex.lock(); - } - - virtual int writeUnlock() - { - return _readWriteMutex.unlock(); - } - - protected: - - ReadWriteMutex(const ReadWriteMutex&) {} - ReadWriteMutex& operator = (const ReadWriteMutex&) { return *(this); } - -#if 0 - ReentrantMutex _readWriteMutex; - ReentrantMutex _readCountMutex; -#else - OpenThreads::Mutex _readWriteMutex; - OpenThreads::Mutex _readCountMutex; -#endif - unsigned int _readCount; - -}; - -class ScopedReadLock -{ - public: - - ScopedReadLock(ReadWriteMutex& mutex):_mutex(mutex) { _mutex.readLock(); } - ~ScopedReadLock() { _mutex.readUnlock(); } - - protected: - ReadWriteMutex& _mutex; - - ScopedReadLock& operator = (const ScopedReadLock&) { return *this; } -}; - - -class ScopedWriteLock -{ - public: - - ScopedWriteLock(ReadWriteMutex& mutex):_mutex(mutex) { _mutex.writeLock(); } - ~ScopedWriteLock() { _mutex.writeUnlock(); } - - protected: - ReadWriteMutex& _mutex; - - ScopedWriteLock& operator = (const ScopedWriteLock&) { return *this; } -}; - -} - -#endif diff --git a/libs/lib/mac32/include/OpenThreads/ReentrantMutex b/libs/lib/mac32/include/OpenThreads/ReentrantMutex deleted file mode 100644 index fdfefb32d..000000000 --- a/libs/lib/mac32/include/OpenThreads/ReentrantMutex +++ /dev/null @@ -1,34 +0,0 @@ -/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef _OPENTHREADS_REENTRANTMUTEX_ -#define _OPENTHREADS_REENTRANTMUTEX_ - -#include -#include -#include - -namespace OpenThreads { - -class ReentrantMutex : public OpenThreads::Mutex -{ - public: - - ReentrantMutex(): - Mutex(MUTEX_RECURSIVE) {} - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/OpenThreads/ScopedLock b/libs/lib/mac32/include/OpenThreads/ScopedLock deleted file mode 100644 index b665ecaa8..000000000 --- a/libs/lib/mac32/include/OpenThreads/ScopedLock +++ /dev/null @@ -1,70 +0,0 @@ -/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - - -// -// ScopedLock and ReverseScopedLock templates -// ~~~~~~~ -// -#ifndef _ScopedLock_ -#define _ScopedLock_ - -namespace OpenThreads{ - -template class ScopedLock -{ - private: - M& m_lock; - ScopedLock(const ScopedLock&); // prevent copy - ScopedLock& operator=(const ScopedLock&); // prevent assign - public: - explicit ScopedLock(M& m):m_lock(m) {m_lock.lock();} - ~ScopedLock(){m_lock.unlock();} -}; - -template class ReverseScopedLock -{ - private: - M& m_lock; - ReverseScopedLock(const ReverseScopedLock&); // prevent copy - ReverseScopedLock& operator=(const ReverseScopedLock&); // prevent assign - public: - explicit ReverseScopedLock(M& m):m_lock(m) {m_lock.unlock();} - ~ReverseScopedLock(){m_lock.lock();} -}; - - -template class ScopedPointerLock -{ - private: - M* m_lock; - ScopedPointerLock(const ScopedPointerLock&); // prevent copy - ScopedPointerLock& operator=(const ScopedPointerLock&); // prevent assign - public: - explicit ScopedPointerLock(M* m):m_lock(m) { if (m_lock) m_lock->lock();} - ~ScopedPointerLock(){ if (m_lock) m_lock->unlock();} -}; - -template class ReverseScopedPointerLock -{ - private: - M* m_lock; - ReverseScopedPointerLock(const ReverseScopedPointerLock&); // prevent copy - ReverseScopedPointerLock& operator=(const ReverseScopedPointerLock&); // prevent assign - public: - explicit ReverseScopedPointerLock(M* m):m_lock(m) { if (m_lock) m_lock->unlock();} - ~ReverseScopedPointerLock(){ if (m_lock) m_lock->lock();} -}; - -} -#endif diff --git a/libs/lib/mac32/include/OpenThreads/Thread b/libs/lib/mac32/include/OpenThreads/Thread deleted file mode 100644 index 0297b9876..000000000 --- a/libs/lib/mac32/include/OpenThreads/Thread +++ /dev/null @@ -1,389 +0,0 @@ -/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - - -// -// Thread - C++ Thread class -// ~~~~~~~~ -// - -#ifndef _OPENTHREADS_THREAD_ -#define _OPENTHREADS_THREAD_ - -#include - -#include - -namespace OpenThreads { - -/** - * Get the number of processors. - * - * Note, systems where no support exists for querrying the number of processors, 1 is returned. - * - */ -extern OPENTHREAD_EXPORT_DIRECTIVE int GetNumberOfProcessors(); - -/** - * Set the processor affinity of current thread. - * - * Note, systems where no support exists no affinity will be set, and -1 will be returned. - * - */ -extern OPENTHREAD_EXPORT_DIRECTIVE int SetProcessorAffinityOfCurrentThread(unsigned int cpunum); - -/** - * @class Thread - * @brief This class provides an object-oriented thread interface. - */ -class OPENTHREAD_EXPORT_DIRECTIVE Thread { - -public: - - /** - * Set the concurrency level for a running application. This method - * only has effect if the pthreads thread model is being used, and - * then only when that model is many-to-one (eg. irix). - * in other cases it is ignored. The concurrency level is only a - * *hint* as to the number of execution vehicles to use, the actual - * implementation may do anything it wants. Setting the value - * to 0 returns things to their default state. - * - * @return previous concurrency level, -1 indicates no-op. - */ - static int SetConcurrency(int concurrencyLevel); - - /** - * Get the concurrency level for a running application. In this - * case, a return code of 0 means that the application is in default - * mode. A return code of -1 means that the application is incapable - * of setting an arbitrary concurrency, because it is a one-to-one - * execution model (sprocs, linuxThreads) - */ - static int GetConcurrency(); - - /** - * Enumerated Type for thread priority - */ - enum ThreadPriority { - - THREAD_PRIORITY_MAX, /**< The maximum possible priority */ - THREAD_PRIORITY_HIGH, /**< A high (but not max) setting */ - THREAD_PRIORITY_NOMINAL, /**< An average priority */ - THREAD_PRIORITY_LOW, /**< A low (but not min) setting */ - THREAD_PRIORITY_MIN, /**< The miniumum possible priority */ - THREAD_PRIORITY_DEFAULT /**< Priority scheduling default */ - - }; - - /** - * Enumerated Type for thread scheduling policy - */ - enum ThreadPolicy { - - THREAD_SCHEDULE_FIFO, /**< First in, First out scheduling */ - THREAD_SCHEDULE_ROUND_ROBIN, /**< Round-robin scheduling (LINUX_DEFAULT) */ - THREAD_SCHEDULE_TIME_SHARE, /**< Time-share scheduling (IRIX DEFAULT) */ - THREAD_SCHEDULE_DEFAULT /**< Default scheduling */ - - }; - - /** - * Constructor - */ - Thread(); - - /** - * Destructor - */ - virtual ~Thread(); - - - /** - * Return a pointer to the current running thread - */ - static Thread *CurrentThread(); - - - /** - * Initialize Threading in a program. This method must be called before - * you can do any threading in a program. - */ - static void Init(); - - /** - * Yield the processor. - * - * @note This method operates on the calling process. And is - * equivalent to calling sched_yield(). - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - static int YieldCurrentThread(); - - /** - * This method will return the ThreadPriority of the master process. - * (ie, the one calling the thread->start() methods for the first time) - * The method will almost certainly return - * Thread::THREAD_PRIORITY_DEFAULT if - * Init() has not been called. - * - * @return the Thread::ThreadPriority of the master thread. - */ - static ThreadPriority GetMasterPriority() {return s_masterThreadPriority;}; - - - /** - * Get a unique thread id. This id is monotonically increasing. - * - * @return a unique thread identifier - */ - int getThreadId(); - - /** - * Get the thread's process id. This is the pthread_t or pid_t value - * depending on the threading model being used. - * - * @return thread process id. - */ - size_t getProcessId(); - - /** - * Start the thread. This method will configure the thread, set - * it's priority, and spawn it. - * - * @note if the stack size specified setStackSize is smaller than the - * smallest allowable stack size, the threads stack size will be set to - * the minimum allowed, and may be retrieved via the getStackSize() - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int start(); - int startThread(); - - /** - * Test the cancel state of the thread. If the thread has been canceled - * this method will cause the thread to exit now. This method operates - * on the calling thread. - * - * Returns 0 if normal, -1 if called from a thread other that this. - */ - int testCancel(); - - - /** - * Cancel the thread. Equivalent to SIGKILL. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - virtual int cancel(); - - /** - * Set the thread's schedule priority. This is a complex method. - * Beware of thread priorities when using a many-to-many kernel - * entity implemenation (such as IRIX pthreads). If one is not carefull - * to manage the thread priorities, a priority inversion deadlock can - * easily occur (Although the OpenThreads::Mutex & OpenThreads::Barrier - * constructs have been designed with this senario in mind). Unless - * you have explicit need to set the schedule pirorites for a given - * task, it is best to leave them alone. - * - * @note some implementations (notably LinuxThreads and IRIX Sprocs) - * only alow you to decrease thread priorities dynamically. Thus, - * a lower priority thread will not allow it's priority to be raised - * on the fly. - * - * @note seting the environment variable OUTPUT_THREADLIB_SCHEDULING_INFO - * will output scheduling information for each thread to stdout. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int setSchedulePriority(ThreadPriority priority); - - /** - * Get the thread's schedule priority (if able) - * - * @note seting the environment variable OUTPUT_THREADLIB_SCHEDULING_INFO - * will output scheduling information for each thread to stdout. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int getSchedulePriority(); - - /** - * Set the thread's scheduling policy (if able) - * - * @note On some implementations (notably IRIX Sprocs & LinuxThreads) - * The policy may prohibit the use of SCHEDULE_ROUND_ROBIN and - * SCHEDULE_FIFO policies - due to their real-time nature, and - * the danger of deadlocking the machine when used as super-user. - * In such cases, the command is a no-op. - * - * @note seting the environment variable OUTPUT_THREADLIB_SCHEDULING_INFO - * will output scheduling information for each thread to stdout. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int setSchedulePolicy(ThreadPolicy policy); - - /** - * Get the thread's policy (if able) - * - * @note seting the environment variable OUTPUT_THREADLIB_SCHEDULING_INFO - * will output scheduling information for each thread to stdout. - * - * @return policy if normal, -1 if errno set, errno code otherwise. - */ - int getSchedulePolicy(); - - /** - * Set the thread's desired stack size (in bytes). - * This method is an attribute of the thread and must be called - * *before* the start() method is invoked. - * - * @note a return code of 13 (EACESS) means that the thread stack - * size can no longer be changed. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int setStackSize(size_t size); - - /** - * Get the thread's desired stack size. - * - * @return the thread's stack size. 0 indicates that the stack size - * has either not yet been initialized, or not yet been specified by - * the application. - */ - size_t getStackSize(); - - /** - * Print the thread's scheduling information to stdout. - */ - void printSchedulingInfo(); - - /** - * Detach the thread from the calling process. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int detach(); - - /** - * Join the calling process with the thread - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int join(); - - /** - * Disable thread cancelation altogether. Thread::cancel() has no effect. - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int setCancelModeDisable(); - - /** - * Mark the thread to cancel aysncronously on Thread::cancel(). - * (May not be available with process-level implementations). - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int setCancelModeAsynchronous(); - - /** - * Mark the thread to cancel at the earliest convenience on - * Thread::cancel() (This is the default) - * - * @return 0 if normal, -1 if errno set, errno code otherwise. - */ - int setCancelModeDeferred(); - - /** - * Query the thread's running status - * - * @return true if running, false if not. - */ - bool isRunning(); - - /** - * Thread's run method. Must be implemented by derived classes. - * This is where the action happens. - */ - virtual void run() = 0; - - /** - * Thread's cancel cleanup routine, called upon cancel(), after the - * cancelation has taken place, but before the thread exits completely. - * This method should be used to repair parts of the thread's data - * that may have been damaged by a pre-mature cancel. No-op by default. - */ - virtual void cancelCleanup() {}; - - void* getImplementation(){ return _prvData; }; - - /** Thread's processor affinity method. This binds a thread to a - * processor whenever possible. This call must be made before - * start() or startThread() and has no effect after the thread - * has been running. In the pthreads implementation, this is only - * implemented on sgi, through a pthread extension. On other pthread - * platforms this is ignored. Returns 0 on success, implementation's - * error on failure, or -1 if ignored. - */ - int setProcessorAffinity( unsigned int cpunum ); - - /** microSleep method, equivilant to the posix usleep(microsec). - * This is not strictly thread API but is used - * so often with threads. It's basically UNIX usleep. Parameter is - * number of microseconds we current thread to sleep. Returns 0 on - * succes, non-zero on failure (UNIX errno or GetLastError() will give - * detailed description. - */ - static int microSleep( unsigned int microsec); - -private: - - /** - * The Private Actions class is allowed to operate on private data. - */ - friend class ThreadPrivateActions; - - /** - * Private copy constructor, to prevent tampering. - */ - Thread(const Thread &/*t*/) {}; - - /** - * Private copy assignment, to prevent tampering. - */ - Thread &operator=(const Thread &/*t*/) {return *(this);}; - - /** - * Implementation-specific data - */ - void * _prvData; - - /** - * Master thread's priority, set by Thread::Init. - */ - static ThreadPriority s_masterThreadPriority; - - /** - * Is initialized flag - */ - static bool s_isInitialized; -}; - -} - -#endif // !_OPENTHREADS_THREAD_ diff --git a/libs/lib/mac32/include/OpenThreads/Version b/libs/lib/mac32/include/OpenThreads/Version deleted file mode 100644 index 39e5608ec..000000000 --- a/libs/lib/mac32/include/OpenThreads/Version +++ /dev/null @@ -1,38 +0,0 @@ -/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OPENTHREADS_VERSION -#define OPENTHREADS_VERSION 1 - -#include - -extern "C" { - -#define OPENTHREADS_MAJOR_VERSION 2 -#define OPENTHREADS_MINOR_VERSION 6 -#define OPENTHREADS_PATCH_VERSION 0 -#define OPENTHREADS_SOVERSION 12 - -/** OpenThreadsGetVersion() returns the library version number. - * Numbering convention : OpenThreads-1.0 will return 1.0 from OpenThreadsGetVersion. */ -extern OPENTHREAD_EXPORT_DIRECTIVE const char* OpenThreadsGetVersion(); - -/** The OpenThreadsGetSOVersion() method returns the OpenSceneGraph soversion number. */ -extern OPENTHREAD_EXPORT_DIRECTIVE const char* OpenThreadsGetSOVersion(); - -/** The OpenThreadsGetLibraryName() method returns the library name in human-friendly form. */ -extern OPENTHREAD_EXPORT_DIRECTIVE const char* OpenThreadsGetLibraryName(); - -} - -#endif diff --git a/libs/lib/mac32/include/osg/AlphaFunc b/libs/lib/mac32/include/osg/AlphaFunc deleted file mode 100644 index c35dc3c91..000000000 --- a/libs/lib/mac32/include/osg/AlphaFunc +++ /dev/null @@ -1,102 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_ALPHAFUNC -#define OSG_ALPHAFUNC 1 - -#include - -#ifndef GL_ALPHA_TEST - #define GL_ALPHA_TEST 0x0BC0 -#endif - -namespace osg { - -/** Encapsulates OpenGL glAlphaFunc. -*/ -class OSG_EXPORT AlphaFunc : public StateAttribute -{ - public : - - enum ComparisonFunction { - NEVER = GL_NEVER, - LESS = GL_LESS, - EQUAL = GL_EQUAL, - LEQUAL = GL_LEQUAL, - GREATER = GL_GREATER, - NOTEQUAL = GL_NOTEQUAL, - GEQUAL = GL_GEQUAL, - ALWAYS = GL_ALWAYS - }; - - - AlphaFunc(); - - AlphaFunc(ComparisonFunction func,float ref): - _comparisonFunc(func), - _referenceValue(ref) {} - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - AlphaFunc(const AlphaFunc& af,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(af,copyop), - _comparisonFunc(af._comparisonFunc), - _referenceValue(af._referenceValue) {} - - META_StateAttribute(osg, AlphaFunc,ALPHAFUNC); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(AlphaFunc,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_comparisonFunc) - COMPARE_StateAttribute_Parameter(_referenceValue) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_ALPHA_TEST); - return true; - } - - inline void setFunction(ComparisonFunction func,float ref) - { - _comparisonFunc = func; - _referenceValue = ref; - } - - inline void setFunction(ComparisonFunction func) { _comparisonFunc=func; } - inline ComparisonFunction getFunction() const { return _comparisonFunc; } - - inline void setReferenceValue(float value) { _referenceValue=value; } - inline float getReferenceValue() const { return _referenceValue; } - - virtual void apply(State& state) const; - - protected: - - virtual ~AlphaFunc(); - - ComparisonFunction _comparisonFunc; - float _referenceValue; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/AnimationPath b/libs/lib/mac32/include/osg/AnimationPath deleted file mode 100644 index 9062e3cd5..000000000 --- a/libs/lib/mac32/include/osg/AnimationPath +++ /dev/null @@ -1,314 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_ANIMATIONPATH -#define OSG_ANIMATIONPATH 1 - -#include -#include -#include - -#include -#include -#include -#include - -namespace osg { - -/** AnimationPath encapsulates a time varying transformation pathway. Can be - * used for updating camera position and model object position. - * AnimationPathCallback can be attached directly to Transform nodes to - * move subgraphs around the scene. -*/ -class OSG_EXPORT AnimationPath : public virtual osg::Object -{ - public: - - AnimationPath():_loopMode(LOOP) {} - - AnimationPath(const AnimationPath& ap, const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Object(ap,copyop), - _timeControlPointMap(ap._timeControlPointMap), - _loopMode(ap._loopMode) {} - - META_Object(osg,AnimationPath); - - class ControlPoint - { - public: - ControlPoint(): - _scale(1.0,1.0,1.0) {} - - ControlPoint(const osg::Vec3d& position): - _position(position), - _rotation(), - _scale(1.0,1.0,1.0) {} - - ControlPoint(const osg::Vec3d& position, const osg::Quat& rotation): - _position(position), - _rotation(rotation), - _scale(1.0,1.0,1.0) {} - - ControlPoint(const osg::Vec3d& position, const osg::Quat& rotation, const osg::Vec3d& scale): - _position(position), - _rotation(rotation), - _scale(scale) {} - - void setPosition(const osg::Vec3d& position) { _position = position; } - const osg::Vec3d& getPosition() const { return _position; } - - void setRotation(const osg::Quat& rotation) { _rotation = rotation; } - const osg::Quat& getRotation() const { return _rotation; } - - void setScale(const osg::Vec3d& scale) { _scale = scale; } - const osg::Vec3d& getScale() const { return _scale; } - - inline void interpolate(float ratio,const ControlPoint& first, const ControlPoint& second) - { - float one_minus_ratio = 1.0f-ratio; - _position = first._position*one_minus_ratio + second._position*ratio; - _rotation.slerp(ratio,first._rotation,second._rotation); - _scale = first._scale*one_minus_ratio + second._scale*ratio; - } - - inline void interpolate(double ratio,const ControlPoint& first, const ControlPoint& second) - { - double one_minus_ratio = 1.0f-ratio; - _position = first._position*one_minus_ratio + second._position*ratio; - _rotation.slerp(ratio,first._rotation,second._rotation); - _scale = first._scale*one_minus_ratio + second._scale*ratio; - } - - inline void getMatrix(Matrixf& matrix) const - { - matrix.makeRotate(_rotation); - matrix.preMultScale(_scale); - matrix.postMultTranslate(_position); - } - - inline void getMatrix(Matrixd& matrix) const - { - matrix.makeRotate(_rotation); - matrix.preMultScale(_scale); - matrix.postMultTranslate(_position); - } - - inline void getInverse(Matrixf& matrix) const - { - matrix.makeRotate(_rotation.inverse()); - matrix.postMultScale(osg::Vec3d(1.0/_scale.x(),1.0/_scale.y(),1.0/_scale.z())); - matrix.preMultTranslate(-_position); - } - - inline void getInverse(Matrixd& matrix) const - { - matrix.makeRotate(_rotation.inverse()); - matrix.postMultScale(osg::Vec3d(1.0/_scale.x(),1.0/_scale.y(),1.0/_scale.z())); - matrix.preMultTranslate(-_position); - } - - protected: - - osg::Vec3d _position; - osg::Quat _rotation; - osg::Vec3d _scale; - - }; - - - /** Given a specific time, return the transformation matrix for a point. */ - bool getMatrix(double time,Matrixf& matrix) const - { - ControlPoint cp; - if (!getInterpolatedControlPoint(time,cp)) return false; - cp.getMatrix(matrix); - return true; - } - - /** Given a specific time, return the transformation matrix for a point. */ - bool getMatrix(double time,Matrixd& matrix) const - { - ControlPoint cp; - if (!getInterpolatedControlPoint(time,cp)) return false; - cp.getMatrix(matrix); - return true; - } - - /** Given a specific time, return the inverse transformation matrix for a point. */ - bool getInverse(double time,Matrixf& matrix) const - { - ControlPoint cp; - if (!getInterpolatedControlPoint(time,cp)) return false; - cp.getInverse(matrix); - return true; - } - - bool getInverse(double time,Matrixd& matrix) const - { - ControlPoint cp; - if (!getInterpolatedControlPoint(time,cp)) return false; - cp.getInverse(matrix); - return true; - } - - /** Given a specific time, return the local ControlPoint frame for a point. */ - virtual bool getInterpolatedControlPoint(double time,ControlPoint& controlPoint) const; - - /** Insert a control point into the AnimationPath.*/ - void insert(double time,const ControlPoint& controlPoint); - - double getFirstTime() const { if (!_timeControlPointMap.empty()) return _timeControlPointMap.begin()->first; else return 0.0;} - double getLastTime() const { if (!_timeControlPointMap.empty()) return _timeControlPointMap.rbegin()->first; else return 0.0;} - double getPeriod() const { return getLastTime()-getFirstTime();} - - enum LoopMode - { - SWING, - LOOP, - NO_LOOPING - }; - - void setLoopMode(LoopMode lm) { _loopMode = lm; } - - LoopMode getLoopMode() const { return _loopMode; } - - - typedef std::map TimeControlPointMap; - - void setTimeControlPointMap(TimeControlPointMap& tcpm) { _timeControlPointMap=tcpm; } - - TimeControlPointMap& getTimeControlPointMap() { return _timeControlPointMap; } - - const TimeControlPointMap& getTimeControlPointMap() const { return _timeControlPointMap; } - - bool empty() const { return _timeControlPointMap.empty(); } - - void clear() { _timeControlPointMap.clear(); } - - /** Read the animation path from a flat ASCII file stream. */ - void read(std::istream& in); - - /** Write the animation path to a flat ASCII file stream. */ - void write(std::ostream& out) const; - - /** Write the control point to a flat ASCII file stream. */ - void write(TimeControlPointMap::const_iterator itr, std::ostream& out) const; - - protected: - - virtual ~AnimationPath() {} - - TimeControlPointMap _timeControlPointMap; - LoopMode _loopMode; - -}; - - -class OSG_EXPORT AnimationPathCallback : public NodeCallback -{ - public: - - AnimationPathCallback(): - _pivotPoint(0.0,0.0,0.0), - _useInverseMatrix(false), - _timeOffset(0.0), - _timeMultiplier(1.0), - _firstTime(DBL_MAX), - _latestTime(0.0), - _pause(false), - _pauseTime(0.0) {} - - AnimationPathCallback(const AnimationPathCallback& apc,const CopyOp& copyop): - NodeCallback(apc,copyop), - _animationPath(apc._animationPath), - _pivotPoint(apc._pivotPoint), - _useInverseMatrix(apc._useInverseMatrix), - _timeOffset(apc._timeOffset), - _timeMultiplier(apc._timeMultiplier), - _firstTime(apc._firstTime), - _latestTime(apc._latestTime), - _pause(apc._pause), - _pauseTime(apc._pauseTime) {} - - - META_Object(osg,AnimationPathCallback); - - /** Construct an AnimationPathCallback with a specified animation path.*/ - AnimationPathCallback(AnimationPath* ap,double timeOffset=0.0,double timeMultiplier=1.0): - _animationPath(ap), - _pivotPoint(0.0,0.0,0.0), - _useInverseMatrix(false), - _timeOffset(timeOffset), - _timeMultiplier(timeMultiplier), - _firstTime(DBL_MAX), - _latestTime(0.0), - _pause(false), - _pauseTime(0.0) {} - - /** Construct an AnimationPathCallback and automatically create an animation path to produce a rotation about a point.*/ - AnimationPathCallback(const osg::Vec3d& pivot,const osg::Vec3d& axis,float angularVelocity); - - - void setAnimationPath(AnimationPath* path) { _animationPath = path; } - AnimationPath* getAnimationPath() { return _animationPath.get(); } - const AnimationPath* getAnimationPath() const { return _animationPath.get(); } - - inline void setPivotPoint(const Vec3d& pivot) { _pivotPoint = pivot; } - inline const Vec3d& getPivotPoint() const { return _pivotPoint; } - - void setUseInverseMatrix(bool useInverseMatrix) { _useInverseMatrix = useInverseMatrix; } - bool getUseInverseMatrix() const { return _useInverseMatrix; } - - void setTimeOffset(double offset) { _timeOffset = offset; } - double getTimeOffset() const { return _timeOffset; } - - void setTimeMultiplier(double multiplier) { _timeMultiplier = multiplier; } - double getTimeMultiplier() const { return _timeMultiplier; } - - - virtual void reset(); - - void setPause(bool pause); - bool getPause() const { return _pause; } - - /** Get the animation time that is used to specify the position along - * the AnimationPath. Animation time is computed from the formula: - * ((_latestTime-_firstTime)-_timeOffset)*_timeMultiplier.*/ - virtual double getAnimationTime() const; - - /** Implements the callback. */ - virtual void operator()(Node* node, NodeVisitor* nv); - - void update(osg::Node& node); - - public: - - ref_ptr _animationPath; - osg::Vec3d _pivotPoint; - bool _useInverseMatrix; - double _timeOffset; - double _timeMultiplier; - double _firstTime; - double _latestTime; - bool _pause; - double _pauseTime; - - protected: - - ~AnimationPathCallback(){} - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ApplicationUsage b/libs/lib/mac32/include/osg/ApplicationUsage deleted file mode 100644 index a035c919e..000000000 --- a/libs/lib/mac32/include/osg/ApplicationUsage +++ /dev/null @@ -1,122 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_APPLICATIONUSAGE -#define OSG_APPLICATIONUSAGE 1 - -#include - -#include -#include -#include - -namespace osg { - -class OSG_EXPORT ApplicationUsage : public osg::Referenced -{ - public: - - static ApplicationUsage* instance(); - - ApplicationUsage() {} - - ApplicationUsage(const std::string& commandLineUsage); - - typedef std::map UsageMap; - - - /** The ApplicationName is often displayed when logging errors, and frequently incorporated into the Description (below). */ - void setApplicationName(const std::string& name) { _applicationName = name; } - const std::string& getApplicationName() const { return _applicationName; } - - /** If non-empty, the Description is typically shown by the Help Handler - * as text on the Help display (which also lists keyboard abbreviations. */ - void setDescription(const std::string& desc) { _description = desc; } - const std::string& getDescription() const { return _description; } - - enum Type - { - NO_HELP = 0x0, - COMMAND_LINE_OPTION = 0x1, - ENVIRONMENTAL_VARIABLE = 0x2, - KEYBOARD_MOUSE_BINDING = 0x4, - HELP_ALL = KEYBOARD_MOUSE_BINDING|ENVIRONMENTAL_VARIABLE|COMMAND_LINE_OPTION - }; - - void addUsageExplanation(Type type,const std::string& option,const std::string& explanation); - - void setCommandLineUsage(const std::string& explanation) { _commandLineUsage=explanation; } - const std::string& getCommandLineUsage() const { return _commandLineUsage; } - - - void addCommandLineOption(const std::string& option,const std::string& explanation, const std::string &defaultValue = ""); - - void setCommandLineOptions(const UsageMap& usageMap) { _commandLineOptions=usageMap; } - const UsageMap& getCommandLineOptions() const { return _commandLineOptions; } - - void setCommandLineOptionsDefaults(const UsageMap& usageMap) { _commandLineOptionsDefaults=usageMap; } - const UsageMap& getCommandLineOptionsDefaults() const { return _commandLineOptionsDefaults; } - - - void addEnvironmentalVariable(const std::string& option,const std::string& explanation, const std::string& defaultValue = ""); - - void setEnvironmentalVariables(const UsageMap& usageMap) { _environmentalVariables=usageMap; } - const UsageMap& getEnvironmentalVariables() const { return _environmentalVariables; } - - void setEnvironmentalVariablesDefaults(const UsageMap& usageMap) { _environmentalVariablesDefaults=usageMap; } - const UsageMap& getEnvironmentalVariablesDefaults() const { return _environmentalVariablesDefaults; } - - - void addKeyboardMouseBinding(const std::string& option,const std::string& explanation); - - void setKeyboardMouseBindings(const UsageMap& usageMap) { _keyboardMouse=usageMap; } - const UsageMap& getKeyboardMouseBindings() const { return _keyboardMouse; } - - - void getFormattedString(std::string& str, const UsageMap& um,unsigned int widthOfOutput=80,bool showDefaults=false,const UsageMap& ud=UsageMap()); - - void write(std::ostream& output,const UsageMap& um,unsigned int widthOfOutput=80,bool showDefaults=false,const UsageMap& ud=UsageMap()); - - void write(std::ostream& output,unsigned int type=COMMAND_LINE_OPTION, unsigned int widthOfOutput=80,bool showDefaults=false); - - void writeEnvironmentSettings(std::ostream& output); - - protected: - - virtual ~ApplicationUsage() {} - - std::string _applicationName; - std::string _description; - std::string _commandLineUsage; - UsageMap _commandLineOptions; - UsageMap _environmentalVariables; - UsageMap _keyboardMouse; - UsageMap _environmentalVariablesDefaults; - UsageMap _commandLineOptionsDefaults; - -}; - -class ApplicationUsageProxy -{ - public: - - /** register an explanation of commandline/environmentvariable/keyboard mouse usage.*/ - ApplicationUsageProxy(ApplicationUsage::Type type,const std::string& option,const std::string& explanation) - { - ApplicationUsage::instance()->addUsageExplanation(type,option,explanation); - } -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ArgumentParser b/libs/lib/mac32/include/osg/ArgumentParser deleted file mode 100644 index e20bdee32..000000000 --- a/libs/lib/mac32/include/osg/ArgumentParser +++ /dev/null @@ -1,213 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_ARGUMENTPARSER -#define OSG_ARGUMENTPARSER 1 - -#include -#include -#include - -#include -#include -#include - -namespace osg { - -class OSG_EXPORT ArgumentParser -{ - public: - - class OSG_EXPORT Parameter - { - public: - enum ParameterType - { - BOOL_PARAMETER, - FLOAT_PARAMETER, - DOUBLE_PARAMETER, - INT_PARAMETER, - UNSIGNED_INT_PARAMETER, - STRING_PARAMETER - }; - - union ValueUnion - { - bool* _bool; - float* _float; - double* _double; - int* _int; - unsigned int* _uint; - std::string* _string; - }; - - Parameter(bool& value) { _type = BOOL_PARAMETER; _value._bool = &value; } - - Parameter(float& value) { _type = FLOAT_PARAMETER; _value._float = &value; } - - Parameter(double& value) { _type = DOUBLE_PARAMETER; _value._double = &value; } - - Parameter(int& value) { _type = INT_PARAMETER; _value._int = &value; } - - Parameter(unsigned int& value) { _type = UNSIGNED_INT_PARAMETER; _value._uint = &value; } - - Parameter(std::string& value) { _type = STRING_PARAMETER; _value._string = &value; } - - Parameter(const Parameter& param) { _type = param._type; _value = param._value; } - - Parameter& operator = (const Parameter& param) { _type = param._type; _value = param._value; return *this; } - - bool valid(const char* str) const; - bool assign(const char* str); - - protected: - - ParameterType _type; - ValueUnion _value; - }; - - /** Return true if the specified string is an option in the form - * -option or --option. */ - static bool isOption(const char* str); - - /** Return true if string is non-NULL and not an option in the form - * -option or --option. */ - static bool isString(const char* str); - - /** Return true if specified parameter is a number. */ - static bool isNumber(const char* str); - - /** Return true if specified parameter is a bool. */ - static bool isBool(const char* str); - - public: - - ArgumentParser(int* argc,char **argv); - - void setApplicationUsage(ApplicationUsage* usage) { _usage = usage; } - ApplicationUsage* getApplicationUsage() { return _usage.get(); } - const ApplicationUsage* getApplicationUsage() const { return _usage.get(); } - - /** Return the argument count. */ - int& argc() { return *_argc; } - - /** Return the argument array. */ - char** argv() { return _argv; } - - /** Return the char* argument at the specified position. */ - char* operator [] (int pos) { return _argv[pos]; } - - /** Return the const char* argument at the specified position. */ - const char* operator [] (int pos) const { return _argv[pos]; } - - /** Return the application name, as specified by argv[0] */ - std::string getApplicationName() const; - - /** Return the position of an occurrence of a string in the argument list. - * Return -1 if no string is found. */ - int find(const std::string& str) const; - - /** Return true if the specified parameter is an option in the form of - * -option or --option. */ - bool isOption(int pos) const; - - /** Return true if the specified parameter is a string not in - * the form of an option. */ - bool isString(int pos) const; - - /** Return true if the specified parameter is a number. */ - bool isNumber(int pos) const; - - bool containsOptions() const; - - /** Remove one or more arguments from the argv argument list, - * and decrement the argc respectively. */ - void remove(int pos,int num=1); - - /** Return true if the specified argument matches the given string. */ - bool match(int pos, const std::string& str) const; - - /** Search for an occurrence of a string in the argument list. If found, - * remove that occurrence and return true. Otherwise, return false. */ - bool read(const std::string& str); - bool read(const std::string& str, Parameter value1); - bool read(const std::string& str, Parameter value1, Parameter value2); - bool read(const std::string& str, Parameter value1, Parameter value2, Parameter value3); - bool read(const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4); - bool read(const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5); - bool read(const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6); - bool read(const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6, Parameter value7); - bool read(const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6, Parameter value7, Parameter value8); - - - /** If the argument value at the specified position matches the given string, - * and subsequent parameters are also matched, then set the parameter values, - * remove the arguments from the list, and return true. Otherwise, return false. */ - bool read(int pos, const std::string& str); - bool read(int pos, const std::string& str, Parameter value1); - bool read(int pos, const std::string& str, Parameter value1, Parameter value2); - bool read(int pos, const std::string& str, Parameter value1, Parameter value2, Parameter value3); - bool read(int pos, const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4); - bool read(int pos, const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5); - bool read(int pos, const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6); - bool read(int pos, const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6, Parameter value7); - bool read(int pos, const std::string& str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6, Parameter value7, Parameter value8); - - - enum ErrorSeverity - { - BENIGN = 0, - CRITICAL = 1 - }; - - typedef std::map ErrorMessageMap; - - /** Return the error flag, true if an error has occurred when reading arguments. */ - bool errors(ErrorSeverity severity=BENIGN) const; - - /** Report an error message by adding to the ErrorMessageMap. */ - void reportError(const std::string& message,ErrorSeverity severity=CRITICAL); - - /** For each remaining option, report it as unrecognized. */ - void reportRemainingOptionsAsUnrecognized(ErrorSeverity severity=BENIGN); - - /** Return the error message, if any has occurred. */ - ErrorMessageMap& getErrorMessageMap() { return _errorMessageMap; } - - /** Return the error message, if any has occurred. */ - const ErrorMessageMap& getErrorMessageMap() const { return _errorMessageMap; } - - /** Write error messages to the given ostream, if at or above the given severity. */ - void writeErrorMessages(std::ostream& output,ErrorSeverity sevrity=BENIGN); - - - /** This convenience method handles help requests on the command line. - * Return the type(s) of help requested. The return value of this - * function is suitable for passing into getApplicationUsage()->write(). - * If ApplicationUsage::NO_HELP is returned then no help commandline option - * was found on the command line. */ - ApplicationUsage::Type readHelpType(); - - - protected: - - int* _argc; - char** _argv; - ErrorMessageMap _errorMessageMap; - ref_ptr _usage; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Array b/libs/lib/mac32/include/osg/Array deleted file mode 100644 index 19d7396c0..000000000 --- a/libs/lib/mac32/include/osg/Array +++ /dev/null @@ -1,491 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_ARRAY -#define OSG_ARRAY 1 - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace osg { - -class ArrayVisitor; -class ConstArrayVisitor; - -class ValueVisitor; -class ConstValueVisitor; - -class OSG_EXPORT Array : public BufferData -{ - - public: - - enum Type - { - ArrayType = 0, - ByteArrayType = 1, - ShortArrayType = 2, - IntArrayType = 3, - UByteArrayType = 4, - UShortArrayType = 5, - UIntArrayType = 6, - Vec4ubArrayType = 7, - FloatArrayType = 8, - Vec2ArrayType = 9, - Vec3ArrayType = 10, - Vec4ArrayType = 11, - Vec2sArrayType = 12, - Vec3sArrayType = 13, - Vec4sArrayType = 14, - Vec2bArrayType = 15, - Vec3bArrayType = 16, - Vec4bArrayType = 17, - DoubleArrayType = 18, - Vec2dArrayType = 19, - Vec3dArrayType = 20, - Vec4dArrayType = 21, - MatrixArrayType = 22 - }; - - Array(Type arrayType=ArrayType,GLint dataSize=0,GLenum dataType=0): - _arrayType(arrayType), - _dataSize(dataSize), - _dataType(dataType) {} - - Array(const Array& array,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - BufferData(array,copyop), - _arrayType(array._arrayType), - _dataSize(array._dataSize), - _dataType(array._dataType) {} - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const; - - virtual void accept(ArrayVisitor&) = 0; - virtual void accept(ConstArrayVisitor&) const = 0; - - virtual void accept(unsigned int index,ValueVisitor&) = 0; - virtual void accept(unsigned int index,ConstValueVisitor&) const = 0; - - /** Return -1 if lhs element is less than rhs element, 0 if equal, - * 1 if lhs element is greater than rhs element. */ - virtual int compare(unsigned int lhs,unsigned int rhs) const = 0; - - Type getType() const { return _arrayType; } - GLint getDataSize() const { return _dataSize; } - GLenum getDataType() const { return _dataType; } - virtual const GLvoid* getDataPointer() const = 0; - virtual unsigned int getTotalDataSize() const = 0; - virtual unsigned int getNumElements() const = 0; - - /** Frees unused space on this vector - i.e. the difference between size() and max_size() of the underlying vector.*/ - virtual void trim() {} - - /** Set the VertexBufferObject.*/ - inline void setVertexBufferObject(osg::VertexBufferObject* vbo) { setBufferObject(vbo); } - - /** Get the VertexBufferObject. If no VBO is assigned returns NULL*/ - inline osg::VertexBufferObject* getVertexBufferObject() { return dynamic_cast(_bufferObject.get()); } - - /** Get the const VertexBufferObject. If no VBO is assigned returns NULL*/ - inline const osg::VertexBufferObject* getVertexBufferObject() const { return dynamic_cast(_bufferObject.get()); } - - protected: - - virtual ~Array() {} - - Type _arrayType; - GLint _dataSize; - GLenum _dataType; -}; - -template -class TemplateArray : public Array, public MixinVector -{ - public: - - TemplateArray() : Array(ARRAYTYPE,DataSize,DataType) {} - - TemplateArray(const TemplateArray& ta,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Array(ta,copyop), - MixinVector(ta) {} - - TemplateArray(unsigned int no) : - Array(ARRAYTYPE,DataSize,DataType), - MixinVector(no) {} - - TemplateArray(unsigned int no,const T* ptr) : - Array(ARRAYTYPE,DataSize,DataType), - MixinVector(ptr,ptr+no) {} - - template - TemplateArray(InputIterator first,InputIterator last) : - Array(ARRAYTYPE,DataSize,DataType), - MixinVector(first,last) {} - - TemplateArray& operator = (const TemplateArray& array) - { - if (this==&array) return *this; - this->assign(array.begin(),array.end()); - return *this; - } - - virtual Object* cloneType() const { return new TemplateArray(); } - virtual Object* clone(const CopyOp& copyop) const { return new TemplateArray(*this,copyop); } - - inline virtual void accept(ArrayVisitor& av); - inline virtual void accept(ConstArrayVisitor& av) const; - - inline virtual void accept(unsigned int index,ValueVisitor& vv); - inline virtual void accept(unsigned int index,ConstValueVisitor& vv) const; - - virtual int compare(unsigned int lhs,unsigned int rhs) const - { - const T& elem_lhs = (*this)[lhs]; - const T& elem_rhs = (*this)[rhs]; - if (elem_lhs( *this ).swap( *this ); - } - - virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; } - virtual unsigned int getTotalDataSize() const { return static_cast(this->size()*sizeof(T)); } - virtual unsigned int getNumElements() const { return static_cast(this->size()); } - - typedef T ElementDataType; // expose T - - protected: - - virtual ~TemplateArray() {} -}; - -class OSG_EXPORT IndexArray : public Array -{ - - public: - - IndexArray(Type arrayType=ArrayType,GLint dataSize=0,GLenum dataType=0): - Array(arrayType,dataSize,dataType) {} - - IndexArray(const Array& array,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Array(array,copyop) {} - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - - virtual unsigned int index(unsigned int pos) const = 0; - - protected: - - virtual ~IndexArray() {} -}; - -template -class TemplateIndexArray : public IndexArray, public MixinVector -{ - public: - - TemplateIndexArray() : IndexArray(ARRAYTYPE,DataSize,DataType) {} - - TemplateIndexArray(const TemplateIndexArray& ta,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - IndexArray(ta,copyop), - MixinVector(ta) {} - - TemplateIndexArray(unsigned int no) : - IndexArray(ARRAYTYPE,DataSize,DataType), - MixinVector(no) {} - - TemplateIndexArray(unsigned int no,T* ptr) : - IndexArray(ARRAYTYPE,DataSize,DataType), - MixinVector(ptr,ptr+no) {} - - template - TemplateIndexArray(InputIterator first,InputIterator last) : - IndexArray(ARRAYTYPE,DataSize,DataType), - MixinVector(first,last) {} - - TemplateIndexArray& operator = (const TemplateIndexArray& array) - { - if (this==&array) return *this; - this->assign(array.begin(),array.end()); - return *this; - } - - virtual Object* cloneType() const { return new TemplateIndexArray(); } - virtual Object* clone(const CopyOp& copyop) const { return new TemplateIndexArray(*this,copyop); } - - inline virtual void accept(ArrayVisitor& av); - inline virtual void accept(ConstArrayVisitor& av) const; - - inline virtual void accept(unsigned int index,ValueVisitor& vv); - inline virtual void accept(unsigned int index,ConstValueVisitor& vv) const; - - virtual int compare(unsigned int lhs,unsigned int rhs) const - { - const T& elem_lhs = (*this)[lhs]; - const T& elem_rhs = (*this)[rhs]; - if (elem_lhs( *this ).swap( *this ); - } - - virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; } - virtual unsigned int getTotalDataSize() const { return static_cast(this->size()*sizeof(T)); } - virtual unsigned int getNumElements() const { return static_cast(this->size()); } - - virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } - - typedef T ElementDataType; // expose T - - protected: - - virtual ~TemplateIndexArray() {} -}; - -typedef TemplateIndexArray ByteArray; -typedef TemplateIndexArray ShortArray; -typedef TemplateIndexArray IntArray; -typedef TemplateIndexArray UByteArray; -typedef TemplateIndexArray UShortArray; -typedef TemplateIndexArray UIntArray; - -typedef TemplateArray FloatArray; - -typedef TemplateArray Vec2Array; -typedef TemplateArray Vec3Array; -typedef TemplateArray Vec4Array; - -typedef TemplateArray Vec4ubArray; - -typedef TemplateArray Vec2sArray; -typedef TemplateArray Vec3sArray; -typedef TemplateArray Vec4sArray; - -typedef TemplateArray Vec2bArray; -typedef TemplateArray Vec3bArray; -typedef TemplateArray Vec4bArray; - -typedef TemplateArray DoubleArray; -typedef TemplateArray Vec2dArray; -typedef TemplateArray Vec3dArray; -typedef TemplateArray Vec4dArray; - -typedef TemplateArray MatrixfArray; - - -class ArrayVisitor -{ - public: - ArrayVisitor() {} - virtual ~ArrayVisitor() {} - - virtual void apply(Array&) {} - virtual void apply(ByteArray&) {} - virtual void apply(ShortArray&) {} - virtual void apply(IntArray&) {} - virtual void apply(UByteArray&) {} - virtual void apply(UShortArray&) {} - virtual void apply(UIntArray&) {} - virtual void apply(FloatArray&) {} - virtual void apply(DoubleArray&) {} - - virtual void apply(Vec2Array&) {} - virtual void apply(Vec3Array&) {} - virtual void apply(Vec4Array&) {} - - virtual void apply(Vec4ubArray&) {} - - virtual void apply(Vec2bArray&) {} - virtual void apply(Vec3bArray&) {} - virtual void apply(Vec4bArray&) {} - - virtual void apply(Vec2sArray&) {} - virtual void apply(Vec3sArray&) {} - virtual void apply(Vec4sArray&) {} - - virtual void apply(Vec2dArray&) {} - virtual void apply(Vec3dArray&) {} - virtual void apply(Vec4dArray&) {} - - virtual void apply(MatrixfArray&) {} -}; - -class ConstArrayVisitor -{ - public: - ConstArrayVisitor() {} - virtual ~ConstArrayVisitor() {} - - virtual void apply(const Array&) {} - virtual void apply(const ByteArray&) {} - virtual void apply(const ShortArray&) {} - virtual void apply(const IntArray&) {} - virtual void apply(const UByteArray&) {} - virtual void apply(const UShortArray&) {} - virtual void apply(const UIntArray&) {} - virtual void apply(const FloatArray&) {} - virtual void apply(const DoubleArray&) {} - - virtual void apply(const Vec2Array&) {} - virtual void apply(const Vec3Array&) {} - virtual void apply(const Vec4Array&) {} - - virtual void apply(const Vec4ubArray&) {} - - virtual void apply(const Vec2bArray&) {} - virtual void apply(const Vec3bArray&) {} - virtual void apply(const Vec4bArray&) {} - - virtual void apply(const Vec2sArray&) {} - virtual void apply(const Vec3sArray&) {} - virtual void apply(const Vec4sArray&) {} - - virtual void apply(const Vec2dArray&) {} - virtual void apply(const Vec3dArray&) {} - virtual void apply(const Vec4dArray&) {} - - virtual void apply(const MatrixfArray&) {} -}; - - -class ValueVisitor -{ - public: - ValueVisitor() {} - virtual ~ValueVisitor() {} - - virtual void apply(GLbyte&) {} - virtual void apply(GLshort&) {} - virtual void apply(GLint&) {} - virtual void apply(GLushort&) {} - virtual void apply(GLubyte&) {} - virtual void apply(GLuint&) {} - virtual void apply(GLfloat&) {} - virtual void apply(GLdouble&) {} - - - virtual void apply(Vec2&) {} - virtual void apply(Vec3&) {} - virtual void apply(Vec4&) {} - - virtual void apply(Vec4ub&) {} - - virtual void apply(Vec2b&) {} - virtual void apply(Vec3b&) {} - virtual void apply(Vec4b&) {} - - virtual void apply(Vec2s&) {} - virtual void apply(Vec3s&) {} - virtual void apply(Vec4s&) {} - - virtual void apply(Vec2d&) {} - virtual void apply(Vec3d&) {} - virtual void apply(Vec4d&) {} - - virtual void apply(Matrixf&) {} -}; - -class ConstValueVisitor -{ - public: - ConstValueVisitor() {} - virtual ~ConstValueVisitor() {} - - virtual void apply(const GLbyte&) {} - virtual void apply(const GLshort&) {} - virtual void apply(const GLint&) {} - virtual void apply(const GLushort&) {} - virtual void apply(const GLubyte&) {} - virtual void apply(const GLuint&) {} - virtual void apply(const GLfloat&) {} - virtual void apply(const GLdouble&) {} - - virtual void apply(const Vec4ub&) {} - - virtual void apply(const Vec2&) {} - virtual void apply(const Vec3&) {} - virtual void apply(const Vec4&) {} - - virtual void apply(const Vec2b&) {} - virtual void apply(const Vec3b&) {} - virtual void apply(const Vec4b&) {} - - virtual void apply(const Vec2s&) {} - virtual void apply(const Vec3s&) {} - virtual void apply(const Vec4s&) {} - - virtual void apply(const Vec2d&) {} - virtual void apply(const Vec3d&) {} - virtual void apply(const Vec4d&) {} - - virtual void apply(const Matrixf&) {} -}; - -template -inline void TemplateArray::accept(ArrayVisitor& av) { av.apply(*this); } - -template -inline void TemplateArray::accept(ConstArrayVisitor& av) const { av.apply(*this); } - -template -inline void TemplateArray::accept(unsigned int index,ValueVisitor& vv) { vv.apply( (*this)[index] ); } - -template -inline void TemplateArray::accept(unsigned int index,ConstValueVisitor& vv) const { vv.apply( (*this)[index] );} - -template -inline void TemplateIndexArray::accept(ArrayVisitor& av) { av.apply(*this); } - -template -inline void TemplateIndexArray::accept(ConstArrayVisitor& av) const { av.apply(*this); } - -template -inline void TemplateIndexArray::accept(unsigned int index,ValueVisitor& vv) { vv.apply( (*this)[index] ); } - -template -inline void TemplateIndexArray::accept(unsigned int index,ConstValueVisitor& vv) const { vv.apply( (*this)[index] );} - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ArrayDispatchers b/libs/lib/mac32/include/osg/ArrayDispatchers deleted file mode 100644 index d2c0505f1..000000000 --- a/libs/lib/mac32/include/osg/ArrayDispatchers +++ /dev/null @@ -1,138 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_ArrayDispatchers -#define OSG_ArrayDispatchers 1 - -#include -#include -#include -#include - -namespace osg { - -// forward declare -class State; -class AttributeDispatchMap; - -struct AttributeDispatch : public osg::Referenced -{ - virtual void assign(const GLvoid*, const IndexArray*) {} - virtual void operator() (unsigned int) {}; -}; - -/** Helper class for managing the dispatch to OpenGL of various attribute arrays such as stored in osg::Geometry.*/ -class OSG_EXPORT ArrayDispatchers : public osg::Referenced -{ - public: - - ArrayDispatchers(); - ~ArrayDispatchers(); - - void setState(osg::State* state); - - AttributeDispatch* vertexDispatcher(Array* array, IndexArray* indices); - AttributeDispatch* normalDispatcher(Array* array, IndexArray* indices); - AttributeDispatch* colorDispatcher(Array* array, IndexArray* indices); - AttributeDispatch* secondaryColorDispatcher(Array* array, IndexArray* indices); - AttributeDispatch* fogCoordDispatcher(Array* array, IndexArray* indices); - AttributeDispatch* texCoordDispatcher(unsigned int unit, Array* array, IndexArray* indices); - AttributeDispatch* vertexAttribDispatcher(unsigned int unit, Array* array, IndexArray* indices); - - void reset(); - - void setUseGLBeginEndAdapter(bool flag) { _useGLBeginEndAdapter = flag; } - bool getUseGLBeginEndAdapter() const { return _useGLBeginEndAdapter; } - - void setUseVertexAttribAlias(bool flag) { _useVertexAttribAlias = flag; } - bool getUseVertexAttribAlias() const { return _useVertexAttribAlias; } - - void activate(unsigned int binding, AttributeDispatch* at) - { - if (at) _activeDispatchList[binding].push_back(at); - } - - void activateVertexArray(unsigned int binding, osg::Array* array, osg::IndexArray* indices) { if (binding && array) activate(binding, vertexDispatcher(array, indices)); } - void activateColorArray(unsigned int binding, osg::Array* array, osg::IndexArray* indices) { if (binding && array) activate(binding, colorDispatcher(array, indices)); } - void activateNormalArray(unsigned int binding, osg::Array* array, osg::IndexArray* indices) { if (binding && array) activate(binding, normalDispatcher(array, indices)); } - void activateSecondaryColorArray(unsigned int binding, osg::Array* array, osg::IndexArray* indices) { if (binding && array) activate(binding, secondaryColorDispatcher(array, indices)); } - void activateFogCoordArray(unsigned int binding, osg::Array* array, osg::IndexArray* indices) { if (binding && array) activate(binding, fogCoordDispatcher(array, indices)); } - void activateTexCoordArray(unsigned int binding, unsigned int unit, osg::Array* array, osg::IndexArray* indices) { if (binding && array) activate(binding, texCoordDispatcher(unit, array, indices)); } - void activateVertexAttribArray(unsigned int binding, unsigned int unit, osg::Array* array, osg::IndexArray* indices) { if (binding && array) activate(binding, vertexAttribDispatcher(unit, array, indices)); } - - void dispatch(unsigned int binding, unsigned int index) - { - AttributeDispatchList& ad = _activeDispatchList[binding]; - for(AttributeDispatchList::iterator itr = ad.begin(); - itr != ad.end(); - ++itr) - { - (*(*itr))(index); - } - } - - bool active(unsigned int binding) const { return !_activeDispatchList[binding].empty(); } - - void Begin(GLenum mode) - { -#ifdef OSG_GL1_AVAILABLE - if (_useGLBeginEndAdapter) _glBeginEndAdapter->Begin(mode); - else ::glBegin(mode); -#else - _glBeginEndAdapter->Begin(mode); -#endif - } - - void End() - { -#ifdef OSG_GL1_AVAILABLE - if (_useGLBeginEndAdapter) _glBeginEndAdapter->End(); - else ::glEnd(); -#else - _glBeginEndAdapter->End(); -#endif - } - - protected: - - void init(); - - void assignTexCoordDispatchers(unsigned int unit); - void assignVertexAttribDispatchers(unsigned int unit); - - bool _initialized; - State* _state; - GLBeginEndAdapter* _glBeginEndAdapter; - - AttributeDispatchMap* _vertexDispatchers; - AttributeDispatchMap* _normalDispatchers; - AttributeDispatchMap* _colorDispatchers; - AttributeDispatchMap* _secondaryColorDispatchers; - AttributeDispatchMap* _fogCoordDispatchers; - - typedef std::vector AttributeDispatchMapList; - AttributeDispatchMapList _texCoordDispatchers; - AttributeDispatchMapList _vertexAttribDispatchers; - - typedef std::vector AttributeDispatchList; - - typedef std::vector ActiveDispatchList; - ActiveDispatchList _activeDispatchList; - - bool _useVertexAttribAlias; - bool _useGLBeginEndAdapter; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/AudioStream b/libs/lib/mac32/include/osg/AudioStream deleted file mode 100644 index a9d5c124b..000000000 --- a/libs/lib/mac32/include/osg/AudioStream +++ /dev/null @@ -1,86 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_AUDIOSTREAM -#define OSG_AUDIOSTREAM 1 - -#include -#include - -namespace osg { - -/** Pure virtual AudioSink bass class that is used to connect the audio system with AudioStreams. */ -class OSG_EXPORT AudioSink : public osg::Object -{ -public: - - AudioSink(); - - virtual const char * libraryName() const { return "osg"; } - virtual const char * className() const { return "AudioSinkInterface"; } - - virtual void play() = 0; - virtual void pause() = 0; - virtual void stop() = 0; - - virtual bool playing() const = 0; - - virtual double getDelay() const { return _delay; } - virtual void setDelay(const double delay) { _delay = delay; } - - virtual void setVolume(float) {} - virtual float getVolume() const { return 0.0f; } - -private: - - virtual AudioSink * cloneType() const { return 0; } - virtual AudioSink * clone(const osg::CopyOp &) const { return 0; } - - double _delay; -}; - -/** Pure virtual AudioStream base class. Subclasses provide mechanism for reading/generating audio data*/ -class OSG_EXPORT AudioStream : public osg::Object -{ - public: - AudioStream(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - AudioStream(const AudioStream& audio,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "AudioStream"; } - - virtual void setAudioSink(osg::AudioSink* audio_sink) = 0; - - virtual void consumeAudioBuffer(void * const buffer, const size_t size) = 0; - - virtual int audioFrequency() const = 0; - virtual int audioNbChannels() const = 0; - - enum SampleFormat - { - SAMPLE_FORMAT_U8, - SAMPLE_FORMAT_S16, - SAMPLE_FORMAT_S24, - SAMPLE_FORMAT_S32, - SAMPLE_FORMAT_F32 - }; - - virtual SampleFormat audioSampleFormat() const = 0; -}; - -} // namespace - -#endif diff --git a/libs/lib/mac32/include/osg/AutoTransform b/libs/lib/mac32/include/osg/AutoTransform deleted file mode 100644 index efa0f65e5..000000000 --- a/libs/lib/mac32/include/osg/AutoTransform +++ /dev/null @@ -1,161 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_AUTOTRANSFORM -#define OSG_AUTOTRANSFORM 1 - -#include -#include -#include -#include - -namespace osg { - -/** AutoTransform is a derived form of Transform that automatically - * scales or rotates to keep its children aligned with screen coordinates. -*/ -class OSG_EXPORT AutoTransform : public Transform -{ - public : - AutoTransform(); - - AutoTransform(const AutoTransform& pat,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual osg::Object* cloneType() const { return new AutoTransform (); } - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new AutoTransform (*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "AutoTransform"; } - virtual const char* libraryName() const { return "osg"; } - - virtual void accept(NodeVisitor& nv); - - virtual AutoTransform* asAutoTransform() { return this; } - virtual const AutoTransform* asAutoTransform() const { return this; } - - inline void setPosition(const Vec3d& pos) { _position = pos; _matrixDirty=true; dirtyBound(); } - inline const Vec3d& getPosition() const { return _position; } - - - inline void setRotation(const Quat& quat) { _rotation = quat; _matrixDirty=true; dirtyBound(); } - inline const Quat& getRotation() const { return _rotation; } - - inline void setScale(double scale) { setScale(osg::Vec3(scale,scale,scale)); } - - void setScale(const Vec3d& scale); - inline const Vec3d& getScale() const { return _scale; } - - void setMinimumScale(double minimumScale) { _minimumScale = minimumScale; } - double getMinimumScale() const { return _minimumScale; } - - void setMaximumScale(double maximumScale) { _maximumScale = maximumScale; } - double getMaximumScale() const { return _maximumScale; } - - inline void setPivotPoint(const Vec3d& pivot) { _pivotPoint = pivot; _matrixDirty=true; dirtyBound(); } - inline const Vec3d& getPivotPoint() const { return _pivotPoint; } - - - void setAutoUpdateEyeMovementTolerance(float tolerance) { _autoUpdateEyeMovementTolerance = tolerance; } - float getAutoUpdateEyeMovementTolerance() const { return _autoUpdateEyeMovementTolerance; } - - - enum AutoRotateMode - { - NO_ROTATION, - ROTATE_TO_SCREEN, - ROTATE_TO_CAMERA, - ROTATE_TO_AXIS - }; - - void setAutoRotateMode(AutoRotateMode mode); - - AutoRotateMode getAutoRotateMode() const { return _autoRotateMode; } - - /** Set the rotation axis for the AutoTransform's child nodes. - * Only utilized when _autoRotateMode==ROTATE_TO_AXIS. */ - void setAxis(const Vec3& axis); - /** Get the rotation axis. */ - inline const Vec3& getAxis() const { return _axis; } - - /** This normal defines child Nodes' front face direction when unrotated. */ - void setNormal(const Vec3& normal); - /** Get the front face direction normal. */ - inline const Vec3& getNormal() const { return _normal; } - - void setAutoScaleToScreen(bool autoScaleToScreen) { _autoScaleToScreen = autoScaleToScreen; _matrixDirty=true; } - - bool getAutoScaleToScreen() const { return _autoScaleToScreen; } - - void setAutoScaleTransitionWidthRatio(float ratio) { _autoScaleTransitionWidthRatio = ratio; } - float getAutoScaleTransitionWidthRatio() const { return _autoScaleTransitionWidthRatio; } - - - virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor* nv) const; - - virtual bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor* nv) const; - - virtual BoundingSphere computeBound() const; - - - protected : - - virtual ~AutoTransform() {} - - Vec3d _position; - Vec3d _pivotPoint; - double _autoUpdateEyeMovementTolerance; - - AutoRotateMode _autoRotateMode; - - bool _autoScaleToScreen; - - mutable Quat _rotation; - mutable Vec3d _scale; - mutable bool _firstTimeToInitEyePoint; - mutable osg::Vec3 _previousEyePoint; - mutable osg::Vec3 _previousLocalUp; - mutable Viewport::value_type _previousWidth; - mutable Viewport::value_type _previousHeight; - mutable osg::Matrixd _previousProjection; - mutable osg::Vec3d _previousPosition; - - double _minimumScale; - double _maximumScale; - double _autoScaleTransitionWidthRatio; - - void computeMatrix() const; - - mutable bool _matrixDirty; - mutable osg::Matrixd _cachedMatrix; - - enum AxisAligned - { - AXIAL_ROT_X_AXIS=ROTATE_TO_AXIS+1, - AXIAL_ROT_Y_AXIS, - AXIAL_ROT_Z_AXIS, - CACHE_DIRTY - }; - - Vec3 _axis; - Vec3 _normal; - - // used internally as cache of which what _axis is aligned to help - // decide which method of rotation to use. - int _cachedMode; - Vec3 _side; - void updateCache(); - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Billboard b/libs/lib/mac32/include/osg/Billboard deleted file mode 100644 index dcec5d935..000000000 --- a/libs/lib/mac32/include/osg/Billboard +++ /dev/null @@ -1,132 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BILLBOARD -#define OSG_BILLBOARD 1 - -#include -#include - -namespace osg { - -/** Billboard is a derived form of Geode that orients its osg::Drawable - * children to face the eye point. Typical uses include trees and - * particle explosions, -*/ -class OSG_EXPORT Billboard : public Geode -{ - public: - - enum Mode { - POINT_ROT_EYE, - POINT_ROT_WORLD, - AXIAL_ROT - }; - - Billboard(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Billboard(const Billboard&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, Billboard); - - /** Set the billboard rotation mode. */ - void setMode(Mode mode); - /** Get the billboard rotation mode. */ - inline Mode getMode() const { return _mode; } - - /** Set the rotation axis for the billboard's child Drawables. - * Only utilized when mode==AXIAL_ROT. */ - void setAxis(const Vec3& axis); - /** Get the rotation axis. */ - inline const Vec3& getAxis() const { return _axis; } - - /** This normal defines child Drawables' front face direction when unrotated. */ - void setNormal(const Vec3& normal); - /** Get the front face direction normal. */ - inline const Vec3& getNormal() const { return _normal; } - - - /** Set the specified child Drawable's position. */ - inline void setPosition(unsigned int i,const Vec3& pos) { _positionList[i] = pos; } - /** Get the specified child Drawable's position. */ - inline const Vec3& getPosition(unsigned int i) const { return _positionList[i]; } - - /** Type definition for pivot point position list. */ - typedef std::vector PositionList; - - /** Set the list of pivot point positions. */ - inline void setPositionList(PositionList& pl) { _positionList=pl; } - - /** Get the list of pivot point positions. */ - inline PositionList& getPositionList() { return _positionList; } - - /** Get a const list of pivot point positions. */ - inline const PositionList& getPositionList() const { return _positionList; } - - /** Add a Drawable with a default position of Vec3(0,0,0). - * Call the base-class Geode::addDrawble() to add the given Drawable - * gset as a child. If Geode::addDrawable() returns true, add the - * default position to the pivot point position list and return true. - * Otherwise, return false. */ - virtual bool addDrawable( Drawable *gset ); - - /** Add a Drawable with a specified position. - * Call the base-class Geode::addDrawble() to add the given Drawable - * gset as a child. If Geode::addDrawable() returns true, add the - * given position pos to the pivot point position list and return true. - * Otherwise, return false. */ - virtual bool addDrawable(Drawable *gset,const Vec3& pos); - - /** Remove a Drawable and its associated position. - * If gset is a child, remove it, decrement its reference count, - * remove its pivot point position. and return true. - * Otherwise, return false. */ - virtual bool removeDrawable( Drawable *gset ); - - - bool computeMatrix(Matrix& modelview, const Vec3& eye_local, const Vec3& pos_local) const; - - virtual BoundingSphere computeBound() const; - - protected: - - virtual ~Billboard(); - - enum AxisAligned - { - AXIAL_ROT_X_AXIS=AXIAL_ROT+1, - AXIAL_ROT_Y_AXIS, - AXIAL_ROT_Z_AXIS, - POINT_ROT_WORLD_Z_AXIS, - CACHE_DIRTY - }; - - - Mode _mode; - Vec3 _axis; - Vec3 _normal; - Matrix _rotateNormalToZAxis; - PositionList _positionList; - - // used internally as cache of which what _axis is aligned to help - // decide which method of rotation to use. - int _cachedMode; - Vec3 _side; - void updateCache(); - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/BlendColor b/libs/lib/mac32/include/osg/BlendColor deleted file mode 100644 index 3670a6065..000000000 --- a/libs/lib/mac32/include/osg/BlendColor +++ /dev/null @@ -1,125 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BLENDCOLOR -#define OSG_BLENDCOLOR 1 - -#include -#include -#include -#include - - - -namespace osg { - -/** Encapsulates OpenGL blend/transparency state. */ -class OSG_EXPORT BlendColor : public StateAttribute -{ - public : - - BlendColor(); - - BlendColor(const osg::Vec4& constantColor); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - BlendColor(const BlendColor& trans,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(trans,copyop), - _constantColor(trans._constantColor) {} - - META_StateAttribute(osg, BlendColor,BLENDCOLOR); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(BlendColor,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_constantColor) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_BLEND); - return true; - } - - void setConstantColor(const osg::Vec4& color) { _constantColor = color; } - - inline osg::Vec4& getConstantColor() { return _constantColor; } - - inline const osg::Vec4& getConstantColor() const { return _constantColor; } - - virtual void apply(State& state) const; - - - - - /** Encapsulates queries of extension availability, obtains extension - * function pointers, and provides convenience wrappers for - * calling extension functions. */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setBlendColorSupported(bool flag) { _isBlendColorSupported=flag; } - bool isBlendColorSupported() const { return _isBlendColorSupported; } - - void glBlendColor(GLclampf red , GLclampf green , GLclampf blue , GLclampf alpha) const; - - protected: - - ~Extensions() {} - - - typedef void (GL_APIENTRY * GLBlendColorProc) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - bool _isBlendColorSupported; - GLBlendColorProc _glBlendColor; - - }; - - /** Returns the Extensions object for the given context. - * If createIfNotInitalized is true and the Extensions object doesn't - * exist, getExtensions() creates it on the given context. - * Returns NULL if createIfNotInitalized is false and the Extensions - * object doesn't exist. */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions() allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes, - * but need to ensure that they all use the same low common denominator extensions. */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - - protected : - - virtual ~BlendColor(); - - osg::Vec4 _constantColor; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/BlendEquation b/libs/lib/mac32/include/osg/BlendEquation deleted file mode 100644 index de4ab4fe9..000000000 --- a/libs/lib/mac32/include/osg/BlendEquation +++ /dev/null @@ -1,161 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BLENDEQUATION -#define OSG_BLENDEQUATION 1 - -#include - -#ifndef GL_VERSION_1_2 -/* Logic Ops */ -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#endif - -#ifndef GL_LOGIC_OP -#define GL_LOGIC_OP 0x0BF1 -#endif - -#ifndef GL_ALPHA_MIN_SGIX -#define GL_ALPHA_MIN_SGIX 0x8320 -#define GL_ALPHA_MAX_SGIX 0x8321 -#endif - -namespace osg { - -/** Encapsulates OpenGL BlendEquation state. */ -class OSG_EXPORT BlendEquation : public StateAttribute -{ - public : - - enum Equation { - RGBA_MIN = GL_MIN, - RGBA_MAX = GL_MAX, - ALPHA_MIN = GL_ALPHA_MIN_SGIX, - ALPHA_MAX = GL_ALPHA_MAX_SGIX, - LOGIC_OP = GL_LOGIC_OP, - FUNC_ADD = GL_FUNC_ADD, - FUNC_SUBTRACT = GL_FUNC_SUBTRACT, - FUNC_REVERSE_SUBTRACT = GL_FUNC_REVERSE_SUBTRACT - }; - - BlendEquation(); - - BlendEquation(Equation equation); - - BlendEquation(Equation equationRGB, Equation equationAlpha); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - BlendEquation(const BlendEquation& trans,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(trans,copyop), - _equationRGB(trans._equationRGB), - _equationAlpha(trans._equationAlpha){} - - META_StateAttribute(osg, BlendEquation,BLENDEQUATION); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(BlendEquation,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_equationRGB) - COMPARE_StateAttribute_Parameter(_equationAlpha) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_BLEND); - return true; - } - - - inline void setEquation(Equation equation) { _equationRGB = _equationAlpha = equation; } - inline Equation getEquation() const { return _equationRGB; } - - inline void setEquationRGB(Equation equation) { _equationRGB = equation; } - inline Equation getEquationRGB() const { return _equationRGB; } - - inline void setEquationAlpha(Equation equation) { _equationAlpha = equation; } - inline Equation getEquationAlpha() const { return _equationAlpha; } - - virtual void apply(State& state) const; - /** Encapsulates queries of extension availability, obtains extension - * function pointers, and provides convenience wrappers for - * calling extension functions. */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - bool isBlendEquationSupported() const { return _isBlendEquationSupported; } - bool isBlendEquationSeparateSupported() const { return _isBlendEquationSeparateSupported; } - bool isSGIXMinMaxSupported() const { return _isSGIXMinMaxSupported; } - bool isLogicOpSupported() const { return _isLogicOpSupported; } - - void glBlendEquation(GLenum mode) const; - void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) const; - - protected: - - ~Extensions() {} - - typedef void (GL_APIENTRY * GLBlendEquationProc)(GLenum mode); - typedef void (GL_APIENTRY * GLBlendEquationSeparateProc)(GLenum modeRGB, GLenum modeAlpha); - - bool _isBlendEquationSupported; - bool _isBlendEquationSeparateSupported; - bool _isSGIXMinMaxSupported; - bool _isLogicOpSupported; - - GLBlendEquationProc _glBlendEquation; - GLBlendEquationSeparateProc _glBlendEquationSeparate; - }; - - /** Returns the Extensions object for the given context. - * If createIfNotInitalized is true and the Extensions object doesn't - * exist, getExtensions() creates it on the given context. - * Returns NULL if createIfNotInitalized is false and the Extensions - * object doesn't exist. */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions() allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes, - * but need to ensure that they all use the same low common denominator extensions. */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected : - - virtual ~BlendEquation(); - - - Equation _equationRGB, _equationAlpha; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/BlendFunc b/libs/lib/mac32/include/osg/BlendFunc deleted file mode 100644 index 4b75e310c..000000000 --- a/libs/lib/mac32/include/osg/BlendFunc +++ /dev/null @@ -1,221 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BLENDFUNC -#define OSG_BLENDFUNC 1 - -#include - - -#ifndef GL_VERSION_1_2 -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#endif - -#ifndef GL_VERSION_1_4 -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#endif - - -namespace osg { - -/** Encapsulates OpenGL blend/transparency state. - * - * Blending combines incoming fragment with a fragment - * already present in the target buffer. - * - * OpenGL 1.1 supports following source and destination blending factors: - * GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, - * GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, - * GL_ZERO, GL_ONE. - * - * Moreover, there are three source-only blending factors: - * GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA_SATURATE - * and two destination-only blending factors: - * GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR. - * OpenGL 1.4 allowed to use these five blending factors - * as both - source and destination blending factors. - * - * Following four source and destination blending factors - * were added by Imaging subset of OpenGL 1.2 - * and made mandatory by OpenGL 1.4: - * GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, - * GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA - * - * OpenGL 1.4 further provides glBlendFuncSeparate - * (promoted from GL_EXT_blend_func_separate). - * It makes possible to set blending functions for RGB and Alpha separately. - * Before, it was possible to set just one blending function for RGBA. - */ -class OSG_EXPORT BlendFunc : public StateAttribute -{ - public : - - BlendFunc(); - - BlendFunc(GLenum source, GLenum destination); - BlendFunc(GLenum source, GLenum destination, GLenum source_alpha, GLenum destination_alpha); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - BlendFunc(const BlendFunc& trans,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(trans,copyop), - _source_factor(trans._source_factor), - _destination_factor(trans._destination_factor), - _source_factor_alpha(trans._source_factor_alpha), - _destination_factor_alpha(trans._destination_factor_alpha) {} - - META_StateAttribute(osg, BlendFunc,BLENDFUNC); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(BlendFunc,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_source_factor) - COMPARE_StateAttribute_Parameter(_destination_factor) - COMPARE_StateAttribute_Parameter(_source_factor_alpha) - COMPARE_StateAttribute_Parameter(_destination_factor_alpha) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_BLEND); - return true; - } - - enum BlendFuncMode { - DST_ALPHA = GL_DST_ALPHA, - DST_COLOR = GL_DST_COLOR, - ONE = GL_ONE, - ONE_MINUS_DST_ALPHA = GL_ONE_MINUS_DST_ALPHA, - ONE_MINUS_DST_COLOR = GL_ONE_MINUS_DST_COLOR, - ONE_MINUS_SRC_ALPHA = GL_ONE_MINUS_SRC_ALPHA, - ONE_MINUS_SRC_COLOR = GL_ONE_MINUS_SRC_COLOR, - SRC_ALPHA = GL_SRC_ALPHA, - SRC_ALPHA_SATURATE = GL_SRC_ALPHA_SATURATE, - SRC_COLOR = GL_SRC_COLOR, - CONSTANT_COLOR = GL_CONSTANT_COLOR, - ONE_MINUS_CONSTANT_COLOR = GL_ONE_MINUS_CONSTANT_COLOR, - CONSTANT_ALPHA = GL_CONSTANT_ALPHA, - ONE_MINUS_CONSTANT_ALPHA = GL_ONE_MINUS_CONSTANT_ALPHA, - ZERO = GL_ZERO - }; - - inline void setFunction( GLenum source, GLenum destination ) - { - _source_factor = source; - _destination_factor = destination; - _source_factor_alpha = source; - _destination_factor_alpha = destination; - } - - inline void setFunction( GLenum source_rgb, GLenum destination_rgb, GLenum source_alpha, GLenum destination_alpha ) - { - _source_factor = source_rgb; - _destination_factor = destination_rgb; - _source_factor_alpha = source_alpha; - _destination_factor_alpha = destination_alpha; - } - - void setSource(GLenum source) { _source_factor = _source_factor_alpha = source; } - inline GLenum getSource() const { return _source_factor; } - - void setSourceRGB(GLenum source) { _source_factor = source; } - inline GLenum getSourceRGB() const { return _source_factor; } - - void setSourceAlpha(GLenum source) { _source_factor_alpha = source; } - inline GLenum getSourceAlpha() const { return _source_factor_alpha; } - - void setDestination(GLenum destination) { _destination_factor = _destination_factor_alpha = destination; } - inline GLenum getDestination() const { return _destination_factor; } - - void setDestinationRGB(GLenum destination) { _destination_factor = destination; } - inline GLenum getDestinationRGB() const { return _destination_factor; } - - void setDestinationAlpha(GLenum destination) { _destination_factor_alpha = destination; } - inline GLenum getDestinationAlpha() const { return _destination_factor_alpha; } - - virtual void apply(State& state) const; - /** Encapsulates queries of extension availability, obtains extension - * function pointers, and provides convenience wrappers for - * calling extension functions. */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setBlendFuncSeparateSupported(bool flag) { _isBlendFuncSeparateSupported=flag; } - bool isBlendFuncSeparateSupported() const { return _isBlendFuncSeparateSupported; } - - void glBlendFuncSeparate(GLenum sfactorRGB, - GLenum dfactorRGB, - GLenum sfactorAlpha, - GLenum dfactorAlpha) const; - - protected: - - ~Extensions() {} - - - typedef void (GL_APIENTRY * GLBlendFuncSeparateProc) (GLenum sfactorRGB, - GLenum dfactorRGB, - GLenum sfactorAlpha, - GLenum dfactorAlpha); - bool _isBlendFuncSeparateSupported; - GLBlendFuncSeparateProc _glBlendFuncSeparate; - - }; - - /** Returns the Extensions object for the given context. - * If createIfNotInitalized is true and the Extensions object doesn't - * exist, getExtensions() creates it on the given context. - * Returns NULL if createIfNotInitalized is false and the Extensions - * object doesn't exist. */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions() allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes, - * but need to ensure that they all use the same low common denominator extensions. */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected : - - virtual ~BlendFunc(); - - GLenum _source_factor; - GLenum _destination_factor; - GLenum _source_factor_alpha; - GLenum _destination_factor_alpha; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/BoundingBox b/libs/lib/mac32/include/osg/BoundingBox deleted file mode 100644 index da52b10dd..000000000 --- a/libs/lib/mac32/include/osg/BoundingBox +++ /dev/null @@ -1,243 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BOUNDINGBOX -#define OSG_BOUNDINGBOX 1 - -#include -#include -#include -#include -#include - -namespace osg { - -template -class BoundingSphereImpl; - -/** General purpose axis-aligned bounding box class for enclosing objects/vertices. - * Bounds leaf objects in a scene such as osg::Drawable objects. Used for frustum - * culling etc. -*/ -template -class BoundingBoxImpl -{ - public: - typedef VT vec_type; - typedef typename VT::value_type value_type; - - /** Minimum extent. (Smallest X, Y, and Z values of all coordinates.) */ - vec_type _min; - /** Maximum extent. (Greatest X, Y, and Z values of all coordinates.) */ - vec_type _max; - - /** Creates an uninitialized bounding box. */ - inline BoundingBoxImpl() : - _min(FLT_MAX, - FLT_MAX, - FLT_MAX), - _max(-FLT_MAX, - -FLT_MAX, - -FLT_MAX) - {} - - /** Creates a bounding box initialized to the given extents. */ - inline BoundingBoxImpl(value_type xmin, value_type ymin, value_type zmin, - value_type xmax, value_type ymax, value_type zmax) : - _min(xmin,ymin,zmin), - _max(xmax,ymax,zmax) {} - - /** Creates a bounding box initialized to the given extents. */ - inline BoundingBoxImpl(const vec_type& min,const vec_type& max) : - _min(min), - _max(max) {} - - /** Clear the bounding box. Erases existing minimum and maximum extents. */ - inline void init() - { - _min.set(FLT_MAX, - FLT_MAX, - FLT_MAX); - _max.set(-FLT_MAX, - -FLT_MAX, - -FLT_MAX); - } - - /** Returns true if the bounding box extents are valid, false otherwise. */ - inline bool valid() const - { - return _max.x()>=_min.x() && _max.y()>=_min.y() && _max.z()>=_min.z(); - } - - /** Sets the bounding box extents. */ - inline void set (value_type xmin, value_type ymin, value_type zmin, - value_type xmax, value_type ymax, value_type zmax) - { - _min.set(xmin,ymin,zmin); - _max.set(xmax,ymax,zmax); - } - - /** Sets the bounding box extents. */ - inline void set(const vec_type& min,const vec_type& max) - { - _min = min; - _max = max; - } - - - inline value_type& xMin() { return _min.x(); } - inline value_type xMin() const { return _min.x(); } - - inline value_type& yMin() { return _min.y(); } - inline value_type yMin() const { return _min.y(); } - - inline value_type& zMin() { return _min.z(); } - inline value_type zMin() const { return _min.z(); } - - inline value_type& xMax() { return _max.x(); } - inline value_type xMax() const { return _max.x(); } - - inline value_type& yMax() { return _max.y(); } - inline value_type yMax() const { return _max.y(); } - - inline value_type& zMax() { return _max.z(); } - inline value_type zMax() const { return _max.z(); } - - /** Calculates and returns the bounding box center. */ - inline const vec_type center() const - { - return (_min+_max)*0.5; - } - - /** Calculates and returns the bounding box radius. */ - inline value_type radius() const - { - return sqrt(radius2()); - } - - /** Calculates and returns the squared length of the bounding box radius. - * Note, radius2() is faster to calculate than radius(). */ - inline value_type radius2() const - { - return 0.25*((_max-_min).length2()); - } - - /** Returns a specific corner of the bounding box. - * pos specifies the corner as a number between 0 and 7. - * Each bit selects an axis, X, Y, or Z from least- to - * most-significant. Unset bits select the minimum value - * for that axis, and set bits select the maximum. */ - inline const vec_type corner(unsigned int pos) const - { - return vec_type(pos&1?_max.x():_min.x(),pos&2?_max.y():_min.y(),pos&4?_max.z():_min.z()); - } - - /** Expands the bounding box to include the given coordinate. - * If the box is uninitialized, set its min and max extents to v. */ - inline void expandBy(const vec_type& v) - { - if(v.x()<_min.x()) _min.x() = v.x(); - if(v.x()>_max.x()) _max.x() = v.x(); - - if(v.y()<_min.y()) _min.y() = v.y(); - if(v.y()>_max.y()) _max.y() = v.y(); - - if(v.z()<_min.z()) _min.z() = v.z(); - if(v.z()>_max.z()) _max.z() = v.z(); - } - - /** Expands the bounding box to include the given coordinate. - * If the box is uninitialized, set its min and max extents to - * Vec3(x,y,z). */ - inline void expandBy(value_type x,value_type y,value_type z) - { - if(x<_min.x()) _min.x() = x; - if(x>_max.x()) _max.x() = x; - - if(y<_min.y()) _min.y() = y; - if(y>_max.y()) _max.y() = y; - - if(z<_min.z()) _min.z() = z; - if(z>_max.z()) _max.z() = z; - } - - /** Expands this bounding box to include the given bounding box. - * If this box is uninitialized, set it equal to bb. */ - void expandBy(const BoundingBoxImpl& bb) - { - if (!bb.valid()) return; - - if(bb._min.x()<_min.x()) _min.x() = bb._min.x(); - if(bb._max.x()>_max.x()) _max.x() = bb._max.x(); - - if(bb._min.y()<_min.y()) _min.y() = bb._min.y(); - if(bb._max.y()>_max.y()) _max.y() = bb._max.y(); - - if(bb._min.z()<_min.z()) _min.z() = bb._min.z(); - if(bb._max.z()>_max.z()) _max.z() = bb._max.z(); - } - - /** Expands this bounding box to include the given sphere. - * If this box is uninitialized, set it to include sh. */ - void expandBy(const BoundingSphereImpl& sh) - { - if (!sh.valid()) return; - - if(sh._center.x()-sh._radius<_min.x()) _min.x() = sh._center.x()-sh._radius; - if(sh._center.x()+sh._radius>_max.x()) _max.x() = sh._center.x()+sh._radius; - - if(sh._center.y()-sh._radius<_min.y()) _min.y() = sh._center.y()-sh._radius; - if(sh._center.y()+sh._radius>_max.y()) _max.y() = sh._center.y()+sh._radius; - - if(sh._center.z()-sh._radius<_min.z()) _min.z() = sh._center.z()-sh._radius; - if(sh._center.z()+sh._radius>_max.z()) _max.z() = sh._center.z()+sh._radius; - } - - - /** Returns the intersection of this bounding box and the specified bounding box. */ - BoundingBoxImpl intersect(const BoundingBoxImpl& bb) const - { return BoundingBoxImpl(osg::maximum(xMin(),bb.xMin()),osg::maximum(yMin(),bb.yMin()),osg::maximum(zMin(),bb.zMin()), - osg::minimum(xMax(),bb.xMax()),osg::minimum(yMax(),bb.yMax()),osg::minimum(zMax(),bb.zMax())); - - } - - /** Return true if this bounding box intersects the specified bounding box. */ - bool intersects(const BoundingBoxImpl& bb) const - { return osg::maximum(xMin(),bb.xMin()) <= osg::minimum(xMax(),bb.xMax()) && - osg::maximum(yMin(),bb.yMin()) <= osg::minimum(yMax(),bb.yMax()) && - osg::maximum(zMin(),bb.zMin()) <= osg::minimum(zMax(),bb.zMax()); - - } - - /** Returns true if this bounding box contains the specified coordinate. */ - inline bool contains(const vec_type& v) const - { - return valid() && - (v.x()>=_min.x() && v.x()<=_max.x()) && - (v.y()>=_min.y() && v.y()<=_max.y()) && - (v.z()>=_min.z() && v.z()<=_max.z()); - } -}; - -typedef BoundingBoxImpl BoundingBoxf; -typedef BoundingBoxImpl BoundingBoxd; - -#ifdef OSG_USE_FLOAT_BOUNDINGBOX -typedef BoundingBoxf BoundingBox; -#else -typedef BoundingBoxd BoundingBox; -#endif - -} - -#endif diff --git a/libs/lib/mac32/include/osg/BoundingSphere b/libs/lib/mac32/include/osg/BoundingSphere deleted file mode 100644 index b24a011ff..000000000 --- a/libs/lib/mac32/include/osg/BoundingSphere +++ /dev/null @@ -1,306 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BOUNDINGSPHERE -#define OSG_BOUNDINGSPHERE 1 - -#include -#include -#include -#include - -namespace osg { - -template -class BoundingBoxImpl; - -/** General purpose bounding sphere class for enclosing nodes/objects/vertices. - * Bounds internal osg::Nodes in the scene, assists in view frustum culling, - * etc. Similar in function to BoundingBox, it's quicker for evaluating - * culling but generally will not cull as aggressively because it encloses a - * greater volume. -*/ -template -class BoundingSphereImpl -{ - public: - typedef VT vec_type; - typedef typename VT::value_type value_type; - - vec_type _center; - value_type _radius; - - /** Construct a default bounding sphere with radius to -1.0f, representing an invalid/unset bounding sphere.*/ - BoundingSphereImpl() : _center(0.0,0.0,0.0),_radius(-1.0) {} - - /** Creates a bounding sphere initialized to the given extents. */ - BoundingSphereImpl(const vec_type& center, value_type radius) : _center(center),_radius(radius) {} - - /** Creates a bounding sphere initialized to the given extents. */ - BoundingSphereImpl(const BoundingSphereImpl& bs) : _center(bs._center),_radius(bs._radius) {} - - /** Creates a bounding sphere initialized to the given extents. */ - BoundingSphereImpl(const BoundingBoxImpl& bb) : _center(0.0,0.0,0.0),_radius(-1.0) { expandBy(bb); } - - /** Clear the bounding sphere. Reset to default values. */ - inline void init() - { - _center.set(0.0,0.0,0.0); - _radius = -1.0; - } - - /** Returns true of the bounding sphere extents are valid, false - * otherwise. */ - inline bool valid() const { return _radius>=0.0; } - - /** Set the bounding sphere to the given center/radius using floats. */ - inline void set(const vec_type& center,value_type radius) - { - _center = center; - _radius = radius; - } - - /** Returns the center of the bounding sphere. */ - inline vec_type& center() { return _center; } - - /** Returns the const center of the bounding sphere. */ - inline const vec_type& center() const { return _center; } - - /** Returns the radius of the bounding sphere. */ - inline value_type& radius() { return _radius; } - /** Returns the const radius of the bounding sphere. */ - inline value_type radius() const { return _radius; } - - /** Returns the squared length of the radius. Note, For performance - * reasons, the calling method is responsible for checking to make - * sure the sphere is valid. */ - inline value_type radius2() const { return _radius*_radius; } - - /** Expands the sphere to encompass the given point. Repositions the - * sphere center to minimize the radius increase. If the sphere is - * uninitialized, set its center to v and radius to zero. */ - template - void expandBy(const vector_type& v); - - /** Expands the sphere to encompass the given point. Does not - * reposition the sphere center. If the sphere is - * uninitialized, set its center to v and radius to zero. */ - template - void expandRadiusBy(const vector_type& v); - - /** Expands the sphere to encompass the given sphere. Repositions the - * sphere center to minimize the radius increase. If the sphere is - * uninitialized, set its center and radius to match sh. */ - void expandBy(const BoundingSphereImpl& sh); - - /** Expands the sphere to encompass the given sphere. Does not - * repositions the sphere center. If the sphere is - * uninitialized, set its center and radius to match sh. */ - void expandRadiusBy(const BoundingSphereImpl& sh); - - /** Expands the sphere to encompass the given box. Repositions the - * sphere center to minimize the radius increase. */ - void expandBy(const BoundingBoxImpl& bb); - - /** Expands the sphere to encompass the given box. Does not - * repositions the sphere center. */ - void expandRadiusBy(const BoundingBoxImpl& bb); - - /** Returns true if v is within the sphere. */ - inline bool contains(const vec_type& v) const - { - return valid() && ((v-_center).length2()<=radius2()); - } - - - /** Returns true if there is a non-empty intersection with the given - * bounding sphere. */ - inline bool intersects( const BoundingSphereImpl& bs ) const - { - return valid() && bs.valid() && - ((_center - bs._center).length2() <= (_radius + bs._radius)*(_radius + bs._radius)); - } - -}; - - -template - template -void BoundingSphereImpl::expandBy(const vector_type& v) -{ - if (valid()) - { - vec_type dv = v-_center; - value_type r = dv.length(); - if (r>_radius) - { - value_type dr = (r-_radius)*0.5; - _center += dv*(dr/r); - _radius += dr; - } // else do nothing as vertex is within sphere. - } - else - { - _center = v; - _radius = 0.0; - } -} - -template - template -void BoundingSphereImpl::expandRadiusBy(const vector_type& v) -{ - if (valid()) - { - value_type r = (v-_center).length(); - if (r>_radius) _radius = r; - // else do nothing as vertex is within sphere. - } - else - { - _center = v; - _radius = 0.0; - } -} - -template -void BoundingSphereImpl::expandBy(const BoundingSphereImpl& sh) -{ - // ignore operation if incomming BoundingSphere is invalid. - if (!sh.valid()) return; - - // This sphere is not set so use the inbound sphere - if (!valid()) - { - _center = sh._center; - _radius = sh._radius; - - return; - } - - - // Calculate d == The distance between the sphere centers - double d = ( _center - sh.center() ).length(); - - // New sphere is already inside this one - if ( d + sh.radius() <= _radius ) - { - return; - } - - // New sphere completely contains this one - if ( d + _radius <= sh.radius() ) - { - _center = sh._center; - _radius = sh._radius; - return; - } - - - // Build a new sphere that completely contains the other two: - // - // The center point lies halfway along the line between the furthest - // points on the edges of the two spheres. - // - // Computing those two points is ugly - so we'll use similar triangles - double new_radius = (_radius + d + sh.radius() ) * 0.5; - double ratio = ( new_radius - _radius ) / d ; - - _center[0] += ( sh.center()[0] - _center[0] ) * ratio; - _center[1] += ( sh.center()[1] - _center[1] ) * ratio; - _center[2] += ( sh.center()[2] - _center[2] ) * ratio; - - _radius = new_radius; - -} - -template -void BoundingSphereImpl::expandRadiusBy(const BoundingSphereImpl& sh) -{ - if (sh.valid()) - { - if (valid()) - { - value_type r = (sh._center-_center).length()+sh._radius; - if (r>_radius) _radius = r; - // else do nothing as vertex is within sphere. - } - else - { - _center = sh._center; - _radius = sh._radius; - } - } -} - -template -void BoundingSphereImpl::expandBy(const BoundingBoxImpl& bb) -{ - if (bb.valid()) - { - if (valid()) - { - BoundingBoxImpl newbb(bb); - - for(unsigned int c=0;c<8;++c) - { - vec_type v = bb.corner(c)-_center; // get the direction vector from corner - v.normalize(); // normalise it. - v *= -_radius; // move the vector in the opposite direction distance radius. - v += _center; // move to absolute position. - newbb.expandBy(v); // add it into the new bounding box. - } - - _center = newbb.center(); - _radius = newbb.radius(); - - } - else - { - _center = bb.center(); - _radius = bb.radius(); - } - } -} - -template -void BoundingSphereImpl::expandRadiusBy(const BoundingBoxImpl& bb) -{ - if (bb.valid()) - { - if (valid()) - { - for(unsigned int c=0;c<8;++c) - { - expandRadiusBy(bb.corner(c)); - } - } - else - { - _center = bb.center(); - _radius = bb.radius(); - } - } -} - -typedef BoundingSphereImpl BoundingSpheref; -typedef BoundingSphereImpl BoundingSphered; - -#ifdef OSG_USE_FLOAT_BOUNDINGSPHERE - typedef BoundingSpheref BoundingSphere; -#else - typedef BoundingSphered BoundingSphere; -#endif -} - -#endif diff --git a/libs/lib/mac32/include/osg/BoundsChecking b/libs/lib/mac32/include/osg/BoundsChecking deleted file mode 100644 index d33cd038a..000000000 --- a/libs/lib/mac32/include/osg/BoundsChecking +++ /dev/null @@ -1,216 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BOUNDSCHECKING -#define OSG_BOUNDSCHECKING 1 - -#include - -namespace osg { - - -/** If value is greater than or equal to minValue do nothing - legal value, - * Otherwise set value to minValue, and warn that valueName was clamped. - * Note this is effectively A=max(A,B). */ -template -inline void clampGEQUAL(T& value,const T minValue,const char* valueName) -{ - if (value -inline void clampLEQUAL(T& value,const T maxValue,const char* valueName) -{ - if (value>maxValue) - { - notify(WARN) << "Warning: "< -inline void clampBetweenRange(T& value,const T minValue,const T maxValue,const char* valueName) -{ - if (valuemaxValue) - { - notify(WARN) << "Warning: "< -inline void clampArrayElementGEQUAL(A& value,unsigned int i,const T minValue,const char* valueName) -{ - if (value[i] -inline void clampArrayElementLEQUAL(A& value,unsigned int i,const T maxValue,const char* valueName) -{ - if (value[i]>maxValue) - { - notify(WARN) << "Warning: "< -inline void clampArrayElementBetweenRange(A& value,unsigned int i,const T minValue,const T maxValue,const char* valueName) -{ - if (value[i]maxValue) - { - notify(WARN) << "Warning: "< -inline void clampArrayElementsGEQUAL(A& value,unsigned int first,unsigned int last,const T minValue,const char* valueName) -{ - for(unsigned int i=first;i<=last;++i) - clampArrayElementGEQUAL(value,i,minValue,valueName); -} - -/** For each element of value[] in the range (first,last), if the element is - * less than or equal to maxValue do nothing - legal value, Otherwise clamp - * the element to maxValue, and warn that valueName[i] was clamped. */ -template -inline void clampArrayElementsLEQUAL(A& value,unsigned int first,unsigned int last,const T maxValue,const char* valueName) -{ - for(unsigned int i=first;i<=last;++i) - clampArrayElementLEQUAL(value,i,maxValue,valueName); -} - -/** For each element of value[] in the range (first,last), if the element is - * between or equal to minValue and maxValue do nothing - legal value, - * Otherwise clamp the element to the range and warn that valueName[i] was - * clamped. Equivalent to calling - * clampArrayElementsGEQUAL( value, first, last, minValue, valueName); - * clampArrayElementsLEQUAL( value, first, last, maxValue, valueName); */ -template -inline void clampArrayElementsBetweenRange(A& value,unsigned int first,unsigned int last,const T minValue,const T maxValue,const char* valueName) -{ - for(unsigned int i=first;i<=last;++i) - clampArrayElementBetweenRange(value,i,minValue,maxValue,valueName); -} - - -/** For each element of the three-element array value[], if the element is - * greater than or equal to minValue do nothing - legal value, Otherwise - * clamp the element to minValue, and warn that valueName[i] was clamped. */ -template -inline void clampArray3GEQUAL(A& value,const T minValue,const char* valueName) -{ - clampArrayElementsGEQUAL(value,0u,2u,minValue,valueName); -} - -/** For each element of the three-element array value[], if the element is - * less than or equal to maxValue do nothing - legal value, Otherwise clamp - * the element to maxValue, and warn that valueName[i] was clamped. */ -template -inline void clampArray3LEQUAL(A& value,const T maxValue,const char* valueName) -{ - clampArrayElementsLEQUAL(value,0u,2u,maxValue,valueName); -} - -/** For each element of the three-element array value[], if the element is - * between or equal to minValue and maxValue do nothing - legal value, - * Otherwise clamp the element to the range and warn that valueName[i] was - * clamped. Equivalent to calling - * clampArray3GEQUAL( value, minValue, valueName); - * clampArray3LEQUAL( value, maxValue, valueName); */ -template -inline void clampArray3BetweenRange(A& value,const T minValue,const T maxValue,const char* valueName) -{ - clampArrayElementsBetweenRange(value,0u,2u,minValue,maxValue,valueName); -} - - - -/** For each element of the four-element array value[], if the element is - * greater than or equal to minValue do nothing - legal value, Otherwise - * clamp the element to minValue, and warn that valueName[i] was clamped. */ -template -inline void clampArray4GEQUAL(A& value,const T minValue,const char* valueName) -{ - clampArrayElementsGEQUAL(value,0u,3u,minValue,valueName); -} - -/** For each element of the four-element array value[], if the element is - * less than or equal to maxValue do nothing - legal value, Otherwise clamp - * the element to maxValue, and warn that valueName[i] was clamped. */ -template -inline void clampArray4LEQUAL(A& value,const T maxValue,const char* valueName) -{ - clampArrayElementsLEQUAL(value,0u,3u,maxValue,valueName); -} - -/** For each element of the four-element array value[], if the element is - * between or equal to minValue and maxValue do nothing - legal value, - * Otherwise clamp the element to the range and warn that valueName[i] was - * clamped. Equivalent to calling - * clampArray4GEQUAL( value, minValue, valueName); - * clampArray4LEQUAL( value, maxValue, valueName); */ -template -inline void clampArray4BetweenRange(A& value,const T minValue,const T maxValue,const char* valueName) -{ - clampArrayElementsBetweenRange(value,0u,3u,minValue,maxValue,valueName); -} - -} - -#endif diff --git a/libs/lib/mac32/include/osg/BufferIndexBinding b/libs/lib/mac32/include/osg/BufferIndexBinding deleted file mode 100644 index c073ecd2e..000000000 --- a/libs/lib/mac32/include/osg/BufferIndexBinding +++ /dev/null @@ -1,134 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * Copyright (C) 2010 Tim Moore - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BUFFERINDEXBINDING -#define OSG_BUFFERINDEXBINDING 1 - -#include -#include -#include - -#ifndef GL_TRANSFORM_FEEDBACK_BUFFER - #define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#endif - -namespace osg { - -class State; - -/** Encapsulate binding buffer objects to index targets. This - * specifically supports the uniform buffer and transform feedback - * targets. - */ - -// Common implementation superclass -class OSG_EXPORT BufferIndexBinding : public StateAttribute -{ - protected: - BufferIndexBinding(GLenum target, GLuint index); - BufferIndexBinding(GLenum target, GLuint index, BufferObject* bo, GLintptr offset, - GLsizeiptr size); - BufferIndexBinding(const BufferIndexBinding& rhs, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - public: - // The member value is part of the key to this state attribute in - // the State class. Using the index target, we can seperately - // track the bindings for many different index targets. - virtual unsigned getMember() const { return static_cast(_index); } - - GLenum getTarget() const { return _target; } - /** Get the index target. - */ - GLuint getIndex() const { return _index; } - /** Set the buffer object that will be bound to the index target. - */ - void setBufferObject(BufferObject *bo) { _bufferObject = bo; } - /** Get the buffer object to be bound. - */ - BufferObject* getBufferObject() const { return _bufferObject.get(); } - /** Set the starting offset into the buffer object for data for - the indexed target. Note: the required alignment on the offset - may be quite large (e.g., 256 bytes on NVidia 8600M). This - should be checked with glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT...). - */ - void setOffset(GLintptr offset) { _offset = offset; } - GLintptr getOffset() const { return _offset; } - /** Set the size of data for the indexed target. - */ - void setSize(GLsizeiptr size) { _size = size; } - GLsizeiptr getSize() const { return _size; } - virtual void apply(State& state) const; - protected: - virtual ~BufferIndexBinding(); - const GLenum _target; - const GLuint _index; - ref_ptr _bufferObject; - GLintptr _offset; - GLsizeiptr _size; -}; - -/** StateAttribute for binding a uniform buffer index target. - */ -class OSG_EXPORT UniformBufferBinding : public BufferIndexBinding -{ - public: - UniformBufferBinding(); - UniformBufferBinding(GLuint index); - /** Create a binding for a uniform buffer index target. - * @param index the index target - * @param bo associated buffer object - * @param offset offset into buffer object - * @param size size of data in buffer object - */ - UniformBufferBinding(GLuint index, BufferObject* bo, GLintptr offset, GLsizeiptr size); - UniformBufferBinding(const UniformBufferBinding& rhs, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - META_StateAttribute(osg, UniformBufferBinding, UNIFORMBUFFERBINDING); - - virtual int compare(const StateAttribute& bb) const - { - COMPARE_StateAttribute_Types(UniformBufferBinding, bb) - - COMPARE_StateAttribute_Parameter(_target) - COMPARE_StateAttribute_Parameter(_index) - COMPARE_StateAttribute_Parameter(_bufferObject) - COMPARE_StateAttribute_Parameter(_offset) - COMPARE_StateAttribute_Parameter(_size) - return 0; - } -}; - -/** StateAttribute for binding a transform feedback index target. - */ -class OSG_EXPORT TransformFeedbackBufferBinding : public BufferIndexBinding -{ - public: - TransformFeedbackBufferBinding(GLuint index = 0); - TransformFeedbackBufferBinding(GLuint index, BufferObject* bo, GLintptr offset, GLsizeiptr size); - TransformFeedbackBufferBinding(const TransformFeedbackBufferBinding& rhs, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - META_StateAttribute(osg, TransformFeedbackBufferBinding, TRANSFORMFEEDBACKBUFFERBINDING); - - virtual int compare(const StateAttribute& bb) const - { - COMPARE_StateAttribute_Types(TransformFeedbackBufferBinding, bb) - - COMPARE_StateAttribute_Parameter(_target) - COMPARE_StateAttribute_Parameter(_index) - COMPARE_StateAttribute_Parameter(_bufferObject) - COMPARE_StateAttribute_Parameter(_offset) - COMPARE_StateAttribute_Parameter(_size) - return 0; - } -}; -} - -#endif diff --git a/libs/lib/mac32/include/osg/BufferObject b/libs/lib/mac32/include/osg/BufferObject deleted file mode 100644 index 5c3e243a1..000000000 --- a/libs/lib/mac32/include/osg/BufferObject +++ /dev/null @@ -1,828 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BUFFEROBJECT -#define OSG_BUFFEROBJECT 1 - -#include -#include -#include -#include - -#include -#include -#include - -#ifndef GL_ARB_vertex_buffer_object - - #define GL_ARB_vertex_buffer_object - - // for compatibility with gl.h headers that don't support VBO, - #if defined(_WIN64) - typedef __int64 GLintptrARB; - typedef __int64 GLsizeiptrARB; - #elif defined(__ia64__) || defined(__x86_64__) - typedef long int GLintptrARB; - typedef long int GLsizeiptrARB; - #else - typedef int GLintptrARB; - typedef int GLsizeiptrARB; - #endif - - #define GL_ARRAY_BUFFER_ARB 0x8892 - #define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 - #define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 - #define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 - #define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 - #define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 - #define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 - #define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 - #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A - #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B - #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C - #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D - #define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E - #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F - #define GL_STREAM_DRAW_ARB 0x88E0 - #define GL_STREAM_READ_ARB 0x88E1 - #define GL_STREAM_COPY_ARB 0x88E2 - #define GL_STATIC_DRAW_ARB 0x88E4 - #define GL_STATIC_READ_ARB 0x88E5 - #define GL_STATIC_COPY_ARB 0x88E6 - #define GL_DYNAMIC_DRAW_ARB 0x88E8 - #define GL_DYNAMIC_READ_ARB 0x88E9 - #define GL_DYNAMIC_COPY_ARB 0x88EA - #define GL_READ_ONLY_ARB 0x88B8 - #define GL_WRITE_ONLY_ARB 0x88B9 - #define GL_READ_WRITE_ARB 0x88BA - #define GL_BUFFER_SIZE_ARB 0x8764 - #define GL_BUFFER_USAGE_ARB 0x8765 - #define GL_BUFFER_ACCESS_ARB 0x88BB - #define GL_BUFFER_MAPPED_ARB 0x88BC - #define GL_BUFFER_MAP_POINTER_ARB 0x88BD - -#endif - -#ifndef GL_VERSION_1_5 - #if defined(_WIN64) - typedef __int64 GLintptr; - typedef __int64 GLsizeiptr; - #elif defined(__ia64__) || defined(__x86_64__) || defined(ANDROID) - typedef long int GLintptr; - typedef long int GLsizeiptr; - #else - typedef int GLintptr; - typedef int GLsizeiptr; - #endif - - #define GL_STREAM_DRAW 0x88E0 - #define GL_STREAM_READ 0x88E1 - #define GL_STREAM_COPY 0x88E2 - #define GL_STATIC_DRAW 0x88E4 - #define GL_STATIC_READ 0x88E5 - #define GL_STATIC_COPY 0x88E6 - #define GL_DYNAMIC_DRAW 0x88E8 - #define GL_DYNAMIC_READ 0x88E9 - #define GL_DYNAMIC_COPY 0x88EA -#endif - -#ifndef GL_VERSION_2_1 - #define GL_PIXEL_PACK_BUFFER 0x88EB - #define GL_PIXEL_UNPACK_BUFFER 0x88EC - #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED - #define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#endif - - -#ifndef GL_ARB_pixel_buffer_object - #define GL_PIXEL_PACK_BUFFER_ARB 0x88EB - #define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC - #define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED - #define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF -#endif - -namespace osg -{ - -class State; -class BufferData; -class BufferObject; - -class BufferObjectProfile -{ - public: - BufferObjectProfile(): - _target(0), - _usage(0), - _size(0) {} - - BufferObjectProfile(GLenum target, GLenum usage, unsigned int size): - _target(target), - _usage(usage), - _size(size) {} - - BufferObjectProfile(const BufferObjectProfile& bpo): - _target(bpo._target), - _usage(bpo._usage), - _size(bpo._size) {} - - bool operator < (const BufferObjectProfile& rhs) const - { - if (_target < rhs._target) return true; - else if (_target > rhs._target) return false; - if (_usage < rhs._usage) return true; - else if (_usage > rhs._usage) return false; - return _size < rhs._size; - } - - bool operator == (const BufferObjectProfile& rhs) const - { - return (_target == rhs._target) && - (_usage == rhs._usage) && - (_size == rhs._size); - } - - void setProfile(GLenum target, GLenum usage, unsigned int size) - { - _target = target; - _usage = usage; - _size = size; - } - - BufferObjectProfile& operator = (const BufferObjectProfile& rhs) - { - _target = rhs._target; - _usage = rhs._usage; - _size = rhs._size; - return *this; - } - - GLenum _target; - GLenum _usage; - GLenum _size; -}; - -// forward declare -class GLBufferObjectSet; -class GLBufferObjectManager; - -class OSG_EXPORT GLBufferObject : public Referenced -{ - public: - - GLBufferObject(unsigned int contextID, BufferObject* bufferObject, unsigned int glObjectID=0); - - void setProfile(const BufferObjectProfile& profile) { _profile = profile; } - const BufferObjectProfile& getProfile() const { return _profile; } - - void setBufferObject(BufferObject* bufferObject); - BufferObject* getBufferObject() { return _bufferObject; } - - struct BufferEntry - { - BufferEntry(): modifiedCount(0),dataSize(0),offset(0),dataSource(0) {} - - BufferEntry(const BufferEntry& rhs): - modifiedCount(rhs.modifiedCount), - dataSize(rhs.dataSize), - offset(rhs.offset), - dataSource(rhs.dataSource) {} - - BufferEntry& operator = (const BufferEntry& rhs) - { - if (&rhs==this) return *this; - modifiedCount = rhs.modifiedCount; - dataSize = rhs.dataSize; - offset = rhs.offset; - dataSource = rhs.dataSource; - return *this; - } - - unsigned int modifiedCount; - unsigned int dataSize; - unsigned int offset; - BufferData* dataSource; - }; - - inline unsigned int getContextID() const { return _contextID; } - - inline GLuint& getGLObjectID() { return _glObjectID; } - inline GLuint getGLObjectID() const { return _glObjectID; } - inline GLsizeiptrARB getOffset(unsigned int i) const { return _bufferEntries[i].offset; } - - inline void bindBuffer(); - - inline void unbindBuffer() - { - _extensions->glBindBuffer(_profile._target,0); - } - - inline bool isDirty() const { return _dirty; } - - void dirty() { _dirty = true; } - - void clear(); - - void compileBuffer(); - - void deleteGLObject(); - - void assign(BufferObject* bufferObject); - - bool isPBOSupported() const { return _extensions->isPBOSupported(); } - - static GLBufferObject* createGLBufferObject(unsigned int contextID, const BufferObject* bufferObject); - - static void deleteAllBufferObjects(unsigned int contextID); - static void discardAllBufferObjects(unsigned int contextID); - static void flushAllDeletedBufferObjects(unsigned int contextID); - static void discardAllDeletedBufferObjects(unsigned int contextID); - static void flushDeletedBufferObjects(unsigned int contextID,double currentTime, double& availbleTime); - static void releaseGLBufferObject(unsigned int contextID, GLBufferObject* to); - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provide convenience wrappers to - * check for the extensions or use the associated functions.*/ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - bool isBufferObjectSupported() const { return _glGenBuffers!=0; } - bool isPBOSupported() const { return _isPBOSupported; } - bool isUniformBufferObjectSupported() const { return _isUniformBufferObjectSupported; } - - void glGenBuffers (GLsizei n, GLuint *buffers) const; - void glBindBuffer (GLenum target, GLuint buffer) const; - void glBufferData (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage) const; - void glBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data) const; - void glDeleteBuffers (GLsizei n, const GLuint *buffers) const; - GLboolean glIsBuffer (GLuint buffer) const; - void glGetBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data) const; - GLvoid* glMapBuffer (GLenum target, GLenum access) const; - GLboolean glUnmapBuffer (GLenum target) const; - void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params) const; - void glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params) const; - void glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); - void glBindBufferBase (GLenum target, GLuint index, GLuint buffer); - - protected: - - typedef void (GL_APIENTRY * GenBuffersProc) (GLsizei n, GLuint *buffers); - typedef void (GL_APIENTRY * BindBufferProc) (GLenum target, GLuint buffer); - typedef void (GL_APIENTRY * BufferDataProc) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); - typedef void (GL_APIENTRY * BufferSubDataProc) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); - typedef void (GL_APIENTRY * DeleteBuffersProc) (GLsizei n, const GLuint *buffers); - typedef GLboolean (GL_APIENTRY * IsBufferProc) (GLuint buffer); - typedef void (GL_APIENTRY * GetBufferSubDataProc) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); - typedef GLvoid* (GL_APIENTRY * MapBufferProc) (GLenum target, GLenum access); - typedef GLboolean (GL_APIENTRY * UnmapBufferProc) (GLenum target); - typedef void (GL_APIENTRY * GetBufferParameterivProc) (GLenum target, GLenum pname, GLint *params); - typedef void (GL_APIENTRY * GetBufferPointervProc) (GLenum target, GLenum pname, GLvoid* *params); - typedef void (GL_APIENTRY * BindBufferRangeProc) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); - typedef void (GL_APIENTRY * BindBufferBaseProc) (GLenum target, GLuint index, GLuint buffer); - - - GenBuffersProc _glGenBuffers; - BindBufferProc _glBindBuffer; - BufferDataProc _glBufferData; - BufferSubDataProc _glBufferSubData; - DeleteBuffersProc _glDeleteBuffers; - IsBufferProc _glIsBuffer; - GetBufferSubDataProc _glGetBufferSubData; - MapBufferProc _glMapBuffer; - UnmapBufferProc _glUnmapBuffer; - GetBufferParameterivProc _glGetBufferParameteriv; - GetBufferPointervProc _glGetBufferPointerv; - BindBufferRangeProc _glBindBufferRange; - BindBufferBaseProc _glBindBufferBase; - - bool _isPBOSupported; - bool _isUniformBufferObjectSupported; - }; - - /** Function to call to get the extension of a specified context. - * If the Extension object for that context has not yet been created - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object is - * only created with the graphics context associated with ContextID..*/ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions allows users to override the extensions across graphics contexts. - * typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions.*/ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - protected: - - virtual ~GLBufferObject(); - - unsigned int computeBufferAlignment(unsigned int pos, unsigned int bufferAlignment) const - { - if (bufferAlignment<2) return pos; - if ((pos%bufferAlignment)==0) return pos; - return ((pos/bufferAlignment)+1)*bufferAlignment; - } - - unsigned int _contextID; - GLuint _glObjectID; - - BufferObjectProfile _profile; - unsigned int _allocatedSize; - - bool _dirty; - - typedef std::vector BufferEntries; - BufferEntries _bufferEntries; - - BufferObject* _bufferObject; - - public: - - GLBufferObjectSet* _set; - GLBufferObject* _previous; - GLBufferObject* _next; - unsigned int _frameLastUsed; - - public: - Extensions* _extensions; - -}; - -typedef std::list< ref_ptr > GLBufferObjectList; - -class OSG_EXPORT GLBufferObjectSet : public Referenced -{ - public: - GLBufferObjectSet(GLBufferObjectManager* parent, const BufferObjectProfile& profile); - - const BufferObjectProfile& getProfile() const { return _profile; } - - void handlePendingOrphandedGLBufferObjects(); - - void deleteAllGLBufferObjects(); - void discardAllGLBufferObjects(); - void flushAllDeletedGLBufferObjects(); - void discardAllDeletedGLBufferObjects(); - void flushDeletedGLBufferObjects(double currentTime, double& availableTime); - - GLBufferObject* takeFromOrphans(BufferObject* bufferObject); - GLBufferObject* takeOrGenerate(BufferObject* bufferObject); - - void moveToBack(GLBufferObject* to); - void addToBack(GLBufferObject* to); - void orphan(GLBufferObject* to); - void remove(GLBufferObject* to); - void moveToSet(GLBufferObject* to, GLBufferObjectSet* set); - - unsigned int size() const { return _profile._size * _numOfGLBufferObjects; } - - bool makeSpace(unsigned int& size); - - bool checkConsistency() const; - - GLBufferObjectManager* getParent() { return _parent; } - - unsigned int computeNumGLBufferObjectsInList() const; - unsigned int getNumOfGLBufferObjects() const { return _numOfGLBufferObjects; } - unsigned int getNumOrphans() const { return _orphanedGLBufferObjects.size(); } - unsigned int getNumPendingOrphans() const { return _pendingOrphanedGLBufferObjects.size(); } - - - protected: - - virtual ~GLBufferObjectSet(); - - OpenThreads::Mutex _mutex; - - GLBufferObjectManager* _parent; - unsigned int _contextID; - BufferObjectProfile _profile; - unsigned int _numOfGLBufferObjects; - GLBufferObjectList _orphanedGLBufferObjects; - GLBufferObjectList _pendingOrphanedGLBufferObjects; - - GLBufferObject* _head; - GLBufferObject* _tail; -}; - -class OSG_EXPORT GLBufferObjectManager : public osg::Referenced -{ - public: - GLBufferObjectManager(unsigned int contextID); - - unsigned int getContextID() const { return _contextID; } - - - void setNumberActiveGLBufferObjects(unsigned int size) { _numActiveGLBufferObjects = size; } - unsigned int& getNumberActiveGLBufferObjects() { return _numActiveGLBufferObjects; } - unsigned int getNumberActiveGLBufferObjects() const { return _numActiveGLBufferObjects; } - - void setNumberOrphanedGLBufferObjects(unsigned int size) { _numOrphanedGLBufferObjects = size; } - unsigned int& getNumberOrphanedGLBufferObjects() { return _numOrphanedGLBufferObjects; } - unsigned int getNumberOrphanedGLBufferObjects() const { return _numOrphanedGLBufferObjects; } - - void setCurrGLBufferObjectPoolSize(unsigned int size) { _currGLBufferObjectPoolSize = size; } - unsigned int& getCurrGLBufferObjectPoolSize() { return _currGLBufferObjectPoolSize; } - unsigned int getCurrGLBufferObjectPoolSize() const { return _currGLBufferObjectPoolSize; } - - void setMaxGLBufferObjectPoolSize(unsigned int size); - unsigned int getMaxGLBufferObjectPoolSize() const { return _maxGLBufferObjectPoolSize; } - - bool hasSpace(unsigned int size) const { return (_currGLBufferObjectPoolSize+size)<=_maxGLBufferObjectPoolSize; } - bool makeSpace(unsigned int size); - - GLBufferObject* generateGLBufferObject(const osg::BufferObject* bufferObject); - - void handlePendingOrphandedGLBufferObjects(); - - void deleteAllGLBufferObjects(); - void discardAllGLBufferObjects(); - void flushAllDeletedGLBufferObjects(); - void discardAllDeletedGLBufferObjects(); - void flushDeletedGLBufferObjects(double currentTime, double& availableTime); - void releaseGLBufferObject(GLBufferObject* to); - - GLBufferObjectSet* getGLBufferObjectSet(const BufferObjectProfile& profile); - - void newFrame(osg::FrameStamp* fs); - void resetStats(); - void reportStats(std::ostream& out); - void recomputeStats(std::ostream& out); - - unsigned int& getFrameNumber() { return _frameNumber; } - unsigned int& getNumberFrames() { return _numFrames; } - - unsigned int& getNumberDeleted() { return _numDeleted; } - double& getDeleteTime() { return _deleteTime; } - - unsigned int& getNumberGenerated() { return _numGenerated; } - double& getGenerateTime() { return _generateTime; } - - unsigned int& getNumberApplied() { return _numApplied; } - double& getApplyTime() { return _applyTime; } - - static osg::ref_ptr& getGLBufferObjectManager(unsigned int contextID); - - protected: - - typedef std::map< BufferObjectProfile, osg::ref_ptr > GLBufferObjectSetMap; - unsigned int _contextID; - unsigned int _numActiveGLBufferObjects; - unsigned int _numOrphanedGLBufferObjects; - unsigned int _currGLBufferObjectPoolSize; - unsigned int _maxGLBufferObjectPoolSize; - GLBufferObjectSetMap _glBufferObjectSetMap; - - unsigned int _frameNumber; - - unsigned int _numFrames; - unsigned int _numDeleted; - double _deleteTime; - - unsigned int _numGenerated; - double _generateTime; - - unsigned int _numApplied; - double _applyTime; - -}; - - -class OSG_EXPORT BufferObject : public Object -{ - public: - - BufferObject(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - BufferObject(const BufferObject& bo,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "BufferObject"; } - - void setTarget(GLenum target) { _profile._target = target; } - GLenum getTarget() const { return _profile._target; } - - /** Set what type of usage the buffer object will have. Options are: - * GL_STREAM_DRAW, GL_STREAM_READ, GL_STREAM_COPY, - * GL_STATIC_DRAW, GL_STATIC_READ, GL_STATIC_COPY, - * GL_DYNAMIC_DRAW, GL_DYNAMIC_READ, or GL_DYNAMIC_COPY. - */ - void setUsage(GLenum usage) { _profile._usage = usage; } - - /** Get the type of usage the buffer object has been set up for.*/ - GLenum getUsage() const { return _profile._usage; } - - BufferObjectProfile& getProfile() { return _profile; } - const BufferObjectProfile& getProfile() const { return _profile; } - - - /** Set whether the BufferObject should use a GLBufferObject just for copying the BufferData and release it immmediately so that it may be reused.*/ - void setCopyDataAndReleaseGLBufferObject(bool copyAndRelease) { _copyDataAndReleaseGLBufferObject = copyAndRelease; } - - /** Get whether the BufferObject should use a GLBufferObject just for copying the BufferData and release it immmediately.*/ - bool getCopyDataAndReleaseGLBufferObject() const { return _copyDataAndReleaseGLBufferObject; } - - - void dirty(); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - void releaseGLObjects(State* state=0) const; - - unsigned int addBufferData(BufferData* bd); - void removeBufferData(unsigned int index); - void removeBufferData(BufferData* bd); - - void setBufferData(unsigned int index, BufferData* bd); - BufferData* getBufferData(unsigned int index) { return _bufferDataList[index]; } - const BufferData* getBufferData(unsigned int index) const { return _bufferDataList[index]; } - - unsigned int getNumBufferData() const { return _bufferDataList.size(); } - - void setGLBufferObject(unsigned int contextID, GLBufferObject* glbo) { _glBufferObjects[contextID] = glbo; } - - GLBufferObject* getGLBufferObject(unsigned int contextID) const { return _glBufferObjects[contextID].get(); } - - GLBufferObject* getOrCreateGLBufferObject(unsigned int contextID) const - { - if (!_glBufferObjects[contextID]) _glBufferObjects[contextID] = GLBufferObject::createGLBufferObject(contextID, this); - return _glBufferObjects[contextID].get(); - } - - unsigned int computeRequiredBufferSize() const; - - /** deprecated, provided for backwards compatibility.*/ - static void deleteBufferObject(unsigned int contextID,GLuint globj); - - protected: - - ~BufferObject(); - - typedef std::vector< BufferData* > BufferDataList; - typedef osg::buffered_object< osg::ref_ptr > GLBufferObjects; - - BufferObjectProfile _profile; - - bool _copyDataAndReleaseGLBufferObject; - - BufferDataList _bufferDataList; - - mutable GLBufferObjects _glBufferObjects; -}; - -class OSG_EXPORT BufferData : public Object -{ - public: - - BufferData(): - Object(true), - _modifiedCount(0), - _bufferIndex(0) {} - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - BufferData(const BufferData& bd,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - osg::Object(bd,copyop), - _modifiedCount(0), - _bufferIndex(0), - _modifiedCallback(bd._modifiedCallback) {} - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "BufferData"; } - - virtual const GLvoid* getDataPointer() const = 0; - virtual unsigned int getTotalDataSize() const = 0; - - void setBufferObject(BufferObject* bufferObject); - BufferObject* getBufferObject() { return _bufferObject.get(); } - const BufferObject* getBufferObject() const { return _bufferObject.get(); } - - void setBufferIndex(unsigned int index) { _bufferIndex = index; } - unsigned int getBufferIndex() const { return _bufferIndex; } - - GLBufferObject* getGLBufferObject(unsigned int contextID) const { return _bufferObject.valid() ? _bufferObject->getGLBufferObject(contextID) : 0; } - GLBufferObject* getOrCreateGLBufferObject(unsigned int contextID) const { return _bufferObject.valid() ? _bufferObject->getOrCreateGLBufferObject(contextID) : 0; } - - struct ModifiedCallback : public virtual osg::Object - { - ModifiedCallback() {} - - ModifiedCallback(const ModifiedCallback&,const CopyOp&) {} - - META_Object(osg,ModifiedCallback); - - virtual void modified(BufferData* /*bufferData*/) const {} - }; - - void setModifiedCallback(ModifiedCallback* md) { _modifiedCallback = md; } - ModifiedCallback* getModifiedCallback() { return _modifiedCallback.get(); } - const ModifiedCallback* getModifiedCallback() const { return _modifiedCallback.get(); } - - /** Dirty the primitive, which increments the modified count, to force buffer objects to update. - * If a ModifiedCallback is attached to this BufferData then the callback is called prior to the bufferObject's dirty is called. */ - inline void dirty() - { - ++_modifiedCount; - if (_modifiedCallback.valid()) _modifiedCallback->modified(this); - if (_bufferObject.valid()) _bufferObject->dirty(); - } - - /** Set the modified count value.*/ - inline void setModifiedCount(unsigned int value) { _modifiedCount=value; } - - /** Get modified count value.*/ - inline unsigned int getModifiedCount() const { return _modifiedCount; } - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - void releaseGLObjects(State* state=0) const; - -protected: - - virtual ~BufferData(); - - unsigned int _modifiedCount; - - unsigned int _bufferIndex; - osg::ref_ptr _bufferObject; - osg::ref_ptr _modifiedCallback; -}; - - -class Array; -class OSG_EXPORT VertexBufferObject : public BufferObject -{ - public: - - VertexBufferObject(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - VertexBufferObject(const VertexBufferObject& vbo,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg,VertexBufferObject); - - unsigned int addArray(osg::Array* array); - void removeArray(osg::Array* array); - - void setArray(unsigned int i, Array* array); - Array* getArray(unsigned int i); - const Array* getArray(unsigned int i) const; - - protected: - virtual ~VertexBufferObject(); -}; - -class DrawElements; -class OSG_EXPORT ElementBufferObject : public BufferObject -{ - public: - - ElementBufferObject(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ElementBufferObject(const ElementBufferObject& pbo,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg,ElementBufferObject); - - unsigned int addDrawElements(osg::DrawElements* PrimitiveSet); - void removeDrawElements(osg::DrawElements* PrimitiveSet); - - void setDrawElements(unsigned int i, DrawElements* PrimitiveSet); - DrawElements* getDrawElements(unsigned int i); - const DrawElements* getDrawElements(unsigned int i) const; - - protected: - - virtual ~ElementBufferObject(); -}; - -class Image; -class OSG_EXPORT PixelBufferObject : public BufferObject -{ - public: - - PixelBufferObject(osg::Image* image=0); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - PixelBufferObject(const PixelBufferObject& pbo,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg,PixelBufferObject); - - void setImage(osg::Image* image); - - Image* getImage(); - const Image* getImage() const; - - bool isPBOSupported(unsigned int contextID) const { return _glBufferObjects[contextID]->isPBOSupported(); } - - protected: - - virtual ~PixelBufferObject(); -}; - -/** - * This object represent a general class of pixel buffer objects, - * which are capable of allocating buffer object (memory) - * on the GPU. The memory can then be used either for CPU-GPU - * pixel transfer or directly for GPU-GPU transfer, without CPU intervention. - **/ -class OSG_EXPORT PixelDataBufferObject : public BufferObject -{ - public: - PixelDataBufferObject(); - PixelDataBufferObject(const PixelDataBufferObject& pbo, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg, PixelDataBufferObject); - - //! Set new size of the buffer object. This will reallocate the memory on the next compile - inline void setDataSize(unsigned int size) { _profile._size = size; dirty(); } - - //! Get data size of the used buffer - inline unsigned int getDataSize() const { return _profile._size; } - - //! Compile the buffer (reallocate the memory if buffer is dirty) - virtual void compileBuffer(State& state) const; - - //! Bind the buffer in read mode, which means that data can be downloaded from the buffer (note: GL_PIXEL_UNPACK_BUFFER_ARB) - virtual void bindBufferInReadMode(State& state); - - //! Bind the buffer in write mode, which means following OpenGL instructions will write data into the buffer (note: GL_PIXEL_PACK_BUFFER_ARB) - virtual void bindBufferInWriteMode(State& state); - - //! Unbind the buffer - virtual void unbindBuffer(unsigned int contextID) const; - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - enum Mode - { - //! A normal mode of this data buffer - NONE = 0, - - //! Buffer is in read mode (@see bindBufferInReadMode) - READ = 1, - - //! Buffer is in write mode (@see bindBufferInWriteMode) - WRITE = 2 - }; - - Mode getMode(unsigned int contextID) const { return (Mode)_mode[contextID]; } - - protected: - - virtual ~PixelDataBufferObject(); - - typedef osg::buffered_value ModeList; - - mutable ModeList _mode; - -}; - -class OSG_EXPORT UniformBufferObject : public BufferObject -{ - public: - UniformBufferObject(); - UniformBufferObject(const UniformBufferObject& ubo, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - META_Object(osg, UniformBufferObject); - protected: - virtual ~UniformBufferObject(); -}; - -inline void GLBufferObject::bindBuffer() -{ - _extensions->glBindBuffer(_profile._target,_glObjectID); - if (_set) _set->moveToBack(this); -} - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Camera b/libs/lib/mac32/include/osg/Camera deleted file mode 100644 index 631a1783f..000000000 --- a/libs/lib/mac32/include/osg/Camera +++ /dev/null @@ -1,674 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CAMERA -#define OSG_CAMERA 1 - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace osg { - -// forward declare View to allow Camera to point back to the View that its within -class View; -class RenderInfo; - -/** Camera - is a subclass of Transform which represents encapsulates the settings of a Camera. -*/ -class OSG_EXPORT Camera : public Transform, public CullSettings -{ - public : - - - Camera(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Camera(const Camera&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, Camera); - - /** Set the View that this Camera is part of. */ - void setView(View* view) { _view = view; } - - /** Get the View that this Camera is part of. */ - View* getView() { return _view; } - - /** Get the const View that this Camera is part of. */ - const View* getView() const { return _view; } - - - /** Set the Stats object used for collect various frame related - * timing and scene graph stats. */ - void setStats(osg::Stats* stats) { _stats = stats; } - - /** Get the Stats object.*/ - osg::Stats* getStats() { return _stats.get(); } - - /** Get the const Stats object.*/ - const osg::Stats* getStats() const { return _stats.get(); } - - - /** Set whether this camera allows events to be generated by the - * associated graphics window to be associated with this camera. */ - void setAllowEventFocus(bool focus) { _allowEventFocus = focus; } - - /** Get whether this camera allows events to be generated by the - * associated graphics window to be associated with this camera. */ - bool getAllowEventFocus() const { return _allowEventFocus; } - - - /** Set the DisplaySettings object associated with this view.*/ - void setDisplaySettings(osg::DisplaySettings* ds) { _displaySettings = ds; } - - /** Get the DisplaySettings object associated with this view.*/ - osg::DisplaySettings* getDisplaySettings() { return _displaySettings.get(); } - - /** Get the const DisplaySettings object associated with this view.*/ - const osg::DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); } - - - /** Set the clear mask used in glClear(). - * Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT. */ - inline void setClearMask(GLbitfield mask) { _clearMask = mask; applyMaskAction(CLEAR_MASK); } - - /** Get the clear mask.*/ - inline GLbitfield getClearMask() const { return _clearMask; } - - /** Set the clear color used in glClearColor(). - * glClearColor is only called if mask & GL_COLOR_BUFFER_BIT is true*/ - void setClearColor(const osg::Vec4& color) { _clearColor=color; applyMaskAction(CLEAR_COLOR); } - - /** Get the clear color.*/ - const osg::Vec4& getClearColor() const { return _clearColor; } - - /** Set the clear accum used in glClearAccum(). - * glClearAcumm is only called if mask & GL_ACCUM_BUFFER_BIT is true. */ - void setClearAccum(const osg::Vec4& color) { _clearAccum=color; } - - /** Get the clear accum value.*/ - const osg::Vec4& getClearAccum() const { return _clearAccum; } - - /** Set the clear depth used in glClearDepth(). Defaults to 1.0 - * glClearDepth is only called if mask & GL_DEPTH_BUFFER_BIT is true. */ - void setClearDepth(double depth) { _clearDepth=depth; } - - /** Get the clear depth value.*/ - double getClearDepth() const { return _clearDepth; } - - /** Set the clear stencil value used in glClearStencil(). Defaults to 0; - * glClearStencil is only called if mask & GL_STENCIL_BUFFER_BIT is true*/ - void setClearStencil(int stencil) { _clearStencil=stencil; } - - /** Get the clear stencil value.*/ - int getClearStencil() const { return _clearStencil; } - - - /** Set the color mask of the camera to use specified osg::ColorMask. */ - void setColorMask(osg::ColorMask* colorMask); - - - /** Set the color mask of the camera to specified values. */ - void setColorMask(bool red, bool green, bool blue, bool alpha); - - /** Get the const ColorMask. */ - const ColorMask* getColorMask() const { return _colorMask.get(); } - - /** Get the ColorMask. */ - ColorMask* getColorMask() { return _colorMask.get(); } - - - /** Set the viewport of the camera to use specified osg::Viewport. */ - void setViewport(osg::Viewport* viewport); - - /** Set the viewport of the camera to specified dimensions. */ - void setViewport(int x,int y,int width,int height); - - /** Get the const viewport. */ - const Viewport* getViewport() const { return _viewport.get(); } - - /** Get the viewport. */ - Viewport* getViewport() { return _viewport.get(); } - - - enum TransformOrder - { - PRE_MULTIPLY, - POST_MULTIPLY - }; - - /** Set the transformation order for world-to-local and local-to-world transformation.*/ - void setTransformOrder(TransformOrder order) { _transformOrder = order; } - - /** Get the transformation order.*/ - TransformOrder getTransformOrder() const { return _transformOrder; } - - enum ProjectionResizePolicy - { - FIXED, /**< Keep the projection matrix fixed, despite window resizes.*/ - HORIZONTAL, /**< Adjust the HORIZONTAL field of view on window resizes.*/ - VERTICAL /**< Adjust the VERTICAL field of view on window resizes.*/ - - }; - - /** Set the policy used to determine if and how the projection matrix should be adjusted on window resizes. */ - inline void setProjectionResizePolicy(ProjectionResizePolicy policy) { _projectionResizePolicy = policy; } - - /** Get the policy used to determine if and how the projection matrix should be adjusted on window resizes. */ - inline ProjectionResizePolicy getProjectionResizePolicy() const { return _projectionResizePolicy; } - - - /** Set the projection matrix. Can be thought of as setting the lens of a camera. */ - inline void setProjectionMatrix(const osg::Matrixf& matrix) { _projectionMatrix.set(matrix); } - - /** Set the projection matrix. Can be thought of as setting the lens of a camera. */ - inline void setProjectionMatrix(const osg::Matrixd& matrix) { _projectionMatrix.set(matrix); } - - /** Set to an orthographic projection. See OpenGL glOrtho for documentation further details.*/ - void setProjectionMatrixAsOrtho(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Set to a 2D orthographic projection. See OpenGL glOrtho2D documentation for further details.*/ - void setProjectionMatrixAsOrtho2D(double left, double right, - double bottom, double top); - - /** Set to a perspective projection. See OpenGL glFrustum documentation for further details.*/ - void setProjectionMatrixAsFrustum(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Create a symmetrical perspective projection, See OpenGL gluPerspective documentation for further details. - * Aspect ratio is defined as width/height.*/ - void setProjectionMatrixAsPerspective(double fovy,double aspectRatio, - double zNear, double zFar); - - /** Get the projection matrix.*/ - osg::Matrixd& getProjectionMatrix() { return _projectionMatrix; } - - /** Get the const projection matrix.*/ - const osg::Matrixd& getProjectionMatrix() const { return _projectionMatrix; } - - /** Get the orthographic settings of the orthographic projection matrix. - * Returns false if matrix is not an orthographic matrix, where parameter values are undefined.*/ - bool getProjectionMatrixAsOrtho(double& left, double& right, - double& bottom, double& top, - double& zNear, double& zFar) const; - - /** Get the frustum setting of a perspective projection matrix. - * Returns false if matrix is not a perspective matrix, where parameter values are undefined.*/ - bool getProjectionMatrixAsFrustum(double& left, double& right, - double& bottom, double& top, - double& zNear, double& zFar) const; - - /** Get the frustum setting of a symmetric perspective projection matrix. - * Returns false if matrix is not a perspective matrix, where parameter values are undefined. - * Note, if matrix is not a symmetric perspective matrix then the shear will be lost. - * Asymmetric matrices occur when stereo, power walls, caves and reality center display are used. - * In these configurations one should use the 'getProjectionMatrixAsFrustum' method instead.*/ - bool getProjectionMatrixAsPerspective(double& fovy,double& aspectRatio, - double& zNear, double& zFar) const; - - - - /** Set the view matrix. Can be thought of as setting the position of the world relative to the camera in camera coordinates. */ - inline void setViewMatrix(const osg::Matrixf& matrix) { _viewMatrix.set(matrix); dirtyBound();} - - /** Set the view matrix. Can be thought of as setting the position of the world relative to the camera in camera coordinates. */ - inline void setViewMatrix(const osg::Matrixd& matrix) { _viewMatrix.set(matrix); dirtyBound();} - - /** Get the view matrix. */ - osg::Matrixd& getViewMatrix() { return _viewMatrix; } - - /** Get the const view matrix. */ - const osg::Matrixd& getViewMatrix() const { return _viewMatrix; } - - /** Set to the position and orientation of view matrix, using the same convention as gluLookAt. */ - void setViewMatrixAsLookAt(const osg::Vec3d& eye,const osg::Vec3d& center,const osg::Vec3d& up); - - /** Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt. */ - void getViewMatrixAsLookAt(osg::Vec3d& eye,osg::Vec3d& center,osg::Vec3d& up,double lookDistance=1.0) const; - - /** Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt. */ - void getViewMatrixAsLookAt(osg::Vec3f& eye,osg::Vec3f& center,osg::Vec3f& up,float lookDistance=1.0f) const; - - /** Get the inverse view matrix.*/ - Matrixd getInverseViewMatrix() const; - - - enum RenderOrder - { - PRE_RENDER, - NESTED_RENDER, - POST_RENDER - }; - - /** Set the rendering order of this camera's subgraph relative to any camera that this subgraph is nested within. - * For rendering to a texture, one typically uses PRE_RENDER. - * For Head Up Displays, one would typically use POST_RENDER.*/ - void setRenderOrder(RenderOrder order, int orderNum = 0) { _renderOrder = order; _renderOrderNum = orderNum; } - - /** Get the rendering order of this camera's subgraph relative to any camera that this subgraph is nested within.*/ - RenderOrder getRenderOrder() const { return _renderOrder; } - - /** Get the rendering order number of this camera relative to any sibling cameras in this subgraph.*/ - int getRenderOrderNum() const { return _renderOrderNum; } - - /** Return true if this Camera is set up as a render to texture camera, i.e. it has textures assigned to it.*/ - bool isRenderToTextureCamera() const; - - enum RenderTargetImplementation - { - FRAME_BUFFER_OBJECT, - PIXEL_BUFFER_RTT, - PIXEL_BUFFER, - FRAME_BUFFER, - SEPERATE_WINDOW - }; - - /** Set the render target.*/ - void setRenderTargetImplementation(RenderTargetImplementation impl); - - /** Set the render target and fall-back that's used if the former isn't available.*/ - void setRenderTargetImplementation(RenderTargetImplementation impl, RenderTargetImplementation fallback); - - /** Get the render target.*/ - RenderTargetImplementation getRenderTargetImplementation() const { return _renderTargetImplementation; } - - /** Get the render target fallback.*/ - RenderTargetImplementation getRenderTargetFallback() const { return _renderTargetFallback; } - - - /** Set the draw buffer used at the start of each frame draw. - * Note, a buffer value of GL_NONE is used to sepecify that the rendering back-end should choose the most appropriate buffer.*/ - void setDrawBuffer(GLenum buffer) { _drawBuffer = buffer; applyMaskAction( DRAW_BUFFER ); } - - /** Get the draw buffer used at the start of each frame draw. */ - GLenum getDrawBuffer() const { return _drawBuffer; } - - /** Set the read buffer for any required copy operations to use. - * Note, a buffer value of GL_NONE is used to sepecify that the rendering back-end should choose the most appropriate buffer.*/ - void setReadBuffer(GLenum buffer) { _readBuffer = buffer; applyMaskAction( READ_BUFFER ); } - - /** Get the read buffer for any required copy operations to use. */ - GLenum getReadBuffer() const { return _readBuffer; } - - enum BufferComponent - { - DEPTH_BUFFER, - STENCIL_BUFFER, - PACKED_DEPTH_STENCIL_BUFFER, - COLOR_BUFFER, - COLOR_BUFFER0, - COLOR_BUFFER1 = COLOR_BUFFER0+1, - COLOR_BUFFER2 = COLOR_BUFFER0+2, - COLOR_BUFFER3 = COLOR_BUFFER0+3, - COLOR_BUFFER4 = COLOR_BUFFER0+4, - COLOR_BUFFER5 = COLOR_BUFFER0+5, - COLOR_BUFFER6 = COLOR_BUFFER0+6, - COLOR_BUFFER7 = COLOR_BUFFER0+7, - COLOR_BUFFER8 = COLOR_BUFFER0+8, - COLOR_BUFFER9 = COLOR_BUFFER0+9, - COLOR_BUFFER10 = COLOR_BUFFER0+10, - COLOR_BUFFER11 = COLOR_BUFFER0+11, - COLOR_BUFFER12 = COLOR_BUFFER0+12, - COLOR_BUFFER13 = COLOR_BUFFER0+13, - COLOR_BUFFER14 = COLOR_BUFFER0+14, - COLOR_BUFFER15 = COLOR_BUFFER0+15 - }; - - static const unsigned int FACE_CONTROLLED_BY_GEOMETRY_SHADER; - - /** Attach a buffer with specified OpenGL internal format.*/ - void attach(BufferComponent buffer, GLenum internalFormat); - - /** Attach a Texture to specified buffer component. - * The level parameter controls the mip map level of the texture that is attached. - * The face parameter controls the face of texture cube map or z level of 3d texture. - * The mipMapGeneration flag controls whether mipmap generation should be done for texture.*/ - void attach(BufferComponent buffer, osg::Texture* texture, unsigned int level = 0, unsigned int face=0, bool mipMapGeneration=false, - unsigned int multisampleSamples = 0, - unsigned int multisampleColorSamples = 0); - - /** Attach a Image to specified buffer component.*/ - void attach(BufferComponent buffer, osg::Image* image, - unsigned int multisampleSamples = 0, - unsigned int multisampleColorSamples = 0); - - /** Detach specified buffer component.*/ - void detach(BufferComponent buffer); - - struct Attachment - { - Attachment(): - _internalFormat(GL_NONE), - _level(0), - _face(0), - _mipMapGeneration(false), - _multisampleSamples(0), - _multisampleColorSamples(0) {} - - int width() const - { - if (_texture.valid()) return _texture->getTextureWidth(); - if (_image.valid()) return _image->s(); - return 0; - }; - - int height() const - { - if (_texture.valid()) return _texture->getTextureHeight(); - if (_image.valid()) return _image->t(); - return 0; - }; - - int depth() const - { - if (_texture.valid()) return _texture->getTextureDepth(); - if (_image.valid()) return _image->r(); - return 0; - }; - - GLenum _internalFormat; - ref_ptr _image; - ref_ptr _texture; - unsigned int _level; - unsigned int _face; - bool _mipMapGeneration; - unsigned int _multisampleSamples; - unsigned int _multisampleColorSamples; - }; - - typedef std::map< BufferComponent, Attachment> BufferAttachmentMap; - - /** Get the BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads.*/ - BufferAttachmentMap& getBufferAttachmentMap() { return _bufferAttachmentMap; } - - /** Get the const BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads.*/ - const BufferAttachmentMap& getBufferAttachmentMap() const { return _bufferAttachmentMap; } - - - /** Explicit control over implicit allocation of buffers when using FBO. - Implicit buffers are automatically substituted when user have not attached such buffer. - - Camera may set up two FBOs: primary Render FBO and secondary Resolve FBO for multisample usage. - So in practive we have two masks defined for the Camera: - implicitBufferAttachmentRenderMask - implicitBufferAttachmentResolveMask - They can be set together by setImplicitBufferAttachmentMask method, or separately - by setImplicitBufferAttachmentRenderMask and setImplicitBufferAttachmentResolveMask. - - Camera defaults are USE_DISPLAY_SETTINGS_MASK which means that by default - Camera chooses to substitue buffer attachments as defined by DisplaySettings. - - Usually DisplaySettings implicit buffer attachment selection defaults to: DEPTH and COLOR - for both primary (Render) FBO and seconday Multisample (Resolve) FBO - ie: IMPLICT_DEPTH_BUFFER_ATTACHMENT | IMPLICIT_COLOR_BUFFER_ATTACHMENT - - If these masks are not changed and user did not attach depth buffer and/or color buffer - to Camera, then OSG implicitly substitues these buffers. - By default it does not implicitly allocate a stencil buffer. - Use implicti buffer attachment masks to override default behavior: - to turn off DEPTH or COLOR buffer substitution or to enforce STENCIL buffer substitution. - - Note that both values are ignored if not using FBO. - Note that the second mask value is ignored if not using MSFBO. - */ - enum ImplicitBufferAttachment - { - IMPLICIT_DEPTH_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_DEPTH_BUFFER_ATTACHMENT, - IMPLICIT_STENCIL_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_STENCIL_BUFFER_ATTACHMENT, - IMPLICIT_COLOR_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_COLOR_BUFFER_ATTACHMENT, - USE_DISPLAY_SETTINGS_MASK = (~0) - }; - - typedef int ImplicitBufferAttachmentMask; - - void setImplicitBufferAttachmentMask(ImplicitBufferAttachmentMask renderMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT, ImplicitBufferAttachmentMask resolveMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT) - { - _implicitBufferAttachmentRenderMask = renderMask; - _implicitBufferAttachmentResolveMask = resolveMask; - } - - void setImplicitBufferAttachmentRenderMask(ImplicitBufferAttachmentMask implicitBufferAttachmentRenderMask) - { - _implicitBufferAttachmentRenderMask = implicitBufferAttachmentRenderMask; - } - - void setImplicitBufferAttachmentResolveMask(ImplicitBufferAttachmentMask implicitBufferAttachmentResolveMask) - { - _implicitBufferAttachmentResolveMask = implicitBufferAttachmentResolveMask; - } - - /** - Get mask selecting implict buffer attachments for Camera primary FBO - if effectiveMask parameter is set, method follows USE_DISPLAY_SETTINGS_MASK dependence and returns effective mask - if effectiveMask parameter is reset, method returns nominal mask set by the Camera - */ - ImplicitBufferAttachmentMask getImplicitBufferAttachmentRenderMask(bool effectiveMask = false) const - { - if( effectiveMask && _implicitBufferAttachmentRenderMask == USE_DISPLAY_SETTINGS_MASK ) - { - const DisplaySettings * ds = _displaySettings.valid() ? _displaySettings.get() : DisplaySettings::instance().get(); - return ds->getImplicitBufferAttachmentRenderMask(); - } - else - { - return _implicitBufferAttachmentRenderMask; - } - } - - /** - Get mask selecting implict buffer attachments for Camera secondary MULTISAMPLE FBO - if effectiveMask parameter is set, method follows USE_DISPLAY_SETTINGS_MASK dependence and returns effective mask - if effectiveMask parameter is reset, method returns nominal mask set by the Camera - */ - ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask(bool effectiveMask = false) const - { - if( effectiveMask && _implicitBufferAttachmentResolveMask == USE_DISPLAY_SETTINGS_MASK ) - { - const DisplaySettings * ds = _displaySettings.valid() ? _displaySettings.get() : DisplaySettings::instance().get(); - return ds->getImplicitBufferAttachmentResolveMask(); - } - else - { - return _implicitBufferAttachmentResolveMask; - } - } - - /** Create a operation thread for this camera.*/ - void createCameraThread(); - - /** Assign a operation thread to the camera.*/ - void setCameraThread(OperationThread* gt); - - /** Get the operation thread assigned to this camera.*/ - OperationThread* getCameraThread() { return _cameraThread.get(); } - - /** Get the const operation thread assigned to this camera.*/ - const OperationThread* getCameraThread() const { return _cameraThread.get(); } - - - - /** Set the GraphicsContext that provides the mechansim for managing the OpenGL graphics context associated with this camera.*/ - void setGraphicsContext(GraphicsContext* context); - - /** Get the GraphicsContext.*/ - GraphicsContext* getGraphicsContext() { return _graphicsContext.get(); } - - /** Get the const GraphicsContext.*/ - const GraphicsContext* getGraphicsContext() const { return _graphicsContext.get(); } - - - /** Set the Rendering object that is used to implement rendering of the subgraph.*/ - void setRenderer(osg::GraphicsOperation* rc) { _renderer = rc; } - - /** Get the Rendering object that is used to implement rendering of the subgraph.*/ - osg::GraphicsOperation* getRenderer() { return _renderer.get(); } - - /** Get the const Rendering object that is used to implement rendering of the subgraph.*/ - const osg::GraphicsOperation* getRenderer() const { return _renderer.get(); } - - - /** Set the Rendering cache that is used for cached objects associated with rendering of subgraphs.*/ - void setRenderingCache(osg::Object* rc) { _renderingCache = rc; } - - /** Get the Rendering cache that is used for cached objects associated with rendering of subgraphs.*/ - osg::Object* getRenderingCache() { return _renderingCache.get(); } - - /** Get the const Rendering cache that is used for cached objects associated with rendering of subgraphs.*/ - const osg::Object* getRenderingCache() const { return _renderingCache.get(); } - - - /** Draw callback for custom operations.*/ - struct OSG_EXPORT DrawCallback : virtual public Object - { - DrawCallback() {} - - DrawCallback(const DrawCallback&,const CopyOp&) {} - - META_Object(osg, DrawCallback); - - /** Functor method called by rendering thread. Users will typically override this method to carry tasks such as screen capture.*/ - virtual void operator () (osg::RenderInfo& renderInfo) const; - - /** Functor method, provided for backwards compatibility, called by operator() (osg::RenderInfo& renderInfo) method.*/ - virtual void operator () (const osg::Camera& /*camera*/) const {} - }; - - /** Set the initial draw callback for custom operations to be done before the drawing of the camera's subgraph and pre render stages.*/ - void setInitialDrawCallback(DrawCallback* cb) { _initialDrawCallback = cb; } - - /** Get the initial draw callback.*/ - DrawCallback* getInitialDrawCallback() { return _initialDrawCallback.get(); } - - /** Get the const initial draw callback.*/ - const DrawCallback* getInitialDrawCallback() const { return _initialDrawCallback.get(); } - - - /** Set the pre draw callback for custom operations to be done before the drawing of the camera's subgraph but after any pre render stages have been completed.*/ - void setPreDrawCallback(DrawCallback* cb) { _preDrawCallback = cb; } - - /** Get the pre draw callback.*/ - DrawCallback* getPreDrawCallback() { return _preDrawCallback.get(); } - - /** Get the const pre draw callback.*/ - const DrawCallback* getPreDrawCallback() const { return _preDrawCallback.get(); } - - - /** Set the post draw callback for custom operations to be done after the drawing of the camera's subgraph but before the any post render stages have been completed.*/ - void setPostDrawCallback(DrawCallback* cb) { _postDrawCallback = cb; } - - /** Get the post draw callback.*/ - DrawCallback* getPostDrawCallback() { return _postDrawCallback.get(); } - - /** Get the const post draw callback.*/ - const DrawCallback* getPostDrawCallback() const { return _postDrawCallback.get(); } - - - /** Set the final draw callback for custom operations to be done after the drawing of the camera's subgraph and all of the post render stages has been completed.*/ - void setFinalDrawCallback(DrawCallback* cb) { _finalDrawCallback = cb; } - - /** Get the final draw callback.*/ - DrawCallback* getFinalDrawCallback() { return _finalDrawCallback.get(); } - - /** Get the const final draw callback.*/ - const DrawCallback* getFinalDrawCallback() const { return _finalDrawCallback.get(); } - - - OpenThreads::Mutex* getDataChangeMutex() const { return &_dataChangeMutex; } - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objexts - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - public: - - /** Transform method that must be defined to provide generic interface for scene graph traversals.*/ - virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const; - - /** Transform method that must be defined to provide generic interface for scene graph traversals.*/ - virtual bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const; - - /** Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.*/ - virtual void inheritCullSettings(const CullSettings& settings, unsigned int inheritanceMask); - - protected : - - virtual ~Camera(); - - mutable OpenThreads::Mutex _dataChangeMutex; - - - View* _view; - - osg::ref_ptr _stats; - - bool _allowEventFocus; - - osg::ref_ptr _displaySettings; - - GLbitfield _clearMask; - osg::Vec4 _clearColor; - osg::Vec4 _clearAccum; - double _clearDepth; - int _clearStencil; - - ref_ptr _colorMask; - ref_ptr _viewport; - - TransformOrder _transformOrder; - ProjectionResizePolicy _projectionResizePolicy; - - Matrixd _projectionMatrix; - Matrixd _viewMatrix; - - RenderOrder _renderOrder; - int _renderOrderNum; - - GLenum _drawBuffer; - GLenum _readBuffer; - - RenderTargetImplementation _renderTargetImplementation; - RenderTargetImplementation _renderTargetFallback; - BufferAttachmentMap _bufferAttachmentMap; - ImplicitBufferAttachmentMask _implicitBufferAttachmentRenderMask; - ImplicitBufferAttachmentMask _implicitBufferAttachmentResolveMask; - - ref_ptr _cameraThread; - - ref_ptr _graphicsContext; - - ref_ptr _renderer; - ref_ptr _renderingCache; - - ref_ptr _initialDrawCallback; - ref_ptr _preDrawCallback; - ref_ptr _postDrawCallback; - ref_ptr _finalDrawCallback; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/CameraNode b/libs/lib/mac32/include/osg/CameraNode deleted file mode 100644 index 676b84b80..000000000 --- a/libs/lib/mac32/include/osg/CameraNode +++ /dev/null @@ -1,27 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CAMERANODE -#define OSG_CAMERANODE 1 - -#include - -namespace osg { - -#ifdef USE_DEPRECATED_API - typedef osg::Camera CameraNode; -#endif - -} - -#endif diff --git a/libs/lib/mac32/include/osg/CameraView b/libs/lib/mac32/include/osg/CameraView deleted file mode 100644 index 048394710..000000000 --- a/libs/lib/mac32/include/osg/CameraView +++ /dev/null @@ -1,105 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CAMERAVIEW -#define OSG_CAMERAVIEW 1 - -#include -#include -#include -#include -#include - -namespace osg { - -/** CameraView - is a Transform that is used to specify camera views from within the scene graph. - * The application must attach a camera to a CameraView via the NodePath from the top of the scene graph - * to the CameraView node itself, and accumulate the view matrix from this NodePath. -*/ -class OSG_EXPORT CameraView : public Transform -{ - public : - CameraView(); - - CameraView(const CameraView& pat,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Transform(pat,copyop), - _position(pat._position), - _attitude(pat._attitude), - _fieldOfView(pat._fieldOfView), - _fieldOfViewMode(pat._fieldOfViewMode), - _focalLength(pat._focalLength) {} - - - META_Node(osg, CameraView); - - /** Set the position of the camera view.*/ - inline void setPosition(const Vec3d& pos) { _position = pos; dirtyBound(); } - - /** Get the position of the camera view.*/ - inline const Vec3d& getPosition() const { return _position; } - - /** Set the attitude of the camera view.*/ - inline void setAttitude(const Quat& quat) { _attitude = quat; dirtyBound(); } - - /** Get the attitude of the camera view.*/ - inline const Quat& getAttitude() const { return _attitude; } - - /** Set the field of view. - * The camera's field of view can be constrained to either the horizontal or vertical axis of the camera, or unconstrained - * in which case the camera/application are left to choose an appropriate field of view. - * The default value if 60 degrees. */ - inline void setFieldOfView(double fieldOfView) { _fieldOfView = fieldOfView; } - - /** Get the field of view.*/ - inline double getFieldOfView() const { return _fieldOfView; } - - enum FieldOfViewMode - { - UNCONSTRAINED, - HORIZONTAL, - VERTICAL - }; - - /** Set the field of view mode - controlling how the field of view of the camera is constrained by the CameraView settings.*/ - inline void setFieldOfViewMode(FieldOfViewMode mode) { _fieldOfViewMode = mode; } - - /** Get the field of view mode.*/ - inline FieldOfViewMode getFieldOfViewMode() const { return _fieldOfViewMode; } - - /** Set the focal length of the camera. - * A focal length of 0.0 indicates that the camera/application should determine the focal length. - * The default value is 0.0. */ - inline void setFocalLength(double focalLength) { _focalLength = focalLength; } - - /** Get the focal length of the camera.*/ - inline double getFocalLength() const { return _focalLength; } - - - virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor* nv) const; - virtual bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor* nv) const; - - - protected : - - virtual ~CameraView() {} - - Vec3d _position; - Quat _attitude; - double _fieldOfView; - FieldOfViewMode _fieldOfViewMode; - double _focalLength; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ClampColor b/libs/lib/mac32/include/osg/ClampColor deleted file mode 100644 index b817f4fbc..000000000 --- a/libs/lib/mac32/include/osg/ClampColor +++ /dev/null @@ -1,139 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CLAMPCOLOR -#define OSG_CLAMPCOLOR 1 - -#include - -#ifndef GL_ARB_color_buffer_float -#define GL_RGBA_FLOAT_MODE_ARB 0x8820 -#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A -#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B -#define GL_CLAMP_READ_COLOR_ARB 0x891C -#define GL_FIXED_ONLY_ARB 0x891D -#endif - -#ifndef GL_FIXED_ONLY -#define GL_FIXED_ONLY GL_FIXED_ONLY_ARB -#define GL_CLAMP_VERTEX_COLOR GL_CLAMP_VERTEX_COLOR_ARB -#define GL_CLAMP_READ_COLOR GL_CLAMP_READ_COLOR_ARB -#define GL_CLAMP_FRAGMENT_COLOR GL_CLAMP_FRAGMENT_COLOR_ARB -#endif - -#if defined(OSG_GL3_AVAILABLE) - #define GL_CLAMP_VERTEX_COLOR 0x891A - #define GL_CLAMP_FRAGMENT_COLOR 0x891B -#endif - -namespace osg { - -/** Encapsulates OpenGL ClampColor state. */ -class OSG_EXPORT ClampColor : public StateAttribute -{ - public : - - ClampColor(); - - ClampColor(GLenum vertexMode, GLenum fragmentMode, GLenum readMode); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - ClampColor(const ClampColor& rhs,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(rhs,copyop), - _clampVertexColor(rhs._clampVertexColor), - _clampFragmentColor(rhs._clampFragmentColor), - _clampReadColor(rhs._clampReadColor) {} - - META_StateAttribute(osg, ClampColor,CLAMPCOLOR); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(ClampColor,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_clampVertexColor) - COMPARE_StateAttribute_Parameter(_clampFragmentColor) - COMPARE_StateAttribute_Parameter(_clampReadColor) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - void setClampVertexColor(GLenum mode) { _clampVertexColor = mode; } - GLenum getClampVertexColor() const { return _clampVertexColor; } - - void setClampFragmentColor(GLenum mode) { _clampFragmentColor = mode; } - GLenum getClampFragmentColor() const { return _clampFragmentColor; } - - void setClampReadColor(GLenum mode) { _clampReadColor = mode; } - GLenum getClampReadColor() const { return _clampReadColor; } - - - virtual void apply(State& state) const; - /** Encapsulates queries of extension availability, obtains extension - * function pointers, and provides convenience wrappers for - * calling extension functions. */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setClampColorSupported(bool flag) { _isClampColorSupported=flag; } - bool isClampColorSupported() const { return _isClampColorSupported; } - - void glClampColor(GLenum target, GLenum mode) const; - - protected: - - ~Extensions() {} - - typedef void (GL_APIENTRY * GLClampColorProc) (GLenum target, GLenum mode); - bool _isClampColorSupported; - GLClampColorProc _glClampColor; - - }; - - /** Returns the Extensions object for the given context. - * If createIfNotInitalized is true and the Extensions object doesn't - * exist, getExtensions() creates it on the given context. - * Returns NULL if createIfNotInitalized is false and the Extensions - * object doesn't exist. */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions() allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes, - * but need to ensure that they all use the same low common denominator extensions. */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected : - - virtual ~ClampColor(); - - GLenum _clampVertexColor; - GLenum _clampFragmentColor; - GLenum _clampReadColor; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ClearNode b/libs/lib/mac32/include/osg/ClearNode deleted file mode 100644 index a2e3e31b0..000000000 --- a/libs/lib/mac32/include/osg/ClearNode +++ /dev/null @@ -1,75 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CLEARNODE -#define OSG_CLEARNODE 1 - -#include -#include - -namespace osg { - -/** A Group node for clearing the color and depth buffers. Use setClearColor - * to change the clear color, and setRequiresClear to disable/enable the call - * clearing. You might want to disable clearing if you perform your clear by - * drawing fullscreen geometry. If you do this, add child nodes to perform - * such drawing. The default StateSet associated with this node places - * children in render bin -1 to ensure that children are rendered prior to - * the rest of the scene graph. -*/ -class OSG_EXPORT ClearNode : public Group -{ - public : - - ClearNode(); - - ClearNode(const ClearNode& cs, const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Group(cs,copyop), - _requiresClear(cs._requiresClear), - _clearColor(cs._clearColor), - _clearMask(cs._clearMask) {} - - - META_Node(osg, ClearNode); - - /** Enable/disable clearing via glClear. */ - inline void setRequiresClear(bool requiresClear) { _requiresClear = requiresClear; } - - /** Gets whether clearing is enabled or disabled. */ - inline bool getRequiresClear() const { return _requiresClear; } - - /** Sets the clear color. */ - inline void setClearColor(const Vec4& color) { _clearColor = color; } - - /** Returns the clear color. */ - inline const Vec4& getClearColor() const { return _clearColor; } - - /** Set the clear mask used in glClear(..). - * Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT. */ - inline void setClearMask(GLbitfield mask) { _clearMask = mask; } - - /** Get the clear mask.*/ - inline GLbitfield getClearMask() const { return _clearMask; } - - protected : - - virtual ~ClearNode() {} - - bool _requiresClear; - Vec4 _clearColor; - GLbitfield _clearMask; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ClipNode b/libs/lib/mac32/include/osg/ClipNode deleted file mode 100644 index 4e7dde75f..000000000 --- a/libs/lib/mac32/include/osg/ClipNode +++ /dev/null @@ -1,113 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CLIPNODE -#define OSG_CLIPNODE 1 - -#include -#include - -namespace osg { - -/** Node for defining the position of ClipPlanes in the scene.*/ -class OSG_EXPORT ClipNode : public Group -{ - - public: - - typedef std::vector > ClipPlaneList; - - - ClipNode(); - - ClipNode(const ClipNode& es, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, ClipNode); - - enum ReferenceFrame - { - RELATIVE_RF, - ABSOLUTE_RF - }; - - /** Set the light sources's ReferenceFrame, either to be relative to its - * parent reference frame, or relative to an absolute coordinate - * frame. RELATIVE_RF is the default. - * Note: setting the ReferenceFrame to be ABSOLUTE_RF will - * also set the CullingActive flag on the light source, and hence all - * of its parents, to false, thereby disabling culling of it and - * all its parents. This is necessary to prevent inappropriate - * culling, but may impact cull times if the absolute light source is - * deep in the scene graph. It is therefore recommended to only use - * absolute light source at the top of the scene. - */ - void setReferenceFrame(ReferenceFrame rf); - - ReferenceFrame getReferenceFrame() const { return _referenceFrame; } - - - /** Creates six clip planes corresponding to the given BoundingBox. */ - void createClipBox(const BoundingBox& bb,unsigned int clipPlaneNumberBase=0); - - /** Adds the clipplane. Returns true on success, and false if the plane - * has already been added, or if clipplane is NULL. */ - bool addClipPlane(ClipPlane* clipplane); - - /** Removes the clipplane. Returns true on success, false if clipplane - * isn't in this ClipNode.*/ - bool removeClipPlane(ClipPlane* clipplane); - - /** Remove the ClipPlane with the given index. Returns true on success, - * false if pos is not a valid plane index. */ - bool removeClipPlane(unsigned int pos); - - /** Returns the number of ClipPlanes. */ - inline unsigned int getNumClipPlanes() const { return _planes.size(); } - - - /** Get ClipPlane at the given index position. */ - inline ClipPlane* getClipPlane(unsigned int pos) { return _planes[pos].get(); } - - /** Get const ClipPlane at the given index position. */ - inline const ClipPlane* getClipPlane(unsigned int pos) const { return _planes[pos].get(); } - - /** Set the ClipPlaneList. */ - inline void setClipPlaneList(const ClipPlaneList& cpl) { _planes=cpl; } - - /** Get the ClipPlaneList. */ - inline ClipPlaneList& getClipPlaneList() { return _planes; } - - /** Get the const ClipPlaneList. */ - inline const ClipPlaneList& getClipPlaneList() const { return _planes; } - - /** Set the GLModes for all ClipPlanes, on the StateSet. */ - void setStateSetModes(StateSet&,StateAttribute::GLModeValue) const; - - /** Set up the local StateSet. */ - void setLocalStateSetModes(StateAttribute::GLModeValue=StateAttribute::ON); - - virtual BoundingSphere computeBound() const; - - protected: - - virtual ~ClipNode(); - - StateAttribute::GLModeValue _value; - ClipPlaneList _planes; - - ReferenceFrame _referenceFrame; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ClipPlane b/libs/lib/mac32/include/osg/ClipPlane deleted file mode 100644 index 0913039b7..000000000 --- a/libs/lib/mac32/include/osg/ClipPlane +++ /dev/null @@ -1,127 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CLIPPLANE -#define OSG_CLIPPLANE 1 - -#include -#include -#include - -#ifndef GL_CLIP_PLANE0 - #define GL_CLIP_PLANE0 0x3000 - #define GL_CLIP_PLANE1 0x3001 - #define GL_CLIP_PLANE2 0x3002 - #define GL_CLIP_PLANE3 0x3003 - #define GL_CLIP_PLANE4 0x3004 - #define GL_CLIP_PLANE5 0x3005 -#endif - -namespace osg { - -/** Encapsulates OpenGL glClipPlane(). -*/ -class OSG_EXPORT ClipPlane : public StateAttribute -{ - public : - - ClipPlane(); - inline ClipPlane(unsigned int no):_clipPlaneNum(no) {} - inline ClipPlane(unsigned int no,const Vec4d& plane):_clipPlaneNum(no) { setClipPlane(plane); } - inline ClipPlane(unsigned int no,const Plane& plane):_clipPlaneNum(no) { setClipPlane(plane); } - inline ClipPlane(unsigned int no,double a,double b,double c,double d): _clipPlaneNum(no) { setClipPlane(a,b,c,d); } - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - ClipPlane(const ClipPlane& cp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(cp,copyop) - { - _clipPlane[0]=cp._clipPlane[0]; - _clipPlane[1]=cp._clipPlane[1]; - _clipPlane[2]=cp._clipPlane[2]; - _clipPlane[3]=cp._clipPlane[3]; - _clipPlaneNum=cp._clipPlaneNum; - } - - virtual osg::Object* cloneType() const { return new ClipPlane( _clipPlaneNum ); } - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new ClipPlane(*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "ClipPlane"; } - virtual Type getType() const { return CLIPPLANE; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(ClipPlane,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_clipPlaneNum) - COMPARE_StateAttribute_Parameter(_clipPlane[0]) - COMPARE_StateAttribute_Parameter(_clipPlane[1]) - COMPARE_StateAttribute_Parameter(_clipPlane[2]) - COMPARE_StateAttribute_Parameter(_clipPlane[3]) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - virtual unsigned int getMember() const { return _clipPlaneNum; } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode((GLMode)(GL_CLIP_PLANE0+_clipPlaneNum)); - return true; - } - - - /** Set the clip plane with the given Plane. */ - void setClipPlane(const Plane& plane) - { - _clipPlane.set(plane[0],plane[1],plane[2],plane[3]); - } - - /** Defines the plane as [ a b c d ]. */ - void setClipPlane(double a,double b,double c,double d) - { - _clipPlane.set(a,b,c,d); - } - - /** Set the clip plane with the given Vec4. */ - inline void setClipPlane(const Vec4d& plane) { _clipPlane = plane; } - - /** Gets the clip plane as a Vec4d. */ - const Vec4d& getClipPlane() const { return _clipPlane; } - - - /** Sets the clip plane number. */ - void setClipPlaneNum(unsigned int num); - - /** Gets the clip plane number. */ - unsigned int getClipPlaneNum() const; - - /** Applies the clip plane's state to the OpenGL state machine. */ - virtual void apply(State& state) const; - - protected : - - virtual ~ClipPlane(); - - Vec4d _clipPlane; - unsigned int _clipPlaneNum; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ClusterCullingCallback b/libs/lib/mac32/include/osg/ClusterCullingCallback deleted file mode 100644 index 9aa8a9590..000000000 --- a/libs/lib/mac32/include/osg/ClusterCullingCallback +++ /dev/null @@ -1,75 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CLUSTERCULLINGCALLBACK -#define OSG_CLUSTERCULLINGCALLBACK 1 - -#include -#include - -namespace osg { - -/** Implements cluster culling to cull back facing drawables. Derived from - * Drawable::CullCallback. -*/ -class OSG_EXPORT ClusterCullingCallback : public Drawable::CullCallback, public NodeCallback -{ - public: - - ClusterCullingCallback(); - ClusterCullingCallback(const ClusterCullingCallback& ccc,const CopyOp& copyop); - ClusterCullingCallback(const osg::Vec3& controlPoint, const osg::Vec3& normal, float deviation); - ClusterCullingCallback(const osg::Drawable* drawable); - - META_Object(osg,ClusterCullingCallback); - - /** Computes the control point, normal, and deviation from the - * given drawable contents. */ - void computeFrom(const osg::Drawable* drawable); - - /** Transform the ClusterCullingCallback's positional members to a new coordinate frame.*/ - void transform(const osg::Matrixd& matrix); - - void set(const osg::Vec3& controlPoint, const osg::Vec3& normal, float deviation, float radius); - - void setControlPoint(const osg::Vec3& controlPoint) { _controlPoint = controlPoint; } - const osg::Vec3& getControlPoint() const { return _controlPoint; } - - void setNormal(const osg::Vec3& normal) { _normal = normal; } - const osg::Vec3& getNormal() const { return _normal; } - - void setRadius(float radius) { _radius = radius; } - float getRadius() const { return _radius; } - - void setDeviation(float deviation) { _deviation = deviation; } - float getDeviation() const { return _deviation; } - - virtual bool cull(osg::NodeVisitor*, osg::Drawable*, osg::State*) const; - - /** Callback method called by the NodeVisitor when visiting a node.*/ - virtual void operator()(Node* node, NodeVisitor* nv); - - protected: - - virtual ~ClusterCullingCallback() {} - - osg::Vec3 _controlPoint; - osg::Vec3 _normal; - float _radius; - float _deviation; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/CollectOccludersVisitor b/libs/lib/mac32/include/osg/CollectOccludersVisitor deleted file mode 100644 index b0491318f..000000000 --- a/libs/lib/mac32/include/osg/CollectOccludersVisitor +++ /dev/null @@ -1,109 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_COLLECTOCCLUDERSVISITOR -#define OSG_COLLECTOCCLUDERSVISITOR 1 - -#include -#include - -#include - -namespace osg { - -class OSG_EXPORT CollectOccludersVisitor : public osg::NodeVisitor, public osg::CullStack -{ - public: - - - typedef std::set ShadowVolumeOccluderSet; - - CollectOccludersVisitor(); - virtual ~CollectOccludersVisitor(); - - META_NodeVisitor("osg","CollectOccludersVisitor") - - virtual CollectOccludersVisitor* cloneType() const { return new CollectOccludersVisitor(); } - - virtual void reset(); - - virtual float getDistanceToEyePoint(const Vec3& pos, bool withLODScale) const; - virtual float getDistanceToViewPoint(const Vec3& pos, bool withLODScale) const; - - virtual float getDistanceFromEyePoint(const Vec3& pos, bool withLODScale) const; - - virtual void apply(osg::Node&); - virtual void apply(osg::Transform& node); - virtual void apply(osg::Projection& node); - - virtual void apply(osg::Switch& node); - virtual void apply(osg::LOD& node); - virtual void apply(osg::OccluderNode& node); - - /** Sets the minimum shadow occluder volume that an active occluder - * must have. vol is units relative the clip space volume where 1.0 - * is the whole clip space. */ - void setMinimumShadowOccluderVolume(float vol) { _minimumShadowOccluderVolume = vol; } - float getMinimumShadowOccluderVolume() const { return _minimumShadowOccluderVolume; } - - /** Sets the maximum number of occluders to have active for culling - * purposes. */ - void setMaximumNumberOfActiveOccluders(unsigned int num) { _maximumNumberOfActiveOccluders = num; } - unsigned int getMaximumNumberOfActiveOccluders() const { return _maximumNumberOfActiveOccluders; } - - void setCreateDrawablesOnOccludeNodes(bool flag) { _createDrawables=flag; } - bool getCreateDrawablesOnOccludeNodes() const { return _createDrawables; } - - void setCollectedOccluderSet(const ShadowVolumeOccluderSet& svol) { _occluderSet = svol; } - ShadowVolumeOccluderSet& getCollectedOccluderSet() { return _occluderSet; } - const ShadowVolumeOccluderSet& getCollectedOccluderSet() const { return _occluderSet; } - - /** Removes occluded occluders for the collected occluders list, then - * discards all but MaximumNumberOfActiveOccluders of occluders, - * discarding the occluders with the lowest shadow occluder volume. */ - void removeOccludedOccluders(); - - - protected: - - /** Prevents unwanted copy construction. */ - //CollectOccludersVisitor(const CollectOccludersVisitor&):osg::NodeVisitor(),osg::CullStack() {} - - /** Prevents unwanted copy operator. */ - CollectOccludersVisitor& operator = (const CollectOccludersVisitor&) { return *this; } - - inline void handle_cull_callbacks_and_traverse(osg::Node& node) - { - /*osg::NodeCallback* callback = node.getCullCallback(); - if (callback) (*callback)(&node,this); - else*/ if (node.getNumChildrenWithOccluderNodes()>0) traverse(node); - } - - inline void handle_cull_callbacks_and_accept(osg::Node& node,osg::Node* acceptNode) - { - /*osg::NodeCallback* callback = node.getCullCallback(); - if (callback) (*callback)(&node,this); - else*/ if (node.getNumChildrenWithOccluderNodes()>0) acceptNode->accept(*this); - } - - float _minimumShadowOccluderVolume; - unsigned _maximumNumberOfActiveOccluders; - bool _createDrawables; - ShadowVolumeOccluderSet _occluderSet; - -}; - -} - -#endif - diff --git a/libs/lib/mac32/include/osg/ColorMask b/libs/lib/mac32/include/osg/ColorMask deleted file mode 100644 index 48ac2eb53..000000000 --- a/libs/lib/mac32/include/osg/ColorMask +++ /dev/null @@ -1,100 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_COLORMASK -#define OSG_COLORMASK 1 - -#include -#include - -namespace osg { - -/** Encapsulates OpenGL glColorMaskFunc/Op/Mask functions. -*/ -class OSG_EXPORT ColorMask : public StateAttribute -{ - public : - - - ColorMask(); - - ColorMask(bool red,bool green,bool blue,bool alpha): - _red(red), - _green(green), - _blue(blue), - _alpha(alpha) {} - - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - ColorMask(const ColorMask& cm,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(cm,copyop), - _red(cm._red), - _green(cm._green), - _blue(cm._blue), - _alpha(cm._alpha) {} - - META_StateAttribute(osg, ColorMask, COLORMASK); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(ColorMask,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_red) - COMPARE_StateAttribute_Parameter(_green) - COMPARE_StateAttribute_Parameter(_blue) - COMPARE_StateAttribute_Parameter(_alpha) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - inline void setMask(bool red,bool green,bool blue,bool alpha) - { - _red = red; - _green = green; - _blue = blue; - _alpha = alpha; - - } - - inline void setRedMask(bool mask) { _red=mask; } - inline bool getRedMask() const { return _red; } - - inline void setGreenMask(bool mask) { _green=mask; } - inline bool getGreenMask() const { return _green; } - - inline void setBlueMask(bool mask) { _blue=mask; } - inline bool getBlueMask() const { return _blue; } - - inline void setAlphaMask(bool mask) { _alpha=mask; } - inline bool getAlphaMask() const { return _alpha; } - - virtual void apply(State& state) const; - - protected: - - virtual ~ColorMask(); - - bool _red; - bool _green; - bool _blue; - bool _alpha; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ColorMatrix b/libs/lib/mac32/include/osg/ColorMatrix deleted file mode 100644 index 169419c01..000000000 --- a/libs/lib/mac32/include/osg/ColorMatrix +++ /dev/null @@ -1,72 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_COLORMATRIX -#define OSG_COLORMATRIX 1 - -#include -#include - -namespace osg { - -/** Encapsulates OpenGL color matrix functionality. */ -class OSG_EXPORT ColorMatrix : public StateAttribute -{ - public : - - ColorMatrix(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - ColorMatrix(const ColorMatrix& cm,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(cm,copyop), - _matrix(cm._matrix) {} - - META_StateAttribute(osg, ColorMatrix, COLORMATRIX); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(ColorMatrix,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_matrix) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - /** Sets the color matrix. */ - inline void setMatrix(const Matrix& matrix) { _matrix = matrix; } - - /** Gets the color matrix. */ - inline Matrix& getMatrix() { return _matrix; } - - /** Gets the const color matrix. */ - inline const Matrix& getMatrix() const { return _matrix; } - - /** Applies as OpenGL texture matrix. */ - virtual void apply(State& state) const; - - protected: - - virtual ~ColorMatrix( void ); - - Matrix _matrix; - -}; - -} - - -#endif diff --git a/libs/lib/mac32/include/osg/ComputeBoundsVisitor b/libs/lib/mac32/include/osg/ComputeBoundsVisitor deleted file mode 100644 index 320870ff1..000000000 --- a/libs/lib/mac32/include/osg/ComputeBoundsVisitor +++ /dev/null @@ -1,61 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_COMPUTEBOUNDSVISITOR -#define OSG_COMPUTEBOUNDSVISITOR 1 - -#include -#include -#include - -namespace osg { - -class OSG_EXPORT ComputeBoundsVisitor : public osg::NodeVisitor -{ -public: - - ComputeBoundsVisitor(TraversalMode traversalMode = TRAVERSE_ALL_CHILDREN); - - META_NodeVisitor("osg","ComputeBoundsVisitor") - - virtual void reset(); - - osg::BoundingBox& getBoundingBox() { return _bb; } - - void getPolytope(osg::Polytope& polytope, float margin=0.1) const; - - void getBase(osg::Polytope& polytope, float margin=0.1) const; - - void apply(osg::Node& node); - - void apply(osg::Transform& transform); - - void apply(osg::Geode& geode); - - inline void pushMatrix(osg::Matrix& matrix) { _matrixStack.push_back(matrix); } - - inline void popMatrix() { _matrixStack.pop_back(); } - - void applyDrawable(osg::Drawable* drawable); - -protected: - - typedef std::vector MatrixStack; - - MatrixStack _matrixStack; - osg::BoundingBox _bb; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Config b/libs/lib/mac32/include/osg/Config deleted file mode 100644 index 35d05934f..000000000 --- a/libs/lib/mac32/include/osg/Config +++ /dev/null @@ -1,47 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008-2009 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -/**************************************************************************** - * THIS FILE IS AUTOGENERATED BY CMAKE. DO NOT EDIT! - ****************************************************************************/ - -/* Changes to the configuration reflected here can be made with ccmake on - * unix or with cmake-gui on windows. Alternatively you can use cmake's -D - * or -P switches to set some configuration values at cmake configuration time. - */ - -#ifndef OSG_CONFIG -#define OSG_CONFIG 1 - -/* #undef OSG_NOTIFY_DISABLED */ -/* #undef OSG_USE_FLOAT_MATRIX */ -/* #undef OSG_USE_FLOAT_PLANE */ -#define OSG_USE_FLOAT_BOUNDINGSPHERE -#define OSG_USE_FLOAT_BOUNDINGBOX -#define OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION -/* #undef OSG_USE_UTF8_FILENAME */ -#define OSG_DISABLE_MSVC_WARNINGS - -#define OSG_GL1_AVAILABLE -#define OSG_GL2_AVAILABLE -/* #undef OSG_GL3_AVAILABLE */ -/* #undef OSG_GLES1_AVAILABLE */ -/* #undef OSG_GLES2_AVAILABLE */ -/* #undef OSG_GL_LIBRARY_STATIC */ -#define OSG_GL_DISPLAYLISTS_AVAILABLE -#define OSG_GL_MATRICES_AVAILABLE -#define OSG_GL_VERTEX_FUNCS_AVAILABLE -#define OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE -#define OSG_GL_FIXED_FUNCTION_AVAILABLE - -#endif diff --git a/libs/lib/mac32/include/osg/ConvexPlanarOccluder b/libs/lib/mac32/include/osg/ConvexPlanarOccluder deleted file mode 100644 index 397eb40a1..000000000 --- a/libs/lib/mac32/include/osg/ConvexPlanarOccluder +++ /dev/null @@ -1,67 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CONVEXPLANAROCCLUDER -#define OSG_CONVEXPLANAROCCLUDER 1 - -#include -#include - -namespace osg { - -class OccluderVolume; - -/** A class for representing convex clipping volumes made up of several ConvexPlanarPolygon. */ -class OSG_EXPORT ConvexPlanarOccluder : public Object -{ - - public: - - ConvexPlanarOccluder():Object() {} - ConvexPlanarOccluder(const ConvexPlanarOccluder& cpo,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Object(cpo,copyop), - _occluder(cpo._occluder), - _holeList(cpo._holeList) {} - - META_Object(osg,ConvexPlanarOccluder); - - void setOccluder(const ConvexPlanarPolygon& cpp) { _occluder = cpp; } - - ConvexPlanarPolygon& getOccluder() { return _occluder; } - - const ConvexPlanarPolygon& getOccluder() const { return _occluder; } - - - - typedef std::vector HoleList; - - void addHole(const ConvexPlanarPolygon& cpp) { _holeList.push_back(cpp); } - - void setHoleList(const HoleList& holeList) { _holeList=holeList; } - - HoleList& getHoleList() { return _holeList; } - - const HoleList& getHoleList() const { return _holeList; } - - protected: - - ~ConvexPlanarOccluder(); // {} - - ConvexPlanarPolygon _occluder; - HoleList _holeList; - -}; - -} // end of namespace - -#endif diff --git a/libs/lib/mac32/include/osg/ConvexPlanarPolygon b/libs/lib/mac32/include/osg/ConvexPlanarPolygon deleted file mode 100644 index 8c4546b8b..000000000 --- a/libs/lib/mac32/include/osg/ConvexPlanarPolygon +++ /dev/null @@ -1,49 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CONVEXPLANARPOLYGON -#define OSG_CONVEXPLANARPOLYGON 1 - -#include - -#include - -namespace osg { - -/** A class for representing components of convex clipping volumes. */ -class OSG_EXPORT ConvexPlanarPolygon -{ - - public: - - ConvexPlanarPolygon(); - - typedef std::vector VertexList; - - void add(const Vec3& v) { _vertexList.push_back(v); } - - void setVertexList(const VertexList& vertexList) { _vertexList=vertexList; } - - VertexList& getVertexList() { return _vertexList; } - - const VertexList& getVertexList() const { return _vertexList; } - - protected: - - VertexList _vertexList; - -}; - -} // end of namespace - -#endif diff --git a/libs/lib/mac32/include/osg/CoordinateSystemNode b/libs/lib/mac32/include/osg/CoordinateSystemNode deleted file mode 100644 index 4235ffe30..000000000 --- a/libs/lib/mac32/include/osg/CoordinateSystemNode +++ /dev/null @@ -1,248 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_COORDINATESYSTEMNODE -#define OSG_COORDINATESYSTEMNODE 1 - -#include -#include - -namespace osg -{ - -const double WGS_84_RADIUS_EQUATOR = 6378137.0; -const double WGS_84_RADIUS_POLAR = 6356752.3142; - -/** EllipsoidModel encapsulates the ellipsoid used to model astronomical bodies, - * such as sun, planets, moon etc. - * All distance quantities (i.e. heights + radius) are in meters, - * and latitude and longitude are in radians.*/ -class EllipsoidModel : public Object -{ - public: - - /** WGS_84 is a common representation of the earth's spheroid */ - EllipsoidModel(double radiusEquator = WGS_84_RADIUS_EQUATOR, - double radiusPolar = WGS_84_RADIUS_POLAR): - _radiusEquator(radiusEquator), - _radiusPolar(radiusPolar) { computeCoefficients(); } - - EllipsoidModel(const EllipsoidModel& et,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Object(et,copyop), - _radiusEquator(et._radiusEquator), - _radiusPolar(et._radiusPolar) { computeCoefficients(); } - - META_Object(osg,EllipsoidModel); - - void setRadiusEquator(double radius) { _radiusEquator = radius; computeCoefficients(); } - double getRadiusEquator() const { return _radiusEquator; } - - void setRadiusPolar(double radius) { _radiusPolar = radius; computeCoefficients(); } - double getRadiusPolar() const { return _radiusPolar; } - - inline void convertLatLongHeightToXYZ(double latitude, double longitude, double height, - double& X, double& Y, double& Z) const; - - inline void convertXYZToLatLongHeight(double X, double Y, double Z, - double& latitude, double& longitude, double& height) const; - - inline void computeLocalToWorldTransformFromLatLongHeight(double latitude, double longitude, double height, osg::Matrixd& localToWorld) const; - - inline void computeLocalToWorldTransformFromXYZ(double X, double Y, double Z, osg::Matrixd& localToWorld) const; - - inline void computeCoordinateFrame(double latitude, double longitude, osg::Matrixd& localToWorld) const; - - inline osg::Vec3d computeLocalUpVector(double X, double Y, double Z) const; - - // Convenience method for determining if EllipsoidModel is a stock WGS84 ellipsoid - inline bool isWGS84() const {return(_radiusEquator == WGS_84_RADIUS_EQUATOR && _radiusPolar == WGS_84_RADIUS_POLAR);} - - // Compares two EllipsoidModel by comparing critical internal values. - // Ignores _eccentricitySquared since it's just a cached value derived from - // the _radiusEquator and _radiusPolar members. - friend bool operator == ( const EllipsoidModel & e1, const EllipsoidModel& e2) {return(e1._radiusEquator == e2._radiusEquator && e1._radiusPolar == e2._radiusPolar);} - - - protected: - - void computeCoefficients() - { - double flattening = (_radiusEquator-_radiusPolar)/_radiusEquator; - _eccentricitySquared = 2*flattening - flattening*flattening; - } - - double _radiusEquator; - double _radiusPolar; - double _eccentricitySquared; - -}; - -/** CoordinateFrame encapsulates the orientation of east, north and up.*/ -typedef Matrixd CoordinateFrame; - -/** CoordinateSystem encapsulate the coordinate system that is associated with objects in a scene. - For an overview of common earth bases coordinate systems see http://www.colorado.edu/geography/gcraft/notes/coordsys/coordsys_f.html */ -class OSG_EXPORT CoordinateSystemNode : public Group -{ - public: - - CoordinateSystemNode(); - - CoordinateSystemNode(const std::string& format, const std::string& cs); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - CoordinateSystemNode(const CoordinateSystemNode&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osg,CoordinateSystemNode); - - - /** Set the coordinate system node up by copying the format, coordinate system string, and ellipsoid model of another coordinate system node.*/ - void set(const CoordinateSystemNode& csn); - - /** Set the coordinate system format string. Typical values would be WKT, PROJ4, USGS etc.*/ - void setFormat(const std::string& format) { _format = format; } - - /** Get the coordinate system format string.*/ - const std::string& getFormat() const { return _format; } - - /** Set the CoordinateSystem reference string, should be stored in a form consistent with the Format.*/ - void setCoordinateSystem(const std::string& cs) { _cs = cs; } - - /** Get the CoordinateSystem reference string.*/ - const std::string& getCoordinateSystem() const { return _cs; } - - - /** Set EllipsoidModel to describe the model used to map lat, long and height into geocentric XYZ and back. */ - void setEllipsoidModel(EllipsoidModel* ellipsode) { _ellipsoidModel = ellipsode; } - - /** Get the EllipsoidModel.*/ - EllipsoidModel* getEllipsoidModel() { return _ellipsoidModel.get(); } - - /** Get the const EllipsoidModel.*/ - const EllipsoidModel* getEllipsoidModel() const { return _ellipsoidModel.get(); } - - /** Compute the local coordinate frame for specified point.*/ - CoordinateFrame computeLocalCoordinateFrame(const Vec3d& position) const; - - /** Compute the local up-vector for specified point.*/ - osg::Vec3d computeLocalUpVector(const Vec3d& position) const; - - protected: - - virtual ~CoordinateSystemNode() {} - - std::string _format; - std::string _cs; - ref_ptr _ellipsoidModel; - -}; - - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// implement inline methods. -// -inline void EllipsoidModel::convertLatLongHeightToXYZ(double latitude, double longitude, double height, - double& X, double& Y, double& Z) const -{ - // for details on maths see http://www.colorado.edu/geography/gcraft/notes/datum/gif/llhxyz.gif - double sin_latitude = sin(latitude); - double cos_latitude = cos(latitude); - double N = _radiusEquator / sqrt( 1.0 - _eccentricitySquared*sin_latitude*sin_latitude); - X = (N+height)*cos_latitude*cos(longitude); - Y = (N+height)*cos_latitude*sin(longitude); - Z = (N*(1-_eccentricitySquared)+height)*sin_latitude; -} - - -inline void EllipsoidModel::convertXYZToLatLongHeight(double X, double Y, double Z, - double& latitude, double& longitude, double& height) const -{ - // http://www.colorado.edu/geography/gcraft/notes/datum/gif/xyzllh.gif - double p = sqrt(X*X + Y*Y); - double theta = atan2(Z*_radiusEquator , (p*_radiusPolar)); - double eDashSquared = (_radiusEquator*_radiusEquator - _radiusPolar*_radiusPolar)/ - (_radiusPolar*_radiusPolar); - - double sin_theta = sin(theta); - double cos_theta = cos(theta); - - latitude = atan( (Z + eDashSquared*_radiusPolar*sin_theta*sin_theta*sin_theta) / - (p - _eccentricitySquared*_radiusEquator*cos_theta*cos_theta*cos_theta) ); - longitude = atan2(Y,X); - - double sin_latitude = sin(latitude); - double N = _radiusEquator / sqrt( 1.0 - _eccentricitySquared*sin_latitude*sin_latitude); - - height = p/cos(latitude) - N; -} - -inline void EllipsoidModel::computeLocalToWorldTransformFromLatLongHeight(double latitude, double longitude, double height, osg::Matrixd& localToWorld) const -{ - double X, Y, Z; - convertLatLongHeightToXYZ(latitude,longitude,height,X,Y,Z); - - localToWorld.makeTranslate(X,Y,Z); - computeCoordinateFrame(latitude, longitude, localToWorld); -} - -inline void EllipsoidModel::computeLocalToWorldTransformFromXYZ(double X, double Y, double Z, osg::Matrixd& localToWorld) const -{ - double latitude, longitude, height; - convertXYZToLatLongHeight(X,Y,Z,latitude,longitude,height); - - localToWorld.makeTranslate(X,Y,Z); - computeCoordinateFrame(latitude, longitude, localToWorld); -} - -inline void EllipsoidModel::computeCoordinateFrame(double latitude, double longitude, osg::Matrixd& localToWorld) const -{ - // Compute up vector - osg::Vec3d up ( cos(longitude)*cos(latitude), sin(longitude)*cos(latitude), sin(latitude)); - - // Compute east vector - osg::Vec3d east (-sin(longitude), cos(longitude), 0); - - // Compute north vector = outer product up x east - osg::Vec3d north = up ^ east; - - // set matrix - localToWorld(0,0) = east[0]; - localToWorld(0,1) = east[1]; - localToWorld(0,2) = east[2]; - - localToWorld(1,0) = north[0]; - localToWorld(1,1) = north[1]; - localToWorld(1,2) = north[2]; - - localToWorld(2,0) = up[0]; - localToWorld(2,1) = up[1]; - localToWorld(2,2) = up[2]; -} - -inline osg::Vec3d EllipsoidModel::computeLocalUpVector(double X, double Y, double Z) const -{ - // Note latitude is angle between normal to ellipsoid surface and XY-plane - double latitude; - double longitude; - double altitude; - convertXYZToLatLongHeight(X,Y,Z,latitude,longitude,altitude); - - // Compute up vector - return osg::Vec3d( cos(longitude) * cos(latitude), - sin(longitude) * cos(latitude), - sin(latitude)); -} - -} -#endif diff --git a/libs/lib/mac32/include/osg/CopyOp b/libs/lib/mac32/include/osg/CopyOp deleted file mode 100644 index 129225b9e..000000000 --- a/libs/lib/mac32/include/osg/CopyOp +++ /dev/null @@ -1,93 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_COPYOP -#define OSG_COPYOP 1 - -#include - -namespace osg { - -class Referenced; -class Object; -class Image; -class Texture; -class StateSet; -class StateAttribute; -class StateAttributeCallback; -class Uniform; -class Node; -class Drawable; -class Array; -class PrimitiveSet; -class Shape; -class NodeCallback; - - -/** Copy Op(erator) used to control whether shallow or deep copy is used - * during copy construction and clone operation.*/ -class OSG_EXPORT CopyOp -{ - - public: - - enum Options - { - SHALLOW_COPY = 0, - DEEP_COPY_OBJECTS = 1<<0, - DEEP_COPY_NODES = 1<<1, - DEEP_COPY_DRAWABLES = 1<<2, - DEEP_COPY_STATESETS = 1<<3, - DEEP_COPY_STATEATTRIBUTES = 1<<4, - DEEP_COPY_TEXTURES = 1<<5, - DEEP_COPY_IMAGES = 1<<6, - DEEP_COPY_ARRAYS = 1<<7, - DEEP_COPY_PRIMITIVES = 1<<8, - DEEP_COPY_SHAPES = 1<<9, - DEEP_COPY_UNIFORMS = 1<<10, - DEEP_COPY_CALLBACKS = 1<<11, - DEEP_COPY_USERDATA = 1<<12, - DEEP_COPY_ALL = 0x7FFFFFFF - }; - - typedef unsigned int CopyFlags; - - inline CopyOp(CopyFlags flags=SHALLOW_COPY):_flags(flags) {} - virtual ~CopyOp() {} - - void setCopyFlags(CopyFlags flags) { _flags = flags; } - CopyFlags getCopyFlags() const { return _flags; } - - virtual Referenced* operator() (const Referenced* ref) const; - virtual Object* operator() (const Object* obj) const; - virtual Node* operator() (const Node* node) const; - virtual Drawable* operator() (const Drawable* drawable) const; - virtual StateSet* operator() (const StateSet* stateset) const; - virtual StateAttribute* operator() (const StateAttribute* attr) const; - virtual Texture* operator() (const Texture* text) const; - virtual Image* operator() (const Image* image) const; - virtual Array* operator() (const Array* array) const; - virtual PrimitiveSet* operator() (const PrimitiveSet* primitives) const; - virtual Shape* operator() (const Shape* shape) const; - virtual Uniform* operator() (const Uniform* shape) const; - virtual NodeCallback* operator() (const NodeCallback* nodecallback) const; - virtual StateAttributeCallback* operator() (const StateAttributeCallback* stateattributecallback) const; - - protected: - - CopyFlags _flags; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/CullFace b/libs/lib/mac32/include/osg/CullFace deleted file mode 100644 index 647ce2056..000000000 --- a/libs/lib/mac32/include/osg/CullFace +++ /dev/null @@ -1,79 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CULLFACE -#define OSG_CULLFACE 1 - -#include -#include - -namespace osg { - -/** Class to globally enable/disable OpenGL's polygon culling mode. - */ -class OSG_EXPORT CullFace : public StateAttribute -{ - public : - - enum Mode { - FRONT = GL_FRONT, - BACK = GL_BACK, - FRONT_AND_BACK = GL_FRONT_AND_BACK - }; - - CullFace(Mode mode=BACK): - _mode(mode) {} - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - CullFace(const CullFace& cf,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(cf,copyop), - _mode(cf._mode) {} - - META_StateAttribute(osg, CullFace, CULLFACE); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(CullFace,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_mode) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_CULL_FACE); - return true; - } - - inline void setMode(Mode mode) { _mode = mode; } - - inline Mode getMode() const { return _mode; } - - virtual void apply(State& state) const; - - protected: - - virtual ~CullFace(); - - Mode _mode; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/CullSettings b/libs/lib/mac32/include/osg/CullSettings deleted file mode 100644 index 3bebebf84..000000000 --- a/libs/lib/mac32/include/osg/CullSettings +++ /dev/null @@ -1,274 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CULLSETTINGS -#define OSG_CULLSETTINGS 1 - -#include -#include -#include - -namespace osg { - -// forward declare -class ArgumentParser; -class ApplicationUsage; - -class OSG_EXPORT CullSettings -{ - public: - - CullSettings() - { - setDefaults(); - readEnvironmentalVariables(); - } - - CullSettings(ArgumentParser& arguments) - { - setDefaults(); - readEnvironmentalVariables(); - readCommandLine(arguments); - } - - CullSettings(const CullSettings& cs); - - virtual ~CullSettings() {} - - CullSettings& operator = (const CullSettings& settings) - { - if (this==&settings) return *this; - setCullSettings(settings); - return *this; - } - - - virtual void setDefaults(); - - - enum VariablesMask - { - COMPUTE_NEAR_FAR_MODE = (0x1 << 0), - CULLING_MODE = (0x1 << 1), - LOD_SCALE = (0x1 << 2), - SMALL_FEATURE_CULLING_PIXEL_SIZE = (0x1 << 3), - CLAMP_PROJECTION_MATRIX_CALLBACK = (0x1 << 4), - NEAR_FAR_RATIO = (0x1 << 5), - IMPOSTOR_ACTIVE = (0x1 << 6), - DEPTH_SORT_IMPOSTOR_SPRITES = (0x1 << 7), - IMPOSTOR_PIXEL_ERROR_THRESHOLD = (0x1 << 8), - NUM_FRAMES_TO_KEEP_IMPOSTORS_SPRITES = (0x1 << 9), - CULL_MASK = (0x1 << 10), - CULL_MASK_LEFT = (0x1 << 11), - CULL_MASK_RIGHT = (0x1 << 12), - CLEAR_COLOR = (0x1 << 13), - CLEAR_MASK = (0x1 << 14), - LIGHTING_MODE = (0x1 << 15), - LIGHT = (0x1 << 16), - DRAW_BUFFER = (0x1 << 17), - READ_BUFFER = (0x1 << 18), - - NO_VARIABLES = 0x00000000, - ALL_VARIABLES = 0x7FFFFFFF - }; - - typedef int InheritanceMask; - - /** Set the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.*/ - void setInheritanceMask(InheritanceMask mask) { _inheritanceMask = mask; } - - /** Get the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.*/ - InheritanceMask getInheritanceMask() const { return _inheritanceMask; } - - /** Set the local cull settings values from specified CullSettings object.*/ - void setCullSettings(const CullSettings& settings); - - /** Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.*/ - virtual void inheritCullSettings(const CullSettings& settings) { inheritCullSettings(settings, _inheritanceMask); } - - /** Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.*/ - virtual void inheritCullSettings(const CullSettings& settings, unsigned int inheritanceMask); - - /** read the environmental variables.*/ - void readEnvironmentalVariables(); - - /** read the commandline arguments.*/ - void readCommandLine(ArgumentParser& arguments); - - - enum InheritanceMaskActionOnAttributeSetting - { - DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT, - DO_NOT_MODIFY_INHERITANCE_MASK - }; - - void setInheritanceMaskActionOnAttributeSetting(InheritanceMaskActionOnAttributeSetting action) { _inheritanceMaskActionOnAttributeSetting = action; } - InheritanceMaskActionOnAttributeSetting getInheritanceMaskActionOnAttributeSetting() const { return _inheritanceMaskActionOnAttributeSetting; } - - /** Apply the action, specified by the InheritanceMaskActionOnAttributeSetting, to apply to the inheritance bit mask. - * This method is called by CullSettings::set*() parameter methods to ensure that CullSettings inheritance mechanisms doesn't overwrite the local parameter settings.*/ - inline void applyMaskAction(unsigned int maskBit) - { - if (_inheritanceMaskActionOnAttributeSetting==DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT) - { - _inheritanceMask = _inheritanceMask & (~maskBit); - } - } - - - /** Switch the creation of Impostors on or off. - * Setting active to false forces the CullVisitor to use the Impostor - * LOD children for rendering. Setting active to true forces the - * CullVisitor to create the appropriate pre-rendering stages which - * render to the ImpostorSprite's texture.*/ - void setImpostorsActive(bool active) { _impostorActive = active; applyMaskAction(IMPOSTOR_ACTIVE); } - - /** Get whether impostors are active or not. */ - bool getImpostorsActive() const { return _impostorActive; } - - /** Set the impostor error threshold. - * Used in calculation of whether impostors remain valid.*/ - void setImpostorPixelErrorThreshold(float numPixels) { _impostorPixelErrorThreshold=numPixels; applyMaskAction(IMPOSTOR_PIXEL_ERROR_THRESHOLD); } - - /** Get the impostor error threshold.*/ - float getImpostorPixelErrorThreshold() const { return _impostorPixelErrorThreshold; } - - /** Set whether ImpostorSprite's should be placed in a depth sorted bin for rendering.*/ - void setDepthSortImpostorSprites(bool doDepthSort) { _depthSortImpostorSprites = doDepthSort; applyMaskAction(DEPTH_SORT_IMPOSTOR_SPRITES); } - - /** Get whether ImpostorSprite's are depth sorted bin for rendering.*/ - bool getDepthSortImpostorSprites() const { return _depthSortImpostorSprites; } - - /** Set the number of frames that an ImpostorSprite is kept whilst not being beyond, - * before being recycled.*/ - void setNumberOfFrameToKeepImpostorSprites(int numFrames) { _numFramesToKeepImpostorSprites = numFrames; applyMaskAction(NUM_FRAMES_TO_KEEP_IMPOSTORS_SPRITES); } - - /** Get the number of frames that an ImpostorSprite is kept whilst not being beyond, - * before being recycled.*/ - int getNumberOfFrameToKeepImpostorSprites() const { return _numFramesToKeepImpostorSprites; } - - enum ComputeNearFarMode - { - DO_NOT_COMPUTE_NEAR_FAR = 0, - COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES, - COMPUTE_NEAR_FAR_USING_PRIMITIVES - }; - - void setComputeNearFarMode(ComputeNearFarMode cnfm) { _computeNearFar=cnfm; applyMaskAction(COMPUTE_NEAR_FAR_MODE); } - ComputeNearFarMode getComputeNearFarMode() const { return _computeNearFar;} - - void setNearFarRatio(double ratio) { _nearFarRatio = ratio; applyMaskAction(NEAR_FAR_RATIO); } - double getNearFarRatio() const { return _nearFarRatio; } - - enum CullingModeValues - { - NO_CULLING = 0x0, - VIEW_FRUSTUM_SIDES_CULLING = 0x1, - NEAR_PLANE_CULLING = 0x2, - FAR_PLANE_CULLING = 0x4, - VIEW_FRUSTUM_CULLING = VIEW_FRUSTUM_SIDES_CULLING| - NEAR_PLANE_CULLING| - FAR_PLANE_CULLING, - SMALL_FEATURE_CULLING = 0x8, - SHADOW_OCCLUSION_CULLING = 0x10, - CLUSTER_CULLING = 0x20, - DEFAULT_CULLING = VIEW_FRUSTUM_SIDES_CULLING| - SMALL_FEATURE_CULLING| - SHADOW_OCCLUSION_CULLING| - CLUSTER_CULLING, - ENABLE_ALL_CULLING = VIEW_FRUSTUM_CULLING| - SMALL_FEATURE_CULLING| - SHADOW_OCCLUSION_CULLING| - CLUSTER_CULLING - }; - - typedef int CullingMode; - - /** Set the culling mode for the CullVisitor to use.*/ - void setCullingMode(CullingMode mode) { _cullingMode = mode; applyMaskAction(CULLING_MODE); } - - /** Returns the current CullingMode.*/ - CullingMode getCullingMode() const { return _cullingMode; } - - - void setCullMask(osg::Node::NodeMask nm) { _cullMask = nm; applyMaskAction(CULL_MASK); } - osg::Node::NodeMask getCullMask() const { return _cullMask; } - - void setCullMaskLeft(osg::Node::NodeMask nm) { _cullMaskLeft = nm; applyMaskAction(CULL_MASK_LEFT); } - osg::Node::NodeMask getCullMaskLeft() const { return _cullMaskLeft; } - - void setCullMaskRight(osg::Node::NodeMask nm) { _cullMaskRight = nm; applyMaskAction(CULL_MASK_RIGHT); } - osg::Node::NodeMask getCullMaskRight() const { return _cullMaskRight; } - - /** Set the LOD bias for the CullVisitor to use.*/ - void setLODScale(float scale) { _LODScale = scale; applyMaskAction(LOD_SCALE); } - - /** Get the LOD bias.*/ - float getLODScale() const { return _LODScale; } - - /** Set the Small Feature Culling Pixel Size.*/ - void setSmallFeatureCullingPixelSize(float value) { _smallFeatureCullingPixelSize=value; applyMaskAction(SMALL_FEATURE_CULLING_PIXEL_SIZE); } - - /** Get the Small Feature Culling Pixel Size.*/ - float getSmallFeatureCullingPixelSize() const { return _smallFeatureCullingPixelSize; } - - - - /** Callback for overriding the CullVisitor's default clamping of the projection matrix to computed near and far values. - * Note, both Matrixf and Matrixd versions of clampProjectionMatrixImplementation must be implemented as the CullVisitor - * can target either Matrix data type, configured at compile time.*/ - struct ClampProjectionMatrixCallback : public osg::Referenced - { - virtual bool clampProjectionMatrixImplementation(osg::Matrixf& projection, double& znear, double& zfar) const = 0; - virtual bool clampProjectionMatrixImplementation(osg::Matrixd& projection, double& znear, double& zfar) const = 0; - }; - - /** set the ClampProjectionMatrixCallback.*/ - void setClampProjectionMatrixCallback(ClampProjectionMatrixCallback* cpmc) { _clampProjectionMatrixCallback = cpmc; applyMaskAction(CLAMP_PROJECTION_MATRIX_CALLBACK); } - /** get the non const ClampProjectionMatrixCallback.*/ - ClampProjectionMatrixCallback* getClampProjectionMatrixCallback() { return _clampProjectionMatrixCallback.get(); } - /** get the const ClampProjectionMatrixCallback.*/ - const ClampProjectionMatrixCallback* getClampProjectionMatrixCallback() const { return _clampProjectionMatrixCallback.get(); } - - - /** Write out internal settings of CullSettings. */ - void write(std::ostream& out); - - protected: - - InheritanceMask _inheritanceMask; - InheritanceMaskActionOnAttributeSetting _inheritanceMaskActionOnAttributeSetting; - - ComputeNearFarMode _computeNearFar; - CullingMode _cullingMode; - float _LODScale; - float _smallFeatureCullingPixelSize; - - ref_ptr _clampProjectionMatrixCallback; - double _nearFarRatio; - bool _impostorActive; - bool _depthSortImpostorSprites; - float _impostorPixelErrorThreshold; - int _numFramesToKeepImpostorSprites; - - Node::NodeMask _cullMask; - Node::NodeMask _cullMaskLeft; - Node::NodeMask _cullMaskRight; - - -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/CullStack b/libs/lib/mac32/include/osg/CullStack deleted file mode 100644 index 04ec4873a..000000000 --- a/libs/lib/mac32/include/osg/CullStack +++ /dev/null @@ -1,302 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CULLSTACK -#define OSG_CULLSTACK 1 - -#include -#include -#include -#include -#include - -namespace osg { - -/** A CullStack class which accumulates the current project, modelview matrices -and the CullingSet. */ -class OSG_EXPORT CullStack : public osg::CullSettings -{ - - public: - - - CullStack(); - CullStack(const CullStack& cs); - - ~CullStack(); - - typedef std::vector OccluderList; - - void reset(); - - void pushCullingSet(); - void popCullingSet(); - - void setOccluderList(const ShadowVolumeOccluderList& svol) { _occluderList = svol; } - ShadowVolumeOccluderList& getOccluderList() { return _occluderList; } - const ShadowVolumeOccluderList& getOccluderList() const { return _occluderList; } - - void pushViewport(osg::Viewport* viewport); - void popViewport(); - - void pushProjectionMatrix(osg::RefMatrix* matrix); - void popProjectionMatrix(); - - void pushModelViewMatrix(osg::RefMatrix* matrix, Transform::ReferenceFrame referenceFrame); - void popModelViewMatrix(); - - inline float getFrustumVolume() { if (_frustumVolume<0.0f) computeFrustumVolume(); return _frustumVolume; } - - - /** Compute the pixel size of an object at position v, with specified radius.*/ - float pixelSize(const Vec3& v,float radius) const - { - return getCurrentCullingSet().pixelSize(v,radius); - } - - /** Compute the pixel size of the bounding sphere.*/ - float pixelSize(const BoundingSphere& bs) const - { - return pixelSize(bs.center(),bs.radius()); - } - - /** Compute the pixel size of an object at position v, with specified radius. fabs()ed to always be positive. */ - float clampedPixelSize(const Vec3& v,float radius) const - { - return getCurrentCullingSet().clampedPixelSize(v,radius); - } - - /** Compute the pixel size of the bounding sphere. fabs()ed to always be positive. */ - float clampedPixelSize(const BoundingSphere& bs) const - { - return clampedPixelSize(bs.center(),bs.radius()); - } - - inline void disableAndPushOccludersCurrentMask(NodePath& nodePath) - { - getCurrentCullingSet().disableAndPushOccludersCurrentMask(nodePath); - } - - inline void popOccludersCurrentMask(NodePath& nodePath) - { - getCurrentCullingSet().popOccludersCurrentMask(nodePath); - } - - inline bool isCulled(const std::vector& vertices) - { - return getCurrentCullingSet().isCulled(vertices); - } - - inline bool isCulled(const BoundingBox& bb) - { - return bb.valid() && getCurrentCullingSet().isCulled(bb); - } - - inline bool isCulled(const BoundingSphere& bs) - { - return getCurrentCullingSet().isCulled(bs); - } - - inline bool isCulled(const osg::Node& node) - { - return node.isCullingActive() && getCurrentCullingSet().isCulled(node.getBound()); - } - - inline void pushCurrentMask() - { - getCurrentCullingSet().pushCurrentMask(); - } - - inline void popCurrentMask() - { - getCurrentCullingSet().popCurrentMask(); - } - - - typedef std::vector< CullingSet > CullingStack; - - inline CullingStack& getClipSpaceCullingStack() { return _clipspaceCullingStack; } - - inline CullingStack& getProjectionCullingStack() { return _projectionCullingStack; } - - inline CullingStack& getModelViewCullingStack() { return _modelviewCullingStack; } - - inline CullingSet& getCurrentCullingSet() { return *_back_modelviewCullingStack; } - inline const CullingSet& getCurrentCullingSet() const { return *_back_modelviewCullingStack; } - - inline osg::Viewport* getViewport(); - inline osg::RefMatrix* getModelViewMatrix(); - inline osg::RefMatrix* getProjectionMatrix(); - inline osg::Matrix getWindowMatrix(); - inline const osg::RefMatrix* getMVPW(); - - inline const osg::Vec3& getReferenceViewPoint() const { return _referenceViewPoints.back(); } - inline void pushReferenceViewPoint(const osg::Vec3& viewPoint) { _referenceViewPoints.push_back(viewPoint); } - inline void popReferenceViewPoint() { _referenceViewPoints.pop_back(); } - - inline const osg::Vec3& getEyeLocal() const { return _eyePointStack.back(); } - - inline const osg::Vec3& getViewPointLocal() const { return _viewPointStack.back(); } - - inline const osg::Vec3 getUpLocal() const - { - const osg::Matrix& matrix = *_modelviewStack.back(); - return osg::Vec3(matrix(0,1),matrix(1,1),matrix(2,1)); - } - - inline const osg::Vec3 getLookVectorLocal() const - { - const osg::Matrix& matrix = *_modelviewStack.back(); - return osg::Vec3(-matrix(0,2),-matrix(1,2),-matrix(2,2)); - } - - - protected: - - // base set of shadow volume occluder to use in culling. - ShadowVolumeOccluderList _occluderList; - - typedef fast_back_stack< ref_ptr > MatrixStack; - - MatrixStack _projectionStack; - - MatrixStack _modelviewStack; - MatrixStack _MVPW_Stack; - - typedef fast_back_stack > ViewportStack; - ViewportStack _viewportStack; - - typedef fast_back_stack EyePointStack; - EyePointStack _referenceViewPoints; - EyePointStack _eyePointStack; - EyePointStack _viewPointStack; - - CullingStack _clipspaceCullingStack; - CullingStack _projectionCullingStack; - - CullingStack _modelviewCullingStack; - unsigned int _index_modelviewCullingStack; - CullingSet* _back_modelviewCullingStack; - - void computeFrustumVolume(); - float _frustumVolume; - - unsigned int _bbCornerNear; - unsigned int _bbCornerFar; - - ref_ptr _identity; - - typedef std::vector< osg::ref_ptr > MatrixList; - MatrixList _reuseMatrixList; - unsigned int _currentReuseMatrixIndex; - - inline osg::RefMatrix* createOrReuseMatrix(const osg::Matrix& value); - - -}; - -inline osg::Viewport* CullStack::getViewport() -{ - if (!_viewportStack.empty()) - { - return _viewportStack.back().get(); - } - else - { - return 0L; - } -} - -inline osg::RefMatrix* CullStack::getModelViewMatrix() -{ - if (!_modelviewStack.empty()) - { - return _modelviewStack.back().get(); - } - else - { - return _identity.get(); - } -} - -inline osg::RefMatrix* CullStack::getProjectionMatrix() -{ - if (!_projectionStack.empty()) - { - return _projectionStack.back().get(); - } - else - { - return _identity.get(); - } -} - -inline osg::Matrix CullStack::getWindowMatrix() -{ - if (!_viewportStack.empty()) - { - osg::Viewport* viewport = _viewportStack.back().get(); - return viewport->computeWindowMatrix(); - } - else - { - return *_identity; - } -} - -inline const osg::RefMatrix* CullStack::getMVPW() -{ - if (!_MVPW_Stack.empty()) - { - if (!_MVPW_Stack.back()) - { - _MVPW_Stack.back() = createOrReuseMatrix(*getModelViewMatrix()); - (*_MVPW_Stack.back()) *= *(getProjectionMatrix()); - (*_MVPW_Stack.back()) *= getWindowMatrix(); - } - return _MVPW_Stack.back().get(); - } - else - { - return _identity.get(); - } -} - -inline RefMatrix* CullStack::createOrReuseMatrix(const osg::Matrix& value) -{ - // skip of any already reused matrix. - while (_currentReuseMatrixIndex<_reuseMatrixList.size() && - _reuseMatrixList[_currentReuseMatrixIndex]->referenceCount()>1) - { - ++_currentReuseMatrixIndex; - } - - // if still within list, element must be singularly referenced - // there return it to be reused. - if (_currentReuseMatrixIndex<_reuseMatrixList.size()) - { - RefMatrix* matrix = _reuseMatrixList[_currentReuseMatrixIndex++].get(); - matrix->set(value); - return matrix; - } - - // otherwise need to create new matrix. - osg::RefMatrix* matrix = new RefMatrix(value); - _reuseMatrixList.push_back(matrix); - ++_currentReuseMatrixIndex; - return matrix; -} - -} // end of namespace - -#endif diff --git a/libs/lib/mac32/include/osg/CullingSet b/libs/lib/mac32/include/osg/CullingSet deleted file mode 100644 index cb1739827..000000000 --- a/libs/lib/mac32/include/osg/CullingSet +++ /dev/null @@ -1,350 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_CullingSet -#define OSG_CullingSet 1 - -#include -#include -#include - -#include - - -namespace osg { - -#define COMPILE_WITH_SHADOW_OCCLUSION_CULLING - -/** A CullingSet class which contains a frustum and a list of occluders. */ -class OSG_EXPORT CullingSet : public Referenced -{ - - public: - - typedef std::pair< osg::ref_ptr, osg::Polytope > StateFrustumPair; - typedef std::vector< StateFrustumPair > StateFrustumList; - - CullingSet(); - - CullingSet(const CullingSet& cs): - Referenced(), - _mask(cs._mask), - _frustum(cs._frustum), - _stateFrustumList(cs._stateFrustumList), - _occluderList(cs._occluderList), - _pixelSizeVector(cs._pixelSizeVector), - _smallFeatureCullingPixelSize(cs._smallFeatureCullingPixelSize) - { - } - - CullingSet(const CullingSet& cs,const Matrix& matrix, const Vec4& pixelSizeVector): - _mask(cs._mask), - _frustum(cs._frustum), - _stateFrustumList(cs._stateFrustumList), - _occluderList(cs._occluderList), - _pixelSizeVector(pixelSizeVector), - _smallFeatureCullingPixelSize(cs._smallFeatureCullingPixelSize) - { - _frustum.transformProvidingInverse(matrix); - for(OccluderList::iterator itr=_occluderList.begin(); - itr!=_occluderList.end(); - ++itr) - { - itr->transformProvidingInverse(matrix); - } - } - - CullingSet& operator = (const CullingSet& cs) - { - if (this==&cs) return *this; - - _mask = cs._mask; - _frustum = cs._frustum; - _stateFrustumList = cs._stateFrustumList; - _occluderList = cs._occluderList; - _pixelSizeVector = cs._pixelSizeVector; - _smallFeatureCullingPixelSize = cs._smallFeatureCullingPixelSize; - - return *this; - } - - - inline void set(const CullingSet& cs) - { - _mask = cs._mask; - _frustum = cs._frustum; - _stateFrustumList = cs._stateFrustumList; - _occluderList = cs._occluderList; - _pixelSizeVector = cs._pixelSizeVector; - _smallFeatureCullingPixelSize = cs._smallFeatureCullingPixelSize; - } - - inline void set(const CullingSet& cs,const Matrix& matrix, const Vec4& pixelSizeVector) - { - _mask = cs._mask; - _stateFrustumList = cs._stateFrustumList; - _occluderList = cs._occluderList; - _pixelSizeVector = pixelSizeVector; - _smallFeatureCullingPixelSize = cs._smallFeatureCullingPixelSize; - - //_frustum = cs._frustum; - //_frustum.transformProvidingInverse(matrix); - - _frustum.setAndTransformProvidingInverse(cs._frustum,matrix); - - for(StateFrustumList::iterator sitr=_stateFrustumList.begin(); - sitr!=_stateFrustumList.end(); - ++sitr) - { - sitr->second.transformProvidingInverse(matrix); - } - - for(OccluderList::iterator oitr=_occluderList.begin(); - oitr!=_occluderList.end(); - ++oitr) - { - oitr->transformProvidingInverse(matrix); - } - - } - - typedef std::vector OccluderList; - - typedef int Mask; - - enum MaskValues - { - NO_CULLING = 0x0, - VIEW_FRUSTUM_SIDES_CULLING = 0x1, - NEAR_PLANE_CULLING = 0x2, - FAR_PLANE_CULLING = 0x4, - VIEW_FRUSTUM_CULLING = VIEW_FRUSTUM_SIDES_CULLING| - NEAR_PLANE_CULLING| - FAR_PLANE_CULLING, - SMALL_FEATURE_CULLING = 0x8, - SHADOW_OCCLUSION_CULLING = 0x10, - DEFAULT_CULLING = VIEW_FRUSTUM_SIDES_CULLING| - SMALL_FEATURE_CULLING| - SHADOW_OCCLUSION_CULLING, - ENABLE_ALL_CULLING = VIEW_FRUSTUM_CULLING| - SMALL_FEATURE_CULLING| - SHADOW_OCCLUSION_CULLING - }; - - void setCullingMask(Mask mask) { _mask = mask; } - Mask getCullingMask() const { return _mask; } - - void setFrustum(Polytope& cv) { _frustum = cv; } - - Polytope& getFrustum() { return _frustum; } - const Polytope& getFrustum() const { return _frustum; } - - void addStateFrustum(StateSet* stateset, Polytope& polytope) { _stateFrustumList.push_back(StateFrustumPair(stateset,polytope)); } - - void getStateFrustumList(StateFrustumList& sfl) { _stateFrustumList = sfl; } - StateFrustumList& getStateFrustumList() { return _stateFrustumList; } - - void addOccluder(ShadowVolumeOccluder& cv) { _occluderList.push_back(cv); } - - void setPixelSizeVector(const Vec4& v) { _pixelSizeVector = v; } - - Vec4& getPixelSizeVector() { return _pixelSizeVector; } - const Vec4& getPixelSizeVector() const { return _pixelSizeVector; } - - void setSmallFeatureCullingPixelSize(float value) { _smallFeatureCullingPixelSize=value; } - - float& getSmallFeatureCullingPixelSize() { return _smallFeatureCullingPixelSize; } - - float getSmallFeatureCullingPixelSize() const { return _smallFeatureCullingPixelSize; } - - - /** Compute the pixel of an object at position v, with specified radius.*/ - float pixelSize(const Vec3& v,float radius) const { return radius/(v*_pixelSizeVector); } - - /** Compute the pixel of a bounding sphere.*/ - float pixelSize(const BoundingSphere& bs) const { return bs.radius()/(bs.center()*_pixelSizeVector); } - - /** Compute the pixel of an object at position v, with specified radius. fabs()ed to always be positive. */ - float clampedPixelSize(const Vec3& v,float radius) const { return fabs(pixelSize(v, radius)); } - - /** Compute the pixel of a bounding sphere. fabs()ed to always be positive. */ - float clampedPixelSize(const BoundingSphere& bs) const { return fabs(pixelSize(bs)); } - - - inline bool isCulled(const std::vector& vertices) - { - if (_mask&VIEW_FRUSTUM_CULLING) - { - // is it outside the view frustum... - if (!_frustum.contains(vertices)) return true; - } - - if (_mask&SMALL_FEATURE_CULLING) - { - } - - if (_mask&SHADOW_OCCLUSION_CULLING) - { - // is it in one of the shadow occluder volumes. - if (!_occluderList.empty()) - { - for(OccluderList::iterator itr=_occluderList.begin(); - itr!=_occluderList.end(); - ++itr) - { - if (itr->contains(vertices)) return true; - } - } - } - - return false; - } - - inline bool isCulled(const BoundingBox& bb) - { - if (_mask&VIEW_FRUSTUM_CULLING) - { - // is it outside the view frustum... - if (!_frustum.contains(bb)) return true; - } - - if (_mask&SMALL_FEATURE_CULLING) - { - } - - if (_mask&SHADOW_OCCLUSION_CULLING) - { - // is it in one of the shadow occluder volumes. - if (!_occluderList.empty()) - { - for(OccluderList::iterator itr=_occluderList.begin(); - itr!=_occluderList.end(); - ++itr) - { - if (itr->contains(bb)) return true; - } - } - } - - return false; - } - - inline bool isCulled(const BoundingSphere& bs) - { - if (_mask&VIEW_FRUSTUM_CULLING) - { - // is it outside the view frustum... - if (!_frustum.contains(bs)) return true; - } - - if (_mask&SMALL_FEATURE_CULLING) - { - if (((bs.center()*_pixelSizeVector)*_smallFeatureCullingPixelSize)>bs.radius()) return true; - } -#ifdef COMPILE_WITH_SHADOW_OCCLUSION_CULLING - if (_mask&SHADOW_OCCLUSION_CULLING) - { - // is it in one of the shadow occluder volumes. - if (!_occluderList.empty()) - { - for(OccluderList::iterator itr=_occluderList.begin(); - itr!=_occluderList.end(); - ++itr) - { - if (itr->contains(bs)) return true; - } - } - } -#endif - return false; - } - - inline void pushCurrentMask() - { - _frustum.pushCurrentMask(); - - if (!_stateFrustumList.empty()) - { - for(StateFrustumList::iterator itr=_stateFrustumList.begin(); - itr!=_stateFrustumList.end(); - ++itr) - { - itr->second.pushCurrentMask(); - } - } - - -#ifdef COMPILE_WITH_SHADOW_OCCLUSION_CULLING - if (!_occluderList.empty()) - { - for(OccluderList::iterator itr=_occluderList.begin(); - itr!=_occluderList.end(); - ++itr) - { - itr->pushCurrentMask(); - } - } -#endif - } - - inline void popCurrentMask() - { - _frustum.popCurrentMask(); - - if (!_stateFrustumList.empty()) - { - for(StateFrustumList::iterator itr=_stateFrustumList.begin(); - itr!=_stateFrustumList.end(); - ++itr) - { - itr->second.popCurrentMask(); - } - } - -#ifdef COMPILE_WITH_SHADOW_OCCLUSION_CULLING - if (!_occluderList.empty()) - { - for(OccluderList::iterator itr=_occluderList.begin(); - itr!=_occluderList.end(); - ++itr) - { - itr->popCurrentMask(); - } - } -#endif - } - - void disableAndPushOccludersCurrentMask(NodePath& nodePath); - - void popOccludersCurrentMask(NodePath& nodePath); - - static osg::Vec4 computePixelSizeVector(const Viewport& W, const Matrix& P, const Matrix& M); - - virtual ~CullingSet(); - - - protected: - - - Mask _mask; - Polytope _frustum; - StateFrustumList _stateFrustumList; - OccluderList _occluderList; - Vec4 _pixelSizeVector; - float _smallFeatureCullingPixelSize; - -}; - -} // end of namespace - -#endif diff --git a/libs/lib/mac32/include/osg/DeleteHandler b/libs/lib/mac32/include/osg/DeleteHandler deleted file mode 100644 index 0d10e7a1f..000000000 --- a/libs/lib/mac32/include/osg/DeleteHandler +++ /dev/null @@ -1,88 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_DELETEHANDLER -#define OSG_DELETEHANDLER 1 - -#include - -#include - -namespace osg { - - -/** Class for override the default delete behavior so that users can implement their own object - * deletion schemes. This might be done to help implement protection of multiple threads from deleting - * objects unintentionally. - * Note, the DeleteHandler cannot itself be reference counted, otherwise it - * would be responsible for deleting itself! - * An static auto_ptr<> is used internally in Referenced.cpp to manage the - * DeleteHandler's memory.*/ -class OSG_EXPORT DeleteHandler -{ - public: - - typedef std::pair FrameNumberObjectPair; - typedef std::list ObjectsToDeleteList; - - DeleteHandler(int numberOfFramesToRetainObjects=0); - - virtual ~DeleteHandler(); - - /** Set the number of frames to retain objects that are have been requested for deletion. - * When set to zero objects are deleted immediately, by set to 1 there are kept around for an extra frame etc. - * The ability to retain objects for several frames is useful to prevent premature deletion when objects - * are still be used the graphics threads that are using double buffering of rendering data structures with - * non ref_ptr<> pointers to scene graph elements.*/ - void setNumFramesToRetainObjects(unsigned int numberOfFramesToRetainObjects) { _numFramesToRetainObjects = numberOfFramesToRetainObjects; } - - unsigned int getNumFramesToRetainObjects() const { return _numFramesToRetainObjects; } - - /** Set the current frame number so that subsequent deletes get tagged as associated with this frame.*/ - void setFrameNumber(unsigned int frameNumber) { _currentFrameNumber = frameNumber; } - - /** Get the current frame number.*/ - unsigned int getFrameNumber() const { return _currentFrameNumber; } - - inline void doDelete(const Referenced* object) { delete object; } - - /** Flush objects that ready to be fully deleted.*/ - virtual void flush(); - - /** Flush all objects that the DeleteHandler holds. - * Note, this should only be called if there are no threads running with non ref_ptr<> pointers, such as graphics threads.*/ - virtual void flushAll(); - - /** Request the deletion of an object. - * Depending on users implementation of DeleteHandler, the delete of the object may occur - * straight away or be delayed until doDelete is called. - * The default implementation does a delete straight away.*/ - virtual void requestDelete(const osg::Referenced* object); - - protected: - - DeleteHandler(const DeleteHandler&): - _numFramesToRetainObjects(0), - _currentFrameNumber(0) {} - DeleteHandler operator = (const DeleteHandler&) { return *this; } - - unsigned int _numFramesToRetainObjects; - unsigned int _currentFrameNumber; - OpenThreads::Mutex _mutex; - ObjectsToDeleteList _objectsToDelete; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Depth b/libs/lib/mac32/include/osg/Depth deleted file mode 100644 index 7080f3a0a..000000000 --- a/libs/lib/mac32/include/osg/Depth +++ /dev/null @@ -1,112 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_DEPTH -#define OSG_DEPTH 1 - -#include - -namespace osg { - -/** Encapsulate OpenGL glDepthFunc/Mask/Range functions. -*/ -class OSG_EXPORT Depth : public StateAttribute -{ - public : - - - enum Function - { - NEVER = GL_NEVER, - LESS = GL_LESS, - EQUAL = GL_EQUAL, - LEQUAL = GL_LEQUAL, - GREATER = GL_GREATER, - NOTEQUAL = GL_NOTEQUAL, - GEQUAL = GL_GEQUAL, - ALWAYS = GL_ALWAYS - }; - - - Depth(Function func=LESS,double zNear=0.0, double zFar=1.0,bool writeMask=true); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Depth(const Depth& dp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(dp,copyop), - _func(dp._func), - _zNear(dp._zNear), - _zFar(dp._zFar), - _depthWriteMask(dp._depthWriteMask) {} - - - META_StateAttribute(osg, Depth, DEPTH); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Depth,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_func) - COMPARE_StateAttribute_Parameter(_depthWriteMask) - COMPARE_StateAttribute_Parameter(_zNear) - COMPARE_StateAttribute_Parameter(_zFar) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_DEPTH_TEST); - return true; - } - - inline void setFunction(Function func) { _func = func; } - inline Function getFunction() const { return _func; } - - - inline void setRange(double zNear, double zFar) - { - _zNear = zNear; - _zFar = zFar; - } - - inline void setZNear(double zNear) { _zNear=zNear; } - inline double getZNear() const { return _zNear; } - - inline void setZFar(double zFar) { _zFar=zFar; } - inline double getZFar() const { return _zFar; } - - inline void setWriteMask(bool mask) { _depthWriteMask = mask; } - inline bool getWriteMask() const { return _depthWriteMask; } - - - virtual void apply(State& state) const; - - protected: - - virtual ~Depth(); - - Function _func; - - double _zNear; - double _zFar; - - bool _depthWriteMask; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/DisplaySettings b/libs/lib/mac32/include/osg/DisplaySettings deleted file mode 100644 index 6f0ddda04..000000000 --- a/libs/lib/mac32/include/osg/DisplaySettings +++ /dev/null @@ -1,337 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_DisplaySettings -#define OSG_DisplaySettings 1 - -#include -#include - -#include -#include - -namespace osg { - -// forward declare -class ArgumentParser; -class ApplicationUsage; - -/** DisplaySettings class for encapsulating what visuals are required and - * have been set up, and the status of stereo viewing.*/ -class OSG_EXPORT DisplaySettings : public osg::Referenced -{ - - public: - - /** Maintain a DisplaySettings singleton for objects to query at runtime.*/ - static ref_ptr& instance(); - - DisplaySettings(): - Referenced(true) - { - setDefaults(); - readEnvironmentalVariables(); - } - - DisplaySettings(ArgumentParser& arguments): - Referenced(true) - { - setDefaults(); - readEnvironmentalVariables(); - readCommandLine(arguments); - } - - DisplaySettings(const DisplaySettings& vs); - - - DisplaySettings& operator = (const DisplaySettings& vs); - - void setDisplaySettings(const DisplaySettings& vs); - - void merge(const DisplaySettings& vs); - - void setDefaults(); - - /** read the environmental variables.*/ - void readEnvironmentalVariables(); - - /** read the commandline arguments.*/ - void readCommandLine(ArgumentParser& arguments); - - - enum DisplayType - { - MONITOR, - POWERWALL, - REALITY_CENTER, - HEAD_MOUNTED_DISPLAY - }; - - void setDisplayType(DisplayType type) { _displayType = type; } - - DisplayType getDisplayType() const { return _displayType; } - - - void setStereo(bool on) { _stereo = on; } - bool getStereo() const { return _stereo; } - - enum StereoMode - { - QUAD_BUFFER, - ANAGLYPHIC, - HORIZONTAL_SPLIT, - VERTICAL_SPLIT, - LEFT_EYE, - RIGHT_EYE, - HORIZONTAL_INTERLACE, - VERTICAL_INTERLACE, - CHECKERBOARD - }; - - void setStereoMode(StereoMode mode) { _stereoMode = mode; } - StereoMode getStereoMode() const { return _stereoMode; } - - void setEyeSeparation(float eyeSeparation) { _eyeSeparation = eyeSeparation; } - float getEyeSeparation() const { return _eyeSeparation; } - - enum SplitStereoHorizontalEyeMapping - { - LEFT_EYE_LEFT_VIEWPORT, - LEFT_EYE_RIGHT_VIEWPORT - }; - - void setSplitStereoHorizontalEyeMapping(SplitStereoHorizontalEyeMapping m) { _splitStereoHorizontalEyeMapping = m; } - SplitStereoHorizontalEyeMapping getSplitStereoHorizontalEyeMapping() const { return _splitStereoHorizontalEyeMapping; } - - void setSplitStereoHorizontalSeparation(int s) { _splitStereoHorizontalSeparation = s; } - int getSplitStereoHorizontalSeparation() const { return _splitStereoHorizontalSeparation; } - - enum SplitStereoVerticalEyeMapping - { - LEFT_EYE_TOP_VIEWPORT, - LEFT_EYE_BOTTOM_VIEWPORT - }; - - void setSplitStereoVerticalEyeMapping(SplitStereoVerticalEyeMapping m) { _splitStereoVerticalEyeMapping = m; } - SplitStereoVerticalEyeMapping getSplitStereoVerticalEyeMapping() const { return _splitStereoVerticalEyeMapping; } - - void setSplitStereoVerticalSeparation(int s) { _splitStereoVerticalSeparation = s; } - int getSplitStereoVerticalSeparation() const { return _splitStereoVerticalSeparation; } - - void setSplitStereoAutoAdjustAspectRatio(bool flag) { _splitStereoAutoAdjustAspectRatio=flag; } - bool getSplitStereoAutoAdjustAspectRatio() const { return _splitStereoAutoAdjustAspectRatio; } - - - void setScreenWidth(float width) { _screenWidth = width; } - float getScreenWidth() const { return _screenWidth; } - - void setScreenHeight(float height) { _screenHeight = height; } - float getScreenHeight() const { return _screenHeight; } - - void setScreenDistance(float distance) { _screenDistance = distance; } - float getScreenDistance() const { return _screenDistance; } - - - - void setDoubleBuffer(bool flag) { _doubleBuffer = flag; } - bool getDoubleBuffer() const { return _doubleBuffer; } - - - void setRGB(bool flag) { _RGB = flag; } - bool getRGB() const { return _RGB; } - - - void setDepthBuffer(bool flag) { _depthBuffer = flag; } - bool getDepthBuffer() const { return _depthBuffer; } - - - void setMinimumNumAlphaBits(unsigned int bits) { _minimumNumberAlphaBits = bits; } - unsigned int getMinimumNumAlphaBits() const { return _minimumNumberAlphaBits; } - bool getAlphaBuffer() const { return _minimumNumberAlphaBits!=0; } - - void setMinimumNumStencilBits(unsigned int bits) { _minimumNumberStencilBits = bits; } - unsigned int getMinimumNumStencilBits() const { return _minimumNumberStencilBits; } - bool getStencilBuffer() const { return _minimumNumberStencilBits!=0; } - - void setMinimumNumAccumBits(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha); - unsigned int getMinimumNumAccumRedBits() const { return _minimumNumberAccumRedBits; } - unsigned int getMinimumNumAccumGreenBits() const { return _minimumNumberAccumGreenBits; } - unsigned int getMinimumNumAccumBlueBits() const { return _minimumNumberAccumBlueBits; } - unsigned int getMinimumNumAccumAlphaBits() const { return _minimumNumberAccumAlphaBits; } - bool getAccumBuffer() const { return (_minimumNumberAccumRedBits+_minimumNumberAccumGreenBits+_minimumNumberAccumBlueBits+_minimumNumberAccumAlphaBits)!=0; } - - - void setMaxNumberOfGraphicsContexts(unsigned int num); - unsigned int getMaxNumberOfGraphicsContexts() const; - - void setNumMultiSamples(unsigned int samples) { _numMultiSamples = samples; } - unsigned int getNumMultiSamples() const { return _numMultiSamples; } - bool getMultiSamples() const { return _numMultiSamples!=0; } - - void setCompileContextsHint(bool useCompileContexts) { _compileContextsHint = useCompileContexts; } - bool getCompileContextsHint() const { return _compileContextsHint; } - - void setSerializeDrawDispatch(bool serializeDrawDispatch) { _serializeDrawDispatch = serializeDrawDispatch; } - bool getSerializeDrawDispatch() const { return _serializeDrawDispatch; } - - /** Set the hint for the total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads.*/ - void setNumOfDatabaseThreadsHint(unsigned int numThreads) { _numDatabaseThreadsHint = numThreads; } - - /** Get the hint for total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads.*/ - unsigned int getNumOfDatabaseThreadsHint() const { return _numDatabaseThreadsHint; } - - /** Set the hint for number of threads in the DatbasePager to dedicate to reading http requests.*/ - void setNumOfHttpDatabaseThreadsHint(unsigned int numThreads) { _numHttpDatabaseThreadsHint = numThreads; } - - /** Get the hint for number of threads in the DatbasePager dedicated to reading http requests.*/ - unsigned int getNumOfHttpDatabaseThreadsHint() const { return _numHttpDatabaseThreadsHint; } - - void setApplication(const std::string& application) { _application = application; } - const std::string& getApplication() { return _application; } - - - void setMaxTexturePoolSize(unsigned int size) { _maxTexturePoolSize = size; } - unsigned int getMaxTexturePoolSize() const { return _maxTexturePoolSize; } - - void setMaxBufferObjectPoolSize(unsigned int size) { _maxBufferObjectPoolSize = size; } - unsigned int getMaxBufferObjectPoolSize() const { return _maxBufferObjectPoolSize; } - - /** - Methods used to set and get defaults for Cameras implicit buffer attachments. - For more info: See description of Camera::setImplicitBufferAttachment method - - DisplaySettings implicit buffer attachment selection defaults to: DEPTH and COLOR - for both primary (Render) FBO and seconday Multisample (Resolve) FBO - ie: IMPLICT_DEPTH_BUFFER_ATTACHMENT | IMPLICIT_COLOR_BUFFER_ATTACHMENT - **/ - enum ImplicitBufferAttachment - { - IMPLICIT_DEPTH_BUFFER_ATTACHMENT = (1 << 0), - IMPLICIT_STENCIL_BUFFER_ATTACHMENT = (1 << 1), - IMPLICIT_COLOR_BUFFER_ATTACHMENT = (1 << 2), - DEFAULT_IMPLICIT_BUFFER_ATTACHMENT = IMPLICIT_COLOR_BUFFER_ATTACHMENT | IMPLICIT_DEPTH_BUFFER_ATTACHMENT - }; - - typedef int ImplicitBufferAttachmentMask; - - void setImplicitBufferAttachmentMask(ImplicitBufferAttachmentMask renderMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT, ImplicitBufferAttachmentMask resolveMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT ) - { - _implicitBufferAttachmentRenderMask = renderMask; - _implicitBufferAttachmentResolveMask = resolveMask; - } - - void setImplicitBufferAttachmentRenderMask(ImplicitBufferAttachmentMask implicitBufferAttachmentRenderMask) - { - _implicitBufferAttachmentRenderMask = implicitBufferAttachmentRenderMask; - } - - void setImplicitBufferAttachmentResolveMask(ImplicitBufferAttachmentMask implicitBufferAttachmentResolveMask) - { - _implicitBufferAttachmentResolveMask = implicitBufferAttachmentResolveMask; - } - - /** Get mask selecting default implict buffer attachments for Cameras primary FBOs. */ - ImplicitBufferAttachmentMask getImplicitBufferAttachmentRenderMask() const { return _implicitBufferAttachmentRenderMask; } - - /** Get mask selecting default implict buffer attachments for Cameras secondary MULTISAMPLE FBOs. */ - ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask() const { return _implicitBufferAttachmentResolveMask;} - - enum SwapMethod - { - SWAP_DEFAULT, // Leave swap method at default returned by choose Pixel Format. - SWAP_EXCHANGE, // Flip front / back buffer. - SWAP_COPY, // Copy back to front buffer. - SWAP_UNDEFINED // Move back to front buffer leaving contents of back buffer undefined. - }; - - /** Select preferred swap method */ - void setSwapMethod( SwapMethod swapMethod ) { _swapMethod = swapMethod; } - - /** Get preferred swap method */ - SwapMethod getSwapMethod( void ) { return _swapMethod; } - - /** Set the hint of which OpenGL version to attempt to create a graphics context for.*/ - void setGLContextVersion(const std::string& version) { _glContextVersion = version; } - - /** Get the hint of which OpenGL version to attempt to create a graphics context for.*/ - const std::string getGLContextVersion() const { return _glContextVersion; } - - /** Set the hint of the flags to use in when creating graphic contexts.*/ - void setGLContextFlags(unsigned int flags) { _glContextFlags = flags; } - - /** Get the hint of the flags to use in when creating graphic contexts.*/ - unsigned int getGLContextFlags() const { return _glContextFlags; } - - /** Set the hint of the profile mask to use in when creating graphic contexts.*/ - void setGLContextProfileMask(unsigned int mask) { _glContextProfileMask = mask; } - - /** Get the hint of the profile mask to use in when creating graphic contexts.*/ - unsigned int getGLContextProfileMask() const { return _glContextProfileMask; } - - protected: - - virtual ~DisplaySettings(); - - - DisplayType _displayType; - bool _stereo; - StereoMode _stereoMode; - float _eyeSeparation; - float _screenWidth; - float _screenHeight; - float _screenDistance; - - SplitStereoHorizontalEyeMapping _splitStereoHorizontalEyeMapping; - int _splitStereoHorizontalSeparation; - SplitStereoVerticalEyeMapping _splitStereoVerticalEyeMapping; - int _splitStereoVerticalSeparation; - bool _splitStereoAutoAdjustAspectRatio; - - bool _doubleBuffer; - bool _RGB; - bool _depthBuffer; - unsigned int _minimumNumberAlphaBits; - unsigned int _minimumNumberStencilBits; - unsigned int _minimumNumberAccumRedBits; - unsigned int _minimumNumberAccumGreenBits; - unsigned int _minimumNumberAccumBlueBits; - unsigned int _minimumNumberAccumAlphaBits; - - unsigned int _maxNumOfGraphicsContexts; - - unsigned int _numMultiSamples; - - bool _compileContextsHint; - bool _serializeDrawDispatch; - - unsigned int _numDatabaseThreadsHint; - unsigned int _numHttpDatabaseThreadsHint; - - std::string _application; - - unsigned int _maxTexturePoolSize; - unsigned int _maxBufferObjectPoolSize; - - ImplicitBufferAttachmentMask _implicitBufferAttachmentRenderMask; - ImplicitBufferAttachmentMask _implicitBufferAttachmentResolveMask; - - std::string _glContextVersion; - unsigned int _glContextFlags; - unsigned int _glContextProfileMask; - - SwapMethod _swapMethod; -}; - -} - -# endif diff --git a/libs/lib/mac32/include/osg/DrawPixels b/libs/lib/mac32/include/osg/DrawPixels deleted file mode 100644 index f47783f65..000000000 --- a/libs/lib/mac32/include/osg/DrawPixels +++ /dev/null @@ -1,80 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_DRAWPIXELS -#define OSG_DRAWPIXELS 1 - -#include -#include -#include - -namespace osg { - -/** DrawPixels is an osg::Drawable subclass which encapsulates the drawing of - * images using glDrawPixels.*/ -class OSG_EXPORT DrawPixels : public Drawable -{ - public: - - DrawPixels(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - DrawPixels(const DrawPixels& drawimage,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new DrawPixels(); } - - virtual Object* clone(const CopyOp& copyop) const { return new DrawPixels(*this,copyop); } - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "DrawPixels"; } - - - void setPosition(const osg::Vec3& position); - - osg::Vec3& getPosition() { return _position; } - const osg::Vec3& getPosition() const { return _position; } - - void setImage(osg::Image* image) { _image = image; } - - osg::Image* getImage() { return _image.get(); } - const osg::Image* getImage() const { return _image.get(); } - - void setUseSubImage(bool useSubImage) { _useSubImage=useSubImage; } - bool getUseSubImage() const { return _useSubImage; } - - void setSubImageDimensions(unsigned int offsetX,unsigned int offsetY,unsigned int width,unsigned int height); - void getSubImageDimensions(unsigned int& offsetX,unsigned int& offsetY,unsigned int& width,unsigned int& height) const; - - virtual void drawImplementation(RenderInfo& renderInfo) const; - - virtual BoundingBox computeBound() const; - - protected: - - DrawPixels& operator = (const DrawPixels&) { return *this;} - - virtual ~DrawPixels(); - - Vec3 _position; - ref_ptr _image; - - bool _useSubImage; - unsigned int _offsetX, _offsetY, _width, _height; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Drawable b/libs/lib/mac32/include/osg/Drawable deleted file mode 100644 index e1e6cd698..000000000 --- a/libs/lib/mac32/include/osg/Drawable +++ /dev/null @@ -1,920 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_DRAWABLE -#define OSG_DRAWABLE 1 - -#include -#include -#include -#include -#include - - -#ifndef GL_NV_occlusion_query - - #define GL_OCCLUSION_TEST_HP 0x8165 - #define GL_OCCLUSION_TEST_RESULT_HP 0x8166 - #define GL_PIXEL_COUNTER_BITS_NV 0x8864 - #define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 - #define GL_PIXEL_COUNT_NV 0x8866 - #define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 - -#endif - -#ifndef GL_ARB_occlusion_query - - #define GL_SAMPLES_PASSED_ARB 0x8914 - #define GL_QUERY_COUNTER_BITS_ARB 0x8864 - #define GL_CURRENT_QUERY_ARB 0x8865 - #define GL_QUERY_RESULT_ARB 0x8866 - #define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 - -#endif - - -#ifndef GL_TIME_ELAPSED - #define GL_TIME_ELAPSED 0x88BF - #define GL_TIMESTAMP 0x8E28 -#endif - -#ifndef GL_QUERY_RESULT - #define GL_QUERY_RESULT 0x8866 - #define GL_QUERY_RESULT_AVAILABLE 0x8867 -#endif - - -#if !defined(GL_EXT_timer_query) && !defined(OSG_GL3_AVAILABLE) - #ifdef _WIN32 - typedef __int64 GLint64EXT; - typedef unsigned __int64 GLuint64EXT; - #else - typedef long long int GLint64EXT; - typedef unsigned long long int GLuint64EXT; - #endif -#endif - - -namespace osg { - - -class Vec2f; -class Vec3f; -class Vec4f; -class Vec4ub; -class Geometry; -class NodeVisitor; -class ArrayDispatchers; - -// this is defined to alter the way display lists are compiled inside the -// the draw method, it has been found that the NVidia drivers fail completely -// to optimize COMPILE_AND_EXECUTE in fact make it go slower than for no display -// lists, but optimize a separate COMPILE very well?! Define it as default -// the use of a separate COMPILE, then glCallList rather than use COMPILE_AND_EXECUTE. - -#define USE_SEPARATE_COMPILE_AND_EXECUTE - -/** Pure virtual base class for drawable geometry. In OSG, everything that can - * be rendered is implemented as a class derived from \c Drawable. The - * \c Drawable class contains no drawing primitives, since these are provided - * by subclasses such as \c osg::Geometry. - *

Notice that a \c Drawable is not a \c Node, and therefore it cannot be - * directly added to a scene graph. Instead, Drawables are attached to - * Geodes, which are scene graph nodes. - *

The OpenGL state that must be used when rendering a \c Drawable is - * represented by a \c StateSet. Since a \c Drawable has a reference - * (\c osg::ref_ptr) to a \c StateSet, StateSets can be shared between - * different Drawables. In fact, sharing StateSets is a good - * way to improve performance, since this allows OSG to reduce the number of - * expensive changes in the OpenGL state. - *

Finally, Drawables can also be shared between different - * Geodes, so that the same geometry (loaded to memory just once) can - * be used in different parts of the scene graph. -*/ -class OSG_EXPORT Drawable : public Object -{ - public: - - static unsigned int s_numberDrawablesReusedLastInLastFrame; - static unsigned int s_numberNewDrawablesInLastFrame; - static unsigned int s_numberDeletedDrawablesInLastFrame; - - Drawable(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Drawable(const Drawable& drawable,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "Drawable"; } - - /** Convert 'this' into a Geometry pointer if Drawable is a Geometry, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual Geometry* asGeometry() { return 0; } - - /** Convert 'const this' into a const Geometry pointer if Drawable is a Geometry, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual const Geometry* asGeometry() const { return 0; } - - - /** Compute the DataVariance based on an assessment of callback etc.*/ - virtual void computeDataVariance(); - - - /** A vector of osg::Node pointers which is used to store the parent(s) of drawable.*/ - typedef std::vector ParentList; - - /** Get the parent list of drawable. */ - inline const ParentList& getParents() const { return _parents; } - - /** Get the a copy of parent list of node. A copy is returned to - * prevent modification of the parent list.*/ - inline ParentList getParents() { return _parents; } - - /** Get a single parent of Drawable. - * @param i index of the parent to get. - * @return the parent i. - */ - inline Node* getParent(unsigned int i) { return _parents[i]; } - /** Get a single const parent of Drawable. - * @param i index of the parent to get. - * @return the parent i. - */ - inline const Node* getParent(unsigned int i) const { return _parents[i]; } - - /** - * Get the number of parents of node. - * @return the number of parents of this node. - */ - inline unsigned int getNumParents() const { return static_cast(_parents.size()); } - - /** Get the list of matrices that transform this node from local coordinates to world coordinates. - * The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */ - MatrixList getWorldMatrices(const osg::Node* haltTraversalAtNode=0) const; - - - /** Set the StateSet attached to the Drawable. - Previously attached StateSet are automatically unreferenced on - assignment of a new drawstate.*/ - void setStateSet(StateSet* stateset); - - /** Get the attached StateSet.*/ - inline StateSet* getStateSet() { return _stateset.get();} - - /** Get the attached const StateSet.*/ - inline const StateSet* getStateSet() const { return _stateset.get();} - - /** Get the attached const StateSet, - * if one is not already attached create one, - * attach it to the drawable and return a pointer to it.*/ - StateSet* getOrCreateStateSet(); - - - /** Set the initial bounding volume to use when computing the overall bounding volume.*/ - void setInitialBound(const osg::BoundingBox& bbox) { _initialBound = bbox; dirtyBound(); } - - /** Set the initial bounding volume to use when computing the overall bounding volume.*/ - const BoundingBox& getInitialBound() const { return _initialBound; } - - /** Dirty the bounding box, forcing a computeBound() on the next call - * to getBound(). Should be called in the internal geometry of the Drawable - * is modified.*/ - void dirtyBound(); - - /** Get BoundingBox of Drawable. - * If the BoundingBox is not up to date then its updated via an internal call to computeBond(). - */ - inline const BoundingBox& getBound() const - { - if(!_boundingBoxComputed) - { - _boundingBox = _initialBound; - if (_computeBoundCallback.valid()) - _boundingBox.expandBy(_computeBoundCallback->computeBound(*this)); - else - _boundingBox.expandBy(computeBound()); - - _boundingBoxComputed = true; - } - return _boundingBox; - } - - - /** Compute the bounding box around Drawables's geometry.*/ - virtual BoundingBox computeBound() const; - - /** Callback to allow users to override the default computation of bounding volume. */ - struct ComputeBoundingBoxCallback : public osg::Object - { - ComputeBoundingBoxCallback() {} - - ComputeBoundingBoxCallback(const ComputeBoundingBoxCallback&,const CopyOp&) {} - - META_Object(osg,ComputeBoundingBoxCallback); - - virtual BoundingBox computeBound(const osg::Drawable&) const { return BoundingBox(); } - }; - - /** Set the compute bound callback to override the default computeBound.*/ - void setComputeBoundingBoxCallback(ComputeBoundingBoxCallback* callback) { _computeBoundCallback = callback; } - - /** Get the compute bound callback.*/ - ComputeBoundingBoxCallback* getComputeBoundingBoxCallback() { return _computeBoundCallback.get(); } - - /** Get the const compute bound callback.*/ - const ComputeBoundingBoxCallback* getComputeBoundingBoxCallback() const { return _computeBoundCallback.get(); } - - - /** Set the Shape of the \c Drawable. The shape can be used to - * speed up collision detection or as a guide for procedural - * geometry generation. - * @see osg::Shape. - */ - inline void setShape(Shape* shape) { _shape = shape; } - - /** Get the Shape of the Drawable.*/ - inline Shape* getShape() { return _shape.get(); } - - /** Get the const Shape of the const Drawable.*/ - inline const Shape* getShape() const { return _shape.get(); } - - - - /** Set the drawable so that it can or cannot be used in conjunction with OpenGL - * display lists. When set to true, calls to Drawable::setUseDisplayList, - * whereas when set to false, no display lists can be created and calls - * to setUseDisplayList are ignored, and a warning is produced. The latter - * is typically used to guard against the switching on of display lists - * on objects with dynamic internal data such as continuous Level of Detail - * algorithms.*/ - void setSupportsDisplayList(bool flag); - - /** Get whether display lists are supported for this drawable instance.*/ - inline bool getSupportsDisplayList() const { return _supportsDisplayList; } - - - /** When set to true, force the draw method to use OpenGL Display List for rendering. - If false, rendering directly. If the display list has not been compiled - already, the next call to draw will automatically create the display list.*/ - void setUseDisplayList(bool flag); - - /** Return whether OpenGL display lists are being used for rendering.*/ - inline bool getUseDisplayList() const { return _useDisplayList; } - - /** Return OpenGL display list for specified contextID. */ - inline GLuint& getDisplayList(unsigned int contextID) const { return _globjList[contextID]; } - - /** When set to true, ignore the setUseDisplayList() settings, and hints to the drawImplementation - method to use OpenGL vertex buffer objects for rendering.*/ - virtual void setUseVertexBufferObjects(bool flag); - - /** Return whether OpenGL vertex buffer objects should be used when supported by OpenGL driver.*/ - inline bool getUseVertexBufferObjects() const { return _useVertexBufferObjects; } - - - /** Force a recompile on next draw() of any OpenGL display list associated with this geoset.*/ - virtual void dirtyDisplayList(); - - - /** Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with this drawable. - * This size is used a hint for reuse of deleted display lists/vertex buffer objects. */ - virtual unsigned int getGLObjectSizeHint() const { return 0; } - - - - /** Draw OpenGL primitives. - * If the \c Drawable has \c _useDisplayList set to \c true, then use - * an OpenGL display list, automatically compiling one if required. - * Otherwise, call \c drawImplementation(). - * @note This method should \e not be overridden in subclasses, as it - * manages the optional display list (notice this is not even - * \c virtual). Subclasses should override - * \c drawImplementation() instead. - */ - inline void draw(RenderInfo& renderInfo) const; - - /** Immediately compile this \c Drawable into an OpenGL Display List/VertexBufferObjects. - * @note Operation is ignored if \c _useDisplayList is \c false or VertexBufferObjects are not used. - */ - virtual void compileGLObjects(RenderInfo& renderInfo) const; - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(State* state=0) const; - - struct UpdateCallback : public virtual osg::Object - { - UpdateCallback() {} - - UpdateCallback(const UpdateCallback&,const CopyOp&) {} - - META_Object(osg,UpdateCallback); - - /** do customized update code.*/ - virtual void update(osg::NodeVisitor*, osg::Drawable*) {} - }; - - /** Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal. */ - virtual void setUpdateCallback(UpdateCallback* ac); - - /** Get the non const UpdateCallback.*/ - UpdateCallback* getUpdateCallback() { return _updateCallback.get(); } - - /** Get the const UpdateCallback.*/ - const UpdateCallback* getUpdateCallback() const { return _updateCallback.get(); } - - /** Return whether this Drawable has update callbacks associated with it, and therefore must be traversed.*/ - bool requiresUpdateTraversal() const { return _updateCallback.valid() || (_stateset.valid() && _stateset->requiresUpdateTraversal()); } - - - struct EventCallback : public virtual osg::Object - { - EventCallback() {} - - EventCallback(const EventCallback&,const CopyOp&) {} - - META_Object(osg,EventCallback); - - /** do customized Event code. */ - virtual void event(osg::NodeVisitor*, osg::Drawable*) {} - }; - - /** Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.*/ - virtual void setEventCallback(EventCallback* ac); - - /** Get the non const EventCallback.*/ - EventCallback* getEventCallback() { return _eventCallback.get(); } - - /** Get the const EventCallback.*/ - const EventCallback* getEventCallback() const { return _eventCallback.get(); } - - /** Return whether this Drawable has event callbacks associated with it, and therefore must be traversed.*/ - bool requiresEventTraversal() const { return _eventCallback.valid() || (_stateset.valid() && _stateset->requiresEventTraversal()); } - - - struct CullCallback : public virtual osg::Object - { - CullCallback() {} - - CullCallback(const CullCallback&,const CopyOp&) {} - - META_Object(osg,CullCallback); - - /** deprecated.*/ - virtual bool cull(osg::NodeVisitor*, osg::Drawable*, osg::State*) const { return false; } - - /** do customized cull code, return true if drawable should be culled.*/ - virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const { return cull(nv, drawable, renderInfo? renderInfo->getState():0); } - }; - - /** Set the CullCallback which allows users to customize the culling of Drawable during the cull traversal.*/ - virtual void setCullCallback(CullCallback* cc) { _cullCallback=cc; } - - /** Get the non const CullCallback.*/ - CullCallback* getCullCallback() { return _cullCallback.get(); } - - /** Get the const CullCallback.*/ - const CullCallback* getCullCallback() const { return _cullCallback.get(); } - - - - - /** Callback attached to an Drawable which allows the users to customize the drawing of an exist Drawable object. - * The draw callback is implement as a replacement to the Drawable's own drawImplementation() method, if the - * the user intends to decorate the existing draw code then simple call the drawable->drawImplementation() from - * with the callbacks drawImplementation() method. This allows the users to do both pre and post callbacks - * without fuss and can even disable the inner draw if required.*/ - struct DrawCallback : public virtual osg::Object - { - DrawCallback() {} - - DrawCallback(const DrawCallback&,const CopyOp&) {} - - META_Object(osg,DrawCallback); - - /** do customized draw code.*/ - virtual void drawImplementation(osg::RenderInfo& /*renderInfo*/,const osg::Drawable* /*drawable*/) const {} - }; - - /** Set the DrawCallback which allows users to attach customize the drawing of existing Drawable object.*/ - virtual void setDrawCallback(DrawCallback* dc) { _drawCallback=dc; dirtyDisplayList(); } - - /** Get the non const DrawCallback.*/ - DrawCallback* getDrawCallback() { return _drawCallback.get(); } - - /** Get the const DrawCallback.*/ - const DrawCallback* getDrawCallback() const { return _drawCallback.get(); } - - /** drawImplementation(RenderInfo&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that - * must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable. - * drawImplementation(RenderInfo&) is called from the draw(RenderInfo&) method, with the draw method handling management of OpenGL display lists, - * and drawImplementation(RenderInfo&) handling the actual drawing itself. - * @param renderInfo The osg::RenderInfo object that encapsulates the current rendering information including the osg::State OpenGL state for the current graphics context. */ - virtual void drawImplementation(RenderInfo& renderInfo) const = 0; - - - /** Return a OpenGL display list handle a newly generated or reused from display list cache. */ - static GLuint generateDisplayList(unsigned int contextID, unsigned int sizeHint = 0); - - /** Set the minimum number of display lists to retain in the deleted display list cache. */ - static void setMinimumNumberOfDisplayListsToRetainInCache(unsigned int minimum); - - /** Get the minimum number of display lists to retain in the deleted display list cache. */ - static unsigned int getMinimumNumberOfDisplayListsToRetainInCache(); - - /** Use deleteDisplayList instead of glDeleteList to allow - * OpenGL display list to be cached until they can be deleted - * by the OpenGL context in which they were created, specified - * by contextID.*/ - static void deleteDisplayList(unsigned int contextID,GLuint globj, unsigned int sizeHint = 0); - - /** Flush all the cached display list which need to be deleted - * in the OpenGL context related to contextID.*/ - static void flushAllDeletedDisplayLists(unsigned int contextID); - - /** Flush all the cached display list which need to be deleted - * in the OpenGL context related to contextID. - * Note, unlike flush no OpenGL calls are made, instead the handles are all removed. - * this call is useful for when an OpenGL context has been destroyed. */ - static void discardAllDeletedDisplayLists(unsigned int contextID); - - /** Flush the cached display list which need to be deleted - * in the OpenGL context related to contextID.*/ - static void flushDeletedDisplayLists(unsigned int contextID,double& availableTime); - - typedef unsigned int AttributeType; - - enum AttributeTypes - { - VERTICES = 0, - WEIGHTS = 1, - NORMALS = 2, - COLORS = 3, - SECONDARY_COLORS = 4, - FOG_COORDS = 5, - ATTRIBUTE_6 = 6, - ATTRIBUTE_7 = 7, - TEXTURE_COORDS = 8, - TEXTURE_COORDS_0 = TEXTURE_COORDS, - TEXTURE_COORDS_1 = TEXTURE_COORDS_0+1, - TEXTURE_COORDS_2 = TEXTURE_COORDS_0+2, - TEXTURE_COORDS_3 = TEXTURE_COORDS_0+3, - TEXTURE_COORDS_4 = TEXTURE_COORDS_0+4, - TEXTURE_COORDS_5 = TEXTURE_COORDS_0+5, - TEXTURE_COORDS_6 = TEXTURE_COORDS_0+6, - TEXTURE_COORDS_7 = TEXTURE_COORDS_0+7 - // only eight texture coord examples provided here, but underlying code can handle any no of texture units, - // simply co them as (TEXTURE_COORDS_0+unit). - }; - - class AttributeFunctor - { - public: - virtual ~AttributeFunctor() {} - - virtual void apply(AttributeType,unsigned int,GLbyte*) {} - virtual void apply(AttributeType,unsigned int,GLshort*) {} - virtual void apply(AttributeType,unsigned int,GLint*) {} - - virtual void apply(AttributeType,unsigned int,GLubyte*) {} - virtual void apply(AttributeType,unsigned int,GLushort*) {} - virtual void apply(AttributeType,unsigned int,GLuint*) {} - - virtual void apply(AttributeType,unsigned int,float*) {} - virtual void apply(AttributeType,unsigned int,Vec2*) {} - virtual void apply(AttributeType,unsigned int,Vec3*) {} - virtual void apply(AttributeType,unsigned int,Vec4*) {} - virtual void apply(AttributeType,unsigned int,Vec4ub*) {} - - virtual void apply(AttributeType,unsigned int,double*) {} - virtual void apply(AttributeType,unsigned int,Vec2d*) {} - virtual void apply(AttributeType,unsigned int,Vec3d*) {} - virtual void apply(AttributeType,unsigned int,Vec4d*) {} - }; - - - /** Return true if the Drawable subclass supports accept(AttributeFunctor&).*/ - virtual bool supports(const AttributeFunctor&) const { return false; } - - /** accept an AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. - * return true if functor handled by drawable, - * return false on failure of drawable to generate functor calls.*/ - virtual void accept(AttributeFunctor&) {} - - - class ConstAttributeFunctor - { - public: - - virtual ~ConstAttributeFunctor() {} - - virtual void apply(AttributeType,unsigned int,const GLbyte*) {} - virtual void apply(AttributeType,unsigned int,const GLshort*) {} - virtual void apply(AttributeType,unsigned int,const GLint*) {} - - virtual void apply(AttributeType,unsigned int,const GLubyte*) {} - virtual void apply(AttributeType,unsigned int,const GLushort*) {} - virtual void apply(AttributeType,unsigned int,const GLuint*) {} - - virtual void apply(AttributeType,unsigned int,const float*) {} - virtual void apply(AttributeType,unsigned int,const Vec2*) {} - virtual void apply(AttributeType,unsigned int,const Vec3*) {} - virtual void apply(AttributeType,unsigned int,const Vec4*) {} - virtual void apply(AttributeType,unsigned int,const Vec4ub*) {} - - virtual void apply(AttributeType,unsigned int,const double*) {} - virtual void apply(AttributeType,unsigned int,const Vec2d*) {} - virtual void apply(AttributeType,unsigned int,const Vec3d*) {} - virtual void apply(AttributeType,unsigned int,const Vec4d*) {} - }; - - /** Return true if the Drawable subclass supports accept(ConstAttributeFunctor&).*/ - virtual bool supports(const ConstAttributeFunctor&) const { return false; } - - /** Accept an AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. - * return true if functor handled by drawable, - * return false on failure of drawable to generate functor calls.*/ - virtual void accept(ConstAttributeFunctor&) const {} - - - - /** Return true if the Drawable subclass supports accept(PrimitiveFunctor&).*/ - virtual bool supports(const PrimitiveFunctor&) const { return false; } - - /** Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Drawable has. - * return true if functor handled by drawable, return false on failure of drawable to generate functor calls. - * Note, PrimtiveFunctor only provides const access of the primitives, as primitives may be procedurally generated - * so one cannot modify it.*/ - virtual void accept(PrimitiveFunctor&) const {} - - /** Return true if the Drawable subclass supports accept(PrimitiveIndexFunctor&).*/ - virtual bool supports(const PrimitiveIndexFunctor&) const { return false; } - - /** Accept a PrimitiveIndexFunctor and call its methods to tell it about the internal primitives that this Drawable has. - * return true if functor handled by drawable, return false on failure of drawable to generate functor calls. - * Note, PrimtiveIndexFunctor only provide const access of the primitives, as primitives may be procedurally generated - * so one cannot modify it.*/ - virtual void accept(PrimitiveIndexFunctor&) const {} - - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provide convenience wrappers to - * check for the extensions or use the associated functions.*/ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setVertexProgramSupported(bool flag) { _isVertexProgramSupported=flag; } - bool isVertexProgramSupported() const { return _isVertexProgramSupported; } - - void setSecondaryColorSupported(bool flag) { _isSecondaryColorSupported=flag; } - bool isSecondaryColorSupported() const { return _isSecondaryColorSupported; } - - void setFogCoordSupported(bool flag) { _isFogCoordSupported=flag; } - bool isFogCoordSupported() const { return _isFogCoordSupported; } - - void setMultiTexSupported(bool flag) { _isMultiTexSupported=flag; } - bool isMultiTexSupported() const { return _isMultiTexSupported; } - - void setOcclusionQuerySupported(bool flag) { _isOcclusionQuerySupported=flag; } - bool isOcclusionQuerySupported() const { return _isOcclusionQuerySupported; } - - void setARBOcclusionQuerySupported(bool flag) { _isARBOcclusionQuerySupported=flag; } - bool isARBOcclusionQuerySupported() const { return _isARBOcclusionQuerySupported; } - - void setTimerQuerySupported(bool flag) { _isTimerQuerySupported = flag; } - bool isTimerQuerySupported() const { return _isTimerQuerySupported; } - void setARBTimerQuerySupported(bool flag) { _isARBTimerQuerySupported = flag; } - bool isARBTimerQuerySupported() const { return _isARBTimerQuerySupported; } - void glSecondaryColor3ubv(const GLubyte* coord) const; - void glSecondaryColor3fv(const GLfloat* coord) const; - - void glFogCoordfv(const GLfloat* coord) const; - - void glMultiTexCoord1f(GLenum target,GLfloat coord) const; - void glMultiTexCoord2fv(GLenum target,const GLfloat* coord) const; - void glMultiTexCoord3fv(GLenum target,const GLfloat* coord) const; - void glMultiTexCoord4fv(GLenum target,const GLfloat* coord) const; - - void glMultiTexCoord1d(GLenum target,GLdouble coord) const; - void glMultiTexCoord2dv(GLenum target,const GLdouble* coord) const; - void glMultiTexCoord3dv(GLenum target,const GLdouble* coord) const; - void glMultiTexCoord4dv(GLenum target,const GLdouble* coord) const; - - void glVertexAttrib1s(unsigned int index, GLshort s) const; - void glVertexAttrib1f(unsigned int index, GLfloat f) const; - void glVertexAttrib1d(unsigned int index, GLdouble f) const; - void glVertexAttrib2fv(unsigned int index, const GLfloat * v) const; - void glVertexAttrib3fv(unsigned int index, const GLfloat * v) const; - void glVertexAttrib4fv(unsigned int index, const GLfloat * v) const; - void glVertexAttrib2dv(unsigned int index, const GLdouble * v) const; - void glVertexAttrib3dv(unsigned int index, const GLdouble * v) const; - void glVertexAttrib4dv(unsigned int index, const GLdouble * v) const; - void glVertexAttrib4ubv(unsigned int index, const GLubyte * v) const; - void glVertexAttrib4Nubv(unsigned int index, const GLubyte * v) const; - - - void glGenBuffers (GLsizei n, GLuint *buffers) const; - void glBindBuffer (GLenum target, GLuint buffer) const; - void glBufferData (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage) const; - void glBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data) const; - void glDeleteBuffers (GLsizei n, const GLuint *buffers) const; - GLboolean glIsBuffer (GLuint buffer) const; - void glGetBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data) const; - GLvoid* glMapBuffer (GLenum target, GLenum access) const; - GLboolean glUnmapBuffer (GLenum target) const; - void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params) const; - void glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params) const; - - - void glGenOcclusionQueries( GLsizei n, GLuint *ids ) const; - void glDeleteOcclusionQueries( GLsizei n, const GLuint *ids ) const; - GLboolean glIsOcclusionQuery( GLuint id ) const; - void glBeginOcclusionQuery( GLuint id ) const; - void glEndOcclusionQuery() const; - void glGetOcclusionQueryiv( GLuint id, GLenum pname, GLint *params ) const; - void glGetOcclusionQueryuiv( GLuint id, GLenum pname, GLuint *params ) const; - - void glGetQueryiv(GLenum target, GLenum pname, GLint *params) const; - void glGenQueries(GLsizei n, GLuint *ids) const; - void glBeginQuery(GLenum target, GLuint id) const; - void glEndQuery(GLenum target) const; - void glQueryCounter(GLuint id, GLenum target) const; - GLboolean glIsQuery(GLuint id) const; - void glDeleteQueries(GLsizei n, const GLuint *ids) const; - void glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params) const; - void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) const; - void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params) const; - void glGetInteger64v(GLenum pname, GLint64EXT *params) const; - - protected: - - friend class ArrayDispatchers; - - typedef void (GL_APIENTRY * FogCoordProc) (const GLfloat* coord); - - typedef void (GL_APIENTRY * VertexAttrib1sProc) (GLuint index, GLshort s); - typedef void (GL_APIENTRY * VertexAttrib1fProc) (GLuint index, GLfloat f); - typedef void (GL_APIENTRY * VertexAttrib1dProc) (GLuint index, GLdouble f); - typedef void (GL_APIENTRY * VertexAttribfvProc) (GLuint index, const GLfloat * v); - typedef void (GL_APIENTRY * VertexAttribdvProc) (GLuint index, const GLdouble * v); - typedef void (GL_APIENTRY * VertexAttribubvProc) (GLuint index, const GLubyte * v); - - typedef void (GL_APIENTRY * SecondaryColor3ubvProc) (const GLubyte* coord); - typedef void (GL_APIENTRY * SecondaryColor3fvProc) (const GLfloat* coord); - - typedef void (GL_APIENTRY * MultiTexCoord1fProc) (GLenum target,GLfloat coord); - typedef void (GL_APIENTRY * MultiTexCoordfvProc) (GLenum target,const GLfloat* coord); - typedef void (GL_APIENTRY * MultiTexCoord1dProc) (GLenum target,GLdouble coord); - typedef void (GL_APIENTRY * MultiTexCoorddvProc) (GLenum target,const GLdouble* coord); - - - typedef void (GL_APIENTRY * GenBuffersProc) (GLsizei n, GLuint *buffers); - typedef void (GL_APIENTRY * BindBufferProc) (GLenum target, GLuint buffer); - typedef void (GL_APIENTRY * BufferDataProc) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); - typedef void (GL_APIENTRY * BufferSubDataProc) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); - typedef void (GL_APIENTRY * DeleteBuffersProc) (GLsizei n, const GLuint *buffers); - typedef GLboolean (GL_APIENTRY * IsBufferProc) (GLuint buffer); - typedef void (GL_APIENTRY * GetBufferSubDataProc) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); - typedef GLvoid* (GL_APIENTRY * MapBufferProc) (GLenum target, GLenum access); - typedef GLboolean (GL_APIENTRY * UnmapBufferProc) (GLenum target); - typedef void (GL_APIENTRY * GetBufferParameterivProc) (GLenum target, GLenum pname, GLint *params); - typedef void (GL_APIENTRY * GetBufferPointervProc) (GLenum target, GLenum pname, GLvoid* *params); - - typedef void (GL_APIENTRY * GenOcclusionQueriesProc) ( GLsizei n, GLuint *ids ); - typedef void (GL_APIENTRY * DeleteOcclusionQueriesProc) ( GLsizei n, const GLuint *ids ); - typedef GLboolean (GL_APIENTRY * IsOcclusionQueryProc) ( GLuint id ); - typedef void (GL_APIENTRY * BeginOcclusionQueryProc) ( GLuint id ); - typedef void (GL_APIENTRY * EndOcclusionQueryProc) (); - typedef void (GL_APIENTRY * GetOcclusionQueryivProc) ( GLuint id, GLenum pname, GLint *params ); - typedef void (GL_APIENTRY * GetOcclusionQueryuivProc) ( GLuint id, GLenum pname, GLuint *params ); - typedef void (GL_APIENTRY * GetOcclusionQueryui64vProc) ( GLuint id, GLenum pname, GLuint64EXT *params ); - - typedef void (GL_APIENTRY *GenQueriesProc) (GLsizei n, GLuint *ids); - typedef void (GL_APIENTRY *DeleteQueriesProc) (GLsizei n, const GLuint *ids); - typedef GLboolean (GL_APIENTRY *IsQueryProc) (GLuint id); - typedef void (GL_APIENTRY *BeginQueryProc) (GLenum target, GLuint id); - typedef void (GL_APIENTRY *EndQueryProc) (GLenum target); - typedef void (GL_APIENTRY *QueryCounterProc)(GLuint id, GLenum target); - typedef void (GL_APIENTRY *GetQueryivProc) (GLenum target, GLenum pname, GLint *params); - typedef void (GL_APIENTRY *GetQueryObjectivProc) (GLuint id, GLenum pname, GLint *params); - typedef void (GL_APIENTRY *GetQueryObjectuivProc) (GLuint id, GLenum pname, GLuint *params); - typedef void (GL_APIENTRY *GetQueryObjectui64vProc) (GLuint id, GLenum pname, GLuint64EXT *params); - typedef void (GL_APIENTRY *GetInteger64vProc) (GLenum pname, GLint64EXT *params); - - ~Extensions() {} - - bool _isVertexProgramSupported; - bool _isSecondaryColorSupported; - bool _isFogCoordSupported; - bool _isMultiTexSupported; - bool _isOcclusionQuerySupported; - bool _isARBOcclusionQuerySupported; - bool _isTimerQuerySupported; - bool _isARBTimerQuerySupported; - - FogCoordProc _glFogCoordfv; - - SecondaryColor3ubvProc _glSecondaryColor3ubv; - SecondaryColor3fvProc _glSecondaryColor3fv; - - VertexAttrib1sProc _glVertexAttrib1s; - VertexAttrib1fProc _glVertexAttrib1f; - VertexAttrib1dProc _glVertexAttrib1d; - VertexAttribfvProc _glVertexAttrib1fv; - VertexAttribfvProc _glVertexAttrib2fv; - VertexAttribfvProc _glVertexAttrib3fv; - VertexAttribfvProc _glVertexAttrib4fv; - VertexAttribdvProc _glVertexAttrib2dv; - VertexAttribdvProc _glVertexAttrib3dv; - VertexAttribdvProc _glVertexAttrib4dv; - VertexAttribubvProc _glVertexAttrib4ubv; - VertexAttribubvProc _glVertexAttrib4Nubv; - - MultiTexCoord1fProc _glMultiTexCoord1f; - MultiTexCoordfvProc _glMultiTexCoord1fv; - MultiTexCoordfvProc _glMultiTexCoord2fv; - MultiTexCoordfvProc _glMultiTexCoord3fv; - MultiTexCoordfvProc _glMultiTexCoord4fv; - MultiTexCoord1dProc _glMultiTexCoord1d; - MultiTexCoorddvProc _glMultiTexCoord2dv; - MultiTexCoorddvProc _glMultiTexCoord3dv; - MultiTexCoorddvProc _glMultiTexCoord4dv; - - GenBuffersProc _glGenBuffers; - BindBufferProc _glBindBuffer; - BufferDataProc _glBufferData; - BufferSubDataProc _glBufferSubData; - DeleteBuffersProc _glDeleteBuffers; - IsBufferProc _glIsBuffer; - GetBufferSubDataProc _glGetBufferSubData; - MapBufferProc _glMapBuffer; - UnmapBufferProc _glUnmapBuffer; - GetBufferParameterivProc _glGetBufferParameteriv; - GetBufferPointervProc _glGetBufferPointerv; - - GenOcclusionQueriesProc _glGenOcclusionQueries; - DeleteOcclusionQueriesProc _glDeleteOcclusionQueries; - IsOcclusionQueryProc _glIsOcclusionQuery; - BeginOcclusionQueryProc _glBeginOcclusionQuery; - EndOcclusionQueryProc _glEndOcclusionQuery; - GetOcclusionQueryivProc _glGetOcclusionQueryiv; - GetOcclusionQueryuivProc _glGetOcclusionQueryuiv; - - GenQueriesProc _gl_gen_queries_arb; - DeleteQueriesProc _gl_delete_queries_arb; - IsQueryProc _gl_is_query_arb; - BeginQueryProc _gl_begin_query_arb; - EndQueryProc _gl_end_query_arb; - QueryCounterProc _glQueryCounter; - GetQueryivProc _gl_get_queryiv_arb; - GetQueryObjectivProc _gl_get_query_objectiv_arb; - GetQueryObjectuivProc _gl_get_query_objectuiv_arb; - GetQueryObjectui64vProc _gl_get_query_objectui64v; - GetInteger64vProc _glGetInteger64v; - - }; - - /** Function to call to get the extension of a specified context. - * If the Extension object for that context has not yet been created - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object is - * only created with the graphics context associated with ContextID..*/ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions allows users to override the extensions across graphics contexts. - * typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions.*/ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected: - - Drawable& operator = (const Drawable&) { return *this;} - - virtual ~Drawable(); - - - /** set the bounding box .*/ - void setBound(const BoundingBox& bb) const; - - void addParent(osg::Node* node); - void removeParent(osg::Node* node); - - ParentList _parents; - friend class Node; - friend class Geode; - friend class StateSet; - - ref_ptr _stateset; - - BoundingBox _initialBound; - ref_ptr _computeBoundCallback; - mutable BoundingBox _boundingBox; - mutable bool _boundingBoxComputed; - - ref_ptr _shape; - - bool _supportsDisplayList; - bool _useDisplayList; - bool _supportsVertexBufferObjects; - bool _useVertexBufferObjects; - - typedef osg::buffered_value GLObjectList; - mutable GLObjectList _globjList; - - ref_ptr _updateCallback; - unsigned int _numChildrenRequiringUpdateTraversal; - void setNumChildrenRequiringUpdateTraversal(unsigned int num); - unsigned int getNumChildrenRequiringUpdateTraversal() const { return _numChildrenRequiringUpdateTraversal; } - - ref_ptr _eventCallback; - unsigned int _numChildrenRequiringEventTraversal; - void setNumChildrenRequiringEventTraversal(unsigned int num); - unsigned int getNumChildrenRequiringEventTraversal() const { return _numChildrenRequiringEventTraversal; } - - ref_ptr _cullCallback; - ref_ptr _drawCallback; -}; - -inline void Drawable::draw(RenderInfo& renderInfo) const -{ -#ifdef OSG_GL_DISPLAYLISTS_AVAILABLE - if (_useDisplayList && !(_supportsVertexBufferObjects && _useVertexBufferObjects && renderInfo.getState()->isVertexBufferObjectSupported())) - { - // get the contextID (user defined ID of 0 upwards) for the - // current OpenGL context. - unsigned int contextID = renderInfo.getContextID(); - - // get the globj for the current contextID. - GLuint& globj = _globjList[contextID]; - - // call the globj if already set otherwise compile and execute. - if( globj != 0 ) - { - glCallList( globj ); - } - else if (_useDisplayList) - { -#ifdef USE_SEPARATE_COMPILE_AND_EXECUTE - globj = generateDisplayList(contextID, getGLObjectSizeHint()); - glNewList( globj, GL_COMPILE ); - if (_drawCallback.valid()) - _drawCallback->drawImplementation(renderInfo,this); - else - drawImplementation(renderInfo); - glEndList(); - - glCallList( globj); -#else - globj = generateDisplayList(contextID, getGLObjectSizeHint()); - glNewList( globj, GL_COMPILE_AND_EXECUTE ); - if (_drawCallback.valid()) - _drawCallback->drawImplementation(renderInfo,this); - else - drawImplementation(renderInfo); - glEndList(); -#endif - } - - return; - - } -#endif - - // draw object as nature intended.. - if (_drawCallback.valid()) - _drawCallback->drawImplementation(renderInfo,this); - else - drawImplementation(renderInfo); -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Endian b/libs/lib/mac32/include/osg/Endian deleted file mode 100644 index 9476ef13c..000000000 --- a/libs/lib/mac32/include/osg/Endian +++ /dev/null @@ -1,85 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_ENDIAN -#define OSG_ENDIAN 1 - -#include - -namespace osg { - -enum Endian -{ - BigEndian, - LittleEndian -}; - -inline Endian getCpuByteOrder() -{ - union { - char big_endian_1[2]; - short is_it_really_1; - } u; - u.big_endian_1[0] = 0; - u.big_endian_1[1] = 1; - - if (u.is_it_really_1 == 1) - return BigEndian; - else - return LittleEndian; -} - -inline void swapBytes( char* in, unsigned int size ) -{ - char* start = in; - char* end = start+size-1; - while (start -// define USE_DEPRECATED_API is used to include in API which is being fazed out -// if you can compile your apps with this turned off you are -// well placed for compatibility with future versions. -#define USE_DEPRECATED_API - -// disable VisualStudio warnings -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4512 ) - #pragma warning( disable : 4267 ) - #pragma warning( disable : 4702 ) - #pragma warning( disable : 4511 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSG_EXPORT - # elif defined( OSG_LIBRARY ) - # define OSG_EXPORT __declspec(dllexport) - # else - # define OSG_EXPORT __declspec(dllimport) - # endif -#else - # define OSG_EXPORT -#endif - -// set up define for whether member templates are supported by VisualStudio compilers. -#ifdef _MSC_VER -# if (_MSC_VER >= 1300) -# define __STL_MEMBER_TEMPLATES -# endif -#endif - -/* Define NULL pointer value */ - -#ifndef NULL - #ifdef __cplusplus - #define NULL 0 - #else - #define NULL ((void *)0) - #endif -#endif - -/** - -\namespace osg - -The core osg library provides the basic scene graph classes such as Nodes, -State and Drawables, and maths and general helper classes. -*/ - -#endif - diff --git a/libs/lib/mac32/include/osg/Fog b/libs/lib/mac32/include/osg/Fog deleted file mode 100644 index 56bf41113..000000000 --- a/libs/lib/mac32/include/osg/Fog +++ /dev/null @@ -1,146 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_FOG -#define OSG_FOG 1 - -#include -#include - -#ifndef GL_FOG_DISTANCE_MODE_NV - #define GL_FOG_DISTANCE_MODE_NV 0x855A -#endif -#ifndef GL_EYE_PLANE_ABSOLUTE_NV - #define GL_EYE_PLANE_ABSOLUTE_NV 0x855C -#endif -#ifndef GL_EYE_RADIAL_NV - #define GL_EYE_RADIAL_NV 0x855B -#endif - - -#ifndef GL_FOG_COORDINATE - #define GL_FOG_COORDINATE 0x8451 -#endif -#ifndef GL_FRAGMENT_DEPTH - #define GL_FRAGMENT_DEPTH 0x8452 -#endif - -#ifndef GL_FOG - #define GL_FOG 0x0B60 - #define GL_EXP 0x0800 - #define GL_EXP2 0x0801 -#endif - -#ifndef GL_FOG_HINT - #define GL_FOG_HINT 0x0C54 -#endif - -namespace osg { - - -/** Fog - encapsulates OpenGL fog state. */ -class OSG_EXPORT Fog : public StateAttribute -{ - public : - - Fog(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Fog(const Fog& fog,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(fog,copyop), - _mode(fog._mode), - _density(fog._density), - _start(fog._start), - _end(fog._end), - _color(fog._color), - _fogCoordinateSource(fog._fogCoordinateSource), - _useRadialFog(fog._useRadialFog) {} - - META_StateAttribute(osg, Fog,FOG); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Fog,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_mode) - COMPARE_StateAttribute_Parameter(_density) - COMPARE_StateAttribute_Parameter(_start) - COMPARE_StateAttribute_Parameter(_end) - COMPARE_StateAttribute_Parameter(_color) - COMPARE_StateAttribute_Parameter(_fogCoordinateSource) - COMPARE_StateAttribute_Parameter(_useRadialFog) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_FOG); - return true; - } - - enum Mode { - LINEAR = GL_LINEAR, - EXP = GL_EXP, - EXP2 = GL_EXP2 - }; - - inline void setMode( Mode mode ) { _mode = mode; } - inline Mode getMode() const { return _mode; } - - inline void setDensity( float density ) { _density = density; } - inline float getDensity() const { return _density; } - - inline void setStart( float start ) { _start = start; } - inline float getStart() const { return _start; } - - inline void setEnd( float end ) { _end = end; } - inline float getEnd() const { return _end; } - - inline void setColor( const Vec4 &color ) { _color = color; } - inline const Vec4& getColor() const { return _color; } - - inline void setUseRadialFog( bool useRadialFog ) { _useRadialFog = useRadialFog; } - inline bool getUseRadialFog() const { return _useRadialFog; } - - enum FogCoordinateSource - { - FOG_COORDINATE = GL_FOG_COORDINATE, - FRAGMENT_DEPTH = GL_FRAGMENT_DEPTH - }; - - inline void setFogCoordinateSource(GLint source) { _fogCoordinateSource = source; } - inline GLint getFogCoordinateSource() const { return _fogCoordinateSource; } - - virtual void apply(State& state) const; - - protected : - - virtual ~Fog(); - - Mode _mode; - float _density; - float _start; - float _end; - Vec4 _color; - GLint _fogCoordinateSource; - bool _useRadialFog; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/FragmentProgram b/libs/lib/mac32/include/osg/FragmentProgram deleted file mode 100644 index 9d86311e8..000000000 --- a/libs/lib/mac32/include/osg/FragmentProgram +++ /dev/null @@ -1,312 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_FRAGMENTPROGRAM -#define OSG_FRAGMENTPROGRAM 1 - -#include -#include -#include -#include - -#include -#include - -// if not defined by gl.h use the definition found in: -// http://oss.sgi.com/projects/ogl-sample/registry/ARB/fragment_program.txt -#ifndef GL_ARB_fragment_program -#define GL_FRAGMENT_PROGRAM_ARB 0x8804 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 -#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 -#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 -#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 -#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 -#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A -#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B -#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D -#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E -#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F -#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF - -#endif - - -namespace osg { - - - -/** FragmentProgram - encapsulates the OpenGL ARB fragment program state.*/ -class OSG_EXPORT FragmentProgram : public StateAttribute -{ - public: - - FragmentProgram(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - FragmentProgram(const FragmentProgram& vp,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, FragmentProgram, FRAGMENTPROGRAM); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const osg::StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(FragmentProgram,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_fragmentProgram) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_FRAGMENT_PROGRAM_ARB); - return true; - } - - // data access methods. - - /** Get the handle to the fragment program id for the current context.*/ - inline GLuint& getFragmentProgramID(unsigned int contextID) const - { - return _fragmentProgramIDList[contextID]; - } - - - /** Set the fragment program using a C style string.*/ - inline void setFragmentProgram( const char* program ) - { - _fragmentProgram = program; - dirtyFragmentProgramObject(); - } - - /** Set the fragment program using C++ style string.*/ - inline void setFragmentProgram( const std::string& program ) - { - _fragmentProgram = program; - dirtyFragmentProgramObject(); - } - - /** Get the fragment program.*/ - inline const std::string& getFragmentProgram() const { return _fragmentProgram; } - - /** Set Program Parameters */ - inline void setProgramLocalParameter(const GLuint index, const Vec4& p) - { - _programLocalParameters[index] = p; - } - - typedef std::map LocalParamList; - - /** Set list of Program Parameters */ - inline void setLocalParameters(const LocalParamList& lpl) { _programLocalParameters = lpl; } - - /** Get list of Program Parameters */ - inline LocalParamList& getLocalParameters() { return _programLocalParameters; } - - /** Get const list of Program Parameters */ - inline const LocalParamList& getLocalParameters() const { return _programLocalParameters; } - - /** Matrix */ - inline void setMatrix(const GLenum mode, const Matrix& matrix) - { - _matrixList[mode] = matrix; - } - - typedef std::map MatrixList; - - /** Set list of Matrices */ - inline void setMatrices(const MatrixList& matrices) { _matrixList = matrices; } - - /** Get list of Matrices */ - inline MatrixList& getMatrices() { return _matrixList; } - - /** Get list of Matrices */ - inline const MatrixList& getMatrices() const { return _matrixList; } - - - /** Force a recompile on next apply() of associated OpenGL vertex program objects.*/ - void dirtyFragmentProgramObject(); - - /** use deleteFragmentProgramObject instead of glDeletePrograms to allow - * OpenGL Fragment Program objects to be cached until they can be deleted - * by the OpenGL context in which they were created, specified - * by contextID.*/ - static void deleteFragmentProgramObject(unsigned int contextID,GLuint handle); - - /** flush all the cached fragment programs which need to be deleted - * in the OpenGL context related to contextID.*/ - static void flushDeletedFragmentProgramObjects(unsigned int contextID,double currentTime, double& availableTime); - - /** discard all the cached fragment programs which need to be deleted - * in the OpenGL context related to contextID. - * Note, unlike flush no OpenGL calls are made, instead the handles are all removed. - * this call is useful for when an OpenGL context has been destroyed. */ - static void discardDeletedFragmentProgramObjects(unsigned int contextID); - - virtual void apply(State& state) const; - - virtual void compileGLObjects(State& state) const { apply(state); } - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** release an OpenGL objects in specified graphics context if State - object is passed, otherwise release OpenGL objects for all graphics context if - State object pointer == NULL.*/ - virtual void releaseGLObjects(State* state=0) const; - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provide convenience wrappers to - * check for the extensions or use the associated functions.*/ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setFragmentProgramSupported(bool flag) { _isFragmentProgramSupported=flag; } - bool isFragmentProgramSupported() const { return _isFragmentProgramSupported; } - - void glBindProgram(GLenum target, GLuint id) const; - void glGenPrograms(GLsizei n, GLuint *programs) const; - void glDeletePrograms(GLsizei n, GLuint *programs) const; - void glProgramString(GLenum target, GLenum format, GLsizei len, const void *string) const; - void glProgramLocalParameter4fv(GLenum target, GLuint index, const GLfloat *params) const; - - protected: - - ~Extensions() {} - - bool _isFragmentProgramSupported; - - typedef void (GL_APIENTRY * BindProgramProc) (GLenum target, GLuint id); - typedef void (GL_APIENTRY * GenProgramsProc) (GLsizei n, GLuint *programs); - typedef void (GL_APIENTRY * DeleteProgramsProc) (GLsizei n, GLuint *programs); - typedef void (GL_APIENTRY * ProgramStringProc) (GLenum target, GLenum format, GLsizei len, const void *string); - typedef void (GL_APIENTRY * ProgramLocalParameter4fvProc) (GLenum target, GLuint index, const GLfloat *params); - - BindProgramProc _glBindProgram; - GenProgramsProc _glGenPrograms; - DeleteProgramsProc _glDeletePrograms; - ProgramStringProc _glProgramString; - ProgramLocalParameter4fvProc _glProgramLocalParameter4fv; - }; - - /** Function to call to get the extension of a specified context. - * If the Extension object for that context has not yet been created and the - * 'createIfNotInitalized' flag has been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object will - * only be created with the graphics context associated with ContextID..*/ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions allows users to override the extensions across graphics contexts. - * typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions.*/ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected: - - - virtual ~FragmentProgram(); - - typedef buffered_value FragmentProgramIDList; - mutable FragmentProgramIDList _fragmentProgramIDList; - - std::string _fragmentProgram; - - LocalParamList _programLocalParameters; - MatrixList _matrixList; -}; - - - -} - -#endif - diff --git a/libs/lib/mac32/include/osg/FrameBufferObject b/libs/lib/mac32/include/osg/FrameBufferObject deleted file mode 100644 index c84226ec0..000000000 --- a/libs/lib/mac32/include/osg/FrameBufferObject +++ /dev/null @@ -1,518 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -// initial FBO support written by Marco Jez, June 2005. - -#ifndef OSG_FRAMEBUFFEROBJECT -#define OSG_FRAMEBUFFEROBJECT 1 - -#include -#include -#include -#include - -#ifndef GL_EXT_framebuffer_object -#define GL_EXT_framebuffer_object 1 -#define GL_FRAMEBUFFER_EXT 0x8D40 -#define GL_RENDERBUFFER_EXT 0x8D41 -// #define GL_STENCIL_INDEX_EXT 0x8D45 // removed in rev. #114 of the spec -#define GL_STENCIL_INDEX1_EXT 0x8D46 -#define GL_STENCIL_INDEX4_EXT 0x8D47 -#define GL_STENCIL_INDEX8_EXT 0x8D48 -#define GL_STENCIL_INDEX16_EXT 0x8D49 -#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 -#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 -#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD -#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 -#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 -#endif - -#ifndef GL_EXT_framebuffer_blit -#define GL_EXT_framebuffer_blit 1 -#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA -#endif - -#ifndef GL_EXT_framebuffer_multisample -#define GL_EXT_framebuffer_multisample 1 -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 -#endif - -#ifndef GL_MAX_SAMPLES_EXT -// Workaround for Centos 5 and other distros that define -// GL_EXT_framebuffer_multisample but not GL_MAX_SAMPLES_EXT -#define GL_MAX_SAMPLES_EXT 0x8D57 -#endif - -#ifndef GL_NV_framebuffer_multisample_coverage -#define GL_NV_framebuffer_multisample_coverage 1 -#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB -#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 -#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 -#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 -#endif - -#ifndef GL_DEPTH_COMPONENT -#define GL_DEPTH_COMPONENT 0x1902 -#endif - -#ifndef GL_VERSION_1_4 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#endif - -#ifndef GL_DEPTH_COMPONENT32F -#define GL_DEPTH_COMPONENT32F 0x8CAC -#endif - -#ifndef GL_DEPTH_COMPONENT32F_NV -#define GL_DEPTH_COMPONENT32F_NV 0x8DAB -#endif - -#ifndef GL_EXT_packed_depth_stencil -#define GL_EXT_packed_depth_stencil 1 -#define GL_DEPTH_STENCIL_EXT 0x84F9 -#define GL_UNSIGNED_INT_24_8_EXT 0x84FA -#define GL_DEPTH24_STENCIL8_EXT 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 -#endif - -namespace osg -{ - -/************************************************************************** - * FBOExtensions - **************************************************************************/ - - class OSG_EXPORT FBOExtensions : public osg::Referenced - { - public: - typedef void GL_APIENTRY TglBindRenderbuffer(GLenum, GLuint); - typedef void GL_APIENTRY TglDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers); - typedef void GL_APIENTRY TglGenRenderbuffers(GLsizei, GLuint *); - typedef void GL_APIENTRY TglRenderbufferStorage(GLenum, GLenum, GLsizei, GLsizei); - typedef void GL_APIENTRY TglRenderbufferStorageMultisample(GLenum, GLsizei, GLenum, GLsizei, GLsizei); - typedef void GL_APIENTRY TglRenderbufferStorageMultisampleCoverageNV(GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei); - typedef void GL_APIENTRY TglBindFramebuffer(GLenum, GLuint); - typedef void GL_APIENTRY TglDeleteFramebuffers(GLsizei n, const GLuint *framebuffers); - typedef void GL_APIENTRY TglGenFramebuffers(GLsizei, GLuint *); - typedef GLenum GL_APIENTRY TglCheckFramebufferStatus(GLenum); - typedef void GL_APIENTRY TglFramebufferTexture1D(GLenum, GLenum, GLenum, GLuint, GLint); - typedef void GL_APIENTRY TglFramebufferTexture2D(GLenum, GLenum, GLenum, GLuint, GLint); - typedef void GL_APIENTRY TglFramebufferTexture3D(GLenum, GLenum, GLenum, GLuint, GLint, GLint); - typedef void GL_APIENTRY TglFramebufferTexture(GLenum, GLenum, GLint, GLint); - typedef void GL_APIENTRY TglFramebufferTextureLayer(GLenum, GLenum, GLuint, GLint, GLint); - typedef void GL_APIENTRY TglFramebufferRenderbuffer(GLenum, GLenum, GLenum, GLuint); - typedef void GL_APIENTRY TglGenerateMipmap(GLenum); - typedef void GL_APIENTRY TglBlitFramebuffer(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); - typedef void GL_APIENTRY TglGetRenderbufferParameteriv(GLenum, GLenum, GLint*); - - TglBindRenderbuffer* glBindRenderbuffer; - TglGenRenderbuffers* glGenRenderbuffers; - TglDeleteRenderbuffers* glDeleteRenderbuffers; - TglRenderbufferStorage* glRenderbufferStorage; - TglRenderbufferStorageMultisample* glRenderbufferStorageMultisample; - TglRenderbufferStorageMultisampleCoverageNV* glRenderbufferStorageMultisampleCoverageNV; - TglBindFramebuffer* glBindFramebuffer; - TglDeleteFramebuffers* glDeleteFramebuffers; - TglGenFramebuffers* glGenFramebuffers; - TglCheckFramebufferStatus* glCheckFramebufferStatus; - TglFramebufferTexture1D* glFramebufferTexture1D; - TglFramebufferTexture2D* glFramebufferTexture2D; - TglFramebufferTexture3D* glFramebufferTexture3D; - TglFramebufferTexture* glFramebufferTexture; - TglFramebufferTextureLayer* glFramebufferTextureLayer; - TglFramebufferRenderbuffer* glFramebufferRenderbuffer; - TglGenerateMipmap* glGenerateMipmap; - TglBlitFramebuffer* glBlitFramebuffer; - TglGetRenderbufferParameteriv* glGetRenderbufferParameteriv; - - static FBOExtensions* instance(unsigned contextID, bool createIfNotInitalized); - - bool isSupported() const { return _supported; } - bool isMultisampleSupported() const { return glRenderbufferStorageMultisample != 0; } - bool isMultisampleCoverageSupported() const { return glRenderbufferStorageMultisampleCoverageNV != 0; } - bool isPackedDepthStencilSupported() const { return _packed_depth_stencil_supported; } - - protected: - FBOExtensions(unsigned int contextID); - - bool _supported; - bool _packed_depth_stencil_supported; - }; - -/************************************************************************** - * RenderBuffer - **************************************************************************/ - - class OSG_EXPORT RenderBuffer: public Object - { - public: - RenderBuffer(); - RenderBuffer(int width, int height, GLenum internalFormat, int samples=0, int colorSamples=0); - RenderBuffer(const RenderBuffer& copy, const CopyOp& copyop = CopyOp::SHALLOW_COPY); - - META_Object(osg, RenderBuffer); - - inline int getWidth() const; - inline int getHeight() const; - inline void setWidth(int w); - inline void setHeight(int h); - inline void setSize(int w, int h); - inline GLenum getInternalFormat() const; - inline void setInternalFormat(GLenum format); - inline int getSamples() const; - inline int getColorSamples() const; - inline void setSamples(int samples); - inline void setColorSamples(int colorSamples); - - GLuint getObjectID(unsigned int contextID, const FBOExtensions *ext) const; - inline int compare(const RenderBuffer &rb) const; - - /** Mark internal RenderBuffer for deletion. - * Deletion requests are queued until they can be executed - * in the proper GL context. */ - static void deleteRenderBuffer(unsigned int contextID, GLuint rb); - - /** flush all the cached RenderBuffers which need to be deleted - * in the OpenGL context related to contextID.*/ - static void flushDeletedRenderBuffers(unsigned int contextID,double currentTime, double& availableTime); - - /** discard all the cached RenderBuffers which need to be deleted in the OpenGL context related to contextID. - * Note, unlike flush no OpenGL calls are made, instead the handles are all removed. - * this call is useful for when an OpenGL context has been destroyed. */ - static void discardDeletedRenderBuffers(unsigned int contextID); - - static int getMaxSamples(unsigned int contextID, const FBOExtensions *ext); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objexts - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - protected: - virtual ~RenderBuffer(); - RenderBuffer &operator=(const RenderBuffer &) { return *this; } - - inline void dirtyAll() const; - - private: - mutable buffered_value _objectID; - mutable buffered_value _dirty; - - GLenum _internalFormat; - int _width; - int _height; - // "samples" in the framebuffer_multisample extension is equivalent to - // "coverageSamples" in the framebuffer_multisample_coverage extension. - int _samples; - int _colorSamples; - }; - - // INLINE METHODS - - inline int RenderBuffer::getWidth() const - { - return _width; - } - - inline int RenderBuffer::getHeight() const - { - return _height; - } - - inline void RenderBuffer::setWidth(int w) - { - _width = w; - dirtyAll(); - } - - inline void RenderBuffer::setHeight(int h) - { - _height = h; - dirtyAll(); - } - - inline void RenderBuffer::setSize(int w, int h) - { - _width = w; - _height = h; - dirtyAll(); - } - - inline GLenum RenderBuffer::getInternalFormat() const - { - return _internalFormat; - } - - inline void RenderBuffer::setInternalFormat(GLenum format) - { - _internalFormat = format; - dirtyAll(); - } - - inline int RenderBuffer::getSamples() const - { - return _samples; - } - - inline int RenderBuffer::getColorSamples() const - { - return _colorSamples; - } - - inline void RenderBuffer::setSamples(int samples) - { - _samples = samples; - dirtyAll(); - } - - inline void RenderBuffer::setColorSamples(int colorSamples) - { - _colorSamples = colorSamples; - dirtyAll(); - } - - inline void RenderBuffer::dirtyAll() const - { - _dirty.setAllElementsTo(1); - } - - inline int RenderBuffer::compare(const RenderBuffer &rb) const - { - if (&rb == this) return 0; - if (_internalFormat < rb._internalFormat) return -1; - if (_internalFormat > rb._internalFormat) return 1; - if (_width < rb._width) return -1; - if (_width > rb._width) return 1; - if (_height < rb._height) return -1; - if (_height > rb._height) return 1; - return 0; - } - -/************************************************************************** - * FrameBufferAttachement - **************************************************************************/ - class Texture1D; - class Texture2D; - class Texture2DMultisample; - class Texture3D; - class Texture2DArray; - class TextureCubeMap; - class TextureRectangle; - - class OSG_EXPORT FrameBufferAttachment - { - public: - FrameBufferAttachment(); - FrameBufferAttachment(const FrameBufferAttachment& copy); - - explicit FrameBufferAttachment(RenderBuffer* target); - explicit FrameBufferAttachment(Texture1D* target, unsigned int level = 0); - explicit FrameBufferAttachment(Texture2D* target, unsigned int level = 0); - explicit FrameBufferAttachment(Texture2DMultisample* target, unsigned int level = 0); - explicit FrameBufferAttachment(Texture3D* target, unsigned int zoffset, unsigned int level = 0); - explicit FrameBufferAttachment(Texture2DArray* target, unsigned int layer, unsigned int level = 0); - explicit FrameBufferAttachment(TextureCubeMap* target, unsigned int face, unsigned int level = 0); - explicit FrameBufferAttachment(TextureRectangle* target); - explicit FrameBufferAttachment(Camera::Attachment& attachment); - - ~FrameBufferAttachment(); - - FrameBufferAttachment&operator = (const FrameBufferAttachment& copy); - - bool isMultisample() const; - void createRequiredTexturesAndApplyGenerateMipMap(State& state, const FBOExtensions* ext) const; - void attach(State &state, GLenum target, GLenum attachment_point, const FBOExtensions* ext) const; - int compare(const FrameBufferAttachment &fa) const; - - RenderBuffer* getRenderBuffer(); - const RenderBuffer* getRenderBuffer() const; - - Texture* getTexture(); - const Texture* getTexture() const; - - unsigned int getCubeMapFace() const; - unsigned int getTextureLevel() const; - unsigned int getTexture3DZOffset() const; - unsigned int getTextureArrayLayer() const; - - private: - // use the Pimpl idiom to avoid dependency from - // all Texture* headers - struct Pimpl; - Pimpl* _ximpl; - }; - -/************************************************************************** - * FrameBufferObject - **************************************************************************/ - class OSG_EXPORT FrameBufferObject: public StateAttribute - { - public: - typedef std::map AttachmentMap; - typedef std::vector MultipleRenderingTargets; - - typedef Camera::BufferComponent BufferComponent; - - FrameBufferObject(); - FrameBufferObject(const FrameBufferObject& copy, const CopyOp& copyop = CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, FrameBufferObject, (StateAttribute::Type)0x101010/*FrameBufferObject*/); - - inline const AttachmentMap& getAttachmentMap() const; - - - void setAttachment(BufferComponent attachment_point, const FrameBufferAttachment &attachment); - inline const FrameBufferAttachment& getAttachment(BufferComponent attachment_point) const; - inline bool hasAttachment(BufferComponent attachment_point) const; - - inline bool hasMultipleRenderingTargets() const { return !_drawBuffers.empty(); } - inline const MultipleRenderingTargets& getMultipleRenderingTargets() const { return _drawBuffers; } - - bool isMultisample() const; - - int compare(const StateAttribute &sa) const; - - void apply(State &state) const; - - enum BindTarget - { - READ_FRAMEBUFFER = GL_READ_FRAMEBUFFER_EXT, - DRAW_FRAMEBUFFER = GL_DRAW_FRAMEBUFFER_EXT, - READ_DRAW_FRAMEBUFFER = GL_FRAMEBUFFER_EXT - }; - - /** Bind the FBO as either the read or draw target, or both. */ - void apply(State &state, BindTarget target) const; - - /** Mark internal FBO for deletion. - * Deletion requests are queued until they can be executed - * in the proper GL context. */ - static void deleteFrameBufferObject(unsigned int contextID, GLuint program); - - /** flush all the cached FBOs which need to be deleted - * in the OpenGL context related to contextID.*/ - static void flushDeletedFrameBufferObjects(unsigned int contextID,double currentTime, double& availableTime); - - /** discard all the cached FBOs which need to be deleted - * in the OpenGL context related to contextID.*/ - static void discardDeletedFrameBufferObjects(unsigned int contextID); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objexts - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - protected: - virtual ~FrameBufferObject(); - FrameBufferObject& operator = (const FrameBufferObject&) { return *this; } - - void updateDrawBuffers(); - - inline void dirtyAll(); - - GLenum convertBufferComponentToGLenum(BufferComponent attachment_point) const; - - private: - AttachmentMap _attachments; - - // Buffers passed to glDrawBuffers when using multiple render targets. - MultipleRenderingTargets _drawBuffers; - - mutable buffered_value _dirtyAttachmentList; - mutable buffered_value _unsupported; - mutable buffered_value _fboID; - - }; - - // INLINE METHODS - - inline const FrameBufferObject::AttachmentMap &FrameBufferObject::getAttachmentMap() const - { - return _attachments; - } - - inline bool FrameBufferObject::hasAttachment(FrameBufferObject::BufferComponent attachment_point) const - { - return _attachments.find(attachment_point) != _attachments.end(); - } - - inline const FrameBufferAttachment &FrameBufferObject::getAttachment(FrameBufferObject::BufferComponent attachment_point) const - { - return _attachments.find(attachment_point)->second; - } - - inline void FrameBufferObject::dirtyAll() - { - _dirtyAttachmentList.setAllElementsTo(1); - } - - -} - -#endif - diff --git a/libs/lib/mac32/include/osg/FrameStamp b/libs/lib/mac32/include/osg/FrameStamp deleted file mode 100644 index 7cdea2164..000000000 --- a/libs/lib/mac32/include/osg/FrameStamp +++ /dev/null @@ -1,91 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_FRAMESTAMP -#define OSG_FRAMESTAMP 1 - -#include - -#if defined(__sgi) || (defined(WIN32) && !defined(__MWERKS__)) -#include -#else -#include -using std::tm; -#endif - -namespace osg -{ - -/** Class which encapsulates the frame number, reference time and calendar - * time of specific frame, used to synchronize operations on the scene graph - * and other machines when using a graphics cluster. Note the calendar - * time can be an artificial simulation time or capture the real time - * of day etc.*/ -class OSG_EXPORT FrameStamp : public Referenced -{ - public: - - FrameStamp(); - FrameStamp(const FrameStamp& fs); - - FrameStamp& operator = (const FrameStamp& fs); - - void setFrameNumber(unsigned int fnum) { _frameNumber = fnum; } - unsigned int getFrameNumber() const { return _frameNumber; } - - void setReferenceTime(double refTime) { _referenceTime = refTime; } - double getReferenceTime() const { return _referenceTime; } - - void setSimulationTime(double refTime) { _simulationTime = refTime; } - double getSimulationTime() const { return _simulationTime; } - - void setCalendarTime(const tm& calendarTime); - void getCalendarTime(tm& calendarTime) const; - - // keep public to allow it to be permit allocation which is - // not on the heap used osgcluster - virtual ~FrameStamp(); - - protected: - - - // note no dynamic memory is used so that data can be passed - // via a simple memory copy or within a data packet across - // the network. - - unsigned int _frameNumber; - double _referenceTime; - double _simulationTime; - - // member variables of time.h's tm structure, copied here to - // ensure that all data is not dynamic. The tm structure itself - // is not completely consistent between implementations, which - // could be a problem when sending the FrameStamp across a network - // with different versions of tm (i.e mixing Unix and Windows.) - int tm_sec; /* Seconds. [0-60] (1 leap second) */ - int tm_min; /* Minutes. [0-59] */ - int tm_hour; /* Hours. [0-23] */ - int tm_mday; /* Day. [1-31] */ - int tm_mon; /* Month. [0-11] */ - int tm_year; /* Year - 1900. */ - int tm_wday; /* Day of week. [0-6] */ - int tm_yday; /* Days in year. [0-365] */ - int tm_isdst; /* DST. [-1/0/1]*/ - - -}; - -} - - -#endif diff --git a/libs/lib/mac32/include/osg/FrontFace b/libs/lib/mac32/include/osg/FrontFace deleted file mode 100644 index 43eeb8eb8..000000000 --- a/libs/lib/mac32/include/osg/FrontFace +++ /dev/null @@ -1,70 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_FRONTFACE -#define OSG_FRONTFACE 1 - -#include -#include - -namespace osg { - -/** Class to specify the orientation of front-facing polygons. -*/ -class OSG_EXPORT FrontFace : public StateAttribute -{ - public : - - enum Mode { - CLOCKWISE = GL_CW, - COUNTER_CLOCKWISE = GL_CCW - }; - - FrontFace(Mode face=COUNTER_CLOCKWISE); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - FrontFace(const FrontFace& ff,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(ff,copyop), - _mode(ff._mode) {} - - META_StateAttribute(osg, FrontFace, FRONTFACE); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(FrontFace,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_mode) - - return 0; // passed all the above comparison macros, must be equal. - } - - inline void setMode(Mode mode) { _mode = mode; } - inline Mode getMode() const { return _mode; } - - virtual void apply(State& state) const; - - protected: - - virtual ~FrontFace(); - - Mode _mode; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/GL b/libs/lib/mac32/include/osg/GL deleted file mode 100644 index 9f43694a3..000000000 --- a/libs/lib/mac32/include/osg/GL +++ /dev/null @@ -1,221 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GL -#define OSG_GL 1 - -#include -#include - -#if defined(OSG_GLES1_AVAILABLE) - - #ifdef __APPLE__ - //if its apple include the target defines so we can check for IOS - #include "TargetConditionals.h" - #include - #else - #include - #endif - -#elif defined(OSG_GLES2_AVAILABLE) - - #ifdef __APPLE__ - //if its apple include the target defines so we can check for IOS - #include "TargetConditionals.h" - #include - #else - #include - #endif - - -#else - - #ifndef WIN32 - - // Required for compatibility with glext.h sytle function definitions of - // OpenGL extensions, such as in src/osg/Point.cpp. - #ifndef APIENTRY - #define APIENTRY - #endif - - #else // WIN32 - - #if defined(__CYGWIN__) || defined(__MINGW32__) - - #ifndef APIENTRY - #define GLUT_APIENTRY_DEFINED - #define APIENTRY __stdcall - #endif - // XXX This is from Win32's - #ifndef CALLBACK - #define CALLBACK __stdcall - #endif - - #else // ! __CYGWIN__ - - // Under Windows avoid including - // to avoid name space pollution, but Win32's - // needs APIENTRY and WINGDIAPI defined properly. - // XXX This is from Win32's - #ifndef APIENTRY - #define GLUT_APIENTRY_DEFINED - #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) - #define WINAPI __stdcall - #define APIENTRY WINAPI - #else - #define APIENTRY - #endif - #endif - - // XXX This is from Win32's - #ifndef CALLBACK - #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) - #define CALLBACK __stdcall - #else - #define CALLBACK - #endif - #endif - - #endif // __CYGWIN__ - - // XXX This is from Win32's and - #ifndef WINGDIAPI - #define GLUT_WINGDIAPI_DEFINED - #define DECLSPEC_IMPORT __declspec(dllimport) - #define WINGDIAPI DECLSPEC_IMPORT - #endif - - // XXX This is from Win32's - #if !defined(_WCHAR_T_DEFINED) && !(defined(__GNUC__)&&((__GNUC__ == 3)||(__GNUC__ == 4))) - typedef unsigned short wchar_t; - #define _WCHAR_T_DEFINED - #endif - - #endif // WIN32 - - #if defined(OSG_GL3_AVAILABLE) - - #define GL3_PROTOTYPES 1 - #include - - #else - #ifndef __gl_h_ - #ifdef __APPLE__ - #include - #else - #include - #endif - #endif - #endif - - #ifndef GL_APIENTRY - #define GL_APIENTRY APIENTRY - #endif // GL_APIENTRY - -#endif - - -#ifdef OSG_GL_MATRICES_AVAILABLE - - inline void glLoadMatrix(const float* mat) { glLoadMatrixf(static_cast(mat)); } - inline void glMultMatrix(const float* mat) { glMultMatrixf(static_cast(mat)); } - - #ifdef OSG_GLES1_AVAILABLE - inline void glLoadMatrix(const double* mat) - { - GLfloat flt_mat[16]; - for(unsigned int i=0;i<16;++i) flt_mat[i] = mat[i]; - glLoadMatrixf(flt_mat); - } - - inline void glMultMatrix(const double* mat) - { - GLfloat flt_mat[16]; - for(unsigned int i=0;i<16;++i) flt_mat[i] = mat[i]; - glMultMatrixf(flt_mat); - } - - #else - inline void glLoadMatrix(const double* mat) { glLoadMatrixd(static_cast(mat)); } - inline void glMultMatrix(const double* mat) { glMultMatrixd(static_cast(mat)); } - #endif -#endif - -// add defines for OpenGL targets that don't define them, just to ease compatibility across targets -#ifndef GL_DOUBLE - #define GL_DOUBLE 0x140A - typedef double GLdouble; -#endif - -#ifndef GL_INT - #define GL_INT 0x1404 -#endif - -#ifndef GL_UNSIGNED_INT - #define GL_UNSIGNED_INT 0x1405 -#endif - -#ifndef GL_NONE - // OpenGL ES1 doesn't provide GL_NONE - #define GL_NONE 0x0 -#endif - -#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) - //GLES defines (OES) - #define GL_RGB8_OES 0x8051 - #define GL_RGBA8_OES 0x8058 -#endif - -#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) - #define GL_POLYGON 0x0009 - #define GL_QUADS 0x0007 - #define GL_QUAD_STRIP 0x0008 -#endif - -#if defined(OSG_GL3_AVAILABLE) - #define GL_LUMINANCE 0x1909 - #define GL_LUMINANCE_ALPHA 0x190A -#endif - -#ifdef OSG_GL1_AVAILABLE - #define OSG_GL1_FEATURES 1 -#else - #define OSG_GL1_FEATURES 0 -#endif - -#ifdef OSG_GL2_AVAILABLE - #define OSG_GL2_FEATURES 1 -#else - #define OSG_GL2_FEATURES 0 -#endif - -#ifdef OSG_GL3_AVAILABLE - #define OSG_GL3_FEATURES 1 -#else - #define OSG_GL3_FEATURES 0 -#endif - -#ifdef OSG_GLES1_AVAILABLE - #define OSG_GLES1_FEATURES 1 -#else - #define OSG_GLES1_FEATURES 0 -#endif - -#ifdef OSG_GLES2_AVAILABLE - #define OSG_GLES2_FEATURES 1 -#else - #define OSG_GLES2_FEATURES 0 -#endif - - -#endif // __osgGL_h diff --git a/libs/lib/mac32/include/osg/GL2Extensions b/libs/lib/mac32/include/osg/GL2Extensions deleted file mode 100644 index 8137951bf..000000000 --- a/libs/lib/mac32/include/osg/GL2Extensions +++ /dev/null @@ -1,791 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * Copyright (C) 2003-2005 3Dlabs Inc. Ltd. - * Copyright (C) 2004-2005 Nathan Cournia - * Copyright (C) 2007 Art Tevs - * Copyright (C) 2008 Zebra Imaging - * Copyright (C) 2010 VIRES Simulationstechnologie GmbH - * - * This application is open source and may be redistributed and/or modified - * freely and without restriction, both in commercial and non commercial - * applications, as long as this copyright notice is maintained. - * - * This application is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/* file: include/osg/GL2Extensions - * author: Mike Weiblen 2008-01-02 - * Holger Helmich 2010-10-21 -*/ - -#ifndef OSG_GL2EXTENSIONS -#define OSG_GL2EXTENSIONS 1 - -#include -#include - -#include - -#ifndef GL_SAMPLER_2D_ARRAY_EXT - #define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 - #define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 - #define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 - #define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 -#endif - -#if !defined(GL_VERSION_2_0) -typedef char GLchar; -#endif - -#if !defined(GL_VERSION_2_0) - #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 - #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 -#endif - -#if !defined(GL_VERSION_2_0) && !defined(GL_ES_VERSION_2_0) -#define GL_VERSION_2_0 1 -#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_POINT_SPRITE 0x8861 -#define GL_COORD_REPLACE 0x8862 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_COORDS 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#endif - -#ifndef GL_VERSION_2_1 -#define GL_VERSION_2_1 1 -#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_SLUMINANCE_ALPHA 0x8C44 -#define GL_SLUMINANCE8_ALPHA8 0x8C45 -#define GL_SLUMINANCE 0x8C46 -#define GL_SLUMINANCE8 0x8C47 -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#define GL_COMPRESSED_SLUMINANCE 0x8C4A -#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B -#endif - -// EXT_geometry_shader4 -#ifndef GL_GEOMETRY_SHADER_EXT -#define GL_GEOMETRY_SHADER_EXT 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE -#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 -#define GL_LINES_ADJACENCY_EXT 0x000A -#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B -#define GL_TRIANGLES_ADJACENCY_EXT 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 -#endif - -// ARB_tesselation_shader -#ifndef GL_TESS_EVALUATION_SHADER -#define GL_PATCHES 0x000E -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -#define GL_ISOLINES 0x8E7A -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRACTIONAL_EVEN 0x8E7C -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#endif - -// EXT_gpu_shader4 -#ifndef GL_INT_SAMPLER_2D_EXT -#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 -#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 -#define GL_SAMPLER_BUFFER_EXT 0x8DC2 -#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 -#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 -#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 -#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 -#define GL_INT_SAMPLER_1D_EXT 0x8DC9 -#define GL_INT_SAMPLER_2D_EXT 0x8DCA -#define GL_INT_SAMPLER_3D_EXT 0x8DCB -#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC -#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD -#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF -#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 -#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 -#endif - -// ARB_uniform_buffer_object -#ifndef GL_UNIFORM_BUFFER -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu -#endif - -//ARB_get_program_binary -#ifndef GL_PROGRAM_BINARY_RETRIEVABLE_HINT -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#endif - -namespace osg { - -class OSG_EXPORT GL2Extensions : public osg::Referenced -{ - public: - GL2Extensions(unsigned int contextID); - GL2Extensions(const GL2Extensions& rhs); - - void lowestCommonDenominator(const GL2Extensions& rhs); - - void setupGL2Extensions(unsigned int contextID); - - /** Does the GL driver support OpenGL Shading Language? */ - bool isGlslSupported() const; - - float getGlVersion() const { return _glVersion; } - float getLanguageVersion() const { return _glslLanguageVersion; } - - void setShaderObjectsSupported(bool flag) { _isShaderObjectsSupported = flag; } - bool isShaderObjectsSupported() const { return _isShaderObjectsSupported; } - - void setVertexShaderSupported(bool flag) { _isVertexShaderSupported = flag; } - bool isVertexShaderSupported() const { return _isVertexShaderSupported; } - - void setFragmentShaderSupported(bool flag) { _isFragmentShaderSupported = flag; } - bool isFragmentShaderSupported() const { return _isFragmentShaderSupported; } - - void setLanguage100Supported(bool flag) { _isLanguage100Supported = flag; } - bool isLanguage100Supported() const { return _isLanguage100Supported; } - - void setGeometryShader4Supported(bool flag) { _isGeometryShader4Supported = flag; } - bool isGeometryShader4Supported() const { return _isGeometryShader4Supported; } - - void setTessellationShadersSupported(bool flag) { _areTessellationShadersSupported = flag; } - bool areTessellationShadersSupported() const { return _areTessellationShadersSupported; } - - void setGpuShader4Supported(bool flag) { _isGpuShader4Supported = flag; } - bool isGpuShader4Supported() const { return _isGpuShader4Supported; } - - void setUniformBufferObjectSupported(bool flag) { _isUniformBufferObjectSupported = flag; } - bool isUniformBufferObjectSupported() {return _isUniformBufferObjectSupported; } - - void setGetProgramBinarySupported(bool flag) { _isGetProgramBinarySupported = flag; } - bool isGetProgramBinarySupported() {return _isGetProgramBinarySupported; } - - /** Function to call to get the extension of a specified context. - * If the Exentsion object for that context has not yet been created then - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object - * only be created with the graphics context associated with ContextID..*/ - static GL2Extensions* Get(unsigned int contextID,bool createIfNotInitalized); - - /** allows users to override the extensions across graphics contexts. - * typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions.*/ - static void Set(unsigned int contextID, GL2Extensions* extensions); - - - void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) const; - void glDrawBuffers(GLsizei n, const GLenum *bufs) const; - void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) const; - void glStencilFuncSeparate(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) const; - void glStencilMaskSeparate(GLenum face, GLuint mask) const; - void glAttachShader(GLuint program, GLuint shader) const; - void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name) const; - void glCompileShader(GLuint shader) const; - GLuint glCreateProgram(void) const; - GLuint glCreateShader(GLenum type) const; - void glDeleteProgram(GLuint program) const; - void glDeleteShader(GLuint shader) const; - void glDetachShader(GLuint program, GLuint shader) const; - void glDisableVertexAttribArray(GLuint index) const; - void glEnableVertexAttribArray(GLuint index) const; - void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) const; - void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) const; - void glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj) const; - GLint glGetAttribLocation(GLuint program, const GLchar *name) const; - void glGetProgramiv(GLuint program, GLenum pname, GLint *params) const; - void glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) const; - void glGetShaderiv(GLuint shader, GLenum pname, GLint *params) const; - void glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) const; - void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) const; - GLint glGetUniformLocation(GLuint program, const GLchar *name) const; - void glGetUniformfv(GLuint program, GLint location, GLfloat *params) const; - void glGetUniformiv(GLuint program, GLint location, GLint *params) const; - void glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params) const; - void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) const; - void glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params) const; - void glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid* *pointer) const; - GLboolean glIsProgram(GLuint program) const; - GLboolean glIsShader(GLuint shader) const; - void glLinkProgram(GLuint program) const; - void glShaderSource(GLuint shader, GLsizei count, const GLchar* *string, const GLint *length) const; - void glUseProgram(GLuint program) const; - void glUniform1f(GLint location, GLfloat v0) const; - void glUniform2f(GLint location, GLfloat v0, GLfloat v1) const; - void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) const; - void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) const; - void glUniform1i(GLint location, GLint v0) const; - void glUniform2i(GLint location, GLint v0, GLint v1) const; - void glUniform3i(GLint location, GLint v0, GLint v1, GLint v2) const; - void glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) const; - void glUniform1fv(GLint location, GLsizei count, const GLfloat *value) const; - void glUniform2fv(GLint location, GLsizei count, const GLfloat *value) const; - void glUniform3fv(GLint location, GLsizei count, const GLfloat *value) const; - void glUniform4fv(GLint location, GLsizei count, const GLfloat *value) const; - void glUniform1iv(GLint location, GLsizei count, const GLint *value) const; - void glUniform2iv(GLint location, GLsizei count, const GLint *value) const; - void glUniform3iv(GLint location, GLsizei count, const GLint *value) const; - void glUniform4iv(GLint location, GLsizei count, const GLint *value) const; - void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) const; - void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) const; - void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) const; - void glValidateProgram(GLuint program) const; - void glVertexAttrib1d(GLuint index, GLdouble x) const; - void glVertexAttrib1dv(GLuint index, const GLdouble *v) const; - void glVertexAttrib1f(GLuint index, GLfloat x) const; - void glVertexAttrib1fv(GLuint index, const GLfloat *v) const; - void glVertexAttrib1s(GLuint index, GLshort x) const; - void glVertexAttrib1sv(GLuint index, const GLshort *v) const; - void glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y) const; - void glVertexAttrib2dv(GLuint index, const GLdouble *v) const; - void glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) const; - void glVertexAttrib2fv(GLuint index, const GLfloat *v) const; - void glVertexAttrib2s(GLuint index, GLshort x, GLshort y) const; - void glVertexAttrib2sv(GLuint index, const GLshort *v) const; - void glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z) const; - void glVertexAttrib3dv(GLuint index, const GLdouble *v) const; - void glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) const; - void glVertexAttrib3fv(GLuint index, const GLfloat *v) const; - void glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z) const; - void glVertexAttrib3sv(GLuint index, const GLshort *v) const; - void glVertexAttrib4Nbv(GLuint index, const GLbyte *v) const; - void glVertexAttrib4Niv(GLuint index, const GLint *v) const; - void glVertexAttrib4Nsv(GLuint index, const GLshort *v) const; - void glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) const; - void glVertexAttrib4Nubv(GLuint index, const GLubyte *v) const; - void glVertexAttrib4Nuiv(GLuint index, const GLuint *v) const; - void glVertexAttrib4Nusv(GLuint index, const GLushort *v) const; - void glVertexAttrib4bv(GLuint index, const GLbyte *v) const; - void glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) const; - void glVertexAttrib4dv(GLuint index, const GLdouble *v) const; - void glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) const; - void glVertexAttrib4fv(GLuint index, const GLfloat *v) const; - void glVertexAttrib4iv(GLuint index, const GLint *v) const; - void glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) const; - void glVertexAttrib4sv(GLuint index, const GLshort *v) const; - void glVertexAttrib4ubv(GLuint index, const GLubyte *v) const; - void glVertexAttrib4uiv(GLuint index, const GLuint *v) const; - void glVertexAttrib4usv(GLuint index, const GLushort *v) const; - void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer) const; - - // C++-friendly convenience wrapper methods - GLuint getCurrentProgram() const; - bool getProgramInfoLog( GLuint program, std::string& result ) const; - bool getShaderInfoLog( GLuint shader, std::string& result ) const; - bool getAttribLocation( const char* attribName, GLuint& slot ) const; - bool getFragDataLocation( const char* fragDataName, GLuint& slot) const; - - // GL 2.1 - void glUniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) const; - void glUniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) const; - void glUniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) const; - void glUniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) const; - void glUniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) const; - void glUniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) const; - - // EXT_geometry_shader4 - void glProgramParameteri( GLuint program, GLenum pname, GLint value ) const; - void glFramebufferTexture( GLenum target, GLenum attachment, GLuint texture, GLint level ) const; - void glFramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) const; - void glFramebufferTextureFace( GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face ) const; - - // ARB_tessellation_shader - void glPatchParameteri(GLenum pname, GLint value) const; - void glPatchParameterfv(GLenum pname, const GLfloat *values) const; - - // EXT_gpu_shader4 - void glGetUniformuiv( GLuint program, GLint location, GLuint *params ) const; - void glBindFragDataLocation( GLuint program, GLuint color, const GLchar *name ) const; - GLint glGetFragDataLocation( GLuint program, const GLchar *name ) const; - void glUniform1ui( GLint location, GLuint v0 ) const; - void glUniform2ui( GLint location, GLuint v0, GLuint v1 ) const; - void glUniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2 ) const; - void glUniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) const; - void glUniform1uiv( GLint location, GLsizei count, const GLuint *value ) const; - void glUniform2uiv( GLint location, GLsizei count, const GLuint *value ) const; - void glUniform3uiv( GLint location, GLsizei count, const GLuint *value ) const; - void glUniform4uiv( GLint location, GLsizei count, const GLuint *value ) const; - - // ARB_uniform_buffer_object - void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices) const; - void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params) const; - void glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName) const; - GLuint glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName) const; - void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params) const; - void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) const; - void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) const; - - // ARB_get_program_binary - void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) const; - void glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length) const; - - protected: - ~GL2Extensions() {} - - float _glVersion; - float _glslLanguageVersion; - - bool _isShaderObjectsSupported; - bool _isVertexShaderSupported; - bool _isFragmentShaderSupported; - bool _isLanguage100Supported; - bool _isGeometryShader4Supported; - bool _areTessellationShadersSupported; - bool _isGpuShader4Supported; - bool _isUniformBufferObjectSupported; - bool _isGetProgramBinarySupported; - - typedef void (GL_APIENTRY * BlendEquationSeparateProc)(GLenum modeRGB, GLenum modeAlpha); - typedef void (GL_APIENTRY * DrawBuffersProc)(GLsizei n, const GLenum *bufs); - typedef void (GL_APIENTRY * StencilOpSeparateProc)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); - typedef void (GL_APIENTRY * StencilFuncSeparateProc)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); - typedef void (GL_APIENTRY * StencilMaskSeparateProc)(GLenum face, GLuint mask); - typedef void (GL_APIENTRY * AttachShaderProc)(GLuint program, GLuint shader); - typedef void (GL_APIENTRY * BindAttribLocationProc)(GLuint program, GLuint index, const GLchar *name); - typedef void (GL_APIENTRY * CompileShaderProc)(GLuint shader); - typedef GLuint (GL_APIENTRY * CreateProgramProc)(void); - typedef GLuint (GL_APIENTRY * CreateShaderProc)(GLenum type); - typedef void (GL_APIENTRY * DeleteProgramProc)(GLuint program); - typedef void (GL_APIENTRY * DeleteObjectARBProc)(GLuint program); - typedef void (GL_APIENTRY * DeleteShaderProc)(GLuint shader); - typedef void (GL_APIENTRY * DetachShaderProc)(GLuint program, GLuint shader); - typedef void (GL_APIENTRY * DisableVertexAttribArrayProc)(GLuint index); - typedef void (GL_APIENTRY * EnableVertexAttribArrayProc)(GLuint index); - typedef void (GL_APIENTRY * GetActiveAttribProc)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); - typedef void (GL_APIENTRY * GetActiveUniformProc)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); - typedef void (GL_APIENTRY * GetAttachedShadersProc)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); - typedef GLint (GL_APIENTRY * GetAttribLocationProc)(GLuint program, const GLchar *name); - typedef void (GL_APIENTRY * GetProgramivProc)(GLuint program, GLenum pname, GLint *params); - typedef void (GL_APIENTRY * GetObjectParameterivARBProc)(GLuint program, GLenum pname, GLint *params); - typedef void (GL_APIENTRY * GetProgramInfoLogProc)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); - typedef void (GL_APIENTRY * GetInfoLogARBProc)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); - typedef void (GL_APIENTRY * GetShaderivProc)(GLuint shader, GLenum pname, GLint *params); - typedef void (GL_APIENTRY * GetShaderInfoLogProc)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); - typedef void (GL_APIENTRY * GetShaderSourceProc)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); - typedef GLint (GL_APIENTRY * GetUniformLocationProc)(GLuint program, const GLchar *name); - typedef void (GL_APIENTRY * GetUniformfvProc)(GLuint program, GLint location, GLfloat *params); - typedef void (GL_APIENTRY * GetUniformivProc)(GLuint program, GLint location, GLint *params); - typedef void (GL_APIENTRY * GetVertexAttribdvProc)(GLuint index, GLenum pname, GLdouble *params); - typedef void (GL_APIENTRY * GetVertexAttribfvProc)(GLuint index, GLenum pname, GLfloat *params); - typedef void (GL_APIENTRY * GetVertexAttribivProc)(GLuint index, GLenum pname, GLint *params); - typedef void (GL_APIENTRY * GetVertexAttribPointervProc)(GLuint index, GLenum pname, GLvoid* *pointer); - typedef GLboolean (GL_APIENTRY * IsProgramProc)(GLuint program); - typedef GLboolean (GL_APIENTRY * IsShaderProc)(GLuint shader); - typedef void (GL_APIENTRY * LinkProgramProc)(GLuint program); - typedef void (GL_APIENTRY * ShaderSourceProc)(GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); - typedef void (GL_APIENTRY * UseProgramProc)(GLuint program); - typedef void (GL_APIENTRY * Uniform1fProc)(GLint location, GLfloat v0); - typedef void (GL_APIENTRY * Uniform2fProc)(GLint location, GLfloat v0, GLfloat v1); - typedef void (GL_APIENTRY * Uniform3fProc)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); - typedef void (GL_APIENTRY * Uniform4fProc)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); - typedef void (GL_APIENTRY * Uniform1iProc)(GLint location, GLint v0); - typedef void (GL_APIENTRY * Uniform2iProc)(GLint location, GLint v0, GLint v1); - typedef void (GL_APIENTRY * Uniform3iProc)(GLint location, GLint v0, GLint v1, GLint v2); - typedef void (GL_APIENTRY * Uniform4iProc)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); - typedef void (GL_APIENTRY * Uniform1fvProc)(GLint location, GLsizei count, const GLfloat *value); - typedef void (GL_APIENTRY * Uniform2fvProc)(GLint location, GLsizei count, const GLfloat *value); - typedef void (GL_APIENTRY * Uniform3fvProc)(GLint location, GLsizei count, const GLfloat *value); - typedef void (GL_APIENTRY * Uniform4fvProc)(GLint location, GLsizei count, const GLfloat *value); - typedef void (GL_APIENTRY * Uniform1ivProc)(GLint location, GLsizei count, const GLint *value); - typedef void (GL_APIENTRY * Uniform2ivProc)(GLint location, GLsizei count, const GLint *value); - typedef void (GL_APIENTRY * Uniform3ivProc)(GLint location, GLsizei count, const GLint *value); - typedef void (GL_APIENTRY * Uniform4ivProc)(GLint location, GLsizei count, const GLint *value); - typedef void (GL_APIENTRY * UniformMatrix2fvProc)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); - typedef void (GL_APIENTRY * UniformMatrix3fvProc)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); - typedef void (GL_APIENTRY * UniformMatrix4fvProc)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); - typedef void (GL_APIENTRY * ValidateProgramProc)(GLuint program); - typedef void (GL_APIENTRY * VertexAttrib1dProc)(GLuint index, GLdouble x); - typedef void (GL_APIENTRY * VertexAttrib1dvProc)(GLuint index, const GLdouble *v); - typedef void (GL_APIENTRY * VertexAttrib1fProc)(GLuint index, GLfloat x); - typedef void (GL_APIENTRY * VertexAttrib1fvProc)(GLuint index, const GLfloat *v); - typedef void (GL_APIENTRY * VertexAttrib1sProc)(GLuint index, GLshort x); - typedef void (GL_APIENTRY * VertexAttrib1svProc)(GLuint index, const GLshort *v); - typedef void (GL_APIENTRY * VertexAttrib2dProc)(GLuint index, GLdouble x, GLdouble y); - typedef void (GL_APIENTRY * VertexAttrib2dvProc)(GLuint index, const GLdouble *v); - typedef void (GL_APIENTRY * VertexAttrib2fProc)(GLuint index, GLfloat x, GLfloat y); - typedef void (GL_APIENTRY * VertexAttrib2fvProc)(GLuint index, const GLfloat *v); - typedef void (GL_APIENTRY * VertexAttrib2sProc)(GLuint index, GLshort x, GLshort y); - typedef void (GL_APIENTRY * VertexAttrib2svProc)(GLuint index, const GLshort *v); - typedef void (GL_APIENTRY * VertexAttrib3dProc)(GLuint index, GLdouble x, GLdouble y, GLdouble z); - typedef void (GL_APIENTRY * VertexAttrib3dvProc)(GLuint index, const GLdouble *v); - typedef void (GL_APIENTRY * VertexAttrib3fProc)(GLuint index, GLfloat x, GLfloat y, GLfloat z); - typedef void (GL_APIENTRY * VertexAttrib3fvProc)(GLuint index, const GLfloat *v); - typedef void (GL_APIENTRY * VertexAttrib3sProc)(GLuint index, GLshort x, GLshort y, GLshort z); - typedef void (GL_APIENTRY * VertexAttrib3svProc)(GLuint index, const GLshort *v); - typedef void (GL_APIENTRY * VertexAttrib4NbvProc)(GLuint index, const GLbyte *v); - typedef void (GL_APIENTRY * VertexAttrib4NivProc)(GLuint index, const GLint *v); - typedef void (GL_APIENTRY * VertexAttrib4NsvProc)(GLuint index, const GLshort *v); - typedef void (GL_APIENTRY * VertexAttrib4NubProc)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); - typedef void (GL_APIENTRY * VertexAttrib4NubvProc)(GLuint index, const GLubyte *v); - typedef void (GL_APIENTRY * VertexAttrib4NuivProc)(GLuint index, const GLuint *v); - typedef void (GL_APIENTRY * VertexAttrib4NusvProc)(GLuint index, const GLushort *v); - typedef void (GL_APIENTRY * VertexAttrib4bvProc)(GLuint index, const GLbyte *v); - typedef void (GL_APIENTRY * VertexAttrib4dProc)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); - typedef void (GL_APIENTRY * VertexAttrib4dvProc)(GLuint index, const GLdouble *v); - typedef void (GL_APIENTRY * VertexAttrib4fProc)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - typedef void (GL_APIENTRY * VertexAttrib4fvProc)(GLuint index, const GLfloat *v); - typedef void (GL_APIENTRY * VertexAttrib4ivProc)(GLuint index, const GLint *v); - typedef void (GL_APIENTRY * VertexAttrib4sProc)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); - typedef void (GL_APIENTRY * VertexAttrib4svProc)(GLuint index, const GLshort *v); - typedef void (GL_APIENTRY * VertexAttrib4ubvProc)(GLuint index, const GLubyte *v); - typedef void (GL_APIENTRY * VertexAttrib4uivProc)(GLuint index, const GLuint *v); - typedef void (GL_APIENTRY * VertexAttrib4usvProc)(GLuint index, const GLushort *v); - typedef void (GL_APIENTRY * VertexAttribPointerProc)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); - typedef void (GL_APIENTRY * UniformMatrix2x3fvProc)( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ); - typedef void (GL_APIENTRY * UniformMatrix3x2fvProc)( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ); - typedef void (GL_APIENTRY * UniformMatrix2x4fvProc)( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ); - typedef void (GL_APIENTRY * UniformMatrix4x2fvProc)( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ); - typedef void (GL_APIENTRY * UniformMatrix3x4fvProc)( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ); - typedef void (GL_APIENTRY * UniformMatrix4x3fvProc)( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ); - typedef void (GL_APIENTRY * ProgramParameteriProc)( GLuint program, GLenum pname, GLint value ); - typedef void (GL_APIENTRY * FramebufferTextureProc)( GLenum target, GLenum attachment, GLuint texture, GLint level ); - typedef void (GL_APIENTRY * FramebufferTextureLayerProc)( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ); - typedef void (GL_APIENTRY * FramebufferTextureFaceProc)( GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face ); - typedef void (GL_APIENTRY * PatchParameteriProc)( GLenum pname, GLint value ); - typedef void (GL_APIENTRY * PatchParameterfvProc)( GLenum pname, const GLfloat* values ); - typedef void (GL_APIENTRY * GetUniformuivProc)( GLuint program, GLint location, GLuint* params ); - typedef void (GL_APIENTRY * BindFragDataLocationProc)( GLuint program, GLuint color, const GLchar* name ); - typedef GLint (GL_APIENTRY * GetFragDataLocationProc)( GLuint program, const GLchar* name ); - typedef void (GL_APIENTRY * Uniform1uiProc)( GLint location, GLuint v0 ); - typedef void (GL_APIENTRY * Uniform2uiProc)( GLint location, GLuint v0, GLuint v1 ); - typedef void (GL_APIENTRY * Uniform3uiProc)( GLint location, GLuint v0, GLuint v1, GLuint v2 ); - typedef void (GL_APIENTRY * Uniform4uiProc)( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ); - typedef void (GL_APIENTRY * Uniform1uivProc)( GLint location, GLsizei count, const GLuint *value ); - typedef void (GL_APIENTRY * Uniform2uivProc)( GLint location, GLsizei count, const GLuint *value ); - typedef void (GL_APIENTRY * Uniform3uivProc)( GLint location, GLsizei count, const GLuint *value ); - typedef void (GL_APIENTRY * Uniform4uivProc)( GLint location, GLsizei count, const GLuint *value ); - typedef GLuint (GL_APIENTRY * GetHandleProc) (GLenum pname); - typedef void (GL_APIENTRY * GetUniformIndicesProc)(GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); - typedef void (GL_APIENTRY * GetActiveUniformsivProc)(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); - typedef void (GL_APIENTRY * GetActiveUniformNameProc)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); - typedef GLuint (GL_APIENTRY * GetUniformBlockIndexProc)(GLuint program, const GLchar *uniformBlockName); - typedef void (GL_APIENTRY * GetActiveUniformBlockivProc)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); - typedef void (GL_APIENTRY * GetActiveUniformBlockNameProc)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); - typedef void (GL_APIENTRY * UniformBlockBindingProc)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); - typedef void (GL_APIENTRY * GetProgramBinaryProc)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); - typedef void (GL_APIENTRY * ProgramBinaryProc)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); - - BlendEquationSeparateProc _glBlendEquationSeparate; - DrawBuffersProc _glDrawBuffers; - StencilOpSeparateProc _glStencilOpSeparate; - StencilFuncSeparateProc _glStencilFuncSeparate; - StencilMaskSeparateProc _glStencilMaskSeparate; - AttachShaderProc _glAttachShader; - BindAttribLocationProc _glBindAttribLocation; - CompileShaderProc _glCompileShader; - CreateProgramProc _glCreateProgram; - CreateShaderProc _glCreateShader; - DeleteProgramProc _glDeleteProgram; - DeleteShaderProc _glDeleteShader; - DetachShaderProc _glDetachShader; - DisableVertexAttribArrayProc _glDisableVertexAttribArray; - EnableVertexAttribArrayProc _glEnableVertexAttribArray; - GetActiveAttribProc _glGetActiveAttrib; - GetActiveUniformProc _glGetActiveUniform; - GetAttachedShadersProc _glGetAttachedShaders; - GetAttribLocationProc _glGetAttribLocation; - GetProgramivProc _glGetProgramiv; - GetProgramInfoLogProc _glGetProgramInfoLog; - GetShaderivProc _glGetShaderiv; - GetShaderInfoLogProc _glGetShaderInfoLog; - GetShaderSourceProc _glGetShaderSource; - GetUniformLocationProc _glGetUniformLocation; - GetUniformfvProc _glGetUniformfv; - GetUniformivProc _glGetUniformiv; - GetVertexAttribdvProc _glGetVertexAttribdv; - GetVertexAttribfvProc _glGetVertexAttribfv; - GetVertexAttribivProc _glGetVertexAttribiv; - GetVertexAttribPointervProc _glGetVertexAttribPointerv; - IsProgramProc _glIsProgram; - IsShaderProc _glIsShader; - LinkProgramProc _glLinkProgram; - ShaderSourceProc _glShaderSource; - UseProgramProc _glUseProgram; - Uniform1fProc _glUniform1f; - Uniform2fProc _glUniform2f; - Uniform3fProc _glUniform3f; - Uniform4fProc _glUniform4f; - Uniform1iProc _glUniform1i; - Uniform2iProc _glUniform2i; - Uniform3iProc _glUniform3i; - Uniform4iProc _glUniform4i; - Uniform1fvProc _glUniform1fv; - Uniform2fvProc _glUniform2fv; - Uniform3fvProc _glUniform3fv; - Uniform4fvProc _glUniform4fv; - Uniform1ivProc _glUniform1iv; - Uniform2ivProc _glUniform2iv; - Uniform3ivProc _glUniform3iv; - Uniform4ivProc _glUniform4iv; - UniformMatrix2fvProc _glUniformMatrix2fv; - UniformMatrix3fvProc _glUniformMatrix3fv; - UniformMatrix4fvProc _glUniformMatrix4fv; - ValidateProgramProc _glValidateProgram; - VertexAttrib1dProc _glVertexAttrib1d; - VertexAttrib1dvProc _glVertexAttrib1dv; - VertexAttrib1fProc _glVertexAttrib1f; - VertexAttrib1fvProc _glVertexAttrib1fv; - VertexAttrib1sProc _glVertexAttrib1s; - VertexAttrib1svProc _glVertexAttrib1sv; - VertexAttrib2dProc _glVertexAttrib2d; - VertexAttrib2dvProc _glVertexAttrib2dv; - VertexAttrib2fProc _glVertexAttrib2f; - VertexAttrib2fvProc _glVertexAttrib2fv; - VertexAttrib2sProc _glVertexAttrib2s; - VertexAttrib2svProc _glVertexAttrib2sv; - VertexAttrib3dProc _glVertexAttrib3d; - VertexAttrib3dvProc _glVertexAttrib3dv; - VertexAttrib3fProc _glVertexAttrib3f; - VertexAttrib3fvProc _glVertexAttrib3fv; - VertexAttrib3sProc _glVertexAttrib3s; - VertexAttrib3svProc _glVertexAttrib3sv; - VertexAttrib4NbvProc _glVertexAttrib4Nbv; - VertexAttrib4NivProc _glVertexAttrib4Niv; - VertexAttrib4NsvProc _glVertexAttrib4Nsv; - VertexAttrib4NubProc _glVertexAttrib4Nub; - VertexAttrib4NubvProc _glVertexAttrib4Nubv; - VertexAttrib4NuivProc _glVertexAttrib4Nuiv; - VertexAttrib4NusvProc _glVertexAttrib4Nusv; - VertexAttrib4bvProc _glVertexAttrib4bv; - VertexAttrib4dProc _glVertexAttrib4d; - VertexAttrib4dvProc _glVertexAttrib4dv; - VertexAttrib4fProc _glVertexAttrib4f; - VertexAttrib4fvProc _glVertexAttrib4fv; - VertexAttrib4ivProc _glVertexAttrib4iv; - VertexAttrib4sProc _glVertexAttrib4s; - VertexAttrib4svProc _glVertexAttrib4sv; - VertexAttrib4ubvProc _glVertexAttrib4ubv; - VertexAttrib4uivProc _glVertexAttrib4uiv; - VertexAttrib4usvProc _glVertexAttrib4usv; - VertexAttribPointerProc _glVertexAttribPointer; - - GetInfoLogARBProc _glGetInfoLogARB; - GetObjectParameterivARBProc _glGetObjectParameterivARB; - DeleteObjectARBProc _glDeleteObjectARB; - GetHandleProc _glGetHandleARB; - - // GL 2.1 - UniformMatrix2x3fvProc _glUniformMatrix2x3fv; - UniformMatrix3x2fvProc _glUniformMatrix3x2fv; - UniformMatrix2x4fvProc _glUniformMatrix2x4fv; - UniformMatrix4x2fvProc _glUniformMatrix4x2fv; - UniformMatrix3x4fvProc _glUniformMatrix3x4fv; - UniformMatrix4x3fvProc _glUniformMatrix4x3fv; - - // EXT_geometry_shader4 - ProgramParameteriProc _glProgramParameteri; - FramebufferTextureProc _glFramebufferTexture; - FramebufferTextureLayerProc _glFramebufferTextureLayer; - FramebufferTextureFaceProc _glFramebufferTextureFace; - - // ARB_tesselation_shader - PatchParameteriProc _glPatchParameteri; - PatchParameterfvProc _glPatchParameterfv; - - // EXT_gpu_shader4 - GetUniformuivProc _glGetUniformuiv; - BindFragDataLocationProc _glBindFragDataLocation; - GetFragDataLocationProc _glGetFragDataLocation; - Uniform1uiProc _glUniform1ui; - Uniform2uiProc _glUniform2ui; - Uniform3uiProc _glUniform3ui; - Uniform4uiProc _glUniform4ui; - Uniform1uivProc _glUniform1uiv; - Uniform2uivProc _glUniform2uiv; - Uniform3uivProc _glUniform3uiv; - Uniform4uivProc _glUniform4uiv; - - // ARB_uniform_buffer_object - GetUniformIndicesProc _glGetUniformIndices; - GetActiveUniformsivProc _glGetActiveUniformsiv; - GetActiveUniformNameProc _glGetActiveUniformName; - GetUniformBlockIndexProc _glGetUniformBlockIndex; - GetActiveUniformBlockivProc _glGetActiveUniformBlockiv; - GetActiveUniformBlockNameProc _glGetActiveUniformBlockName; - UniformBlockBindingProc _glUniformBlockBinding; - - //ARB_get_program_binary - GetProgramBinaryProc _glGetProgramBinary; - ProgramBinaryProc _glProgramBinary; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/GLBeginEndAdapter b/libs/lib/mac32/include/osg/GLBeginEndAdapter deleted file mode 100644 index 813193c9d..000000000 --- a/libs/lib/mac32/include/osg/GLBeginEndAdapter +++ /dev/null @@ -1,164 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GLBeginEndAdapter -#define OSG_GLBeginEndAdapter 1 - -#include -#include -#include - -#ifndef GL_TEXTURE0 -#define GL_TEXTURE0 0x84C0 -#endif - -namespace osg { - -// forward declare -class State; - -/** A class adapting OpenGL 1.0 glBegin()/glEnd() style code to vertex array based code */ -class OSG_EXPORT GLBeginEndAdapter -{ - public: - - GLBeginEndAdapter(State* state=0); - - void setState(State* state) { _state = state; } - State* getState() { return _state; } - const State* getState() const { return _state; } - - enum MatrixMode - { - APPLY_LOCAL_MATRICES_TO_VERTICES, - APPLY_LOCAL_MATRICES_TO_MODELVIEW - }; - - void setMatrixMode(MatrixMode mode) { _mode = mode; } - MatrixMode setMatrixMode() const { return _mode; } - - void PushMatrix(); - void PopMatrix(); - - void LoadIdentity(); - void LoadMatrixd(const GLdouble* m); - void MultMatrixd(const GLdouble* m); - - void Translatef(GLfloat x, GLfloat y, GLfloat z) { Translated(x,y,z); } - void Scalef(GLfloat x, GLfloat y, GLfloat z) { Scaled(x,y,z); } - void Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { Rotated(angle,x,y,z); } - - void Translated(GLdouble x, GLdouble y, GLdouble z); - void Scaled(GLdouble x, GLdouble y, GLdouble z); - void Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); - - void Vertex3f(GLfloat x, GLfloat y, GLfloat z); - void Vertex3fv(const GLfloat* v) { Vertex3f(v[0], v[1], v[2]); } - - void Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) - { - _colorAssigned = true; - _color.set(red,green,blue,alpha); - } - - void Color4fv(const GLfloat* c) { Color4f(c[0], c[1], c[2], c[3]); } - void Color4ubv(const GLubyte* c) { const float div = 1.0f/255.0f; Color4f(float(c[0])*div, float(c[1])*div, float(c[2])*div, float(c[3])*div); } - - void Normal3f(GLfloat x, GLfloat y, GLfloat z) - { - _normalAssigned = true; - _normal.set(x,y,z); - } - - void Normal3fv(const GLfloat* n) { Normal3f(n[0], n[1], n[2]); } - - void TexCoord1f(GLfloat x) { MultiTexCoord4f(GL_TEXTURE0, x, 0.0f, 0.0f, 1.0f); } - void TexCoord1fv(const GLfloat* tc) { MultiTexCoord4f(GL_TEXTURE0, tc[0], 0.0f, 0.0f, 1.0f); } - - void TexCoord2f(GLfloat x, GLfloat y) { MultiTexCoord4f(GL_TEXTURE0, x, y, 0.0f, 1.0f); } - void TexCoord2fv(const GLfloat* tc) { MultiTexCoord4f(GL_TEXTURE0, tc[0], tc[1], 0.0f, 1.0f); } - - void TexCoord3f(GLfloat x, GLfloat y, GLfloat z) { MultiTexCoord4f(GL_TEXTURE0, x, y, z, 1.0f); } - void TexCoord3fv(const GLfloat* tc) { MultiTexCoord4f(GL_TEXTURE0, tc[0], tc[1], tc[2], 1.0f); } - - void TexCoord4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { MultiTexCoord4f(GL_TEXTURE0, x, y, z, w); } - void TexCoord4fv(const GLfloat* tc) { MultiTexCoord4f(GL_TEXTURE0, tc[0], tc[1], tc[2], tc[3]); } - - void MultiTexCoord1f(GLenum target, GLfloat x) { MultiTexCoord4f(target, x, 0.0f, 0.0f, 1.0f); } - void MultiTexCoord1fv(GLenum target, const GLfloat* tc) { MultiTexCoord4f(target, tc[0], 0.0f, 0.0f, 1.0f); } - - void MultiTexCoord2f(GLenum target, GLfloat x, GLfloat y) { MultiTexCoord4f(target, x, y, 0.0f, 1.0f); } - void MultiTexCoord2fv(GLenum target, const GLfloat* tc) { MultiTexCoord4f(target, tc[0],tc[1], 0.0f, 1.0f); } - - void MultiTexCoord3f(GLenum target, GLfloat x, GLfloat y, GLfloat z) {MultiTexCoord4f(target, x, y, z, 1.0f); } - void MultiTexCoord3fv(GLenum target, const GLfloat* tc) { MultiTexCoord4f(target, tc[0], tc[1], tc[2], 1.0f); } - - void MultiTexCoord4f(GLenum target, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void MultiTexCoord4fv(GLenum target, const GLfloat* tc) { MultiTexCoord4f(target, tc[0], tc[1], tc[2], tc[3]); } - - void VertexAttrib1f(GLuint unit, GLfloat x) { VertexAttrib4f(unit, x, 0.0f, 0.0f, 0.0f); } - void VertexAttrib1fv(GLuint unit, const GLfloat* tc) { VertexAttrib4f(unit, tc[0], 0.0f, 0.0f, 0.0f); } - - void VertexAttrib2f(GLuint unit, GLfloat x, GLfloat y) { VertexAttrib4f(unit, x, y, 0.0f, 0.0f); } - void VertexAttrib2fv(GLuint unit, const GLfloat* tc) { VertexAttrib4f(unit, tc[0],tc[1], 0.0f, 0.0f); } - - void VertexAttrib3f(GLuint unit, GLfloat x, GLfloat y, GLfloat z) {VertexAttrib4f(unit, x, y, z, 0.0f); } - void VertexAttrib3fv(GLuint unit, const GLfloat* tc) { VertexAttrib4f(unit, tc[0], tc[1], tc[2], 0.0f); } - - void VertexAttrib4f(GLuint unit, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void VertexAttrib4fv(GLuint unit, const GLfloat* tc) { VertexAttrib4f(unit, tc[0], tc[1], tc[2], tc[3]); } - - void Begin(GLenum mode); - void End(); - - protected: - - State* _state; - - MatrixMode _mode; - - typedef std::list MatrixStack; - MatrixStack _matrixStack; - - bool _normalAssigned; - osg::Vec3f _normal; - - bool _colorAssigned; - osg::Vec4f _color; - - osg::Vec3f _overallNormal; - osg::Vec4f _overallColor; - - typedef std::vector AssignedList; - typedef std::vector VertexList; - - AssignedList _texCoordAssignedList; - VertexList _texCoordList; - - AssignedList _vertexAttribAssignedList; - VertexList _vertexAttribList; - - - typedef std::vector< osg::ref_ptr > VertexArrayList; - - GLenum _primitiveMode; - osg::ref_ptr _vertices; - osg::ref_ptr _normals; - osg::ref_ptr _colors; - VertexArrayList _texCoordsList; - VertexArrayList _vertexAttribsList; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/GLExtensions b/libs/lib/mac32/include/osg/GLExtensions deleted file mode 100644 index 6981004a2..000000000 --- a/libs/lib/mac32/include/osg/GLExtensions +++ /dev/null @@ -1,155 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GLEXTENSIONS -#define OSG_GLEXTENSIONS 1 - -#include -#include -#include -#include - - -namespace osg { - -/** Return floating-point OpenGL version number. - * Note: Must only be called within a valid OpenGL context, - * undefined behavior may occur otherwise. -*/ -extern OSG_EXPORT float getGLVersionNumber(); - -/** Return true if "extension" is contained in "extensionString". -*/ -extern OSG_EXPORT bool isExtensionInExtensionString(const char *extension, const char *extensionString); - -/** Return true if OpenGL "extension" is supported. - * Note: Must only be called within a valid OpenGL context, - * undefined behavior may occur otherwise. -*/ -extern OSG_EXPORT bool isGLExtensionSupported(unsigned int contextID, const char *extension); - -/** Return true if OpenGL "extension" or minimum OpenGL version number is supported. - * Note: Must only be called within a valid OpenGL context, - * undefined behavior may occur otherwise. -*/ -extern OSG_EXPORT bool isGLExtensionOrVersionSupported(unsigned int contextID, const char *extension, float requiredGlVersion); - -/** Return the address of the specified OpenGL function. - * Return NULL if function not supported by OpenGL library. - * Note, glGLExtensionFuncPtr is declared inline so that the code - * is compiled locally to the calling code. This should get by Windows' - * dumb implementation of having different GL function ptr's for each - * library when linked to it. -*/ -extern OSG_EXPORT void* getGLExtensionFuncPtr(const char *funcName); - -/** Set a list of extensions to disable for different OpenGL renderers. This allows - * OSG applications to work around OpenGL drivers' bugs which are due to problematic extension support. - * The format of the string is: - * "GLRendererString : ExtensionName, ExtensionName; GLRenderString2 : ExtensionName;" - * An example of is : "SUN_XVR1000:GL_EXT_texture_filter_anisotropic" - * The default setting of GLExtensionDisableString is obtained from the OSG_GL_EXTENSION_DISABLE - * environmental variable. -*/ -extern OSG_EXPORT void setGLExtensionDisableString(const std::string& disableString); - -/** Get the list of extensions that are disabled for various OpenGL renderers. */ -extern OSG_EXPORT std::string& getGLExtensionDisableString(); - -/** Return the address of the specified OpenGL function. If not found then - * check a second function name, if this fails then return NULL as function is - * not supported by OpenGL library. This is used for checking something - * like glActiveTexture (which is in OGL1.3) or glActiveTextureARB. -*/ -inline void* getGLExtensionFuncPtr(const char *funcName,const char *fallbackFuncName) -{ - void* ptr = getGLExtensionFuncPtr(funcName); - if (ptr) return ptr; - return getGLExtensionFuncPtr(fallbackFuncName); -} - -/** Return the address of the specified OpenGL function. If not found then - * check a second function name, if this fails then return NULL as function is - * not supported by OpenGL library. This is used for checking something - * like glActiveTexture (which is in OGL1.3) or glActiveTextureARB. -*/ -inline void* getGLExtensionFuncPtr(const char *funcName1, const char *funcName2, const char *funcName3) -{ - void* ptr = getGLExtensionFuncPtr(funcName1); - if (ptr) return ptr; - - ptr = getGLExtensionFuncPtr(funcName2); - if (ptr) return ptr; - - return getGLExtensionFuncPtr(funcName3); -} - -template -T convertPointerType(R src) -{ - T dest; - memcpy(&dest, &src, sizeof(src)); - return dest; -} - -template -bool setGLExtensionFuncPtr(T& t, const char* str1) -{ - void* data = osg::getGLExtensionFuncPtr(str1); - if (data) - { - memcpy(&t, &data, sizeof(T)); - return true; - } - else - { - t = 0; - return false; - } -} - -template -bool setGLExtensionFuncPtr(T& t, const char* str1, const char* str2) -{ - void* data = osg::getGLExtensionFuncPtr(str1,str2); - if (data) - { - memcpy(&t, &data, sizeof(T)); - return true; - } - else - { - t = 0; - return false; - } -} - -template -bool setGLExtensionFuncPtr(T& t, const char* str1, const char* str2, const char* str3) -{ - void* data = osg::getGLExtensionFuncPtr(str1,str2,str3); - if (data) - { - memcpy(&t, &data, sizeof(T)); - return true; - } - else - { - t = 0; - return false; - } -} - -} - -#endif diff --git a/libs/lib/mac32/include/osg/GLObjects b/libs/lib/mac32/include/osg/GLObjects deleted file mode 100644 index 2c3a52277..000000000 --- a/libs/lib/mac32/include/osg/GLObjects +++ /dev/null @@ -1,42 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GLOBJECTS -#define OSG_GLOBJECTS 1 - -#include - -namespace osg { - -/** Flush all deleted OpenGL objects within the specified availableTime. - * Note, must be called from a thread which has current the graphics context associated with contextID. */ -extern OSG_EXPORT void flushDeletedGLObjects(unsigned int contextID, double currentTime, double& availableTime); - -/** Flush all deleted OpenGL objects. - * Note, must be called from a thread which has current the graphics context associated with contextID. */ -extern OSG_EXPORT void flushAllDeletedGLObjects(unsigned int contextID); - -/** Do a GL delete all OpenGL objects. - * Note, must be called from a thread which has current the graphics context associated with contextID. */ -extern OSG_EXPORT void deleteAllGLObjects(unsigned int contextID); - -/** Discard all OpenGL objects. - * Note, unlike deleteAllObjectObjects discard does not - * do any OpenGL calls so can be called from any thread, but as a consequence it - * also doesn't remove the associated OpenGL resource so discard should only be - * called when the associated graphics context is being/has been closed. */ -extern OSG_EXPORT void discardAllGLObjects(unsigned int contextID); - -} - -#endif diff --git a/libs/lib/mac32/include/osg/GLU b/libs/lib/mac32/include/osg/GLU deleted file mode 100644 index d86bf4d25..000000000 --- a/libs/lib/mac32/include/osg/GLU +++ /dev/null @@ -1,186 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GLU -#define OSG_GLU 1 - -#include - -namespace osg -{ - -/* Pixel storage modes, used by gluScaleImage */ -struct OSG_EXPORT PixelStorageModes -{ - // sets defaults as per glGet docs in OpenGL red book - PixelStorageModes(); - - // use glGet's to retrieve all the current settings - void retrieveStoreModes(); - - // use glGet's to retrieve all the current 3D settings - void retrieveStoreModes3D(); - - GLint pack_alignment; - GLint pack_row_length; - GLint pack_skip_rows; - GLint pack_skip_pixels; - GLint pack_lsb_first; - GLint pack_swap_bytes; - GLint pack_skip_images; - GLint pack_image_height; - - GLint unpack_alignment; - GLint unpack_row_length; - GLint unpack_skip_rows; - GLint unpack_skip_pixels; - GLint unpack_lsb_first; - GLint unpack_swap_bytes; - GLint unpack_skip_images; - GLint unpack_image_height; -} ; - -extern OSG_EXPORT const GLubyte * gluErrorString (GLenum error); - -/** OSG specific gluScaleImage function that allows you to pass in the PixelStoreModes, which - * enables the code to avoid glGet's that are associated with the conventional gluScaleImage function. - * Avoiding glGet's allows this gluScaleImage function to be called at any time, from any thread, there - * is no need to have a graphics context current.*/ -extern OSG_EXPORT GLint gluScaleImage (PixelStorageModes* psm, GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); - -/** Traditional GLU gluScaleImage function that sets up the PixelStoreModes automatically by doing glGets.; - * The use of glGet's means that you can only call this function from a thread with a valid graphics context. - * The use of glGet's will also result in lower performance due to the round trip to the OpenGL driver.*/ -extern OSG_EXPORT GLint gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); - -extern OSG_EXPORT GLint gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); -extern OSG_EXPORT GLint gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data); -extern OSG_EXPORT GLint gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); -extern OSG_EXPORT GLint gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data); - -typedef void (GL_APIENTRY * GLTexImage3DProc) ( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); - -/** Small variation on normal gluBuild3DMipmapLevels as we pass in the function pointer to glTexImage3D rather than rely on GLU style querry for this functon pointer.*/ -extern OSG_EXPORT GLint gluBuild3DMipmapLevels (GLTexImage3DProc glTextImage3DProc, GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); - -/** Small variation on normal gluBuild3DMipmapLevels as we pass in the function pointer to glTexImage3D rather than rely on GLU style querry for this functon pointer.*/ -extern OSG_EXPORT GLint gluBuild3DMipmaps (GLTexImage3DProc glTextImage3DProc, GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); - -/* ErrorCode */ -#define GLU_INVALID_ENUM 100900 -#define GLU_INVALID_VALUE 100901 -#define GLU_OUT_OF_MEMORY 100902 -#define GLU_INCOMPATIBLE_GL_VERSION 100903 -#define GLU_INVALID_OPERATION 100904 - -/* Boolean */ -#define GLU_FALSE 0 -#define GLU_TRUE 1 - -/* QuadricDrawStyle */ -#define GLU_POINT 100010 -#define GLU_LINE 100011 -#define GLU_FILL 100012 -#define GLU_SILHOUETTE 100013 - -/* QuadricCallback */ -/* GLU_ERROR */ - -/* QuadricNormal */ -#define GLU_SMOOTH 100000 -#define GLU_FLAT 100001 -#define GLU_NONE 100002 - -/* QuadricOrientation */ -#define GLU_OUTSIDE 100020 -#define GLU_INSIDE 100021 - -/* TessCallback */ -#define GLU_TESS_BEGIN 100100 -#define GLU_BEGIN 100100 -#define GLU_TESS_VERTEX 100101 -#define GLU_VERTEX 100101 -#define GLU_TESS_END 100102 -#define GLU_END 100102 -#define GLU_TESS_ERROR 100103 -#define GLU_TESS_EDGE_FLAG 100104 -#define GLU_EDGE_FLAG 100104 -#define GLU_TESS_COMBINE 100105 -#define GLU_TESS_BEGIN_DATA 100106 -#define GLU_TESS_VERTEX_DATA 100107 -#define GLU_TESS_END_DATA 100108 -#define GLU_TESS_ERROR_DATA 100109 -#define GLU_TESS_EDGE_FLAG_DATA 100110 -#define GLU_TESS_COMBINE_DATA 100111 - -/* TessContour */ -#define GLU_CW 100120 -#define GLU_CCW 100121 -#define GLU_INTERIOR 100122 -#define GLU_EXTERIOR 100123 -#define GLU_UNKNOWN 100124 - -/* TessProperty */ -#define GLU_TESS_WINDING_RULE 100140 -#define GLU_TESS_BOUNDARY_ONLY 100141 -#define GLU_TESS_TOLERANCE 100142 - -/* TessError */ -#define GLU_TESS_ERROR1 100151 -#define GLU_TESS_ERROR2 100152 -#define GLU_TESS_ERROR3 100153 -#define GLU_TESS_ERROR4 100154 -#define GLU_TESS_ERROR5 100155 -#define GLU_TESS_ERROR6 100156 -#define GLU_TESS_ERROR7 100157 -#define GLU_TESS_ERROR8 100158 -#define GLU_TESS_MISSING_BEGIN_POLYGON 100151 -#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152 -#define GLU_TESS_MISSING_END_POLYGON 100153 -#define GLU_TESS_MISSING_END_CONTOUR 100154 -#define GLU_TESS_COORD_TOO_LARGE 100155 -#define GLU_TESS_NEED_COMBINE_CALLBACK 100156 - -/* TessWinding */ -#define GLU_TESS_WINDING_ODD 100130 -#define GLU_TESS_WINDING_NONZERO 100131 -#define GLU_TESS_WINDING_POSITIVE 100132 -#define GLU_TESS_WINDING_NEGATIVE 100133 -#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134 - -struct GLUtesselator; -typedef GLUtesselator GLUtesselatorObj; -typedef GLUtesselator GLUtriangulatorObj; - -#define GLU_TESS_MAX_COORD 1.0e150 - -/* Internal convenience typedefs */ -typedef void (GL_APIENTRY * _GLUfuncptr)(); -typedef void (GL_APIENTRY * GLU_TESS_CALLBACK)(); - -extern OSG_EXPORT GLUtesselator* GL_APIENTRY gluNewTess (void); -extern OSG_EXPORT void GL_APIENTRY gluDeleteTess (GLUtesselator* tess); - -extern OSG_EXPORT void GL_APIENTRY gluTessBeginContour (GLUtesselator* tess); -extern OSG_EXPORT void GL_APIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); -extern OSG_EXPORT void GL_APIENTRY gluTessEndContour (GLUtesselator* tess); -extern OSG_EXPORT void GL_APIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); -extern OSG_EXPORT void GL_APIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data); -extern OSG_EXPORT void GL_APIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data); -extern OSG_EXPORT void GL_APIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data); -extern OSG_EXPORT void GL_APIENTRY gluTessEndPolygon (GLUtesselator* tess); -extern OSG_EXPORT void GL_APIENTRY gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value ); - -} - -#endif // __osgGLU_h diff --git a/libs/lib/mac32/include/osg/Geode b/libs/lib/mac32/include/osg/Geode deleted file mode 100644 index c09686892..000000000 --- a/libs/lib/mac32/include/osg/Geode +++ /dev/null @@ -1,167 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GEODE -#define OSG_GEODE 1 - -#include -#include -#include - -namespace osg { - -/** A \c Geode is a "geometry node", that is, a leaf node on the scene graph - * that can have "renderable things" attached to it. In OSG, renderable things - * are represented by objects from the \c Drawable class, so a \c Geode is a - * \c Node whose purpose is grouping Drawables. -*/ -class OSG_EXPORT Geode : public Node -{ - public: - - typedef std::vector< ref_ptr > DrawableList; - - Geode(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Geode(const Geode&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, Geode); - - virtual Geode* asGeode() { return this; } - virtual const Geode* asGeode() const { return this; } - - /** Add a \c Drawable to the \c Geode. - * If \c drawable is not \c NULL and is not contained in the \c Geode - * then increment its reference count, add it to the drawables list and - * dirty the bounding sphere to force it to be recomputed on the next - * call to \c getBound(). - * @param drawable The \c Drawable to be added to the \c Geode. - * @return \c true for success; \c false otherwise. - */ - virtual bool addDrawable( Drawable *drawable ); - - /** Remove a \c Drawable from the \c Geode. - * Equivalent to removeDrawable(getDrawableIndex(drawable). - * @param drawable The drawable to be removed. - * @return \c true if at least one \c Drawable was removed. \c false - * otherwise. - */ - virtual bool removeDrawable( Drawable *drawable ); - - /** Remove Drawable(s) from the specified position in - * Geode's drawable list. - * @param i The index of the first \c Drawable to remove. - * @param numDrawablesToRemove The number of Drawable to - * remove. - * @return \c true if at least one \c Drawable was removed. \c false - * otherwise. - */ - virtual bool removeDrawables(unsigned int i,unsigned int numDrawablesToRemove=1); - - /** Replace specified Drawable with another Drawable. - * Equivalent to setDrawable(getDrawableIndex(origDraw),newDraw), - * see docs for \c setDrawable() for further details on implementation. - */ - virtual bool replaceDrawable( Drawable *origDraw, Drawable *newDraw ); - - /** Set \c Drawable at position \c i. - * Decrement the reference count origGSet and increments the - * reference count of newGset, and dirty the bounding sphere - * to force it to recompute on next getBound() and returns true. - * If origDrawable is not found then return false and do not - * add newGset. If newGset is NULL then return false and do - * not remove origGset. - * @return \c true if set correctly, \c false on failure - * (if node==NULL || i is out of range). - */ - virtual bool setDrawable( unsigned int i, Drawable* drawable ); - - /** Return the number of Drawables currently attached to the - * \c Geode. - */ - inline unsigned int getNumDrawables() const { return _drawables.size(); } - - /** Return the \c Drawable at position \c i.*/ - inline Drawable* getDrawable( unsigned int i ) { return _drawables[i].get(); } - - /** Return the \c Drawable at position \c i.*/ - inline const Drawable* getDrawable( unsigned int i ) const { return _drawables[i].get(); } - - /** Return \c true if a given \c Drawable is contained within \c Geode.*/ - inline bool containsDrawable(const Drawable* gset) const - { - for (DrawableList::const_iterator itr=_drawables.begin(); - itr!=_drawables.end(); - ++itr) - { - if (itr->get()==gset) return true; - } - return false; - } - - /** Get the index number of \c drawable. - * @return A value between 0 and getNumDrawables()-1 if - * \c drawable is found; if not found, then - * getNumDrawables() is returned. - */ - inline unsigned int getDrawableIndex( const Drawable* drawable ) const - { - for (unsigned int drawableNum=0;drawableNum<_drawables.size();++drawableNum) - { - if (_drawables[drawableNum]==drawable) return drawableNum; - } - return _drawables.size(); // drawable not found. - } - - /** Get the list of drawables.*/ - const DrawableList& getDrawableList() const { return _drawables; } - - /** Compile OpenGL Display List for each drawable.*/ - void compileDrawables(RenderInfo& renderInfo); - - /** Return the Geode's bounding box, which is the union of all the - * bounding boxes of the geode's drawables.*/ - inline const BoundingBox& getBoundingBox() const - { - if(!_boundingSphereComputed) getBound(); - return _bbox; - } - - virtual BoundingSphere computeBound() const; - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - - protected: - - virtual ~Geode(); - - - mutable osg::BoundingBox _bbox; - DrawableList _drawables; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Geometry b/libs/lib/mac32/include/osg/Geometry deleted file mode 100644 index ab24b0cc7..000000000 --- a/libs/lib/mac32/include/osg/Geometry +++ /dev/null @@ -1,463 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GEOMETRY -#define OSG_GEOMETRY 1 - -#include -#include -#include -#include -#include -#include - -namespace osg { - - -class OSG_EXPORT Geometry : public Drawable -{ - public: - - Geometry(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Geometry(const Geometry& geometry,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new Geometry(); } - virtual Object* clone(const CopyOp& copyop) const { return new Geometry(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "Geometry"; } - - virtual Geometry* asGeometry() { return this; } - virtual const Geometry* asGeometry() const { return this; } - - bool empty() const; - - enum AttributeBinding - { - BIND_OFF=0, - BIND_OVERALL, - BIND_PER_PRIMITIVE_SET, - BIND_PER_PRIMITIVE, - BIND_PER_VERTEX - }; - - struct OSG_EXPORT ArrayData - { - ArrayData(): - binding(BIND_OFF), - normalize(GL_FALSE) {} - - ArrayData(const ArrayData& data,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - ArrayData(Array* a, AttributeBinding b, GLboolean n = GL_FALSE): - array(a), - indices(0), - binding(b), - normalize(n) {} - - ArrayData(Array* a, IndexArray* i, AttributeBinding b, GLboolean n = GL_FALSE): - array(a), - indices(i), - binding(b), - normalize(n) {} - - ArrayData& operator = (const ArrayData& rhs) - { - array = rhs.array; - indices = rhs.indices; - binding = rhs.binding; - normalize = rhs.normalize; - return *this; - } - - inline bool empty() const { return !array.valid(); } - - ref_ptr array; - ref_ptr indices; - AttributeBinding binding; - GLboolean normalize; - }; - - struct OSG_EXPORT Vec3ArrayData - { - Vec3ArrayData(): - binding(BIND_OFF), - normalize(GL_FALSE) {} - - Vec3ArrayData(const Vec3ArrayData& data,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - Vec3ArrayData(Vec3Array* a, AttributeBinding b, GLboolean n = GL_FALSE): - array(a), - indices(0), - binding(b), - normalize(n) {} - - Vec3ArrayData(Vec3Array* a, IndexArray* i, AttributeBinding b, GLboolean n = GL_FALSE): - array(a), - indices(i), - binding(b), - normalize(n) {} - - Vec3ArrayData& operator = (const Vec3ArrayData& rhs) - { - array = rhs.array; - indices = rhs.indices; - binding = rhs.binding; - normalize = rhs.normalize; - return *this; - } - - inline bool empty() const { return !array.valid(); } - - ref_ptr array; - ref_ptr indices; - AttributeBinding binding; - GLboolean normalize; - }; - - /** Static ArrayData which is returned from getTexCoordData(i) const and getVertexAttribData(i) const - * when i is out of range. - */ - static const ArrayData s_InvalidArrayData; - - typedef std::vector< ArrayData > ArrayDataList; - - - void setVertexArray(Array* array); - Array* getVertexArray() { return _vertexData.array.get(); } - const Array* getVertexArray() const { return _vertexData.array.get(); } - - void setVertexData(const ArrayData& arrayData); - ArrayData& getVertexData() { return _vertexData; } - const ArrayData& getVertexData() const { return _vertexData; } - - - void setNormalBinding(AttributeBinding ab); - AttributeBinding getNormalBinding() const { return _normalData.binding; } - - void setNormalArray(Array* array); - Array* getNormalArray() { return _normalData.array.get(); } - const Array* getNormalArray() const { return _normalData.array.get(); } - - void setNormalData(const ArrayData& arrayData); - ArrayData& getNormalData() { return _normalData; } - const ArrayData& getNormalData() const { return _normalData; } - - void setColorBinding(AttributeBinding ab); - AttributeBinding getColorBinding() const { return _colorData.binding; } - - void setColorArray(Array* array); - Array* getColorArray() { return _colorData.array.get(); } - const Array* getColorArray() const { return _colorData.array.get(); } - - void setColorData(const ArrayData& arrayData); - ArrayData& getColorData() { return _colorData; } - const ArrayData& getColorData() const { return _colorData; } - - - void setSecondaryColorBinding(AttributeBinding ab); - AttributeBinding getSecondaryColorBinding() const { return _secondaryColorData.binding; } - - void setSecondaryColorArray(Array* array); - Array* getSecondaryColorArray() { return _secondaryColorData.array.get(); } - const Array* getSecondaryColorArray() const { return _secondaryColorData.array.get(); } - - void setSecondaryColorData(const ArrayData& arrayData); - ArrayData& getSecondaryColorData() { return _secondaryColorData; } - const ArrayData& getSecondaryColorData() const { return _secondaryColorData; } - - - void setFogCoordBinding(AttributeBinding ab); - AttributeBinding getFogCoordBinding() const { return _fogCoordData.binding; } - - void setFogCoordArray(Array* array); - Array* getFogCoordArray() { return _fogCoordData.array.get(); } - const Array* getFogCoordArray() const { return _fogCoordData.array.get(); } - - void setFogCoordData(const ArrayData& arrayData); - ArrayData& getFogCoordData() { return _fogCoordData; } - const ArrayData& getFogCoordData() const { return _fogCoordData; } - - - void setTexCoordArray(unsigned int unit,Array*); - Array* getTexCoordArray(unsigned int unit); - const Array* getTexCoordArray(unsigned int unit) const; - - void setTexCoordData(unsigned int index,const ArrayData& arrayData); - ArrayData& getTexCoordData(unsigned int index); - const ArrayData& getTexCoordData(unsigned int index) const; - - unsigned int getNumTexCoordArrays() const { return static_cast(_texCoordList.size()); } - ArrayDataList& getTexCoordArrayList() { return _texCoordList; } - const ArrayDataList& getTexCoordArrayList() const { return _texCoordList; } - - - - void setVertexAttribArray(unsigned int index,Array* array); - Array *getVertexAttribArray(unsigned int index); - const Array *getVertexAttribArray(unsigned int index) const; - - void setVertexAttribBinding(unsigned int index,AttributeBinding ab); - AttributeBinding getVertexAttribBinding(unsigned int index) const; - - void setVertexAttribNormalize(unsigned int index,GLboolean norm); - GLboolean getVertexAttribNormalize(unsigned int index) const; - - void setVertexAttribData(unsigned int index,const ArrayData& arrayData); - ArrayData& getVertexAttribData(unsigned int index); - const ArrayData& getVertexAttribData(unsigned int index) const; - - unsigned int getNumVertexAttribArrays() const { return static_cast(_vertexAttribList.size()); } - ArrayDataList& getVertexAttribArrayList() { return _vertexAttribList; } - const ArrayDataList& getVertexAttribArrayList() const { return _vertexAttribList; } - - - - typedef std::vector< ref_ptr > PrimitiveSetList; - - void setPrimitiveSetList(const PrimitiveSetList& primitives); - - PrimitiveSetList& getPrimitiveSetList() { return _primitives; } - const PrimitiveSetList& getPrimitiveSetList() const { return _primitives; } - - unsigned int getNumPrimitiveSets() const { return static_cast(_primitives.size()); } - PrimitiveSet* getPrimitiveSet(unsigned int pos) { return _primitives[pos].get(); } - const PrimitiveSet* getPrimitiveSet(unsigned int pos) const { return _primitives[pos].get(); } - - /** Add a primitive set to the geometry. */ - bool addPrimitiveSet(PrimitiveSet* primitiveset); - - /** Set a primitive set to the specified position in geometry's primitive set list. */ - bool setPrimitiveSet(unsigned int i,PrimitiveSet* primitiveset); - - /** Insert a primitive set to the specified position in geometry's primitive set list. */ - bool insertPrimitiveSet(unsigned int i,PrimitiveSet* primitiveset); - - /** Remove primitive set(s) from the specified position in geometry's primitive set list. */ - bool removePrimitiveSet(unsigned int i,unsigned int numElementsToRemove=1); - - /** Get the index number of a primitive set, return a value between - * 0 and getNumPrimitiveSet()-1 if found, if not found then return getNumPrimitiveSet(). - * When checking for a valid find value use if ((value=geometry->getPrimitiveSetIndex(primitive))!=geometry.getNumPrimitiveSet()) - */ - unsigned int getPrimitiveSetIndex(const PrimitiveSet* primitiveset) const; - - - - /** deprecated - forces OpenGL slow path, just kept for backwards compatibility.*/ - void setVertexIndices(IndexArray* array); - IndexArray* getVertexIndices() { return _vertexData.indices.get(); } - const IndexArray* getVertexIndices() const { return _vertexData.indices.get(); } - - /** deprecated - forces OpenGL slow path, just kept for backwards compatibility.*/ - void setNormalIndices(IndexArray* array); - IndexArray* getNormalIndices() { return _normalData.indices.get(); } - const IndexArray* getNormalIndices() const { return _normalData.indices.get(); } - - /** deprecated - forces OpenGL slow path, just kept for backwards compatibility.*/ - void setColorIndices(IndexArray* array); - IndexArray* getColorIndices() { return _colorData.indices.get(); } - const IndexArray* getColorIndices() const { return _colorData.indices.get(); } - - /** deprecated - forces OpenGL slow path, just kept for backwards compatibility.*/ - void setSecondaryColorIndices(IndexArray* array); - IndexArray* getSecondaryColorIndices() { return _secondaryColorData.indices.get(); } - const IndexArray* getSecondaryColorIndices() const { return _secondaryColorData.indices.get(); } - - /** deprecated - forces OpenGL slow path, just kept for backwards compatibility.*/ - void setFogCoordIndices(IndexArray* array); - IndexArray* getFogCoordIndices() { return _fogCoordData.indices.get(); } - const IndexArray* getFogCoordIndices() const { return _fogCoordData.indices.get(); } - - /** deprecated - forces OpenGL slow path, just kept for backwards compatibility.*/ - void setTexCoordIndices(unsigned int unit,IndexArray*); - IndexArray* getTexCoordIndices(unsigned int unit); - const IndexArray* getTexCoordIndices(unsigned int unit) const; - - /** deprecated - forces OpenGL slow path, just kept for backwards compatibility.*/ - void setVertexAttribIndices(unsigned int index,IndexArray* array); - IndexArray* getVertexAttribIndices(unsigned int index); - const IndexArray* getVertexAttribIndices(unsigned int index) const; - - - - - /** When set to true, ignore the setUseDisplayList() settings, and hints to the drawImplementation - method to use OpenGL vertex buffer objects for rendering.*/ - virtual void setUseVertexBufferObjects(bool flag); - - /** Force a recompile on next draw() of any OpenGL display list associated with this geoset.*/ - virtual void dirtyDisplayList(); - - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(State* state=0) const; - - typedef std::vector ArrayList; - bool getArrayList(ArrayList& arrayList) const; - - typedef std::vector DrawElementsList; - bool getDrawElementsList(DrawElementsList& drawElementsList) const; - - osg::VertexBufferObject* getOrCreateVertexBufferObject(); - - osg::ElementBufferObject* getOrCreateElementBufferObject(); - - - /** Set whether fast paths should be used when supported. */ - void setFastPathHint(bool on) { _fastPathHint = on; } - - /** Get whether fast paths should be used when supported. */ - bool getFastPathHint() const { return _fastPathHint; } - - - /** Return true if OpenGL fast paths will be used with drawing this Geometry. - * Fast paths directly use vertex arrays, and glDrawArrays/glDrawElements so have low CPU overhead. - * With Slow paths the osg::Geometry::drawImplementation has to dynamically assemble OpenGL - * compatible vertex arrays from the osg::Geometry arrays data and then dispatch these to OpenGL, - * so have higher CPU overhead than the Fast paths. - * Use of per primitive bindings or per vertex indexed arrays will drop the rendering path off the fast path. - */ - inline bool areFastPathsUsed() const - { - if (_internalOptimizedGeometry.valid()) - return _internalOptimizedGeometry->areFastPathsUsed(); - else - return _fastPath && _fastPathHint; - } - - bool computeFastPathsUsed(); - - bool verifyBindings() const; - - void computeCorrectBindingsAndArraySizes(); - - /** check whether the arrays, indices, bindings and primitives all match correctly, return false is .*/ - bool verifyArrays(std::ostream& out) const; - - bool suitableForOptimization() const; - - void copyToAndOptimize(Geometry& target); - - - bool containsSharedArrays() const; - - void duplicateSharedArrays(); - - - void computeInternalOptimizedGeometry(); - - void removeInternalOptimizedGeometry() { _internalOptimizedGeometry = 0; } - - void setInternalOptimizedGeometry(osg::Geometry* geometry) { _internalOptimizedGeometry = geometry; } - - osg::Geometry* getInternalOptimizedGeometry() { return _internalOptimizedGeometry.get(); } - - const osg::Geometry* getInternalOptimizedGeometry() const { return _internalOptimizedGeometry.get(); } - - - /** Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with this drawable. - * This size is used a hint for reuse of deleted display lists/vertex buffer objects. */ - virtual unsigned int getGLObjectSizeHint() const; - - /** Immediately compile this \c Drawable into an OpenGL Display List/VertexBufferObjects. - * @note Operation is ignored if \c _useDisplayList is \c false or VertexBufferObjects are not used. - */ - virtual void compileGLObjects(RenderInfo& renderInfo) const; - - /** Draw Geometry directly ignoring an OpenGL display list which could be attached. - * This is the internal draw method which does the drawing itself, - * and is the method to override when deriving from Geometry for user-drawn objects. - */ - virtual void drawImplementation(RenderInfo& renderInfo) const; - - /** Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&). */ - virtual bool supports(const Drawable::AttributeFunctor&) const { return true; } - - /** Accept an Drawable::AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. */ - virtual void accept(Drawable::AttributeFunctor& af); - - /** Return true, osg::Geometry does support accept(Drawable::ConstAttributeFunctor&). */ - virtual bool supports(const Drawable::ConstAttributeFunctor&) const { return true; } - - /** Accept a Drawable::ConstAttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. */ - virtual void accept(Drawable::ConstAttributeFunctor& af) const; - - /** Return true, osg::Geometry does support accept(PrimitiveFunctor&). */ - virtual bool supports(const PrimitiveFunctor&) const { return true; } - - /** Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Drawable has. */ - virtual void accept(PrimitiveFunctor& pf) const; - - /** Return true, osg::Geometry does support accept(PrimitiveIndexFunctor&). */ - virtual bool supports(const PrimitiveIndexFunctor&) const { return true; } - - /** Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Drawable has. */ - virtual void accept(PrimitiveIndexFunctor& pf) const; - - - protected: - - Geometry& operator = (const Geometry&) { return *this;} - - virtual ~Geometry(); - - bool verifyBindings(const ArrayData& arrayData) const; - bool verifyBindings(const Vec3ArrayData& arrayData) const; - - void computeCorrectBindingsAndArraySizes(ArrayData& arrayData,const char* arrayName); - void computeCorrectBindingsAndArraySizes(Vec3ArrayData& arrayData,const char* arrayName); - - void addVertexBufferObjectIfRequired(osg::Array* array); - void addElementBufferObjectIfRequired(osg::PrimitiveSet* primitiveSet); - - - PrimitiveSetList _primitives; - ArrayData _vertexData; - ArrayData _normalData; - ArrayData _colorData; - ArrayData _secondaryColorData; - ArrayData _fogCoordData; - ArrayDataList _texCoordList; - ArrayDataList _vertexAttribList; - - mutable bool _fastPath; - bool _fastPathHint; - - ref_ptr _internalOptimizedGeometry; -}; - -/** Convenience function to be used for creating quad geometry with texture coords. - * Tex coords go from left bottom (l,b) to right top (r,t). -*/ -extern OSG_EXPORT Geometry* createTexturedQuadGeometry(const Vec3& corner,const Vec3& widthVec,const Vec3& heightVec, float l, float b, float r, float t); - -/** Convenience function to be used for creating quad geometry with texture coords. - * Tex coords go from bottom left (0,0) to top right (s,t). -*/ -inline Geometry* createTexturedQuadGeometry(const Vec3& corner,const Vec3& widthVec,const Vec3& heightVec, float s=1.0f, float t=1.0f) -{ - return createTexturedQuadGeometry(corner,widthVec,heightVec, 0.0f, 0.0f, s, t); -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/GraphicsContext b/libs/lib/mac32/include/osg/GraphicsContext deleted file mode 100644 index 2b3aa4123..000000000 --- a/libs/lib/mac32/include/osg/GraphicsContext +++ /dev/null @@ -1,530 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GRAPHICSCONTEXT -#define OSG_GRAPHICSCONTEXT 1 - -#include -#include -#include - -#include - -namespace osg { - -// forward declare osg::Camera -class Camera; - -/** Base class for providing Windowing API agnostic access to creating and managing graphics context.*/ -class OSG_EXPORT GraphicsContext : public Object -{ - public: - - struct OSG_EXPORT ScreenIdentifier - { - ScreenIdentifier(); - - ScreenIdentifier(int in_screenNum); - - ScreenIdentifier(const std::string& in_hostName,int in_displayNum, int in_screenNum); - - /** Return the display name in the form hostName::displayNum:screenNum. */ - std::string displayName() const; - - /** Read the DISPLAY environmental variable, and set the ScreenIdentifier accordingly. - * Note, if either of displayNum or screenNum are not defined then -1 is set respectively to - * signify the this parameter has not been set. When parameters are undefined one can call - * call setUndefinedScreenDetalstoDefaultScreen() method after readDISPLAY() to ensure valid values. */ - void readDISPLAY(); - - /** Set the screenIndentifier from the displayName string. - * Note, if either of displayNum or screenNum are not defined then -1 is set respectively to - * signify the this parameter has not been set. When parameters are undefined one can call - * call setUndefinedScreenDetalstoDefaultScreen() method after readDISPLAY() to ensure valid values. */ - void setScreenIdentifier(const std::string& displayName); - - /** Set any undefined displayNum or screenNum values (i.e. -1) to the default display & screen of 0 respectively.*/ - void setUndefinedScreenDetailsToDefaultScreen() - { - if (displayNum<0) displayNum = 0; - if (screenNum<0) screenNum = 0; - } - - std::string hostName; - int displayNum; - int screenNum; - }; - - /** GraphicsContext Traits object provides the specification of what type of graphics context is required.*/ - struct OSG_EXPORT Traits : public osg::Referenced, public ScreenIdentifier - { - Traits(DisplaySettings* ds=0); - - // graphics context original and size - int x; - int y; - int width; - int height; - - // window decoration and behaviour - std::string windowName; - bool windowDecoration; - bool supportsResize; - - // buffer depths, 0 equals off. - unsigned int red; - unsigned int blue; - unsigned int green; - unsigned int alpha; - unsigned int depth; - unsigned int stencil; - - // multi sample parameters - unsigned int sampleBuffers; - unsigned int samples; - - // buffer configuration - bool pbuffer; - bool quadBufferStereo; - bool doubleBuffer; - - // render to texture - GLenum target; - GLenum format; - unsigned int level; - unsigned int face; - unsigned int mipMapGeneration; - - // V-sync - bool vsync; - - // Swap Group - bool swapGroupEnabled; - GLuint swapGroup; - GLuint swapBarrier; - - // use multithreaded OpenGL-engine (OS X only) - bool useMultiThreadedOpenGLEngine; - - // enable cursor - bool useCursor; - - // settings used in set up of graphics context, only presently used by GL3 build of OSG. - std::string glContextVersion; - unsigned int glContextFlags; - unsigned int glContextProfileMask; - - - // shared context - GraphicsContext* sharedContext; - - osg::ref_ptr inheritedWindowData; - - // ask the GraphicsWindow implementation to set the pixel format of an inherited window - bool setInheritedWindowPixelFormat; - - // X11 hint whether to override the window managers window size/position redirection - bool overrideRedirect; - - DisplaySettings::SwapMethod swapMethod; - }; - - /** Simple resolution structure used by WindowingSystemInterface to get and set screen resolution. - * Note the '0' value stands for 'unset'. */ - struct ScreenSettings { - ScreenSettings() : - width(0), - height(0), - refreshRate(0), - colorDepth(0) - {} - ScreenSettings(int width, int height, double refreshRate=0, unsigned int colorDepth=0) : - width(width), - height(height), - refreshRate(refreshRate), - colorDepth(colorDepth) - {} - - int width; - int height; - double refreshRate; ///< Screen refresh rate, in Hz. - unsigned int colorDepth; ///< RGB(A) color buffer depth. - }; - - typedef std::vector ScreenSettingsList; - - /** Callback to be implemented to provide access to Windowing API's ability to create Windows/pbuffers.*/ - struct WindowingSystemInterface : public osg::Referenced - { - virtual unsigned int getNumScreens(const ScreenIdentifier& screenIdentifier = ScreenIdentifier()) = 0; - - virtual void getScreenSettings(const ScreenIdentifier& screenIdentifier, ScreenSettings & resolution) = 0; - - virtual bool setScreenSettings(const ScreenIdentifier& /*screenIdentifier*/, const ScreenSettings & /*resolution*/) { return false; } - - virtual void enumerateScreenSettings(const ScreenIdentifier& screenIdentifier, ScreenSettingsList & resolutionList) = 0; - - virtual GraphicsContext* createGraphicsContext(Traits* traits) = 0; - - virtual ~WindowingSystemInterface() {} - - - /** Gets screen resolution without using the ScreenResolution structure. - * \deprecated Provided only for backward compatibility. */ - inline void getScreenResolution(const ScreenIdentifier& screenIdentifier, unsigned int& width, unsigned int& height) - { - ScreenSettings settings; - getScreenSettings(screenIdentifier, settings); - width = settings.width; - height = settings.height; - } - - /** Sets screen resolution without using the ScreenSettings structure. - * \deprecated Provided only for backward compatibility. */ - inline bool setScreenResolution(const ScreenIdentifier& screenIdentifier, unsigned int width, unsigned int height) - { - return setScreenSettings(screenIdentifier, ScreenSettings(width, height)); - } - - /** \deprecated Provided only for backward compatibility. */ - inline bool setScreenRefreshRate(const ScreenIdentifier& screenIdentifier, double refreshRate) - { - ScreenSettings settings; - getScreenSettings(screenIdentifier, settings); - settings.refreshRate = refreshRate; - return setScreenSettings(screenIdentifier, settings); - } - }; - - - /** Set the query the windowing system for screens and create graphics context - this functor should be supplied by the windows toolkit. */ - static void setWindowingSystemInterface(WindowingSystemInterface* wsInterface); - - /** Get the WindowingSystemInterface*/ - static WindowingSystemInterface* getWindowingSystemInterface(); - - /** Create a graphics context for a specified set of traits.*/ - static GraphicsContext* createGraphicsContext(Traits* traits); - - /** Create a contextID for a new graphics context, this contextID is used to set up the osg::State associate with context. - * Automatically increments the usage count of the contextID to 1.*/ - static unsigned int createNewContextID(); - - /** Get the current max ContextID.*/ - static unsigned int getMaxContextID(); - - /** Increment the usage count associate with a contextID. The usage count specifies how many graphics contexts a specific contextID is shared between.*/ - static void incrementContextIDUsageCount(unsigned int contextID); - - /** Decrement the usage count associate with a contextID. Once the contextID goes to 0 the contextID is then free to be reused.*/ - static void decrementContextIDUsageCount(unsigned int contextID); - - typedef std::vector GraphicsContexts; - - /** Get all the registered graphics contexts.*/ - static GraphicsContexts getAllRegisteredGraphicsContexts(); - - /** Get all the registered graphics contexts associated with a specific contextID.*/ - static GraphicsContexts getRegisteredGraphicsContexts(unsigned int contextID); - - /** Get the GraphicsContext for doing background compilation for GraphicsContexts associated with specified contextID.*/ - static void setCompileContext(unsigned int contextID, GraphicsContext* gc); - - /** Get existing or create a new GraphicsContext to do background compilation for GraphicsContexts associated with specified contextID.*/ - static GraphicsContext* getOrCreateCompileContext(unsigned int contextID); - - /** Get the GraphicsContext for doing background compilation for GraphicsContexts associated with specified contextID.*/ - static GraphicsContext* getCompileContext(unsigned int contextID); - - public: - - /** Add operation to end of OperationQueue.*/ - void add(Operation* operation); - - /** Remove operation from OperationQueue.*/ - void remove(Operation* operation); - - /** Remove named operation from OperationQueue.*/ - void remove(const std::string& name); - - /** Remove all operations from OperationQueue.*/ - void removeAllOperations(); - - /** Run the operations. */ - void runOperations(); - - typedef std::list< ref_ptr > GraphicsOperationQueue; - - /** Get the operations queue, not you must use the OperationsMutex when accessing the queue.*/ - GraphicsOperationQueue& getOperationsQueue() { return _operations; } - - /** Get the operations queue mutex.*/ - OpenThreads::Mutex* getOperationsMutex() { return &_operationsMutex; } - - /** Get the operations queue block used to mark an empty queue, if you end items into the empty queue you must release this block.*/ - osg::RefBlock* getOperationsBlock() { return _operationsBlock.get(); } - - /** Get the current operations that is being run.*/ - Operation* getCurrentOperation() { return _currentOperation.get(); } - - - public: - - /** Get the traits of the GraphicsContext.*/ - inline const Traits* getTraits() const { return _traits.get(); } - - /** Return whether a valid and usable GraphicsContext has been created.*/ - virtual bool valid() const = 0; - - - /** Set the State object which tracks the current OpenGL state for this graphics context.*/ - inline void setState(State* state) { _state = state; } - - /** Get the State object which tracks the current OpenGL state for this graphics context.*/ - inline State* getState() { return _state.get(); } - - /** Get the const State object which tracks the current OpenGL state for this graphics context.*/ - inline const State* getState() const { return _state.get(); } - - - /** Sets the clear color. */ - inline void setClearColor(const Vec4& color) { _clearColor = color; } - - /** Returns the clear color. */ - inline const Vec4& getClearColor() const { return _clearColor; } - - /** Set the clear mask used in glClear(..). - * Defaults to 0 - so no clear is done by default by the GraphicsContext, instead the Camera's attached the GraphicsContext will do the clear. - * GraphicsContext::setClearMask() is useful for when the Camera's Viewports don't conver the whole context, so the context will fill in the gaps. */ - inline void setClearMask(GLbitfield mask) { _clearMask = mask; } - - /** Get the clear mask.*/ - inline GLbitfield getClearMask() const { return _clearMask; } - - /** Do an OpenGL clear of the full graphics context/window. - * Note, must only be called from a thread with this context current.*/ - virtual void clear(); - - double getTimeSinceLastClear() const { return osg::Timer::instance()->delta_s(_lastClearTick, osg::Timer::instance()->tick()); } - - - /** Realize the GraphicsContext.*/ - bool realize(); - - /** close the graphics context. - * close(bool) stops any associated graphics threads, releases the contextID for the GraphicsContext then - * optional calls closeImplementation() to do the actual deletion of the graphics. This call is made optional - * as there are times when the graphics context has already been deleted externally and only the OSG side - * of the its data need to be closed down. */ - void close(bool callCloseImplementation=true); - - /** swap the front and back buffers.*/ - void swapBuffers(); - - /** Return true if the graphics context has been realized and is ready to use.*/ - inline bool isRealized() const { return isRealizedImplementation(); } - - - /** Make this graphics context current. - * Implemented by calling makeCurrentImplementation(). - * Returns true on success. */ - bool makeCurrent(); - - /** Make this graphics context current with specified read context. - * Implemented by calling makeContextCurrentImplementation(). - * Returns true on success. */ - bool makeContextCurrent(GraphicsContext* readContext); - - /** Release the graphics context. - * Returns true on success. */ - bool releaseContext(); - - /** Return true if the current thread has this OpenGL graphics context.*/ - inline bool isCurrent() const { return _threadOfLastMakeCurrent == OpenThreads::Thread::CurrentThread(); } - - /** Bind the graphics context to associated texture.*/ - inline void bindPBufferToTexture(GLenum buffer) { bindPBufferToTextureImplementation(buffer); } - - - - /** Create a graphics thread to the graphics context, so that the thread handles all OpenGL operations.*/ - void createGraphicsThread(); - - /** Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations.*/ - void setGraphicsThread(GraphicsThread* gt); - - /** Get the graphics thread assigned the graphics context.*/ - GraphicsThread* getGraphicsThread() { return _graphicsThread.get(); } - - /** Get the const graphics thread assigned the graphics context.*/ - const GraphicsThread* getGraphicsThread() const { return _graphicsThread.get(); } - - - /** Realize the GraphicsContext implementation, - * Pure virtual - must be implemented by concrete implementations of GraphicsContext. */ - virtual bool realizeImplementation() = 0; - - /** Return true if the graphics context has been realized, and is ready to use, implementation. - * Pure virtual - must be implemented by concrete implementations of GraphicsContext. */ - virtual bool isRealizedImplementation() const = 0; - - /** Close the graphics context implementation. - * Pure virtual - must be implemented by concrete implementations of GraphicsContext. */ - virtual void closeImplementation() = 0; - - /** Make this graphics context current implementation. - * Pure virtual - must be implemented by concrete implementations of GraphicsContext. */ - virtual bool makeCurrentImplementation() = 0; - - /** Make this graphics context current with specified read context implementation. - * Pure virtual - must be implemented by concrete implementations of GraphicsContext. */ - virtual bool makeContextCurrentImplementation(GraphicsContext* readContext) = 0; - - /** Release the graphics context implementation.*/ - virtual bool releaseContextImplementation() = 0; - - /** Pure virtual, Bind the graphics context to associated texture implementation. - * Pure virtual - must be implemented by concrete implementations of GraphicsContext. */ - virtual void bindPBufferToTextureImplementation(GLenum buffer) = 0; - - struct SwapCallback : public osg::Referenced - { - virtual void swapBuffersImplementation(GraphicsContext* gc) = 0; - }; - /** Set the swap callback which overrides the - * GraphicsContext::swapBuffersImplementation(), allowing - * developers to provide custom behavior for swap. - * The callback must call - * GraphicsContext::swapBuffersImplementation() */ - void setSwapCallback(SwapCallback* rc) { _swapCallback = rc; } - - /** Get the swap callback which overrides the GraphicsContext::swapBuffersImplementation().*/ - SwapCallback* getSwapCallback() { return _swapCallback.get(); } - - /** Get the const swap callback which overrides the GraphicsContext::swapBuffersImplementation().*/ - const SwapCallback* getSwapCallback() const { return _swapCallback.get(); } - - /** convinience method for handling whether to call swapbuffers callback or the standard context swapBuffersImplementation. - * swapBuffersCallbackOrImplemenation() is called by swapBuffers() and osg::SwapBuffersOperation, end users should normally - * call swapBuffers() rather than swapBuffersCallbackOrImplemenation(). */ - void swapBuffersCallbackOrImplemenation() - { - if (_state.valid()) _state->frameCompleted(); - - if (_swapCallback.valid()) _swapCallback->swapBuffersImplementation(this); - else swapBuffersImplementation(); - } - - /** Swap the front and back buffers implementation. - * Pure virtual - must be implemented by concrete implementations of GraphicsContext. */ - virtual void swapBuffersImplementation() = 0; - - - - /** resized method should be called when the underlying window has been resized and the GraphicsWindow and associated Cameras must - be updated to keep in sync with the new size. */ - void resized(int x, int y, int width, int height) - { - if (_resizedCallback.valid()) _resizedCallback->resizedImplementation(this, x, y, width, height); - else resizedImplementation(x, y, width, height); - } - - struct ResizedCallback : public osg::Referenced - { - virtual void resizedImplementation(GraphicsContext* gc, int x, int y, int width, int height) = 0; - }; - - /** Set the resized callback which overrides the GraphicsConext::realizedImplementation(), allow developers to provide custom behavior - * in response to a window being resized.*/ - void setResizedCallback(ResizedCallback* rc) { _resizedCallback = rc; } - - /** Get the resized callback which overrides the GraphicsConext::realizedImplementation().*/ - ResizedCallback* getResizedCallback() { return _resizedCallback.get(); } - - /** Get the const resized callback which overrides the GraphicsConext::realizedImplementation().*/ - const ResizedCallback* getResizedCallback() const { return _resizedCallback.get(); } - - /** resized implementation, by default resizes the viewports and aspect ratios the cameras associated with the graphics Window. */ - virtual void resizedImplementation(int x, int y, int width, int height); - - - typedef std::list< osg::Camera* > Cameras; - - /** Get the the list of cameras associated with this graphics context.*/ - Cameras& getCameras() { return _cameras; } - - /** Get the the const list of cameras associated with this graphics context.*/ - const Cameras& getCameras() const { return _cameras; } - - /** set the default FBO-id, this id will be used when the rendering-backend is finished with RTT FBOs */ - void setDefaultFboId(GLuint i) { _defaultFboId = i; } - - GLuint getDefaultFboId() const { return _defaultFboId; } - - public: - - virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "GraphicsContext"; } - - protected: - - GraphicsContext(); - GraphicsContext(const GraphicsContext&, const osg::CopyOp&); - - virtual ~GraphicsContext(); - - virtual Object* cloneType() const { return 0; } - virtual Object* clone(const CopyOp&) const { return 0; } - - /** Register a GraphicsContext.*/ - static void registerGraphicsContext(GraphicsContext* gc); - - /** Unregister a GraphicsContext.*/ - static void unregisterGraphicsContext(GraphicsContext* gc); - - - void addCamera(osg::Camera* camera); - void removeCamera(osg::Camera* camera); - - Cameras _cameras; - - friend class osg::Camera; - - ref_ptr _traits; - ref_ptr _state; - - Vec4 _clearColor; - GLbitfield _clearMask; - - OpenThreads::Thread* _threadOfLastMakeCurrent; - - OpenThreads::Mutex _operationsMutex; - osg::ref_ptr _operationsBlock; - GraphicsOperationQueue _operations; - osg::ref_ptr _currentOperation; - - ref_ptr _graphicsThread; - - ref_ptr _resizedCallback; - ref_ptr _swapCallback; - - Timer_t _lastClearTick; - - GLuint _defaultFboId; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/GraphicsCostEstimator b/libs/lib/mac32/include/osg/GraphicsCostEstimator deleted file mode 100644 index 88fbc1ecc..000000000 --- a/libs/lib/mac32/include/osg/GraphicsCostEstimator +++ /dev/null @@ -1,142 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GRAPHICSCOSTESTIMATOR -#define OSG_GRAPHICSCOSTESTIMATOR - -#include -#include -#include - -namespace osg -{ - -class Geometry; -class Texture; -class Program; -class Node; -class RenderInfo; - -struct ClampedLinearCostFunction1D -{ - ClampedLinearCostFunction1D(double cost0=0.0, double dcost_di=0.0, unsigned int min_input=0): - _cost0(cost0), - _dcost_di(dcost_di), - _min_input(min_input) {} - - void set(double cost0, double dcost_di, unsigned int min_input) - { - _cost0 = cost0; - _dcost_di = dcost_di; - _min_input = min_input; - } - - double operator() (unsigned int input) const - { - return _cost0 + _dcost_di * double(input<=_min_input ? 0u : input-_min_input); - } - double _cost0; - double _dcost_di; - unsigned int _min_input; -}; - -/** Pair of double representing CPU and GPU times in seconds as first and second elements in std::pair. */ -typedef std::pair CostPair; - - -class OSG_EXPORT GeometryCostEstimator : public osg::Referenced -{ -public: - GeometryCostEstimator(); - void setDefaults(); - void calibrate(osg::RenderInfo& renderInfo); - CostPair estimateCompileCost(const osg::Geometry* geometry) const; - CostPair estimateDrawCost(const osg::Geometry* geometry) const; - -protected: - ClampedLinearCostFunction1D _arrayCompileCost; - ClampedLinearCostFunction1D _primtiveSetCompileCost; - - ClampedLinearCostFunction1D _arrayDrawCost; - ClampedLinearCostFunction1D _primtiveSetDrawCost; - - double _displayListCompileConstant; - double _displayListCompileFactor; -}; - -class OSG_EXPORT TextureCostEstimator : public osg::Referenced -{ -public: - TextureCostEstimator(); - void setDefaults(); - void calibrate(osg::RenderInfo& renderInfo); - CostPair estimateCompileCost(const osg::Texture* texture) const; - CostPair estimateDrawCost(const osg::Texture* texture) const; - -protected: - ClampedLinearCostFunction1D _compileCost; - ClampedLinearCostFunction1D _drawCost; -}; - - -class OSG_EXPORT ProgramCostEstimator : public osg::Referenced -{ -public: - ProgramCostEstimator(); - void setDefaults(); - void calibrate(osg::RenderInfo& renderInfo); - CostPair estimateCompileCost(const osg::Program* program) const; - CostPair estimateDrawCost(const osg::Program* program) const; - -protected: - ClampedLinearCostFunction1D _shaderCompileCost; - ClampedLinearCostFunction1D _linkCost; - ClampedLinearCostFunction1D _drawCost; -}; - -class OSG_EXPORT GraphicsCostEstimator : public osg::Referenced -{ -public: - GraphicsCostEstimator(); - - /** set defaults for computing the costs.*/ - void setDefaults(); - - /** calibrate the costs of various compile and draw operations */ - void calibrate(osg::RenderInfo& renderInfo); - - CostPair estimateCompileCost(const osg::Geometry* geometry) const { return _geometryEstimator->estimateCompileCost(geometry); } - CostPair estimateDrawCost(const osg::Geometry* geometry) const { return _geometryEstimator->estimateDrawCost(geometry); } - - CostPair estimateCompileCost(const osg::Texture* texture) const { return _textureEstimator->estimateCompileCost(texture); } - CostPair estimateDrawCost(const osg::Texture* texture) const { return _textureEstimator->estimateDrawCost(texture); } - - CostPair estimateCompileCost(const osg::Program* program) const { return _programEstimator->estimateCompileCost(program); } - CostPair estimateDrawCost(const osg::Program* program) const { return _programEstimator->estimateDrawCost(program); } - - CostPair estimateCompileCost(const osg::Node* node) const; - CostPair estimateDrawCost(const osg::Node* node) const; - -protected: - - virtual ~GraphicsCostEstimator(); - - osg::ref_ptr _geometryEstimator; - osg::ref_ptr _textureEstimator; - osg::ref_ptr _programEstimator; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/GraphicsThread b/libs/lib/mac32/include/osg/GraphicsThread deleted file mode 100644 index 7b67a8554..000000000 --- a/libs/lib/mac32/include/osg/GraphicsThread +++ /dev/null @@ -1,136 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GRAPHICSTHREAD -#define OSG_GRAPHICSTHREAD 1 - -#include -#include - -namespace osg { - -class GraphicsContext; - -/** GraphicsThread is a helper class for running OpenGL GraphicsOperation within a single thread assigned to a specific GraphicsContext.*/ -class OSG_EXPORT GraphicsThread : public osg::OperationThread -{ - public: - - GraphicsThread(); - - /** Run does the graphics thread run loop.*/ - virtual void run(); -}; - -struct OSG_EXPORT GraphicsOperation : public Operation -{ - GraphicsOperation(const std::string& name, bool keep): - Operation(name,keep) {} - - /** Override the standard Operation operator and dynamic cast object to a GraphicsContext, - * on success call operation()(GraphicsContext*).*/ - virtual void operator () (Object* object); - - virtual void operator () (GraphicsContext* context) = 0; -}; - - -/** SwapBufferOperation calls swap buffers on the GraphicsContext.*/ -struct OSG_EXPORT SwapBuffersOperation : public GraphicsOperation -{ - SwapBuffersOperation(): - GraphicsOperation("SwapBuffers",true) {} - - virtual void operator () (GraphicsContext* context); -}; - -/** BarrierOperation allows one to synchronize multiple GraphicsThreads with each other.*/ -struct OSG_EXPORT BarrierOperation : public Operation, public OpenThreads::Barrier -{ - enum PreBlockOp - { - NO_OPERATION, - GL_FLUSH, - GL_FINISH - }; - - BarrierOperation(int numThreads, PreBlockOp op=NO_OPERATION, bool keep=true): - Operation("Barrier", keep), - OpenThreads::Barrier(numThreads), - _preBlockOp(op) {} - - virtual void release(); - - virtual void operator () (Object* object); - - PreBlockOp _preBlockOp; -}; - -/** ReleaseContext_Block_MakeCurrentOperation releases the context for another thread to acquire, - * then blocks waiting for context to be released, once the block is release the context is re-acquired.*/ -struct OSG_EXPORT ReleaseContext_Block_MakeCurrentOperation : public GraphicsOperation, public RefBlock -{ - ReleaseContext_Block_MakeCurrentOperation(): - GraphicsOperation("ReleaseContext_Block_MakeCurrent", false) {} - - virtual void release(); - - virtual void operator () (GraphicsContext* context); -}; - -struct OSG_EXPORT BlockAndFlushOperation : public GraphicsOperation, public OpenThreads::Block -{ - BlockAndFlushOperation(); - - virtual void release(); - - virtual void operator () (GraphicsContext*); -}; - - -struct OSG_EXPORT FlushDeletedGLObjectsOperation : public GraphicsOperation -{ - FlushDeletedGLObjectsOperation(double availableTime, bool keep=false); - - virtual void operator () (GraphicsContext*); - - double _availableTime; -}; - -class OSG_EXPORT RunOperations : public osg::GraphicsOperation -{ -public: - - RunOperations(): - osg::GraphicsOperation("RunOperation",true) {} - - virtual void operator () (osg::GraphicsContext* context); - -}; - -class OSG_EXPORT EndOfDynamicDrawBlock : public OpenThreads::BlockCount, public osg::State::DynamicObjectRenderingCompletedCallback -{ - public: - - EndOfDynamicDrawBlock(unsigned int); - - void completed(osg::State* state); - - protected: - - ~EndOfDynamicDrawBlock() {} -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Group b/libs/lib/mac32/include/osg/Group deleted file mode 100644 index 8bedbc44c..000000000 --- a/libs/lib/mac32/include/osg/Group +++ /dev/null @@ -1,172 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_GROUP -#define OSG_GROUP 1 - -#include -#include - -namespace osg { - -typedef std::vector< ref_ptr > NodeList; - -/** General group node which maintains a list of children. - * Children are reference counted. This allows children to be shared - * with memory management handled automatically via osg::Referenced. -*/ -class OSG_EXPORT Group : public Node -{ - public : - - - Group(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Group(const Group&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, Group); - - virtual Group* asGroup() { return this; } - virtual const Group* asGroup() const { return this; } - - virtual void traverse(NodeVisitor& nv); - - /** Add Node to Group. - * If node is not NULL and is not contained in Group then increment its - * reference count, add it to the child list and dirty the bounding - * sphere to force it to recompute on next getBound() and return true for success. - * Otherwise return false. Scene nodes can't be added as child nodes. - */ - virtual bool addChild( Node *child ); - - /** Insert Node to Group at specific location. - * The new child node is inserted into the child list - * before the node at the specified index. No nodes - * are removed from the group with this operation. - */ - virtual bool insertChild( unsigned int index, Node *child ); - - /** Remove Node from Group. - * If Node is contained in Group then remove it from the child - * list, decrement its reference count, and dirty the - * bounding sphere to force it to recompute on next getBound() and - * return true for success. If Node is not found then return false - * and do not change the reference count of the Node. - * Note, do not override, only override removeChildren(,) is required. - */ - inline bool removeChild( Node *child ) - { - unsigned int pos = getChildIndex(child); - if (pos<_children.size()) return removeChildren(pos,1); - else return false; - } - - /** Remove Node from Group. - * If Node is contained in Group then remove it from the child - * list, decrement its reference count, and dirty the - * bounding sphere to force it to recompute on next getBound() and - * return true for success. If Node is not found then return false - * and do not change the reference count of the Node. - * Note, do not override, only override removeChildren(,) is required. - */ - inline bool removeChild( unsigned int pos, unsigned int numChildrenToRemove=1 ) - { - if (pos<_children.size()) return removeChildren(pos,numChildrenToRemove); - else return false; - } - - /** Remove children from Group. - * Note, must be override by subclasses of Group which add per child attributes.*/ - virtual bool removeChildren(unsigned int pos,unsigned int numChildrenToRemove); - - /** Replace specified Node with another Node. - * Equivalent to setChild(getChildIndex(orignChild),node) - * See docs for setChild for further details on implementation. - */ - virtual bool replaceChild( Node *origChild, Node* newChild ); - - /** Return the number of children nodes. */ - inline unsigned int getNumChildren() const { return static_cast(_children.size()); } - - /** Set child node at position i. - * Return true if set correctly, false on failure (if node==NULL || i is out of range). - * When Set can be successful applied, the algorithm is : decrement the reference count origNode and increment the - * reference count of newNode, and dirty the bounding sphere - * to force it to recompute on next getBound() and return true. - * If origNode is not found then return false and do not - * add newNode. If newNode is NULL then return false and do - * not remove origNode. Also returns false if newChild is a Scene node. - */ - virtual bool setChild( unsigned int i, Node* node ); - - /** Return child node at position i. */ - inline Node* getChild( unsigned int i ) { return _children[i].get(); } - - /** Return child node at position i. */ - inline const Node* getChild( unsigned int i ) const { return _children[i].get(); } - - /** Return true if node is contained within Group. */ - inline bool containsNode( const Node* node ) const - { - - for (NodeList::const_iterator itr=_children.begin(); - itr!=_children.end(); - ++itr) - { - if (itr->get()==node) return true; - } - return false; - } - - /** Get the index number of child, return a value between - * 0 and _children.size()-1 if found, if not found then - * return _children.size(). - */ - inline unsigned int getChildIndex( const Node* node ) const - { - for (unsigned int childNum=0;childNum<_children.size();++childNum) - { - if (_children[childNum]==node) return childNum; - } - return static_cast(_children.size()); // node not found. - } - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - virtual BoundingSphere computeBound() const; - - protected: - - virtual ~Group(); - - virtual void childRemoved(unsigned int /*pos*/, unsigned int /*numChildrenToRemove*/) {} - virtual void childInserted(unsigned int /*pos*/) {} - - NodeList _children; - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Hint b/libs/lib/mac32/include/osg/Hint deleted file mode 100644 index 63b1d5f1f..000000000 --- a/libs/lib/mac32/include/osg/Hint +++ /dev/null @@ -1,81 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_HINT -#define OSG_HINT 1 - -#include - -namespace osg -{ - -class OSG_EXPORT Hint : public StateAttribute -{ -public: - - Hint(): - _target(GL_NONE), - _mode(GL_DONT_CARE) {} - - Hint(GLenum target, GLenum mode): - _target(target), - _mode(mode) {} - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Hint(const Hint& hint,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(hint,copyop), - _target(hint._target), - _mode(hint._mode) {} - - virtual osg::Object* cloneType() const { return new Hint( _target, GL_DONT_CARE ); } - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new Hint(*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "Hint"; } - virtual Type getType() const { return HINT; } - - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Hint,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_target) - COMPARE_StateAttribute_Parameter(_mode) - - return 0; - } - - /** Return the member identifier within the attribute's class type. Used for light number/clip plane number etc.*/ - virtual unsigned int getMember() const { return static_cast(_target); } - - void setTarget(GLenum target); - inline GLenum getTarget() const { return _target; } - - inline void setMode(GLenum mode) { _mode = mode; } - inline GLenum getMode() const { return _mode; } - - virtual void apply(State& state) const; - -protected: - - - GLenum _target; - GLenum _mode; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Image b/libs/lib/mac32/include/osg/Image deleted file mode 100644 index cb099feea..000000000 --- a/libs/lib/mac32/include/osg/Image +++ /dev/null @@ -1,433 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_IMAGE -#define OSG_IMAGE 1 - -#include -#include -#include -#include -#include -#include - -#include -#include - -#ifndef GL_VERSION_1_2 - // 1.2 definitions... - #define GL_BGR 0x80E0 - #define GL_BGRA 0x80E1 - #define GL_UNSIGNED_BYTE_3_3_2 0x8032 - #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 - #define GL_UNSIGNED_SHORT_5_6_5 0x8363 - #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 - #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 - #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 - #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 - #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 - #define GL_UNSIGNED_INT_8_8_8_8 0x8035 - #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 - #define GL_UNSIGNED_INT_10_10_10_2 0x8036 - #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#endif - -#ifndef GL_COMPRESSED_ALPHA - #define GL_COMPRESSED_ALPHA 0x84E9 - #define GL_COMPRESSED_LUMINANCE 0x84EA - #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB - #define GL_COMPRESSED_INTENSITY 0x84EC - #define GL_COMPRESSED_RGB 0x84ED - #define GL_COMPRESSED_RGBA 0x84EE -#endif - - -#ifndef GL_ABGR_EXT -#define GL_ABGR_EXT 0x8000 -#endif - -#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) - #define GL_RED 0x1903 - #define GL_GREEN 0x1904 - #define GL_BLUE 0x1905 - #define GL_DEPTH_COMPONENT 0x1902 - #define GL_STENCIL_INDEX 0x1901 -#endif - -#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) - #define GL_BITMAP 0x1A00 - #define GL_COLOR_INDEX 0x1900 - #define GL_INTENSITY12 0x804C - #define GL_INTENSITY16 0x804D - #define GL_INTENSITY4 0x804A - #define GL_INTENSITY8 0x804B - #define GL_LUMINANCE12 0x8041 - #define GL_LUMINANCE12_ALPHA4 0x8046 - #define GL_LUMINANCE12_ALPHA12 0x8047 - #define GL_LUMINANCE16 0x8042 - #define GL_LUMINANCE16_ALPHA16 0x8048 - #define GL_LUMINANCE4 0x803F - #define GL_LUMINANCE4_ALPHA4 0x8043 - #define GL_LUMINANCE6_ALPHA2 0x8044 - #define GL_LUMINANCE8 0x8040 - #define GL_LUMINANCE8_ALPHA8 0x8045 - #define GL_RGBA8 0x8058 - #define GL_PACK_ROW_LENGTH 0x0D02 -#endif - -#ifndef GL_PACK_SKIP_IMAGES - #define GL_PACK_SKIP_IMAGES 0x806B - #define GL_PACK_IMAGE_HEIGHT 0x806C - #define GL_UNPACK_SKIP_IMAGES 0x806D - #define GL_UNPACK_IMAGE_HEIGHT 0x806E -#endif - -namespace osg { - -// forward declare -class NodeVisitor; - -/** Image class for encapsulating the storage texture image data. */ -class OSG_EXPORT Image : public BufferData -{ - - public : - - Image(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Image(const Image& image,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new Image(); } - virtual Object* clone(const CopyOp& copyop) const { return new Image(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "Image"; } - - virtual const GLvoid* getDataPointer() const { return data(); } - virtual unsigned int getTotalDataSize() const { return getTotalSizeInBytesIncludingMipmaps(); } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const Image& rhs) const; - - void setFileName(const std::string& fileName); - inline const std::string& getFileName() const { return _fileName; } - - enum WriteHint { - NO_PREFERENCE, - STORE_INLINE, - EXTERNAL_FILE - }; - - void setWriteHint(WriteHint writeHint) { _writeHint = writeHint; } - WriteHint getWriteHint() const { return _writeHint; } - - enum AllocationMode { - NO_DELETE, - USE_NEW_DELETE, - USE_MALLOC_FREE - }; - - /** Set the method used for deleting data once it goes out of scope. */ - void setAllocationMode(AllocationMode mode) { _allocationMode = mode; } - - /** Get the method used for deleting data once it goes out of scope. */ - AllocationMode getAllocationMode() const { return _allocationMode; } - - - /** Allocate a pixel block of specified size and type. */ - virtual void allocateImage(int s,int t,int r, - GLenum pixelFormat,GLenum type, - int packing=1); - - - /** Set the image dimensions, format and data. */ - virtual void setImage(int s,int t,int r, - GLint internalTextureformat, - GLenum pixelFormat,GLenum type, - unsigned char* data, - AllocationMode mode, - int packing=1); - - /** Read pixels from current frame buffer at specified position and size, using glReadPixels. - * Create memory for storage if required, reuse existing pixel coords if possible. - */ - virtual void readPixels(int x,int y,int width,int height, - GLenum pixelFormat,GLenum type); - - - /** Read the contents of the current bound texture, handling compressed pixelFormats if present. - * Create memory for storage if required, reuse existing pixel coords if possible. - */ - virtual void readImageFromCurrentTexture(unsigned int contextID, bool copyMipMapsIfAvailable, GLenum type = GL_UNSIGNED_BYTE); - - - /** Scale image to specified size. */ - void scaleImage(int s,int t,int r) { scaleImage(s,t,r, getDataType()); } - - /** Scale image to specified size and with specified data type. */ - virtual void scaleImage(int s,int t,int r, GLenum newDataType); - - /** Copy a source Image into a subpart of this Image at specified position. - * Typically used to copy to an already allocated image, such as creating - * a 3D image from a stack 2D images. - * If this Image is empty then image data is created to - * accomodate the source image in its offset position. - * If source is NULL then no operation happens, this Image is left unchanged. - */ - virtual void copySubImage(int s_offset, int t_offset, int r_offset, const osg::Image* source); - - - enum Origin - { - BOTTOM_LEFT, - TOP_LEFT - }; - - /** Set the origin of the image. - * The default value is BOTTOM_LEFT and is consistent with OpenGL. - * TOP_LEFT is used for imagery that follows standard Imagery convention, such as movies, - * and hasn't been flipped yet. For such images one much flip the t axis of the tex coords. - * to handle this origin position. */ - void setOrigin(Origin origin) { _origin = origin; } - - /** Get the origin of the image.*/ - Origin getOrigin() const { return _origin; } - - - /** Width of image. */ - inline int s() const { return _s; } - - /** Height of image. */ - inline int t() const { return _t; } - - /** Depth of image. */ - inline int r() const { return _r; } - - void setInternalTextureFormat(GLint internalFormat); - inline GLint getInternalTextureFormat() const { return _internalTextureFormat; } - - void setPixelFormat(GLenum pixelFormat); - inline GLenum getPixelFormat() const { return _pixelFormat; } - - void setDataType(GLenum dataType); - inline GLenum getDataType() const { return _dataType; } - - void setPacking(unsigned int packing) { _packing = packing; } - inline unsigned int getPacking() const { return _packing; } - - /** return true of the pixel format is an OpenGL compressed pixel format.*/ - bool isCompressed() const; - - /** Set the pixel aspect ratio, defined as the pixel width divided by the pixel height.*/ - inline void setPixelAspectRatio(float pixelAspectRatio) { _pixelAspectRatio = pixelAspectRatio; } - - /** Get the pixel aspect ratio.*/ - inline float getPixelAspectRatio() const { return _pixelAspectRatio; } - - /** Return the number of bits required for each pixel. */ - inline unsigned int getPixelSizeInBits() const { return computePixelSizeInBits(_pixelFormat,_dataType); } - - /** Return the number of bytes each row of pixels occupies once it has been packed. */ - inline unsigned int getRowSizeInBytes() const { return computeRowWidthInBytes(_s,_pixelFormat,_dataType,_packing); } - - /** Return the number of bytes each image (_s*_t) of pixels occupies. */ - inline unsigned int getImageSizeInBytes() const { return getRowSizeInBytes()*_t; } - - /** Return the number of bytes the whole row/image/volume of pixels occupies. */ - inline unsigned int getTotalSizeInBytes() const { return getImageSizeInBytes()*_r; } - - /** Return the number of bytes the whole row/image/volume of pixels occupies, including all mip maps if included. */ - unsigned int getTotalSizeInBytesIncludingMipmaps() const; - - /** Return true if the Image represent a valid and usable imagery.*/ - bool valid() const { return _s!=0 && _t!=0 && _r!=0 && _data!=0 && _dataType!=0; } - - /** Raw image data. */ - inline unsigned char* data() { return _data; } - - /** Raw const image data. */ - inline const unsigned char* data() const { return _data; } - - - inline unsigned char* data(int column, int row=0,int image=0) - { - if (!_data) return NULL; - return _data+(column*getPixelSizeInBits())/8+row*getRowSizeInBytes()+image*getImageSizeInBytes(); - } - - inline const unsigned char* data(int column, int row=0,int image=0) const - { - if (!_data) return NULL; - return _data+(column*getPixelSizeInBits())/8+row*getRowSizeInBytes()+image*getImageSizeInBytes(); - } - - /** Get the color value for specified texcoord.*/ - Vec4 getColor(unsigned int s,unsigned t=0,unsigned r=0) const; - - /** Get the color value for specified texcoord.*/ - Vec4 getColor(const Vec2& texcoord) const { return getColor(Vec3(texcoord.x(),texcoord.y(),0.0f)); } - - /** Get the color value for specified texcoord.*/ - Vec4 getColor(const Vec3& texcoord) const; - - - /** Flip the image horizontally. */ - void flipHorizontal(); - - /** Flip the image vertically. */ - void flipVertical(); - - - /** Ensure image dimensions are a power of two. - * Mipmapped textures require the image dimensions to be - * power of two and are within the maxiumum texture size for - * the host machine. - */ - void ensureValidSizeForTexturing(GLint maxTextureSize); - - static bool isPackedType(GLenum type); - static GLenum computePixelFormat(GLenum pixelFormat); - static GLenum computeFormatDataType(GLenum pixelFormat); - static unsigned int computeNumComponents(GLenum pixelFormat); - static unsigned int computePixelSizeInBits(GLenum pixelFormat,GLenum type); - static unsigned int computeRowWidthInBytes(int width,GLenum pixelFormat,GLenum type,int packing); - static int computeNearestPowerOfTwo(int s,float bias=0.5f); - static int computeNumberOfMipmapLevels(int s,int t = 1, int r = 1); - - /** Precomputed mipmaps stuff. */ - typedef std::vector< unsigned int > MipmapDataType; - - inline bool isMipmap() const {return !_mipmapData.empty();}; - - unsigned int getNumMipmapLevels() const - { - return static_cast(_mipmapData.size())+1; - }; - - /** Send offsets into data. It is assumed that first mipmap offset (index 0) is 0.*/ - inline void setMipmapLevels(const MipmapDataType& mipmapDataVector) { _mipmapData = mipmapDataVector; } - - inline const MipmapDataType& getMipmapLevels() const { return _mipmapData; } - - inline unsigned int getMipmapOffset(unsigned int mipmapLevel) const - { - if(mipmapLevel == 0) - return 0; - else if (mipmapLevel < getNumMipmapLevels()) - return _mipmapData[mipmapLevel-1]; - return 0; - }; - - inline unsigned char* getMipmapData(unsigned int mipmapLevel) - { - return _data+getMipmapOffset(mipmapLevel); - } - - inline const unsigned char* getMipmapData(unsigned int mipmapLevel) const - { - return _data+getMipmapOffset(mipmapLevel); - } - - /*inline const unsigned char* getMipmapData(unsigned int row, unsigned int column, unsigned int mipmapLevel) const - { - if (!_data) return NULL; - return getMipmapData(mipmapLevel) + (column*getPixelSizeInBits())/8+row*getRowSizeInBytes(); - }*/ - - /** Return true if this image is translucent - i.e. it has alpha values that are less 1.0 (when normalized). */ - virtual bool isImageTranslucent() const; - - /** Set the optional PixelBufferObject used to map the image memory efficiently to graphics memory. */ - void setPixelBufferObject(PixelBufferObject* buffer) { setBufferObject(buffer); } - - /** Get the PixelBufferObject.*/ - PixelBufferObject* getPixelBufferObject() { return dynamic_cast(_bufferObject.get()); } - - /** Get the const PixelBufferObject.*/ - const PixelBufferObject* getPixelBufferObject() const { return dynamic_cast(_bufferObject.get()); } - - /** return whether the update(NodeVisitor* nv) should be required on each frame to enable proper working of osg::Image.*/ - virtual bool requiresUpdateCall() const { return false; } - - /** update method for osg::Image subclasses that update themselves during the update traversal.*/ - virtual void update(NodeVisitor* /*nv*/) {} - - /** convience update callback class that can be attached to StateAttribute (such as Textures) to ensure - * that the Image::update(NodeVisitor*) method is called during the update traversal. This callback - * is automatically attached when Image::requiresUpdateCall() is true (it's false by default.) - */ - struct OSG_EXPORT UpdateCallback : public osg::StateAttributeCallback - { - virtual void operator () (osg::StateAttribute* attr, osg::NodeVisitor* nv); - }; - - /** method for hinting whether to enable or disable focus to images acting as front ends to interactive surfaces such as a vnc or browser window. Return true if handled. */ - virtual bool sendFocusHint(bool /*focus*/) { return false; } - - /** method for sending pointer events to images that are acting as front ends to interactive surfaces such as a vnc or browser window. Return true if handled. */ - virtual bool sendPointerEvent(int /*x*/, int /*y*/, int /*buttonMask*/) { return false; } - - /** method for sending key events to images that are acting as front ends to interactive surfaces such as a vnc or browser window. Return true if handled.*/ - virtual bool sendKeyEvent(int /*key*/, bool /*keyDown*/) { return false; } - - /** method for passing frame information to the custom Image classes, to be called only when objects associated with imagery are not culled.*/ - virtual void setFrameLastRendered(const osg::FrameStamp* /*frameStamp*/) {} - - protected : - - virtual ~Image(); - - Image& operator = (const Image&) { return *this; } - - std::string _fileName; - WriteHint _writeHint; - - - Origin _origin; - - int _s, _t, _r; - GLint _internalTextureFormat; - GLenum _pixelFormat; - GLenum _dataType; - unsigned int _packing; - float _pixelAspectRatio; - - AllocationMode _allocationMode; - unsigned char* _data; - - void deallocateData(); - - void setData(unsigned char* data,AllocationMode allocationMode); - - MipmapDataType _mipmapData; - - ref_ptr _bufferObject; -}; - -class Geode; - -/** Convenience function to be used by image loaders to generate a valid geode - * to return for readNode(). - * Use the image's s and t values to scale the dimensions of the image. -*/ -extern OSG_EXPORT Geode* createGeodeForImage(Image* image); -/** Convenience function to be used by image loaders to generate a valid geode - * to return for readNode(). - * Use the specified s and t values to scale the dimensions of the image. -*/ -extern OSG_EXPORT Geode* createGeodeForImage(Image* image,float s,float t); - -} - -#endif // __SG_IMAGE_H diff --git a/libs/lib/mac32/include/osg/ImageSequence b/libs/lib/mac32/include/osg/ImageSequence deleted file mode 100644 index 94503b741..000000000 --- a/libs/lib/mac32/include/osg/ImageSequence +++ /dev/null @@ -1,151 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_IMAGESEQUENCE -#define OSG_IMAGESEQUENCE 1 - -#include -#include - -#include -#include - -namespace osg { - -/** - * Image Buffer class. -*/ -class OSG_EXPORT ImageSequence : public ImageStream -{ - public: - ImageSequence(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - ImageSequence(const ImageSequence& ImageSequence, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new ImageSequence(); } - virtual Object* clone(const CopyOp& copyop) const { return new ImageSequence(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "ImageSequence"; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const Image& rhs) const; - - virtual void setReferenceTime(double t) { _referenceTime = t; } - virtual double getReferenceTime() const { return _referenceTime; } - - virtual void setTimeMultiplier(double tm) { _timeMultiplier = tm; } - virtual double getTimeMultiplier() const { return _timeMultiplier; } - - typedef std::vector< osg::ref_ptr > Images; - typedef std::vector< std::string > FileNames; - - virtual void seek(double time); - - virtual void play(); - - virtual void pause(); - - virtual void rewind(); - - enum Mode - { - PRE_LOAD_ALL_IMAGES, - PAGE_AND_RETAIN_IMAGES, - PAGE_AND_DISCARD_USED_IMAGES - }; - - void setMode(Mode mode); - Mode getMode() const { return _mode; } - - void setLength(double length); - virtual double getLength() const { return _length; } - - - void addImageFile(const std::string& fileName); - - void setImageFile(unsigned int pos, const std::string& fileName); - std::string getImageFile(unsigned int pos) const; - - unsigned int getNumImageFiles() const { return _fileNames.size(); } - - FileNames& getFileNames() { return _fileNames; } - const FileNames& getFileNames() const { return _fileNames; } - - void addImage(osg::Image* image); - - void setImage(int s,int t,int r, - GLint internalTextureformat, - GLenum pixelFormat,GLenum type, - unsigned char* data, - AllocationMode mode, - int packing=1) { Image::setImage(s,t,r,internalTextureformat, pixelFormat, type, data, mode, packing); } - - void setImage(unsigned int pos, osg::Image* image); - Image* getImage(unsigned int pos); - const Image* getImage(unsigned int pos) const; - - unsigned int getNumImages() const { return _images.size(); } - - Images& getImages() { return _images; } - const Images& getImages() const { return _images; } - - /** ImageSequence requires a call to update(NodeVisitor*) during the update traversal so return true.*/ - virtual bool requiresUpdateCall() const { return true; } - - /** update method for osg::Image subclasses that update themselves during the update traversal.*/ - virtual void update(NodeVisitor* nv); - - protected: - - virtual ~ImageSequence() {} - - virtual void applyLoopingMode(); - - void setImageToChild(const osg::Image* image); - - void computeTimePerImage(); - - int imageIndex(double time); - - - double _referenceTime; - double _timeMultiplier; - - Mode _mode; - double _length; - - double _timePerImage; - - mutable OpenThreads::Mutex _mutex; - FileNames _fileNames; - - Images _images; - - typedef std::set< std::string > FilesRequested; - FilesRequested _filesRequested; - - int _previousAppliedImageIndex; - - - bool _seekTimeSet; - double _seekTime; - - - -}; - -} // namespace - -#endif diff --git a/libs/lib/mac32/include/osg/ImageStream b/libs/lib/mac32/include/osg/ImageStream deleted file mode 100644 index 4b4a6d593..000000000 --- a/libs/lib/mac32/include/osg/ImageStream +++ /dev/null @@ -1,111 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_IMAGESTREAM -#define OSG_IMAGESTREAM 1 - -#include -#include - -namespace osg { - -/** - * Image Stream class. -*/ -class OSG_EXPORT ImageStream : public Image -{ - public: - ImageStream(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - ImageStream(const ImageStream& image,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new ImageStream(); } - virtual Object* clone(const CopyOp& copyop) const { return new ImageStream(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "ImageStream"; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const Image& rhs) const; - - enum StreamStatus - { - INVALID, - PLAYING, - PAUSED, - REWINDING - }; - - virtual void seek(double /*time*/) {} - - virtual void play() { _status=PLAYING; } - - virtual void pause() { _status=PAUSED; } - - virtual void rewind() { _status=REWINDING; } - - virtual void quit(bool /*waitForThreadToExit*/ = true) {} - - StreamStatus getStatus() { return _status; } - - - enum LoopingMode - { - NO_LOOPING, - LOOPING - }; - - void setLoopingMode(LoopingMode mode) - { - if (_loopingMode == mode) return; - - _loopingMode = mode; - applyLoopingMode(); - } - - LoopingMode getLoopingMode() const { return _loopingMode; } - - virtual double getCreationTime() const { return HUGE_VAL; } - virtual double getLength() const { return 0.0; } - virtual double getFrameRate() const { return 0.0; } - - virtual void setReferenceTime(double) {} - virtual double getReferenceTime() const { return 0.0; } - - virtual void setTimeMultiplier(double) {} - virtual double getTimeMultiplier() const { return 0.0; } - - virtual void setVolume(float) {} - virtual float getVolume() const { return 0.0f; } - - typedef std::vector< osg::ref_ptr > AudioStreams; - void setAudioStreams(const AudioStreams& asl) { _audioStreams = asl; } - AudioStreams& getAudioStreams() { return _audioStreams; } - const AudioStreams& getAudioStreams() const { return _audioStreams; } - - - protected: - virtual void applyLoopingMode() {} - - virtual ~ImageStream() {} - - StreamStatus _status; - LoopingMode _loopingMode; - - AudioStreams _audioStreams; -}; - -} // namespace - -#endif diff --git a/libs/lib/mac32/include/osg/ImageUtils b/libs/lib/mac32/include/osg/ImageUtils deleted file mode 100644 index bd4bd7faf..000000000 --- a/libs/lib/mac32/include/osg/ImageUtils +++ /dev/null @@ -1,160 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_IMAGEUTILS -#define OSG_IMAGEUTILS 1 - -#include - -#include - -namespace osg { - -template -void _readRow(unsigned int num, GLenum pixelFormat, const T* data,float scale, O& operation) -{ - switch(pixelFormat) - { - case(GL_LUMINANCE): { for(unsigned int i=0;i -void readRow(unsigned int num, GLenum pixelFormat, GLenum dataType, const unsigned char* data, O& operation) -{ - switch(dataType) - { - case(GL_BYTE): _readRow(num,pixelFormat, (const char*)data, 1.0f/128.0f, operation); break; - case(GL_UNSIGNED_BYTE): _readRow(num,pixelFormat, (const unsigned char*)data, 1.0f/255.0f, operation); break; - case(GL_SHORT): _readRow(num,pixelFormat, (const short*) data, 1.0f/32768.0f, operation); break; - case(GL_UNSIGNED_SHORT): _readRow(num,pixelFormat, (const unsigned short*)data, 1.0f/65535.0f, operation); break; - case(GL_INT): _readRow(num,pixelFormat, (const int*) data, 1.0f/2147483648.0f, operation); break; - case(GL_UNSIGNED_INT): _readRow(num,pixelFormat, (const unsigned int*) data, 1.0f/4294967295.0f, operation); break; - case(GL_FLOAT): _readRow(num,pixelFormat, (const float*) data, 1.0f, operation); break; - } -} - -template -void readImage(const osg::Image* image, O& operation) -{ - if (!image) return; - - for(int r=0;rr();++r) - { - for(int t=0;tt();++t) - { - readRow(image->s(), image->getPixelFormat(), image->getDataType(), image->data(0,t,r), operation); - } - } -} - -// example ModifyOperator -// struct ModifyOperator -// { -// inline void luminance(float& l) const {} -// inline void alpha(float& a) const {} -// inline void luminance_alpha(float& l,float& a) const {} -// inline void rgb(float& r,float& g,float& b) const {} -// inline void rgba(float& r,float& g,float& b,float& a) const {} -// }; - - -template -void _modifyRow(unsigned int num, GLenum pixelFormat, T* data,float scale, const M& operation) -{ - float inv_scale = 1.0f/scale; - switch(pixelFormat) - { - case(GL_LUMINANCE): { for(unsigned int i=0;i -void modifyRow(unsigned int num, GLenum pixelFormat, GLenum dataType, unsigned char* data, const M& operation) -{ - switch(dataType) - { - case(GL_BYTE): _modifyRow(num,pixelFormat, (char*)data, 1.0f/128.0f, operation); break; - case(GL_UNSIGNED_BYTE): _modifyRow(num,pixelFormat, (unsigned char*)data, 1.0f/255.0f, operation); break; - case(GL_SHORT): _modifyRow(num,pixelFormat, (short*) data, 1.0f/32768.0f, operation); break; - case(GL_UNSIGNED_SHORT): _modifyRow(num,pixelFormat, (unsigned short*)data, 1.0f/65535.0f, operation); break; - case(GL_INT): _modifyRow(num,pixelFormat, (int*) data, 1.0f/2147483648.0f, operation); break; - case(GL_UNSIGNED_INT): _modifyRow(num,pixelFormat, (unsigned int*) data, 1.0f/4294967295.0f, operation); break; - case(GL_FLOAT): _modifyRow(num,pixelFormat, (float*) data, 1.0f, operation); break; - } -} - -template -void modifyImage(osg::Image* image, const M& operation) -{ - if (!image) return; - - for(int r=0;rr();++r) - { - for(int t=0;tt();++t) - { - modifyRow(image->s(), image->getPixelFormat(), image->getDataType(), image->data(0,t,r), operation); - } - } -} - -/** Compute the min max colour values in the image.*/ -extern OSG_EXPORT bool computeMinMax(const osg::Image* image, osg::Vec4& min, osg::Vec4& max); - -/** Compute the min max colour values in the image.*/ -extern OSG_EXPORT bool offsetAndScaleImage(osg::Image* image, const osg::Vec4& offset, const osg::Vec4& scale); - -/** Compute source image to destination image.*/ -extern OSG_EXPORT bool copyImage(const osg::Image* srcImage, int src_s, int src_t, int src_r, int width, int height, int depth, - osg::Image* destImage, int dest_s, int dest_t, int dest_r, bool doRescale = false); - -/** Compute the min max colour values in the image.*/ -extern OSG_EXPORT bool clearImageToColor(osg::Image* image, const osg::Vec4& colour); - -typedef std::vector< osg::ref_ptr > ImageList; - -/** Search through the list of Images and find the maximum number of components used amoung the images.*/ -extern OSG_EXPORT unsigned int maximimNumOfComponents(const ImageList& imageList); - -/** create a 3D osg::Image from a list of osg::Image.*/ -extern OSG_EXPORT osg::Image* createImage3D(const ImageList& imageList, - GLenum desiredPixelFormat, - int s_maximumImageSize = 1024, - int t_maximumImageSize = 1024, - int r_maximumImageSize = 1024, - bool resizeToPowerOfTwo = false); - -/** create a 3D osg::Image from a list of osg::Image.*/ -extern OSG_EXPORT osg::Image* createImage3DWithAlpha(const ImageList& imageList, - int s_maximumImageSize = 1024, - int t_maximumImageSize = 1024, - int r_maximumImageSize = 1024, - bool resizeToPowerOfTwo = false); - - -} - - -#endif diff --git a/libs/lib/mac32/include/osg/KdTree b/libs/lib/mac32/include/osg/KdTree deleted file mode 100644 index 2ef9add11..000000000 --- a/libs/lib/mac32/include/osg/KdTree +++ /dev/null @@ -1,198 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_KDTREE -#define OSG_KDTREE 1 - -#include -#include - -#include - -namespace osg -{ - -/** Implementation of a kdtree for Geometry leaves, to enable fast intersection tests.*/ -class OSG_EXPORT KdTree : public osg::Shape -{ - public: - - - KdTree(); - - KdTree(const KdTree& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Shape(osg, KdTree) - - struct OSG_EXPORT BuildOptions - { - BuildOptions(); - - unsigned int _numVerticesProcessed; - unsigned int _targetNumTrianglesPerLeaf; - unsigned int _maxNumLevels; - }; - - - /** Build the kdtree from the specified source geometry object. - * retun true on success. */ - virtual bool build(BuildOptions& buildOptions, osg::Geometry* geometry); - - struct LineSegmentIntersection - { - LineSegmentIntersection(): - ratio(-1.0), - p0(0), - p1(0), - p2(0), - r0(0.0f), - r1(0.0f), - r2(0.0f), - primitiveIndex(0) {} - - bool operator < (const LineSegmentIntersection& rhs) const { return ratio < rhs.ratio; } - - typedef std::vector IndexList; - typedef std::vector RatioList; - - double ratio; - osg::Vec3d intersectionPoint; - osg::Vec3 intersectionNormal; - - unsigned int p0; - unsigned int p1; - unsigned int p2; - float r0; - float r1; - float r2; - - unsigned int primitiveIndex; - }; - - - typedef std::vector LineSegmentIntersections; - - /** compute the intersection of a line segment and the kdtree, return true if an intersection has been found.*/ - virtual bool intersect(const osg::Vec3d& start, const osg::Vec3d& end, LineSegmentIntersections& intersections) const; - - - typedef int value_type; - - struct KdNode - { - KdNode(): - first(0), - second(0) {} - - KdNode(value_type f, value_type s): - first(f), - second(s) {} - - osg::BoundingBox bb; - - value_type first; - value_type second; - }; - - struct Triangle - { - Triangle(): - p0(0),p1(0),p2(0) {} - - Triangle(unsigned int ip0, unsigned int ip1, unsigned int ip2): - p0(ip0), p1(ip1), p2(ip2) {} - - bool operator < (const Triangle& rhs) const - { - if (p0rhs.p0) return false; - if (p1rhs.p1) return false; - return p2 KdNodeList; - typedef std::vector< Triangle > TriangleList; - - int addNode(const KdNode& node) - { - int num = static_cast(_kdNodes.size()); - _kdNodes.push_back(node); - return num; - } - - KdNode& getNode(int nodeNum) { return _kdNodes[nodeNum]; } - const KdNode& getNode(int nodeNum) const { return _kdNodes[nodeNum]; } - - KdNodeList& getNodes() { return _kdNodes; } - const KdNodeList& getNodes() const { return _kdNodes; } - - void setVertices(osg::Vec3Array* vertices) { _vertices = vertices; } - const osg::Vec3Array* getVertices() const { return _vertices.get(); } - - unsigned int addTriangle(const Triangle& tri) - { - unsigned int num = static_cast(_triangles.size()); - _triangles.push_back(tri); - return num; - } - - Triangle& getTriangle(unsigned int i) { return _triangles[i]; } - const Triangle& getTriangle(unsigned int i) const { return _triangles[i]; } - - TriangleList& getTriangles() { return _triangles; } - const TriangleList& getTriangles() const { return _triangles; } - - - protected: - - osg::ref_ptr _vertices; - KdNodeList _kdNodes; - TriangleList _triangles; - -}; - -class OSG_EXPORT KdTreeBuilder : public osg::NodeVisitor -{ - public: - - KdTreeBuilder(); - - KdTreeBuilder(const KdTreeBuilder& rhs); - - META_NodeVisitor("osg","KdTreeBuilder") - - virtual KdTreeBuilder* clone() { return new KdTreeBuilder(*this); } - - void apply(osg::Geode& geode); - - KdTree::BuildOptions _buildOptions; - - osg::ref_ptr _kdTreePrototype; - - - - protected: - - virtual ~KdTreeBuilder() {} - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/LOD b/libs/lib/mac32/include/osg/LOD deleted file mode 100644 index 732de9819..000000000 --- a/libs/lib/mac32/include/osg/LOD +++ /dev/null @@ -1,140 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_LOD -#define OSG_LOD 1 - -#include - -namespace osg { - -/** LOD - Level Of Detail group node which allows switching between children - depending on distance from eye point. - Typical uses are for load balancing - objects further away from - the eye point are rendered at a lower level of detail, and at times - of high stress on the graphics pipeline lower levels of detail can - also be chosen by adjusting the viewers's Camera/CullSettings LODScale value. - Each child has a corresponding valid range consisting of a minimum - and maximum distance. Given a distance to the viewer (d), LOD displays - a child if min <= d < max. LOD may display multiple children simultaneously - if their corresponding ranges overlap. Children can be in any order, - and don't need to be sorted by range or amount of detail. If the number of - ranges (m) is less than the number of children (n), then children m+1 through - n are ignored. -*/ -class OSG_EXPORT LOD : public Group -{ - public : - - LOD(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - LOD(const LOD&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, LOD); - - typedef osg::BoundingSphere::vec_type vec_type; - typedef osg::BoundingSphere::value_type value_type; - - virtual void traverse(NodeVisitor& nv); - - virtual bool addChild(Node *child); - - virtual bool addChild(Node *child, float min, float max); - - virtual bool removeChildren(unsigned int pos,unsigned int numChildrenToRemove=1); - - typedef std::pair MinMaxPair; - typedef std::vector RangeList; - - /** Modes which control how the center of object should be determined when computing which child is active.*/ - enum CenterMode - { - USE_BOUNDING_SPHERE_CENTER, - USER_DEFINED_CENTER - }; - - /** Set how the center of object should be determined when computing which child is active.*/ - void setCenterMode(CenterMode mode) { _centerMode=mode; } - - /** Get how the center of object should be determined when computing which child is active.*/ - CenterMode getCenterMode() const { return _centerMode; } - - /** Sets the object-space point which defines the center of the osg::LOD. - center is affected by any transforms in the hierarchy above the osg::LOD.*/ - inline void setCenter(const vec_type& center) { _centerMode=USER_DEFINED_CENTER; _userDefinedCenter = center; } - - /** return the LOD center point. */ - inline const vec_type& getCenter() const { if (_centerMode==USER_DEFINED_CENTER) return _userDefinedCenter; else return getBound().center(); } - - - /** Set the object-space reference radius of the volume enclosed by the LOD. - * Used to determine the bounding sphere of the LOD in the absence of any children.*/ - inline void setRadius(value_type radius) { _radius = radius; } - - /** Get the object-space radius of the volume enclosed by the LOD.*/ - inline value_type getRadius() const { return _radius; } - - - - /** Modes that control how the range values should be interpreted when computing which child is active.*/ - enum RangeMode - { - DISTANCE_FROM_EYE_POINT, - PIXEL_SIZE_ON_SCREEN - }; - - /** Set how the range values should be interpreted when computing which child is active.*/ - void setRangeMode(RangeMode mode) { _rangeMode = mode; } - - /** Get how the range values should be interpreted when computing which child is active.*/ - RangeMode getRangeMode() const { return _rangeMode; } - - - /** Sets the min and max visible ranges of range of specific child. - Values are floating point distance specified in local objects coordinates.*/ - void setRange(unsigned int childNo, float min,float max); - - /** returns the min visible range for specified child.*/ - inline float getMinRange(unsigned int childNo) const { return _rangeList[childNo].first; } - - /** returns the max visible range for specified child.*/ - inline float getMaxRange(unsigned int childNo) const { return _rangeList[childNo].second; } - - /** returns the number of ranges currently set. - * An LOD which has been fully set up will have getNumChildren()==getNumRanges(). */ - inline unsigned int getNumRanges() const { return _rangeList.size(); } - - /** set the list of MinMax ranges for each child.*/ - inline void setRangeList(const RangeList& rangeList) { _rangeList=rangeList; } - - /** return the list of MinMax ranges for each child.*/ - inline const RangeList& getRangeList() const { return _rangeList; } - - virtual BoundingSphere computeBound() const; - - protected : - virtual ~LOD() {} - - CenterMode _centerMode; - vec_type _userDefinedCenter; - value_type _radius; - - RangeMode _rangeMode; - RangeList _rangeList; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Light b/libs/lib/mac32/include/osg/Light deleted file mode 100644 index 58e4bcf2e..000000000 --- a/libs/lib/mac32/include/osg/Light +++ /dev/null @@ -1,199 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_LIGHT -#define OSG_LIGHT 1 - -#include -#include -#include - -#ifndef GL_LIGHT0 - #define GL_LIGHT0 0x4000 - #define GL_LIGHT1 0x4001 - #define GL_LIGHT2 0x4002 - #define GL_LIGHT3 0x4003 - #define GL_LIGHT4 0x4004 - #define GL_LIGHT5 0x4005 - #define GL_LIGHT6 0x4006 - #define GL_LIGHT7 0x4007 -#endif - -#ifndef GL_LIGHTING - #define GL_LIGHTING 0x0B50 -#endif - -namespace osg { - -/** Light state class which encapsulates OpenGL glLight() functionality. */ -class OSG_EXPORT Light : public StateAttribute -{ - public : - - Light(); - - Light(unsigned int lightnum); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Light(const Light& light,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(light,copyop), - _lightnum(light._lightnum), - _ambient(light._ambient), - _diffuse(light._diffuse), - _specular(light._specular), - _position(light._position), - _direction(light._direction), - _constant_attenuation(light._constant_attenuation), - _linear_attenuation(light._linear_attenuation), - _quadratic_attenuation(light._quadratic_attenuation), - _spot_exponent(light._spot_exponent), - _spot_cutoff(light._spot_cutoff) {} - - virtual osg::Object* cloneType() const { return new Light(_lightnum); } - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new Light(*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "Light"; } - virtual Type getType() const { return LIGHT; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Light,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_lightnum) - COMPARE_StateAttribute_Parameter(_ambient) - COMPARE_StateAttribute_Parameter(_diffuse) - COMPARE_StateAttribute_Parameter(_specular) - COMPARE_StateAttribute_Parameter(_position) - COMPARE_StateAttribute_Parameter(_direction) - COMPARE_StateAttribute_Parameter(_constant_attenuation) - COMPARE_StateAttribute_Parameter(_linear_attenuation) - COMPARE_StateAttribute_Parameter(_quadratic_attenuation) - COMPARE_StateAttribute_Parameter(_spot_exponent) - COMPARE_StateAttribute_Parameter(_spot_cutoff) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual unsigned int getMember() const { return _lightnum; } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_LIGHT0+_lightnum); - return true; - } - - - - /** Set which OpenGL light to operate on. */ - void setLightNum(int num); - - /** Get which OpenGL light this osg::Light operates on. */ - int getLightNum() const { return _lightnum; } - - /** Set the ambient component of the light. */ - inline void setAmbient( const Vec4& ambient ) { _ambient = ambient; } - - /** Get the ambient component of the light. */ - inline const Vec4& getAmbient() const { return _ambient; } - - /** Set the diffuse component of the light. */ - inline void setDiffuse( const Vec4& diffuse ) { _diffuse = diffuse; } - - /** Get the diffuse component of the light. */ - inline const Vec4& getDiffuse() const { return _diffuse; } - - /** Set the specular component of the light. */ - inline void setSpecular( const Vec4& specular ) { _specular = specular; } - - /** Get the specular component of the light. */ - inline const Vec4& getSpecular() const { return _specular; } - - /** Set the position of the light. */ - inline void setPosition( const Vec4& position ) { _position = position; } - - /** Get the position of the light. */ - inline const Vec4& getPosition() const { return _position; } - - /** Set the direction of the light. */ - inline void setDirection( const Vec3& direction ) { _direction = direction; } - - /** Get the direction of the light. */ - inline const Vec3& getDirection() const { return _direction; } - - /** Set the constant attenuation of the light. */ - inline void setConstantAttenuation( float constant_attenuation ) { _constant_attenuation = constant_attenuation; } - - /** Get the constant attenuation of the light. */ - inline float getConstantAttenuation() const { return _constant_attenuation; } - - /** Set the linear attenuation of the light. */ - inline void setLinearAttenuation ( float linear_attenuation ) { _linear_attenuation = linear_attenuation; } - - /** Get the linear attenuation of the light. */ - inline float getLinearAttenuation () const { return _linear_attenuation; } - - /** Set the quadratic attenuation of the light. */ - inline void setQuadraticAttenuation ( float quadratic_attenuation ) { _quadratic_attenuation = quadratic_attenuation; } - - /** Get the quadratic attenuation of the light. */ - inline float getQuadraticAttenuation() const { return _quadratic_attenuation; } - - /** Set the spot exponent of the light. */ - inline void setSpotExponent( float spot_exponent ) { _spot_exponent = spot_exponent; } - - /** Get the spot exponent of the light. */ - inline float getSpotExponent() const { return _spot_exponent; } - - /** Set the spot cutoff of the light. */ - inline void setSpotCutoff( float spot_cutoff ) { _spot_cutoff = spot_cutoff; } - - /** Get the spot cutoff of the light. */ - inline float getSpotCutoff() const { return _spot_cutoff; } - - /** Capture the lighting settings of the current OpenGL state - * and store them in this object. - */ - void captureLightState(); - - /** Apply the light's state to the OpenGL state machine. */ - virtual void apply(State& state) const; - - protected : - - virtual ~Light(); - - /** Initialize the light's settings with some decent defaults. */ - void init(); - - int _lightnum; // OpenGL light number - - Vec4 _ambient; // r, g, b, w - Vec4 _diffuse; // r, g, b, w - Vec4 _specular; // r, g, b, w - Vec4 _position; // x, y, z, w - Vec3 _direction; // x, y, z - float _constant_attenuation; // constant - float _linear_attenuation; // linear - float _quadratic_attenuation; // quadratic - float _spot_exponent; // exponent - float _spot_cutoff; // spread -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/LightModel b/libs/lib/mac32/include/osg/LightModel deleted file mode 100644 index 310ef7301..000000000 --- a/libs/lib/mac32/include/osg/LightModel +++ /dev/null @@ -1,95 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_LIGHTMODEL -#define OSG_LIGHTMODEL 1 - -#include -#include - -namespace osg { - -class OSG_EXPORT LightModel : public StateAttribute -{ - public : - - LightModel(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - LightModel(const LightModel& lw,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(lw,copyop), - _ambient(lw._ambient), - _colorControl(lw._colorControl), - _localViewer(lw._localViewer), - _twoSided(lw._twoSided) {} - - - META_StateAttribute(osg, LightModel, LIGHTMODEL); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(LightModel,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_ambient) - COMPARE_StateAttribute_Parameter(_colorControl) - COMPARE_StateAttribute_Parameter(_localViewer) - COMPARE_StateAttribute_Parameter(_twoSided) - - return 0; // passed all the above comparison macros, must be equal. - } - - - void setAmbientIntensity(const osg::Vec4& ambient) { _ambient = ambient; } - const osg::Vec4& getAmbientIntensity() const { return _ambient; } - - - enum ColorControl - { - SEPARATE_SPECULAR_COLOR, - SINGLE_COLOR - }; - - void setColorControl(ColorControl cc) { _colorControl = cc; } - inline ColorControl getColorControl() const { return _colorControl; } - - - void setLocalViewer(bool localViewer) { _localViewer=localViewer; } - inline bool getLocalViewer() const { return _localViewer; } - - - void setTwoSided(bool twoSided) { _twoSided = twoSided; } - inline bool getTwoSided() const { return _twoSided; } - - - - virtual void apply(State& state) const; - - - protected : - - virtual ~LightModel(); - - osg::Vec4 _ambient; - ColorControl _colorControl; - bool _localViewer; - bool _twoSided; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/LightSource b/libs/lib/mac32/include/osg/LightSource deleted file mode 100644 index 166876039..000000000 --- a/libs/lib/mac32/include/osg/LightSource +++ /dev/null @@ -1,93 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_LIGHTSOURCE -#define OSG_LIGHTSOURCE 1 - -#include -#include -#include - -namespace osg { - -/** Leaf Node for defining a light in the scene. */ -class OSG_EXPORT LightSource : public Group -{ - public: - - LightSource(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - LightSource(const LightSource& ls, - const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Group(ls,copyop), - _value(ls._value), - _light(dynamic_cast(copyop(ls._light.get()))), - _referenceFrame(ls._referenceFrame) {} - - META_Node(osg, LightSource); - - enum ReferenceFrame - { - RELATIVE_RF, - ABSOLUTE_RF - }; - - /** Set the light sources's ReferenceFrame, either to be relative to its - * parent reference frame, or relative to an absolute coordinate - * frame. RELATIVE_RF is the default. - * Note: setting the ReferenceFrame to be ABSOLUTE_RF will - * also set the CullingActive flag on the light source, and hence all - * of its parents, to false, thereby disabling culling of it and - * all its parents. This is necessary to prevent inappropriate - * culling, but may impact cull times if the absolute light source is - * deep in the scene graph. It is therefore recommended to only use - * absolute light source at the top of the scene. - */ - void setReferenceFrame(ReferenceFrame rf); - - ReferenceFrame getReferenceFrame() const { return _referenceFrame; } - - /** Set the attached light. */ - void setLight(Light* light); - - /** Get the attached light. */ - inline Light* getLight() { return _light.get(); } - - /** Get the const attached light. */ - inline const Light* getLight() const { return _light.get(); } - - /** Set the GLModes on StateSet associated with the LightSource. */ - void setStateSetModes(StateSet&,StateAttribute::GLModeValue) const; - - /** Set up the local StateSet. */ - void setLocalStateSetModes(StateAttribute::GLModeValue value = StateAttribute::ON); - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - virtual BoundingSphere computeBound() const; - - protected: - - virtual ~LightSource(); - - StateAttribute::GLModeValue _value; - ref_ptr _light; - - ReferenceFrame _referenceFrame; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/LineSegment b/libs/lib/mac32/include/osg/LineSegment deleted file mode 100644 index d368cc6e5..000000000 --- a/libs/lib/mac32/include/osg/LineSegment +++ /dev/null @@ -1,101 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_LINESEGMENT -#define OSG_LINESEGMENT 1 - -#include -#include -#include - -namespace osg { - -/** LineSegment class for representing a line segment. */ -class OSG_EXPORT LineSegment : public Referenced -{ - public: - - typedef Vec3d vec_type; - typedef vec_type::value_type value_type; - - LineSegment() {}; - LineSegment(const LineSegment& seg) : Referenced(),_s(seg._s),_e(seg._e) {} - LineSegment(const vec_type& s,const vec_type& e) : _s(s),_e(e) {} - - LineSegment& operator = (const LineSegment& seg) { _s = seg._s; _e = seg._e; return *this; } - - inline void set(const vec_type& s,const vec_type& e) { _s=s; _e=e; } - - inline vec_type& start() { return _s; } - inline const vec_type& start() const { return _s; } - - inline vec_type& end() { return _e; } - inline const vec_type& end() const { return _e; } - - inline bool valid() const { return _s.valid() && _e.valid() && _s!=_e; } - - /** return true if segment intersects BoundingBox. */ - bool intersect(const BoundingBox& bb) const; - - /** return true if segment intersects BoundingBox - * and return the intersection ratios. - */ - bool intersect(const BoundingBox& bb,float& r1,float& r2) const; - - /** return true if segment intersects BoundingBox - * and return the intersection ratios. - */ - bool intersect(const BoundingBox& bb,double& r1,double& r2) const; - - /** return true if segment intersects BoundingSphere. */ - bool intersect(const BoundingSphere& bs) const; - - /** return true if segment intersects BoundingSphere and return the - * intersection ratio. - */ - bool intersect(const BoundingSphere& bs,float& r1,float& r2) const; - - /** return true if segment intersects BoundingSphere and return the - * intersection ratio. - */ - bool intersect(const BoundingSphere& bs,double& r1,double& r2) const; - - /** return true if segment intersects triangle - * and set ratio long segment. - */ - bool intersect(const Vec3f& v1,const Vec3f& v2,const Vec3f& v3,float& r); - - /** return true if segment intersects triangle - * and set ratio long segment. - */ - bool intersect(const Vec3d& v1,const Vec3d& v2,const Vec3d& v3,double& r); - - - /** post multiply a segment by matrix.*/ - inline void mult(const LineSegment& seg,const Matrix& m) { _s = seg._s*m; _e = seg._e*m; } - /** pre multiply a segment by matrix.*/ - inline void mult(const Matrix& m,const LineSegment& seg) { _s = m*seg._s; _e = m*seg._e; } - - protected: - - virtual ~LineSegment(); - - static bool intersectAndClip(vec_type& s,vec_type& e,const BoundingBox& bb); - - vec_type _s; - vec_type _e; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/LineStipple b/libs/lib/mac32/include/osg/LineStipple deleted file mode 100644 index 1179eaa5a..000000000 --- a/libs/lib/mac32/include/osg/LineStipple +++ /dev/null @@ -1,83 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_LINESTIPPLE -#define OSG_LINESTIPPLE 1 - -#include - -#ifndef GL_LINE_STIPPLE - #define GL_LINE_STIPPLE 0x0B24 -#endif - -namespace osg { - -class OSG_EXPORT LineStipple : public StateAttribute -{ - public : - - LineStipple(); - - LineStipple(GLint factor, GLushort pattern): - _factor(factor), - _pattern(pattern) {} - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - LineStipple(const LineStipple& lw,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(lw,copyop), - _factor(lw._factor), - _pattern(lw._pattern) {} - - META_StateAttribute(osg, LineStipple, LINESTIPPLE); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // check if the types are equal and then create the rhs variable. - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(LineStipple,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_factor) - COMPARE_StateAttribute_Parameter(_pattern) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_LINE_STIPPLE); - return true; - } - - void setFactor(GLint factor); - inline GLint getFactor() const { return _factor; } - - void setPattern(GLushort pattern); - inline GLushort getPattern() const { return _pattern; } - - virtual void apply(State& state) const; - - - protected : - - virtual ~LineStipple(); - - GLint _factor; - GLushort _pattern; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/LineWidth b/libs/lib/mac32/include/osg/LineWidth deleted file mode 100644 index 61dc926d8..000000000 --- a/libs/lib/mac32/include/osg/LineWidth +++ /dev/null @@ -1,64 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_LINEWIDTH -#define OSG_LINEWIDTH 1 - -#include - -namespace osg { - -/** LineWidth - encapsulates the OpenGL glLineWidth for setting the width of lines in pixels. */ -class OSG_EXPORT LineWidth : public StateAttribute -{ - public : - - LineWidth(float width=1.0f); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - LineWidth(const LineWidth& lw,const CopyOp& copyop=CopyOp::SHALLOW_COPY) : - StateAttribute(lw,copyop), - _width(lw._width) {} - - META_StateAttribute(osg, LineWidth, LINEWIDTH); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // check if the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(LineWidth,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_width) - - return 0; // passed all the above comparison macros, must be equal. - } - - void setWidth(float width); - - inline float getWidth() const { return _width; } - - virtual void apply(State& state) const; - - protected : - - virtual ~LineWidth(); - - float _width; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/LogicOp b/libs/lib/mac32/include/osg/LogicOp deleted file mode 100644 index 37677db9e..000000000 --- a/libs/lib/mac32/include/osg/LogicOp +++ /dev/null @@ -1,113 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_LOGICOP -#define OSG_LOGICOP 1 - -#include - -#ifndef OSG_GL_FIXED_FUNCTION_AVAILABLE - #define GL_CLEAR 0x1500 - #define GL_SET 0x150F - #define GL_COPY 0x1503 - #define GL_COPY_INVERTED 0x150C - #define GL_NOOP 0x1505 - #define GL_AND 0x1501 - #define GL_NAND 0x150E - #define GL_OR 0x1507 - #define GL_NOR 0x1508 - #define GL_XOR 0x1506 - #define GL_EQUIV 0x1509 - #define GL_AND_REVERSE 0x1502 - #define GL_AND_INVERTED 0x1504 - #define GL_OR_REVERSE 0x150B - #define GL_OR_INVERTED 0x150D - #define GL_COLOR_LOGIC_OP 0x0BF2 -#endif - -namespace osg { - -/** Encapsulates OpenGL LogicOp state. */ -class OSG_EXPORT LogicOp : public StateAttribute -{ - public : - - enum Opcode { - CLEAR = GL_CLEAR, - SET = GL_SET, - COPY = GL_COPY, - COPY_INVERTED = GL_COPY_INVERTED, - NOOP = GL_NOOP, - INVERT = GL_INVERT, - AND = GL_AND, - NAND = GL_NAND, - OR = GL_OR, - NOR = GL_NOR, - XOR = GL_XOR, - EQUIV = GL_EQUIV, - AND_REVERSE = GL_AND_REVERSE, - AND_INVERTED = GL_AND_INVERTED, - OR_REVERSE = GL_OR_REVERSE, - OR_INVERTED = GL_OR_INVERTED - }; - - LogicOp(); - - LogicOp(Opcode opcode); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - LogicOp(const LogicOp& trans,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(trans,copyop), - _opcode(trans._opcode){} - - META_StateAttribute(osg, LogicOp,LOGICOP); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(LogicOp,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_opcode) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_COLOR_LOGIC_OP); - return true; - } - - - inline void setOpcode(Opcode opcode) - { - _opcode = opcode; - } - - inline Opcode getOpcode() const { return _opcode; } - - virtual void apply(State& state) const; - - protected : - - virtual ~LogicOp(); - - Opcode _opcode; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Material b/libs/lib/mac32/include/osg/Material deleted file mode 100644 index 6a2f41a0e..000000000 --- a/libs/lib/mac32/include/osg/Material +++ /dev/null @@ -1,205 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_MATERIAL -#define OSG_MATERIAL 1 - -#include -#include - -#ifndef OSG_GL_FIXED_FUNCTION_AVAILABLE - #define GL_AMBIENT 0x1200 - #define GL_DIFFUSE 0x1201 - #define GL_SPECULAR 0x1202 - #define GL_EMISSION 0x1600 - #define GL_AMBIENT_AND_DIFFUSE 0x1602 - #define GL_COLOR_MATERIAL 0x0B57 -#endif - -namespace osg { -/** Material - encapsulates OpenGL glMaterial state.*/ -class OSG_EXPORT Material : public StateAttribute -{ - public : - - Material(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Material(const Material& mat,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(mat,copyop), - _colorMode(mat._colorMode), - _ambientFrontAndBack(mat._ambientFrontAndBack), - _ambientFront(mat._ambientFront), - _ambientBack(mat._ambientBack), - _diffuseFrontAndBack(mat._diffuseFrontAndBack), - _diffuseFront(mat._diffuseFront), - _diffuseBack(mat._diffuseBack), - _specularFrontAndBack(mat._specularFrontAndBack), - _specularFront(mat._specularFront), - _specularBack(mat._specularBack), - _emissionFrontAndBack(mat._emissionFrontAndBack), - _emissionFront(mat._emissionFront), - _emissionBack(mat._emissionBack), - _shininessFrontAndBack(mat._shininessFrontAndBack), - _shininessFront(mat._shininessFront), - _shininessBack(mat._shininessBack) {} - - META_StateAttribute(osg, Material, MATERIAL); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Material,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_colorMode) - COMPARE_StateAttribute_Parameter(_ambientFrontAndBack) - COMPARE_StateAttribute_Parameter(_ambientFront) - COMPARE_StateAttribute_Parameter(_ambientBack) - COMPARE_StateAttribute_Parameter(_diffuseFrontAndBack) - COMPARE_StateAttribute_Parameter(_diffuseFront) - COMPARE_StateAttribute_Parameter(_diffuseBack) - COMPARE_StateAttribute_Parameter(_specularFrontAndBack) - COMPARE_StateAttribute_Parameter(_specularFront) - COMPARE_StateAttribute_Parameter(_specularBack) - COMPARE_StateAttribute_Parameter(_emissionFrontAndBack) - COMPARE_StateAttribute_Parameter(_emissionFront) - COMPARE_StateAttribute_Parameter(_emissionBack) - COMPARE_StateAttribute_Parameter(_shininessFrontAndBack) - COMPARE_StateAttribute_Parameter(_shininessFront) - COMPARE_StateAttribute_Parameter(_shininessBack) - - return 0; // passed all the above comparison macros, must be equal. - } - - Material& operator = (const Material& rhs); - - virtual bool getModeUsage(StateAttribute::ModeUsage& /*usage*/) const - { - // note, since Material does it's own glEnable/glDisable of GL_COLOR_MATERIAL - // we shouldn't declare usage of that mode, so commenting out the below usage. - // usage.usesMode(GL_COLOR_MATERIAL); - return true; - } - - virtual void apply(State& state) const; - - enum Face { - FRONT = GL_FRONT, - BACK = GL_BACK, - FRONT_AND_BACK = GL_FRONT_AND_BACK - }; - - enum ColorMode { - AMBIENT = GL_AMBIENT, - DIFFUSE = GL_DIFFUSE, - SPECULAR = GL_SPECULAR, - EMISSION = GL_EMISSION, - AMBIENT_AND_DIFFUSE = GL_AMBIENT_AND_DIFFUSE, - OFF - }; - - inline void setColorMode(ColorMode mode) { _colorMode = mode; } - inline ColorMode getColorMode() const { return _colorMode; } - - void setAmbient( Face face, const Vec4& ambient ); - const Vec4& getAmbient(Face face) const; - inline bool getAmbientFrontAndBack() const { return _ambientFrontAndBack; } - - void setDiffuse( Face face, const Vec4& diffuse ); - const Vec4& getDiffuse(Face face) const; - inline bool getDiffuseFrontAndBack() const { return _diffuseFrontAndBack; } - - /** Set specular value of specified face(s) of the material, - * valid specular[0..3] range is 0.0 to 1.0. - */ - void setSpecular( Face face, const Vec4& specular ); - - /** Get the specular value for specified face. */ - const Vec4& getSpecular(Face face) const; - - /** Return whether specular values are equal for front and back faces - * or not. - */ - inline bool getSpecularFrontAndBack() const { return _specularFrontAndBack; } - - /** Set emission value of specified face(s) of the material, - * valid emission[0..3] range is 0.0 to 1.0. - */ - void setEmission( Face face, const Vec4& emission ); - - /** Get the emission value for specified face. */ - const Vec4& getEmission(Face face) const; - - /** Return whether emission values are equal for front and back faces - * or not. - */ - inline bool getEmissionFrontAndBack() const { return _emissionFrontAndBack; } - - /** Set shininess of specified face(s) of the material. - * valid shininess range is 0.0 to 128.0. - */ - void setShininess(Face face, float shininess ); - - /** Get the shininess value for specified face. */ - float getShininess(Face face) const; - - /** Return whether shininess values are equal for front and back faces - * or not. - */ - inline bool getShininessFrontAndBack() const { return _shininessFrontAndBack; } - - /** Set the alpha value of ambient, diffuse, specular and emission - * colors of specified face, to 1-transparency. - * Valid transparency range is 0.0 to 1.0. - */ - void setTransparency(Face face,float trans); - - /** Set the alpha value of ambient, diffuse, specular and emission - * colors. Valid transparency range is 0.0 to 1.0. - */ - void setAlpha(Face face,float alpha); - - protected : - - virtual ~Material(); - - ColorMode _colorMode; - - bool _ambientFrontAndBack; - Vec4 _ambientFront; // r, g, b, w - Vec4 _ambientBack; // r, g, b, w - - bool _diffuseFrontAndBack; - Vec4 _diffuseFront; // r, g, b, w - Vec4 _diffuseBack; // r, g, b, w - - bool _specularFrontAndBack; - Vec4 _specularFront; // r, g, b, w - Vec4 _specularBack; // r, g, b, w - - bool _emissionFrontAndBack; - Vec4 _emissionFront; // r, g, b, w - Vec4 _emissionBack; // r, g, b, w - - bool _shininessFrontAndBack; - float _shininessFront; // values 0 - 128.0 - float _shininessBack; // values 0 - 128.0 - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Math b/libs/lib/mac32/include/osg/Math deleted file mode 100644 index 4b8bb8196..000000000 --- a/libs/lib/mac32/include/osg/Math +++ /dev/null @@ -1,254 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef __OSG_MATH -#define __OSG_MATH - -#include - -#include - -//certain math functions were not defined until 10.2 -//so this code checks the version so it can add in workarounds for older versions. -#ifdef __APPLE__ -// Using std::isnan will work for OS X, but use of -// and std:: are not necessarily portible with other systems so -// the include of is isolated here. -#include -#include -#if !defined(MAC_OS_X_VERSION_10_2) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2) - // One extra check to verify the gcc version. - // The assumption is that there is no possible way to use gcc 4+ - // on anything less than 10.3.9. So if gcc 4 is in use, this means - // pre-10.2 support is not intended and we need not define APPLE_PRE_10_2. - // The reason for this extra check is that if the user relies on default - // settings, MAC_OS_X_VERSION_MIN_REQUIRED will be set to 1010 and hit - // this code path, but this is probably not what they want if using gcc 4+. - #if (__GNUC__ < 4) - #define APPLE_PRE_10_2 - #endif -#endif -#endif - -#if defined(_MSC_VER) - #include -#endif - -#if defined (sun) || \ - defined (__APPLE__) || \ - (defined (_AIX) && defined (__GNUC__)) - - #include - - #ifndef acosf - inline float acosf(float value) { return static_cast(acos(value)); } - #endif - - #ifndef asinf - inline float asinf(float value) { return static_cast(asin(value)); } - #endif - - #ifndef cosf - inline float cosf(float value) { return static_cast(cos(value)); } - #endif - - #ifndef sinf - inline float sinf(float value) { return static_cast(sin(value)); } - #endif - - #ifndef logf - inline float logf(float value) { return static_cast(log(value)); } - #endif - - #ifndef powf - inline float powf(float value1,float value2) { return static_cast(pow(value1,value2)); } - #endif - - #ifndef sqrtf - inline float sqrtf(float value) { return static_cast(sqrt(value)); } - #endif - - #ifndef fabsf - inline float fabsf(float value) { return static_cast(fabs(value)); } - #endif - - #ifndef atan2f - inline float atan2f(float value1, float value2) { return static_cast(atan2(value1,value2)); } - #endif - - #ifndef fmodf - inline float fmodf(float value1, float value2) { return static_cast(fmod(value1,value2)); } - #endif - - #ifndef tanf - inline float tanf(float value) { return static_cast(tan(value)); } - #endif - -#endif - - -#if defined (sun) || \ - defined (__hpux) || \ - defined (APPLE_PRE_10_2) || \ - (defined (_AIX) && defined (__GNUC__)) - - #ifndef floorf - inline float floorf(float value) { return static_cast(floor(value)); } - #endif - - #ifndef ceilf - inline float ceilf(float value) { return static_cast(ceil(value)); } - #endif - -#endif - -namespace osg { - -// define the standard trig values -#ifdef PI -#undef PI -#undef PI_2 -#undef PI_4 -#endif -const double PI = 3.14159265358979323846; -const double PI_2 = 1.57079632679489661923; -const double PI_4 = 0.78539816339744830962; -const double LN_2 = 0.69314718055994530942; -const double INVLN_2 = 1.0 / LN_2; - - -/** return the minimum of two values, equivalent to std::min. - * std::min not used because of STL implementation under IRIX not - * containing std::min. -*/ -template -inline T absolute(T v) { return v<(T)0?-v:v; } - -/** return true if float lhs and rhs are equivalent, - * meaning that the difference between them is less than an epsilon value - * which defaults to 1e-6. -*/ -inline bool equivalent(float lhs,float rhs,float epsilon=1e-6) - { float delta = rhs-lhs; return delta<0.0f?delta>=-epsilon:delta<=epsilon; } - -/** return true if double lhs and rhs are equivalent, - * meaning that the difference between them is less than an epsilon value - * which defaults to 1e-6. -*/ -inline bool equivalent(double lhs,double rhs,double epsilon=1e-6) - { double delta = rhs-lhs; return delta<0.0?delta>=-epsilon:delta<=epsilon; } - -/** return the minimum of two values, equivalent to std::min. - * std::min not used because of STL implementation under IRIX not containing - * std::min. -*/ -template -inline T minimum(T lhs,T rhs) { return lhs -inline T maximum(T lhs,T rhs) { return lhs>rhs?lhs:rhs; } - -template -inline T clampTo(T v,T minimum,T maximum) - { return vmaximum?maximum:v; } - -template -inline T clampAbove(T v,T minimum) { return v -inline T clampBelow(T v,T maximum) { return v>maximum?maximum:v; } - -template -inline T clampBetween(T v,T minimum, T maximum) - { return clampBelow(clampAbove(v,minimum),maximum); } - -template -inline T sign(T v) { return v<(T)0?(T)-1:(T)1; } - -template -inline T signOrZero(T v) { return v<(T)0 ? (T)-1 : ( v>(T)0 ? (T)1 : 0 ); } - -template -inline T square(T v) { return v*v; } - -template -inline T signedSquare(T v) { return v<(T)0?-v*v:v*v;; } - -inline float inDegrees(float angle) { return angle*(float)PI/180.0f; } -inline double inDegrees(double angle) { return angle*PI/180.0; } - -template -inline T inRadians(T angle) { return angle; } - -inline float DegreesToRadians(float angle) { return angle*(float)PI/180.0f; } -inline double DegreesToRadians(double angle) { return angle*PI/180.0; } - -inline float RadiansToDegrees(float angle) { return angle*180.0f/(float)PI; } -inline double RadiansToDegrees(double angle) { return angle*180.0/PI; } - -inline float round(float v) { return v>=0.0f?floorf(v+0.5f):ceilf(v-0.5f); } -inline double round(double v) { return v>=0.0?floor(v+0.5):ceil(v-0.5); } - -#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MWERKS__) - inline bool isNaN(float v) { return _isnan(v)!=0; } - inline bool isNaN(double v) { return _isnan(v)!=0; } -#else - #if defined(__APPLE__) - inline bool isNaN(float v) { return (std::fpclassify(v) == (int)FP_NAN); } - inline bool isNaN(double v) { return (std::fpclassify(v) == (int)FP_NAN); } - #else - // Need to use to std::isnan to avoid undef problem from - inline bool isNaN(float v) { return isnan(v); } - inline bool isNaN(double v) { return isnan(v); } - #endif -#endif - - -/** compute the volume of a tetrahedron. */ -template -inline float computeVolume(const T& a,const T& b,const T& c,const T& d) -{ - return fabsf(((b-c)^(a-b))*(d-b)); -} - -/** compute the volume of a prism. */ -template -inline float computeVolume(const T& f1,const T& f2,const T& f3, - const T& b1,const T& b2,const T& b3) -{ - return computeVolume(f1,f2,f3,b1)+ - computeVolume(b1,b2,b3,f2)+ - computeVolume(b1,b3,f2,f3); -} - -/** Convert a ascii number to a double, ignoring locale settings.*/ -extern OSG_EXPORT double asciiToDouble(const char* str); - -/** Convert a ascii number to a float, ignoring locale settings.*/ -inline float asciiToFloat(const char* str) { return static_cast(asciiToDouble(str)); } - -/** Detect first ascii POSITIVE number in string and convert to double.*/ -extern OSG_EXPORT double findAsciiToDouble(const char* str); - -/** Detect first ascii POSITIVE number in string and convert to double.*/ -inline float findAsciiToFloat(const char* str) { return static_cast(findAsciiToDouble(str)); } - -} - - -#endif // __OSG_MATH - diff --git a/libs/lib/mac32/include/osg/Matrix b/libs/lib/mac32/include/osg/Matrix deleted file mode 100644 index 0e6d93acd..000000000 --- a/libs/lib/mac32/include/osg/Matrix +++ /dev/null @@ -1,34 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_MATRIX -#define OSG_MATRIX 1 - -#include -#include -#include - -namespace osg { - -#ifdef OSG_USE_FLOAT_MATRIX - typedef Matrixf Matrix; - typedef RefMatrixf RefMatrix; -#else - typedef Matrixd Matrix; - typedef RefMatrixd RefMatrix; -#endif - -} //namespace osg - - -#endif diff --git a/libs/lib/mac32/include/osg/MatrixTransform b/libs/lib/mac32/include/osg/MatrixTransform deleted file mode 100644 index f63f9e440..000000000 --- a/libs/lib/mac32/include/osg/MatrixTransform +++ /dev/null @@ -1,84 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_MATRIXTRANSFORM -#define OSG_MATRIXTRANSFORM 1 - -#include - -namespace osg { - -/** MatrixTransform - is a subclass of Transform which has an osg::Matrix - * which represents a 4x4 transformation of its children from local coordinates - * into the Transform's parent coordinates. -*/ -class OSG_EXPORT MatrixTransform : public Transform -{ - public : - - - MatrixTransform(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - MatrixTransform(const MatrixTransform&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - MatrixTransform(const Matrix& matix); - - META_Node(osg, MatrixTransform); - - virtual MatrixTransform* asMatrixTransform() { return this; } - virtual const MatrixTransform* asMatrixTransform() const { return this; } - - - /** Set the transform's matrix.*/ - void setMatrix(const Matrix& mat) { _matrix = mat; _inverseDirty=true; dirtyBound(); } - - /** Get the matrix. */ - inline const Matrix& getMatrix() const { return _matrix; } - - /** pre multiply the transform's matrix.*/ - void preMult(const Matrix& mat) { _matrix.preMult(mat); _inverseDirty=true; dirtyBound(); } - - /** post multiply the transform's matrix.*/ - void postMult(const Matrix& mat) { _matrix.postMult(mat); _inverseDirty=true; dirtyBound(); } - - /** Get the inverse matrix. */ - inline const Matrix& getInverseMatrix() const - { - if (_inverseDirty) - { - _inverse.invert(_matrix); - _inverseDirty = false; - } - return _inverse; - } - - virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const; - - virtual bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const; - - - protected : - - virtual ~MatrixTransform(); - - Matrix _matrix; - mutable Matrix _inverse; - mutable bool _inverseDirty; - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Matrixd b/libs/lib/mac32/include/osg/Matrixd deleted file mode 100644 index eb671c52d..000000000 --- a/libs/lib/mac32/include/osg/Matrixd +++ /dev/null @@ -1,815 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_MATRIXD -#define OSG_MATRIXD 1 - -#include -#include -#include -#include - -namespace osg { - -class Matrixf; - -class OSG_EXPORT Matrixd -{ - public: - - typedef double value_type; - - inline Matrixd() { makeIdentity(); } - inline Matrixd( const Matrixd& mat) { set(mat.ptr()); } - Matrixd( const Matrixf& mat ); - inline explicit Matrixd( float const * const ptr ) { set(ptr); } - inline explicit Matrixd( double const * const ptr ) { set(ptr); } - inline explicit Matrixd( const Quat& quat ) { makeRotate(quat); } - - Matrixd(value_type a00, value_type a01, value_type a02, value_type a03, - value_type a10, value_type a11, value_type a12, value_type a13, - value_type a20, value_type a21, value_type a22, value_type a23, - value_type a30, value_type a31, value_type a32, value_type a33); - - ~Matrixd() {} - - int compare(const Matrixd& m) const; - - bool operator < (const Matrixd& m) const { return compare(m)<0; } - bool operator == (const Matrixd& m) const { return compare(m)==0; } - bool operator != (const Matrixd& m) const { return compare(m)!=0; } - - inline value_type& operator()(int row, int col) { return _mat[row][col]; } - inline value_type operator()(int row, int col) const { return _mat[row][col]; } - - inline bool valid() const { return !isNaN(); } - inline bool isNaN() const { return osg::isNaN(_mat[0][0]) || osg::isNaN(_mat[0][1]) || osg::isNaN(_mat[0][2]) || osg::isNaN(_mat[0][3]) || - osg::isNaN(_mat[1][0]) || osg::isNaN(_mat[1][1]) || osg::isNaN(_mat[1][2]) || osg::isNaN(_mat[1][3]) || - osg::isNaN(_mat[2][0]) || osg::isNaN(_mat[2][1]) || osg::isNaN(_mat[2][2]) || osg::isNaN(_mat[2][3]) || - osg::isNaN(_mat[3][0]) || osg::isNaN(_mat[3][1]) || osg::isNaN(_mat[3][2]) || osg::isNaN(_mat[3][3]); } - - inline Matrixd& operator = (const Matrixd& rhs) - { - if( &rhs == this ) return *this; - set(rhs.ptr()); - return *this; - } - - Matrixd& operator = (const Matrixf& other); - - inline void set(const Matrixd& rhs) { set(rhs.ptr()); } - - void set(const Matrixf& rhs); - - inline void set(float const * const ptr) - { - value_type* local_ptr = (value_type*)_mat; - for(int i=0;i<16;++i) local_ptr[i]=(value_type)ptr[i]; - } - - inline void set(double const * const ptr) - { - value_type* local_ptr = (value_type*)_mat; - for(int i=0;i<16;++i) local_ptr[i]=(value_type)ptr[i]; - } - - void set(value_type a00, value_type a01, value_type a02,value_type a03, - value_type a10, value_type a11, value_type a12,value_type a13, - value_type a20, value_type a21, value_type a22,value_type a23, - value_type a30, value_type a31, value_type a32,value_type a33); - - value_type * ptr() { return (value_type*)_mat; } - const value_type * ptr() const { return (const value_type *)_mat; } - - bool isIdentity() const - { - return _mat[0][0]==1.0 && _mat[0][1]==0.0 && _mat[0][2]==0.0 && _mat[0][3]==0.0 && - _mat[1][0]==0.0 && _mat[1][1]==1.0 && _mat[1][2]==0.0 && _mat[1][3]==0.0 && - _mat[2][0]==0.0 && _mat[2][1]==0.0 && _mat[2][2]==1.0 && _mat[2][3]==0.0 && - _mat[3][0]==0.0 && _mat[3][1]==0.0 && _mat[3][2]==0.0 && _mat[3][3]==1.0; - } - - void makeIdentity(); - - void makeScale( const Vec3f& ); - void makeScale( const Vec3d& ); - void makeScale( value_type, value_type, value_type ); - - void makeTranslate( const Vec3f& ); - void makeTranslate( const Vec3d& ); - void makeTranslate( value_type, value_type, value_type ); - - void makeRotate( const Vec3f& from, const Vec3f& to ); - void makeRotate( const Vec3d& from, const Vec3d& to ); - void makeRotate( value_type angle, const Vec3f& axis ); - void makeRotate( value_type angle, const Vec3d& axis ); - void makeRotate( value_type angle, value_type x, value_type y, value_type z ); - void makeRotate( const Quat& ); - void makeRotate( value_type angle1, const Vec3f& axis1, - value_type angle2, const Vec3f& axis2, - value_type angle3, const Vec3f& axis3); - void makeRotate( value_type angle1, const Vec3d& axis1, - value_type angle2, const Vec3d& axis2, - value_type angle3, const Vec3d& axis3); - - - /** decompose the matrix into translation, rotation, scale and scale orientation.*/ - void decompose( osg::Vec3f& translation, - osg::Quat& rotation, - osg::Vec3f& scale, - osg::Quat& so ) const; - - /** decompose the matrix into translation, rotation, scale and scale orientation.*/ - void decompose( osg::Vec3d& translation, - osg::Quat& rotation, - osg::Vec3d& scale, - osg::Quat& so ) const; - - - /** Set to an orthographic projection. - * See glOrtho for further details. - */ - void makeOrtho(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Get the orthographic settings of the orthographic projection matrix. - * Note, if matrix is not an orthographic matrix then invalid values - * will be returned. - */ - bool getOrtho(double& left, double& right, - double& bottom, double& top, - double& zNear, double& zFar) const; - - /** Set to a 2D orthographic projection. - * See glOrtho2D for further details. - */ - inline void makeOrtho2D(double left, double right, - double bottom, double top) - { - makeOrtho(left,right,bottom,top,-1.0,1.0); - } - - - /** Set to a perspective projection. - * See glFrustum for further details. - */ - void makeFrustum(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Get the frustum settings of a perspective projection matrix. - * Note, if matrix is not a perspective matrix then invalid values - * will be returned. - */ - bool getFrustum(double& left, double& right, - double& bottom, double& top, - double& zNear, double& zFar) const; - - /** Set to a symmetrical perspective projection. - * See gluPerspective for further details. - * Aspect ratio is defined as width/height. - */ - void makePerspective(double fovy, double aspectRatio, - double zNear, double zFar); - - /** Get the frustum settings of a symmetric perspective projection - * matrix. - * Return false if matrix is not a perspective matrix, - * where parameter values are undefined. - * Note, if matrix is not a symmetric perspective matrix then the - * shear will be lost. - * Asymmetric matrices occur when stereo, power walls, caves and - * reality center display are used. - * In these configuration one should use the AsFrustum method instead. - */ - bool getPerspective(double& fovy, double& aspectRatio, - double& zNear, double& zFar) const; - - /** Set the position and orientation to be a view matrix, - * using the same convention as gluLookAt. - */ - void makeLookAt(const Vec3d& eye,const Vec3d& center,const Vec3d& up); - - /** Get to the position and orientation of a modelview matrix, - * using the same convention as gluLookAt. - */ - void getLookAt(Vec3f& eye,Vec3f& center,Vec3f& up, - value_type lookDistance=1.0f) const; - - /** Get to the position and orientation of a modelview matrix, - * using the same convention as gluLookAt. - */ - void getLookAt(Vec3d& eye,Vec3d& center,Vec3d& up, - value_type lookDistance=1.0f) const; - - /** invert the matrix rhs, automatically select invert_4x3 or invert_4x4. */ - inline bool invert( const Matrixd& rhs) - { - bool is_4x3 = (rhs._mat[0][3]==0.0 && rhs._mat[1][3]==0.0 && rhs._mat[2][3]==0.0 && rhs._mat[3][3]==1.0); - return is_4x3 ? invert_4x3(rhs) : invert_4x4(rhs); - } - - /** 4x3 matrix invert, not right hand column is assumed to be 0,0,0,1. */ - bool invert_4x3( const Matrixd& rhs); - - /** full 4x4 matrix invert. */ - bool invert_4x4( const Matrixd& rhs); - - /** ortho-normalize the 3x3 rotation & scale matrix */ - void orthoNormalize(const Matrixd& rhs); - - // basic utility functions to create new matrices - inline static Matrixd identity( void ); - inline static Matrixd scale( const Vec3f& sv); - inline static Matrixd scale( const Vec3d& sv); - inline static Matrixd scale( value_type sx, value_type sy, value_type sz); - inline static Matrixd translate( const Vec3f& dv); - inline static Matrixd translate( const Vec3d& dv); - inline static Matrixd translate( value_type x, value_type y, value_type z); - inline static Matrixd rotate( const Vec3f& from, const Vec3f& to); - inline static Matrixd rotate( const Vec3d& from, const Vec3d& to); - inline static Matrixd rotate( value_type angle, value_type x, value_type y, value_type z); - inline static Matrixd rotate( value_type angle, const Vec3f& axis); - inline static Matrixd rotate( value_type angle, const Vec3d& axis); - inline static Matrixd rotate( value_type angle1, const Vec3f& axis1, - value_type angle2, const Vec3f& axis2, - value_type angle3, const Vec3f& axis3); - inline static Matrixd rotate( value_type angle1, const Vec3d& axis1, - value_type angle2, const Vec3d& axis2, - value_type angle3, const Vec3d& axis3); - inline static Matrixd rotate( const Quat& quat); - inline static Matrixd inverse( const Matrixd& matrix); - inline static Matrixd orthoNormal(const Matrixd& matrix); - /** Create an orthographic projection matrix. - * See glOrtho for further details. - */ - inline static Matrixd ortho(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Create a 2D orthographic projection. - * See glOrtho for further details. - */ - inline static Matrixd ortho2D(double left, double right, - double bottom, double top); - - /** Create a perspective projection. - * See glFrustum for further details. - */ - inline static Matrixd frustum(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Create a symmetrical perspective projection. - * See gluPerspective for further details. - * Aspect ratio is defined as width/height. - */ - inline static Matrixd perspective(double fovy, double aspectRatio, - double zNear, double zFar); - - /** Create the position and orientation as per a camera, - * using the same convention as gluLookAt. - */ - inline static Matrixd lookAt(const Vec3f& eye, - const Vec3f& center, - const Vec3f& up); - - /** Create the position and orientation as per a camera, - * using the same convention as gluLookAt. - */ - inline static Matrixd lookAt(const Vec3d& eye, - const Vec3d& center, - const Vec3d& up); - - inline Vec3f preMult( const Vec3f& v ) const; - inline Vec3d preMult( const Vec3d& v ) const; - inline Vec3f postMult( const Vec3f& v ) const; - inline Vec3d postMult( const Vec3d& v ) const; - inline Vec3f operator* ( const Vec3f& v ) const; - inline Vec3d operator* ( const Vec3d& v ) const; - inline Vec4f preMult( const Vec4f& v ) const; - inline Vec4d preMult( const Vec4d& v ) const; - inline Vec4f postMult( const Vec4f& v ) const; - inline Vec4d postMult( const Vec4d& v ) const; - inline Vec4f operator* ( const Vec4f& v ) const; - inline Vec4d operator* ( const Vec4d& v ) const; - -#ifdef USE_DEPRECATED_API - inline void set(const Quat& q) { makeRotate(q); } - inline void get(Quat& q) const { q = getRotate(); } -#endif - - void setRotate(const Quat& q); - /** Get the matrix rotation as a Quat. Note that this function - * assumes a non-scaled matrix and will return incorrect results - * for scaled matrixces. Consider decompose() instead. - */ - Quat getRotate() const; - - void setTrans( value_type tx, value_type ty, value_type tz ); - void setTrans( const Vec3f& v ); - void setTrans( const Vec3d& v ); - - inline Vec3d getTrans() const { return Vec3d(_mat[3][0],_mat[3][1],_mat[3][2]); } - - inline Vec3d getScale() const { - Vec3d x_vec(_mat[0][0],_mat[1][0],_mat[2][0]); - Vec3d y_vec(_mat[0][1],_mat[1][1],_mat[2][1]); - Vec3d z_vec(_mat[0][2],_mat[1][2],_mat[2][2]); - return Vec3d(x_vec.length(), y_vec.length(), z_vec.length()); - } - - /** apply a 3x3 transform of v*M[0..2,0..2]. */ - inline static Vec3f transform3x3(const Vec3f& v,const Matrixd& m); - - /** apply a 3x3 transform of v*M[0..2,0..2]. */ - inline static Vec3d transform3x3(const Vec3d& v,const Matrixd& m); - - /** apply a 3x3 transform of M[0..2,0..2]*v. */ - inline static Vec3f transform3x3(const Matrixd& m,const Vec3f& v); - - /** apply a 3x3 transform of M[0..2,0..2]*v. */ - inline static Vec3d transform3x3(const Matrixd& m,const Vec3d& v); - - // basic Matrixd multiplication, our workhorse methods. - void mult( const Matrixd&, const Matrixd& ); - void preMult( const Matrixd& ); - void postMult( const Matrixd& ); - - /** Optimized version of preMult(translate(v)); */ - inline void preMultTranslate( const Vec3d& v ); - inline void preMultTranslate( const Vec3f& v ); - /** Optimized version of postMult(translate(v)); */ - inline void postMultTranslate( const Vec3d& v ); - inline void postMultTranslate( const Vec3f& v ); - - /** Optimized version of preMult(scale(v)); */ - inline void preMultScale( const Vec3d& v ); - inline void preMultScale( const Vec3f& v ); - /** Optimized version of postMult(scale(v)); */ - inline void postMultScale( const Vec3d& v ); - inline void postMultScale( const Vec3f& v ); - - /** Optimized version of preMult(rotate(q)); */ - inline void preMultRotate( const Quat& q ); - /** Optimized version of postMult(rotate(q)); */ - inline void postMultRotate( const Quat& q ); - - inline void operator *= ( const Matrixd& other ) - { if( this == &other ) { - Matrixd temp(other); - postMult( temp ); - } - else postMult( other ); - } - - inline Matrixd operator * ( const Matrixd &m ) const - { - osg::Matrixd r; - r.mult(*this,m); - return r; - } - - protected: - value_type _mat[4][4]; - -}; - -class RefMatrixd : public Object, public Matrixd -{ - public: - - RefMatrixd():Object(false), Matrixd() {} - RefMatrixd( const Matrixd& other) : Object(false), Matrixd(other) {} - RefMatrixd( const Matrixf& other) : Object(false), Matrixd(other) {} - RefMatrixd( const RefMatrixd& other) : Object(other), Matrixd(other) {} - explicit RefMatrixd( Matrixd::value_type const * const def ):Object(false), Matrixd(def) {} - RefMatrixd( Matrixd::value_type a00, Matrixd::value_type a01, Matrixd::value_type a02, Matrixd::value_type a03, - Matrixd::value_type a10, Matrixd::value_type a11, Matrixd::value_type a12, Matrixd::value_type a13, - Matrixd::value_type a20, Matrixd::value_type a21, Matrixd::value_type a22, Matrixd::value_type a23, - Matrixd::value_type a30, Matrixd::value_type a31, Matrixd::value_type a32, Matrixd::value_type a33): - Object(false), - Matrixd(a00, a01, a02, a03, - a10, a11, a12, a13, - a20, a21, a22, a23, - a30, a31, a32, a33) {} - - virtual Object* cloneType() const { return new RefMatrixd(); } - virtual Object* clone(const CopyOp&) const { return new RefMatrixd(*this); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "Matrix"; } - - - protected: - - virtual ~RefMatrixd() {} -}; - - -// static utility methods -inline Matrixd Matrixd::identity(void) -{ - Matrixd m; - m.makeIdentity(); - return m; -} - -inline Matrixd Matrixd::scale(value_type sx, value_type sy, value_type sz) -{ - Matrixd m; - m.makeScale(sx,sy,sz); - return m; -} - -inline Matrixd Matrixd::scale(const Vec3f& v ) -{ - return scale(v.x(), v.y(), v.z() ); -} - -inline Matrixd Matrixd::scale(const Vec3d& v ) -{ - return scale(v.x(), v.y(), v.z() ); -} - -inline Matrixd Matrixd::translate(value_type tx, value_type ty, value_type tz) -{ - Matrixd m; - m.makeTranslate(tx,ty,tz); - return m; -} - -inline Matrixd Matrixd::translate(const Vec3f& v ) -{ - return translate(v.x(), v.y(), v.z() ); -} - -inline Matrixd Matrixd::translate(const Vec3d& v ) -{ - return translate(v.x(), v.y(), v.z() ); -} - -inline Matrixd Matrixd::rotate( const Quat& q ) -{ - return Matrixd(q); -} -inline Matrixd Matrixd::rotate(value_type angle, value_type x, value_type y, value_type z ) -{ - Matrixd m; - m.makeRotate(angle,x,y,z); - return m; -} -inline Matrixd Matrixd::rotate(value_type angle, const Vec3f& axis ) -{ - Matrixd m; - m.makeRotate(angle,axis); - return m; -} -inline Matrixd Matrixd::rotate(value_type angle, const Vec3d& axis ) -{ - Matrixd m; - m.makeRotate(angle,axis); - return m; -} -inline Matrixd Matrixd::rotate( value_type angle1, const Vec3f& axis1, - value_type angle2, const Vec3f& axis2, - value_type angle3, const Vec3f& axis3) -{ - Matrixd m; - m.makeRotate(angle1,axis1,angle2,axis2,angle3,axis3); - return m; -} -inline Matrixd Matrixd::rotate( value_type angle1, const Vec3d& axis1, - value_type angle2, const Vec3d& axis2, - value_type angle3, const Vec3d& axis3) -{ - Matrixd m; - m.makeRotate(angle1,axis1,angle2,axis2,angle3,axis3); - return m; -} -inline Matrixd Matrixd::rotate(const Vec3f& from, const Vec3f& to ) -{ - Matrixd m; - m.makeRotate(from,to); - return m; -} -inline Matrixd Matrixd::rotate(const Vec3d& from, const Vec3d& to ) -{ - Matrixd m; - m.makeRotate(from,to); - return m; -} - -inline Matrixd Matrixd::inverse( const Matrixd& matrix) -{ - Matrixd m; - m.invert(matrix); - return m; -} - -inline Matrixd Matrixd::orthoNormal(const Matrixd& matrix) -{ - Matrixd m; - m.orthoNormalize(matrix); - return m; -} - -inline Matrixd Matrixd::ortho(double left, double right, - double bottom, double top, - double zNear, double zFar) -{ - Matrixd m; - m.makeOrtho(left,right,bottom,top,zNear,zFar); - return m; -} - -inline Matrixd Matrixd::ortho2D(double left, double right, - double bottom, double top) -{ - Matrixd m; - m.makeOrtho2D(left,right,bottom,top); - return m; -} - -inline Matrixd Matrixd::frustum(double left, double right, - double bottom, double top, - double zNear, double zFar) -{ - Matrixd m; - m.makeFrustum(left,right,bottom,top,zNear,zFar); - return m; -} - -inline Matrixd Matrixd::perspective(double fovy, double aspectRatio, - double zNear, double zFar) -{ - Matrixd m; - m.makePerspective(fovy,aspectRatio,zNear,zFar); - return m; -} - -inline Matrixd Matrixd::lookAt(const Vec3f& eye, - const Vec3f& center, - const Vec3f& up) -{ - Matrixd m; - m.makeLookAt(eye,center,up); - return m; -} - -inline Matrixd Matrixd::lookAt(const Vec3d& eye, - const Vec3d& center, - const Vec3d& up) -{ - Matrixd m; - m.makeLookAt(eye,center,up); - return m; -} - -inline Vec3f Matrixd::postMult( const Vec3f& v ) const -{ - value_type d = 1.0f/(_mat[3][0]*v.x()+_mat[3][1]*v.y()+_mat[3][2]*v.z()+_mat[3][3]) ; - return Vec3f( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3])*d, - (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3])*d, - (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3])*d) ; -} - -inline Vec3d Matrixd::postMult( const Vec3d& v ) const -{ - value_type d = 1.0f/(_mat[3][0]*v.x()+_mat[3][1]*v.y()+_mat[3][2]*v.z()+_mat[3][3]) ; - return Vec3d( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3])*d, - (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3])*d, - (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3])*d) ; -} - -inline Vec3f Matrixd::preMult( const Vec3f& v ) const -{ - value_type d = 1.0f/(_mat[0][3]*v.x()+_mat[1][3]*v.y()+_mat[2][3]*v.z()+_mat[3][3]) ; - return Vec3f( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0])*d, - (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1])*d, - (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2])*d); -} - -inline Vec3d Matrixd::preMult( const Vec3d& v ) const -{ - value_type d = 1.0f/(_mat[0][3]*v.x()+_mat[1][3]*v.y()+_mat[2][3]*v.z()+_mat[3][3]) ; - return Vec3d( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0])*d, - (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1])*d, - (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2])*d); -} - -inline Vec4f Matrixd::postMult( const Vec4f& v ) const -{ - return Vec4f( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3]*v.w()), - (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3]*v.w()), - (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3]*v.w()), - (_mat[3][0]*v.x() + _mat[3][1]*v.y() + _mat[3][2]*v.z() + _mat[3][3]*v.w())) ; -} -inline Vec4d Matrixd::postMult( const Vec4d& v ) const -{ - return Vec4d( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3]*v.w()), - (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3]*v.w()), - (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3]*v.w()), - (_mat[3][0]*v.x() + _mat[3][1]*v.y() + _mat[3][2]*v.z() + _mat[3][3]*v.w())) ; -} - -inline Vec4f Matrixd::preMult( const Vec4f& v ) const -{ - return Vec4f( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0]*v.w()), - (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1]*v.w()), - (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2]*v.w()), - (_mat[0][3]*v.x() + _mat[1][3]*v.y() + _mat[2][3]*v.z() + _mat[3][3]*v.w())); -} - -inline Vec4d Matrixd::preMult( const Vec4d& v ) const -{ - return Vec4d( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0]*v.w()), - (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1]*v.w()), - (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2]*v.w()), - (_mat[0][3]*v.x() + _mat[1][3]*v.y() + _mat[2][3]*v.z() + _mat[3][3]*v.w())); -} - -inline Vec3f Matrixd::transform3x3(const Vec3f& v,const Matrixd& m) -{ - return Vec3f( (m._mat[0][0]*v.x() + m._mat[1][0]*v.y() + m._mat[2][0]*v.z()), - (m._mat[0][1]*v.x() + m._mat[1][1]*v.y() + m._mat[2][1]*v.z()), - (m._mat[0][2]*v.x() + m._mat[1][2]*v.y() + m._mat[2][2]*v.z())); -} -inline Vec3d Matrixd::transform3x3(const Vec3d& v,const Matrixd& m) -{ - return Vec3d( (m._mat[0][0]*v.x() + m._mat[1][0]*v.y() + m._mat[2][0]*v.z()), - (m._mat[0][1]*v.x() + m._mat[1][1]*v.y() + m._mat[2][1]*v.z()), - (m._mat[0][2]*v.x() + m._mat[1][2]*v.y() + m._mat[2][2]*v.z())); -} - -inline Vec3f Matrixd::transform3x3(const Matrixd& m,const Vec3f& v) -{ - return Vec3f( (m._mat[0][0]*v.x() + m._mat[0][1]*v.y() + m._mat[0][2]*v.z()), - (m._mat[1][0]*v.x() + m._mat[1][1]*v.y() + m._mat[1][2]*v.z()), - (m._mat[2][0]*v.x() + m._mat[2][1]*v.y() + m._mat[2][2]*v.z()) ) ; -} -inline Vec3d Matrixd::transform3x3(const Matrixd& m,const Vec3d& v) -{ - return Vec3d( (m._mat[0][0]*v.x() + m._mat[0][1]*v.y() + m._mat[0][2]*v.z()), - (m._mat[1][0]*v.x() + m._mat[1][1]*v.y() + m._mat[1][2]*v.z()), - (m._mat[2][0]*v.x() + m._mat[2][1]*v.y() + m._mat[2][2]*v.z()) ) ; -} - -inline void Matrixd::preMultTranslate( const Vec3d& v ) -{ - for (unsigned i = 0; i < 3; ++i) - { - double tmp = v[i]; - if (tmp == 0) - continue; - _mat[3][0] += tmp*_mat[i][0]; - _mat[3][1] += tmp*_mat[i][1]; - _mat[3][2] += tmp*_mat[i][2]; - _mat[3][3] += tmp*_mat[i][3]; - } -} - -inline void Matrixd::preMultTranslate( const Vec3f& v ) -{ - for (unsigned i = 0; i < 3; ++i) - { - float tmp = v[i]; - if (tmp == 0) - continue; - _mat[3][0] += tmp*_mat[i][0]; - _mat[3][1] += tmp*_mat[i][1]; - _mat[3][2] += tmp*_mat[i][2]; - _mat[3][3] += tmp*_mat[i][3]; - } -} - -inline void Matrixd::postMultTranslate( const Vec3d& v ) -{ - for (unsigned i = 0; i < 3; ++i) - { - double tmp = v[i]; - if (tmp == 0) - continue; - _mat[0][i] += tmp*_mat[0][3]; - _mat[1][i] += tmp*_mat[1][3]; - _mat[2][i] += tmp*_mat[2][3]; - _mat[3][i] += tmp*_mat[3][3]; - } -} - -inline void Matrixd::postMultTranslate( const Vec3f& v ) -{ - for (unsigned i = 0; i < 3; ++i) - { - float tmp = v[i]; - if (tmp == 0) - continue; - _mat[0][i] += tmp*_mat[0][3]; - _mat[1][i] += tmp*_mat[1][3]; - _mat[2][i] += tmp*_mat[2][3]; - _mat[3][i] += tmp*_mat[3][3]; - } -} - -inline void Matrixd::preMultScale( const Vec3d& v ) -{ - _mat[0][0] *= v[0]; _mat[0][1] *= v[0]; _mat[0][2] *= v[0]; _mat[0][3] *= v[0]; - _mat[1][0] *= v[1]; _mat[1][1] *= v[1]; _mat[1][2] *= v[1]; _mat[1][3] *= v[1]; - _mat[2][0] *= v[2]; _mat[2][1] *= v[2]; _mat[2][2] *= v[2]; _mat[2][3] *= v[2]; -} - -inline void Matrixd::preMultScale( const Vec3f& v ) -{ - _mat[0][0] *= v[0]; _mat[0][1] *= v[0]; _mat[0][2] *= v[0]; _mat[0][3] *= v[0]; - _mat[1][0] *= v[1]; _mat[1][1] *= v[1]; _mat[1][2] *= v[1]; _mat[1][3] *= v[1]; - _mat[2][0] *= v[2]; _mat[2][1] *= v[2]; _mat[2][2] *= v[2]; _mat[2][3] *= v[2]; -} - -inline void Matrixd::postMultScale( const Vec3d& v ) -{ - _mat[0][0] *= v[0]; _mat[1][0] *= v[0]; _mat[2][0] *= v[0]; _mat[3][0] *= v[0]; - _mat[0][1] *= v[1]; _mat[1][1] *= v[1]; _mat[2][1] *= v[1]; _mat[3][1] *= v[1]; - _mat[0][2] *= v[2]; _mat[1][2] *= v[2]; _mat[2][2] *= v[2]; _mat[3][2] *= v[2]; -} - -inline void Matrixd::postMultScale( const Vec3f& v ) -{ - _mat[0][0] *= v[0]; _mat[1][0] *= v[0]; _mat[2][0] *= v[0]; _mat[3][0] *= v[0]; - _mat[0][1] *= v[1]; _mat[1][1] *= v[1]; _mat[2][1] *= v[1]; _mat[3][1] *= v[1]; - _mat[0][2] *= v[2]; _mat[1][2] *= v[2]; _mat[2][2] *= v[2]; _mat[3][2] *= v[2]; -} - -inline void Matrixd::preMultRotate( const Quat& q ) -{ - if (q.zeroRotation()) - return; - Matrixd r; - r.setRotate(q); - preMult(r); -} - -inline void Matrixd::postMultRotate( const Quat& q ) -{ - if (q.zeroRotation()) - return; - Matrixd r; - r.setRotate(q); - postMult(r); -} - -inline Vec3f operator* (const Vec3f& v, const Matrixd& m ) -{ - return m.preMult(v); -} - -inline Vec3d operator* (const Vec3d& v, const Matrixd& m ) -{ - return m.preMult(v); -} - -inline Vec4f operator* (const Vec4f& v, const Matrixd& m ) -{ - return m.preMult(v); -} - -inline Vec4d operator* (const Vec4d& v, const Matrixd& m ) -{ - return m.preMult(v); -} - -inline Vec3f Matrixd::operator* (const Vec3f& v) const -{ - return postMult(v); -} - -inline Vec3d Matrixd::operator* (const Vec3d& v) const -{ - return postMult(v); -} - -inline Vec4f Matrixd::operator* (const Vec4f& v) const -{ - return postMult(v); -} - -inline Vec4d Matrixd::operator* (const Vec4d& v) const -{ - return postMult(v); -} - - -} //namespace osg - - -#endif diff --git a/libs/lib/mac32/include/osg/Matrixf b/libs/lib/mac32/include/osg/Matrixf deleted file mode 100644 index 8a4d3cd7a..000000000 --- a/libs/lib/mac32/include/osg/Matrixf +++ /dev/null @@ -1,914 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_MATRIXF -#define OSG_MATRIXF 1 - -#include -#include -#include -#include - -namespace osg { - -class Matrixf; - -class OSG_EXPORT Matrixf -{ - public: - - typedef float value_type; - - inline Matrixf() { makeIdentity(); } - inline Matrixf( const Matrixf& mat) { set(mat.ptr()); } - Matrixf( const Matrixd& mat ); - inline explicit Matrixf( float const * const ptr ) { set(ptr); } - inline explicit Matrixf( double const * const ptr ) { set(ptr); } - inline explicit Matrixf( const Quat& quat ) { makeRotate(quat); } - - Matrixf( value_type a00, value_type a01, value_type a02, value_type a03, - value_type a10, value_type a11, value_type a12, value_type a13, - value_type a20, value_type a21, value_type a22, value_type a23, - value_type a30, value_type a31, value_type a32, value_type a33); - - ~Matrixf() {} - - int compare(const Matrixf& m) const; - - bool operator < (const Matrixf& m) const { return compare(m)<0; } - bool operator == (const Matrixf& m) const { return compare(m)==0; } - bool operator != (const Matrixf& m) const { return compare(m)!=0; } - - inline value_type& operator()(int row, int col) { return _mat[row][col]; } - inline value_type operator()(int row, int col) const { return _mat[row][col]; } - - inline bool valid() const { return !isNaN(); } - inline bool isNaN() const { return osg::isNaN(_mat[0][0]) || osg::isNaN(_mat[0][1]) || osg::isNaN(_mat[0][2]) || osg::isNaN(_mat[0][3]) || - osg::isNaN(_mat[1][0]) || osg::isNaN(_mat[1][1]) || osg::isNaN(_mat[1][2]) || osg::isNaN(_mat[1][3]) || - osg::isNaN(_mat[2][0]) || osg::isNaN(_mat[2][1]) || osg::isNaN(_mat[2][2]) || osg::isNaN(_mat[2][3]) || - osg::isNaN(_mat[3][0]) || osg::isNaN(_mat[3][1]) || osg::isNaN(_mat[3][2]) || osg::isNaN(_mat[3][3]); } - - inline Matrixf& operator = (const Matrixf& rhs) - { - if( &rhs == this ) return *this; - set(rhs.ptr()); - return *this; - } - - Matrixf& operator = (const Matrixd& other); - - inline void set(const Matrixf& rhs) { set(rhs.ptr()); } - - void set(const Matrixd& rhs); - - inline void set(float const * const ptr) - { - value_type* local_ptr = (value_type*)_mat; - for(int i=0;i<16;++i) local_ptr[i]=(value_type)ptr[i]; - } - - inline void set(double const * const ptr) - { - value_type* local_ptr = (value_type*)_mat; - for(int i=0;i<16;++i) local_ptr[i]=(value_type)ptr[i]; - } - - void set(value_type a00, value_type a01, value_type a02,value_type a03, - value_type a10, value_type a11, value_type a12,value_type a13, - value_type a20, value_type a21, value_type a22,value_type a23, - value_type a30, value_type a31, value_type a32,value_type a33); - - value_type * ptr() { return (value_type*)_mat; } - const value_type * ptr() const { return (const value_type *)_mat; } - - bool isIdentity() const - { - return _mat[0][0]==1.0f && _mat[0][1]==0.0f && _mat[0][2]==0.0f && _mat[0][3]==0.0f && - _mat[1][0]==0.0f && _mat[1][1]==1.0f && _mat[1][2]==0.0f && _mat[1][3]==0.0f && - _mat[2][0]==0.0f && _mat[2][1]==0.0f && _mat[2][2]==1.0f && _mat[2][3]==0.0f && - _mat[3][0]==0.0f && _mat[3][1]==0.0f && _mat[3][2]==0.0f && _mat[3][3]==1.0f; - } - - void makeIdentity(); - - void makeScale( const Vec3f& ); - void makeScale( const Vec3d& ); - void makeScale( value_type, value_type, value_type ); - - void makeTranslate( const Vec3f& ); - void makeTranslate( const Vec3d& ); - void makeTranslate( value_type, value_type, value_type ); - - void makeRotate( const Vec3f& from, const Vec3f& to ); - void makeRotate( const Vec3d& from, const Vec3d& to ); - void makeRotate( value_type angle, const Vec3f& axis ); - void makeRotate( value_type angle, const Vec3d& axis ); - void makeRotate( value_type angle, value_type x, value_type y, value_type z ); - void makeRotate( const Quat& ); - void makeRotate( value_type angle1, const Vec3f& axis1, - value_type angle2, const Vec3f& axis2, - value_type angle3, const Vec3f& axis3); - void makeRotate( value_type angle1, const Vec3d& axis1, - value_type angle2, const Vec3d& axis2, - value_type angle3, const Vec3d& axis3); - - - /** decompose the matrix into translation, rotation, scale and scale orientation.*/ - void decompose( osg::Vec3f& translation, - osg::Quat& rotation, - osg::Vec3f& scale, - osg::Quat& so ) const; - - /** decompose the matrix into translation, rotation, scale and scale orientation.*/ - void decompose( osg::Vec3d& translation, - osg::Quat& rotation, - osg::Vec3d& scale, - osg::Quat& so ) const; - - - /** Set to an orthographic projection. - * See glOrtho for further details. - */ - void makeOrtho(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Get the orthographic settings of the orthographic projection matrix. - * Note, if matrix is not an orthographic matrix then invalid values - * will be returned. - */ - bool getOrtho(double& left, double& right, - double& bottom, double& top, - double& zNear, double& zFar) const; - - /** Set to a 2D orthographic projection. - * See glOrtho2D for further details. - */ - inline void makeOrtho2D(double left, double right, - double bottom, double top) - { - makeOrtho(left,right,bottom,top,-1.0,1.0); - } - - - /** Set to a perspective projection. - * See glFrustum for further details. - */ - void makeFrustum(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Get the frustum settings of a perspective projection matrix. - * Note, if matrix is not a perspective matrix then invalid values - * will be returned. - */ - bool getFrustum(double& left, double& right, - double& bottom, double& top, - double& zNear, double& zFar) const; - - /** Set to a symmetrical perspective projection. - * See gluPerspective for further details. - * Aspect ratio is defined as width/height. - */ - void makePerspective(double fovy, double aspectRatio, - double zNear, double zFar); - - /** Get the frustum settings of a symmetric perspective projection - * matrix. - * Return false if matrix is not a perspective matrix, - * where parameter values are undefined. - * Note, if matrix is not a symmetric perspective matrix then the - * shear will be lost. - * Asymmetric matrices occur when stereo, power walls, caves and - * reality center display are used. - * In these configuration one should use the AsFrustum method instead. - */ - bool getPerspective(double& fovy, double& aspectRatio, - double& zNear, double& zFar) const; - - /** Set the position and orientation to be a view matrix, - * using the same convention as gluLookAt. - */ - void makeLookAt(const Vec3d& eye,const Vec3d& center,const Vec3d& up); - - /** Get to the position and orientation of a modelview matrix, - * using the same convention as gluLookAt. - */ - void getLookAt(Vec3f& eye,Vec3f& center,Vec3f& up, - value_type lookDistance=1.0f) const; - - /** Get to the position and orientation of a modelview matrix, - * using the same convention as gluLookAt. - */ - void getLookAt(Vec3d& eye,Vec3d& center,Vec3d& up, - value_type lookDistance=1.0f) const; - - /** invert the matrix rhs, automatically select invert_4x3 or invert_4x4. */ - inline bool invert( const Matrixf& rhs) - { - bool is_4x3 = (rhs._mat[0][3]==0.0f && rhs._mat[1][3]==0.0f && rhs._mat[2][3]==0.0f && rhs._mat[3][3]==1.0f); - return is_4x3 ? invert_4x3(rhs) : invert_4x4(rhs); - } - - /** 4x3 matrix invert, not right hand column is assumed to be 0,0,0,1. */ - bool invert_4x3( const Matrixf& rhs); - - /** full 4x4 matrix invert. */ - bool invert_4x4( const Matrixf& rhs); - - /** ortho-normalize the 3x3 rotation & scale matrix */ - void orthoNormalize(const Matrixf& rhs); - - //basic utility functions to create new matrices - inline static Matrixf identity( void ); - inline static Matrixf scale( const Vec3f& sv); - inline static Matrixf scale( const Vec3d& sv); - inline static Matrixf scale( value_type sx, value_type sy, value_type sz); - inline static Matrixf translate( const Vec3f& dv); - inline static Matrixf translate( const Vec3d& dv); - inline static Matrixf translate( value_type x, value_type y, value_type z); - inline static Matrixf rotate( const Vec3f& from, const Vec3f& to); - inline static Matrixf rotate( const Vec3d& from, const Vec3d& to); - inline static Matrixf rotate( value_type angle, value_type x, value_type y, value_type z); - inline static Matrixf rotate( value_type angle, const Vec3f& axis); - inline static Matrixf rotate( value_type angle, const Vec3d& axis); - inline static Matrixf rotate( value_type angle1, const Vec3f& axis1, - value_type angle2, const Vec3f& axis2, - value_type angle3, const Vec3f& axis3); - inline static Matrixf rotate( value_type angle1, const Vec3d& axis1, - value_type angle2, const Vec3d& axis2, - value_type angle3, const Vec3d& axis3); - inline static Matrixf rotate( const Quat& quat); - inline static Matrixf inverse( const Matrixf& matrix); - inline static Matrixf orthoNormal(const Matrixf& matrix); - - /** Create an orthographic projection matrix. - * See glOrtho for further details. - */ - inline static Matrixf ortho(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Create a 2D orthographic projection. - * See glOrtho for further details. - */ - inline static Matrixf ortho2D(double left, double right, - double bottom, double top); - - /** Create a perspective projection. - * See glFrustum for further details. - */ - inline static Matrixf frustum(double left, double right, - double bottom, double top, - double zNear, double zFar); - - /** Create a symmetrical perspective projection. - * See gluPerspective for further details. - * Aspect ratio is defined as width/height. - */ - inline static Matrixf perspective(double fovy, double aspectRatio, - double zNear, double zFar); - - /** Create the position and orientation as per a camera, - * using the same convention as gluLookAt. - */ - inline static Matrixf lookAt(const Vec3f& eye, - const Vec3f& center, - const Vec3f& up); - - /** Create the position and orientation as per a camera, - * using the same convention as gluLookAt. - */ - inline static Matrixf lookAt(const Vec3d& eye, - const Vec3d& center, - const Vec3d& up); - - inline Vec3f preMult( const Vec3f& v ) const; - inline Vec3d preMult( const Vec3d& v ) const; - inline Vec3f postMult( const Vec3f& v ) const; - inline Vec3d postMult( const Vec3d& v ) const; - inline Vec3f operator* ( const Vec3f& v ) const; - inline Vec3d operator* ( const Vec3d& v ) const; - inline Vec4f preMult( const Vec4f& v ) const; - inline Vec4d preMult( const Vec4d& v ) const; - inline Vec4f postMult( const Vec4f& v ) const; - inline Vec4d postMult( const Vec4d& v ) const; - inline Vec4f operator* ( const Vec4f& v ) const; - inline Vec4d operator* ( const Vec4d& v ) const; - -#ifdef USE_DEPRECATED_API - inline void set(const Quat& q) { makeRotate(q); } - inline void get(Quat& q) const { q = getRotate(); } -#endif - - void setRotate(const Quat& q); - /** Get the matrix rotation as a Quat. Note that this function - * assumes a non-scaled matrix and will return incorrect results - * for scaled matrixces. Consider decompose() instead. - */ - Quat getRotate() const; - - - void setTrans( value_type tx, value_type ty, value_type tz ); - void setTrans( const Vec3f& v ); - void setTrans( const Vec3d& v ); - - inline Vec3d getTrans() const { return Vec3d(_mat[3][0],_mat[3][1],_mat[3][2]); } - - inline Vec3d getScale() const { - Vec3d x_vec(_mat[0][0],_mat[1][0],_mat[2][0]); - Vec3d y_vec(_mat[0][1],_mat[1][1],_mat[2][1]); - Vec3d z_vec(_mat[0][2],_mat[1][2],_mat[2][2]); - return Vec3d(x_vec.length(), y_vec.length(), z_vec.length()); - } - - /** apply a 3x3 transform of v*M[0..2,0..2]. */ - inline static Vec3f transform3x3(const Vec3f& v,const Matrixf& m); - - /** apply a 3x3 transform of v*M[0..2,0..2]. */ - inline static Vec3d transform3x3(const Vec3d& v,const Matrixf& m); - - /** apply a 3x3 transform of M[0..2,0..2]*v. */ - inline static Vec3f transform3x3(const Matrixf& m,const Vec3f& v); - - /** apply a 3x3 transform of M[0..2,0..2]*v. */ - inline static Vec3d transform3x3(const Matrixf& m,const Vec3d& v); - - // basic Matrixf multiplication, our workhorse methods. - void mult( const Matrixf&, const Matrixf& ); - void preMult( const Matrixf& ); - void postMult( const Matrixf& ); - - /** Optimized version of preMult(translate(v)); */ - inline void preMultTranslate( const Vec3d& v ); - inline void preMultTranslate( const Vec3f& v ); - /** Optimized version of postMult(translate(v)); */ - inline void postMultTranslate( const Vec3d& v ); - inline void postMultTranslate( const Vec3f& v ); - - /** Optimized version of preMult(scale(v)); */ - inline void preMultScale( const Vec3d& v ); - inline void preMultScale( const Vec3f& v ); - /** Optimized version of postMult(scale(v)); */ - inline void postMultScale( const Vec3d& v ); - inline void postMultScale( const Vec3f& v ); - - /** Optimized version of preMult(rotate(q)); */ - inline void preMultRotate( const Quat& q ); - /** Optimized version of postMult(rotate(q)); */ - inline void postMultRotate( const Quat& q ); - - inline void operator *= ( const Matrixf& other ) - { if( this == &other ) { - Matrixf temp(other); - postMult( temp ); - } - else postMult( other ); - } - - inline Matrixf operator * ( const Matrixf &m ) const - { - osg::Matrixf r; - r.mult(*this,m); - return r; - } - - /** Multiply by scalar. */ - inline Matrixf operator * (value_type rhs) const - { - return Matrixf( - _mat[0][0]*rhs, _mat[0][1]*rhs, _mat[0][2]*rhs, _mat[0][3]*rhs, - _mat[1][0]*rhs, _mat[1][1]*rhs, _mat[1][2]*rhs, _mat[1][3]*rhs, - _mat[2][0]*rhs, _mat[2][1]*rhs, _mat[2][2]*rhs, _mat[2][3]*rhs, - _mat[3][0]*rhs, _mat[3][1]*rhs, _mat[3][2]*rhs, _mat[3][3]*rhs); - } - - /** Unary multiply by scalar. */ - inline Matrixf& operator *= (value_type rhs) - { - _mat[0][0]*=rhs; - _mat[0][1]*=rhs; - _mat[0][2]*=rhs; - _mat[0][3]*=rhs; - _mat[1][0]*=rhs; - _mat[1][1]*=rhs; - _mat[1][2]*=rhs; - _mat[1][3]*=rhs; - _mat[2][0]*=rhs; - _mat[2][1]*=rhs; - _mat[2][2]*=rhs; - _mat[2][3]*=rhs; - _mat[3][0]*=rhs; - _mat[3][1]*=rhs; - _mat[3][2]*=rhs; - _mat[3][3]*=rhs; - return *this; - } - - /** Divide by scalar. */ - inline Matrixf operator / (value_type rhs) const - { - return Matrixf( - _mat[0][0]/rhs, _mat[0][1]/rhs, _mat[0][2]/rhs, _mat[0][3]/rhs, - _mat[1][0]/rhs, _mat[1][1]/rhs, _mat[1][2]/rhs, _mat[1][3]/rhs, - _mat[2][0]/rhs, _mat[2][1]/rhs, _mat[2][2]/rhs, _mat[2][3]/rhs, - _mat[3][0]/rhs, _mat[3][1]/rhs, _mat[3][2]/rhs, _mat[3][3]/rhs); - } - - /** Unary divide by scalar. */ - inline Matrixf& operator /= (value_type rhs) - { - _mat[0][0]/=rhs; - _mat[0][1]/=rhs; - _mat[0][2]/=rhs; - _mat[0][3]/=rhs; - _mat[1][0]/=rhs; - _mat[1][1]/=rhs; - _mat[1][2]/=rhs; - _mat[1][3]/=rhs; - _mat[2][0]/=rhs; - _mat[2][1]/=rhs; - _mat[2][2]/=rhs; - _mat[2][3]/=rhs; - _mat[3][0]/=rhs; - _mat[3][1]/=rhs; - _mat[3][2]/=rhs; - _mat[3][3]/=rhs; - return *this; - } - - /** Binary vector add. */ - inline Matrixf operator + (const Matrixf& rhs) const - { - return Matrixf( - _mat[0][0] + rhs._mat[0][0], - _mat[0][1] + rhs._mat[0][1], - _mat[0][2] + rhs._mat[0][2], - _mat[0][3] + rhs._mat[0][3], - _mat[1][0] + rhs._mat[1][0], - _mat[1][1] + rhs._mat[1][1], - _mat[1][2] + rhs._mat[1][2], - _mat[1][3] + rhs._mat[1][3], - _mat[2][0] + rhs._mat[2][0], - _mat[2][1] + rhs._mat[2][1], - _mat[2][2] + rhs._mat[2][2], - _mat[2][3] + rhs._mat[2][3], - _mat[3][0] + rhs._mat[3][0], - _mat[3][1] + rhs._mat[3][1], - _mat[3][2] + rhs._mat[3][2], - _mat[3][3] + rhs._mat[3][3]); - } - - /** Unary vector add. Slightly more efficient because no temporary - * intermediate object. - */ - inline Matrixf& operator += (const Matrixf& rhs) - { - _mat[0][0] += rhs._mat[0][0]; - _mat[0][1] += rhs._mat[0][1]; - _mat[0][2] += rhs._mat[0][2]; - _mat[0][3] += rhs._mat[0][3]; - _mat[1][0] += rhs._mat[1][0]; - _mat[1][1] += rhs._mat[1][1]; - _mat[1][2] += rhs._mat[1][2]; - _mat[1][3] += rhs._mat[1][3]; - _mat[2][0] += rhs._mat[2][0]; - _mat[2][1] += rhs._mat[2][1]; - _mat[2][2] += rhs._mat[2][2]; - _mat[2][3] += rhs._mat[2][3]; - _mat[3][0] += rhs._mat[3][0]; - _mat[3][1] += rhs._mat[3][1]; - _mat[3][2] += rhs._mat[3][2]; - _mat[3][3] += rhs._mat[3][3]; - return *this; - } - - protected: - value_type _mat[4][4]; - -}; - -class RefMatrixf : public Object, public Matrixf -{ - public: - - RefMatrixf():Object(false), Matrixf() {} - RefMatrixf( const Matrixf& other) : Object(false), Matrixf(other) {} - RefMatrixf( const Matrixd& other) : Object(false), Matrixf(other) {} - RefMatrixf( const RefMatrixf& other) : Object(other), Matrixf(other) {} - explicit RefMatrixf( Matrixf::value_type const * const def ):Object(false), Matrixf(def) {} - RefMatrixf( Matrixf::value_type a00, Matrixf::value_type a01, Matrixf::value_type a02, Matrixf::value_type a03, - Matrixf::value_type a10, Matrixf::value_type a11, Matrixf::value_type a12, Matrixf::value_type a13, - Matrixf::value_type a20, Matrixf::value_type a21, Matrixf::value_type a22, Matrixf::value_type a23, - Matrixf::value_type a30, Matrixf::value_type a31, Matrixf::value_type a32, Matrixf::value_type a33): - Object(false), - Matrixf(a00, a01, a02, a03, - a10, a11, a12, a13, - a20, a21, a22, a23, - a30, a31, a32, a33) {} - - virtual Object* cloneType() const { return new RefMatrixf(); } - virtual Object* clone(const CopyOp&) const { return new RefMatrixf(*this); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "Matrix"; } - - - protected: - - virtual ~RefMatrixf() {} -}; - - -//static utility methods -inline Matrixf Matrixf::identity(void) -{ - Matrixf m; - m.makeIdentity(); - return m; -} - -inline Matrixf Matrixf::scale(value_type sx, value_type sy, value_type sz) -{ - Matrixf m; - m.makeScale(sx,sy,sz); - return m; -} - -inline Matrixf Matrixf::scale(const Vec3f& v ) -{ - return scale(v.x(), v.y(), v.z() ); -} - -inline Matrixf Matrixf::scale(const Vec3d& v ) -{ - return scale(v.x(), v.y(), v.z() ); -} - -inline Matrixf Matrixf::translate(value_type tx, value_type ty, value_type tz) -{ - Matrixf m; - m.makeTranslate(tx,ty,tz); - return m; -} - -inline Matrixf Matrixf::translate(const Vec3f& v ) -{ - return translate(v.x(), v.y(), v.z() ); -} - -inline Matrixf Matrixf::translate(const Vec3d& v ) -{ - return translate(v.x(), v.y(), v.z() ); -} - -inline Matrixf Matrixf::rotate( const Quat& q ) -{ - return Matrixf(q); -} -inline Matrixf Matrixf::rotate(value_type angle, value_type x, value_type y, value_type z ) -{ - Matrixf m; - m.makeRotate(angle,x,y,z); - return m; -} -inline Matrixf Matrixf::rotate(value_type angle, const Vec3f& axis ) -{ - Matrixf m; - m.makeRotate(angle,axis); - return m; -} -inline Matrixf Matrixf::rotate(value_type angle, const Vec3d& axis ) -{ - Matrixf m; - m.makeRotate(angle,axis); - return m; -} -inline Matrixf Matrixf::rotate( value_type angle1, const Vec3f& axis1, - value_type angle2, const Vec3f& axis2, - value_type angle3, const Vec3f& axis3) -{ - Matrixf m; - m.makeRotate(angle1,axis1,angle2,axis2,angle3,axis3); - return m; -} -inline Matrixf Matrixf::rotate( value_type angle1, const Vec3d& axis1, - value_type angle2, const Vec3d& axis2, - value_type angle3, const Vec3d& axis3) -{ - Matrixf m; - m.makeRotate(angle1,axis1,angle2,axis2,angle3,axis3); - return m; -} -inline Matrixf Matrixf::rotate(const Vec3f& from, const Vec3f& to ) -{ - Matrixf m; - m.makeRotate(from,to); - return m; -} -inline Matrixf Matrixf::rotate(const Vec3d& from, const Vec3d& to ) -{ - Matrixf m; - m.makeRotate(from,to); - return m; -} - -inline Matrixf Matrixf::inverse( const Matrixf& matrix) -{ - Matrixf m; - m.invert(matrix); - return m; -} - -inline Matrixf Matrixf::orthoNormal(const Matrixf& matrix) -{ - Matrixf m; - m.orthoNormalize(matrix); - return m; -} - -inline Matrixf Matrixf::ortho(double left, double right, - double bottom, double top, - double zNear, double zFar) -{ - Matrixf m; - m.makeOrtho(left,right,bottom,top,zNear,zFar); - return m; -} - -inline Matrixf Matrixf::ortho2D(double left, double right, - double bottom, double top) -{ - Matrixf m; - m.makeOrtho2D(left,right,bottom,top); - return m; -} - -inline Matrixf Matrixf::frustum(double left, double right, - double bottom, double top, - double zNear, double zFar) -{ - Matrixf m; - m.makeFrustum(left,right,bottom,top,zNear,zFar); - return m; -} - -inline Matrixf Matrixf::perspective(double fovy,double aspectRatio, - double zNear, double zFar) -{ - Matrixf m; - m.makePerspective(fovy,aspectRatio,zNear,zFar); - return m; -} - -inline Matrixf Matrixf::lookAt(const Vec3f& eye,const Vec3f& center,const Vec3f& up) -{ - Matrixf m; - m.makeLookAt(eye,center,up); - return m; -} - -inline Matrixf Matrixf::lookAt(const Vec3d& eye,const Vec3d& center,const Vec3d& up) -{ - Matrixf m; - m.makeLookAt(eye,center,up); - return m; -} - -inline Vec3f Matrixf::postMult( const Vec3f& v ) const -{ - value_type d = 1.0f/(_mat[3][0]*v.x()+_mat[3][1]*v.y()+_mat[3][2]*v.z()+_mat[3][3]) ; - return Vec3f( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3])*d, - (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3])*d, - (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3])*d) ; -} -inline Vec3d Matrixf::postMult( const Vec3d& v ) const -{ - value_type d = 1.0f/(_mat[3][0]*v.x()+_mat[3][1]*v.y()+_mat[3][2]*v.z()+_mat[3][3]) ; - return Vec3d( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3])*d, - (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3])*d, - (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3])*d) ; -} - -inline Vec3f Matrixf::preMult( const Vec3f& v ) const -{ - value_type d = 1.0f/(_mat[0][3]*v.x()+_mat[1][3]*v.y()+_mat[2][3]*v.z()+_mat[3][3]) ; - return Vec3f( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0])*d, - (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1])*d, - (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2])*d); -} -inline Vec3d Matrixf::preMult( const Vec3d& v ) const -{ - value_type d = 1.0f/(_mat[0][3]*v.x()+_mat[1][3]*v.y()+_mat[2][3]*v.z()+_mat[3][3]) ; - return Vec3d( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0])*d, - (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1])*d, - (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2])*d); -} - -inline Vec4f Matrixf::postMult( const Vec4f& v ) const -{ - return Vec4f( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3]*v.w()), - (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3]*v.w()), - (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3]*v.w()), - (_mat[3][0]*v.x() + _mat[3][1]*v.y() + _mat[3][2]*v.z() + _mat[3][3]*v.w())) ; -} -inline Vec4d Matrixf::postMult( const Vec4d& v ) const -{ - return Vec4d( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3]*v.w()), - (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3]*v.w()), - (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3]*v.w()), - (_mat[3][0]*v.x() + _mat[3][1]*v.y() + _mat[3][2]*v.z() + _mat[3][3]*v.w())) ; -} - -inline Vec4f Matrixf::preMult( const Vec4f& v ) const -{ - return Vec4f( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0]*v.w()), - (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1]*v.w()), - (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2]*v.w()), - (_mat[0][3]*v.x() + _mat[1][3]*v.y() + _mat[2][3]*v.z() + _mat[3][3]*v.w())); -} -inline Vec4d Matrixf::preMult( const Vec4d& v ) const -{ - return Vec4d( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0]*v.w()), - (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1]*v.w()), - (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2]*v.w()), - (_mat[0][3]*v.x() + _mat[1][3]*v.y() + _mat[2][3]*v.z() + _mat[3][3]*v.w())); -} -inline Vec3f Matrixf::transform3x3(const Vec3f& v,const Matrixf& m) -{ - return Vec3f( (m._mat[0][0]*v.x() + m._mat[1][0]*v.y() + m._mat[2][0]*v.z()), - (m._mat[0][1]*v.x() + m._mat[1][1]*v.y() + m._mat[2][1]*v.z()), - (m._mat[0][2]*v.x() + m._mat[1][2]*v.y() + m._mat[2][2]*v.z())); -} -inline Vec3d Matrixf::transform3x3(const Vec3d& v,const Matrixf& m) -{ - return Vec3d( (m._mat[0][0]*v.x() + m._mat[1][0]*v.y() + m._mat[2][0]*v.z()), - (m._mat[0][1]*v.x() + m._mat[1][1]*v.y() + m._mat[2][1]*v.z()), - (m._mat[0][2]*v.x() + m._mat[1][2]*v.y() + m._mat[2][2]*v.z())); -} - -inline Vec3f Matrixf::transform3x3(const Matrixf& m,const Vec3f& v) -{ - return Vec3f( (m._mat[0][0]*v.x() + m._mat[0][1]*v.y() + m._mat[0][2]*v.z()), - (m._mat[1][0]*v.x() + m._mat[1][1]*v.y() + m._mat[1][2]*v.z()), - (m._mat[2][0]*v.x() + m._mat[2][1]*v.y() + m._mat[2][2]*v.z()) ) ; -} -inline Vec3d Matrixf::transform3x3(const Matrixf& m,const Vec3d& v) -{ - return Vec3d( (m._mat[0][0]*v.x() + m._mat[0][1]*v.y() + m._mat[0][2]*v.z()), - (m._mat[1][0]*v.x() + m._mat[1][1]*v.y() + m._mat[1][2]*v.z()), - (m._mat[2][0]*v.x() + m._mat[2][1]*v.y() + m._mat[2][2]*v.z()) ) ; -} - -inline void Matrixf::preMultTranslate( const Vec3d& v ) -{ - for (unsigned i = 0; i < 3; ++i) - { - double tmp = v[i]; - if (tmp == 0) - continue; - _mat[3][0] += tmp*_mat[i][0]; - _mat[3][1] += tmp*_mat[i][1]; - _mat[3][2] += tmp*_mat[i][2]; - _mat[3][3] += tmp*_mat[i][3]; - } -} - -inline void Matrixf::preMultTranslate( const Vec3f& v ) -{ - for (unsigned i = 0; i < 3; ++i) - { - float tmp = v[i]; - if (tmp == 0) - continue; - _mat[3][0] += tmp*_mat[i][0]; - _mat[3][1] += tmp*_mat[i][1]; - _mat[3][2] += tmp*_mat[i][2]; - _mat[3][3] += tmp*_mat[i][3]; - } -} - -inline void Matrixf::postMultTranslate( const Vec3d& v ) -{ - for (unsigned i = 0; i < 3; ++i) - { - double tmp = v[i]; - if (tmp == 0) - continue; - _mat[0][i] += tmp*_mat[0][3]; - _mat[1][i] += tmp*_mat[1][3]; - _mat[2][i] += tmp*_mat[2][3]; - _mat[3][i] += tmp*_mat[3][3]; - } -} - -inline void Matrixf::postMultTranslate( const Vec3f& v ) -{ - for (unsigned i = 0; i < 3; ++i) - { - float tmp = v[i]; - if (tmp == 0) - continue; - _mat[0][i] += tmp*_mat[0][3]; - _mat[1][i] += tmp*_mat[1][3]; - _mat[2][i] += tmp*_mat[2][3]; - _mat[3][i] += tmp*_mat[3][3]; - } -} - -inline void Matrixf::preMultScale( const Vec3d& v ) -{ - _mat[0][0] *= v[0]; _mat[0][1] *= v[0]; _mat[0][2] *= v[0]; _mat[0][3] *= v[0]; - _mat[1][0] *= v[1]; _mat[1][1] *= v[1]; _mat[1][2] *= v[1]; _mat[1][3] *= v[1]; - _mat[2][0] *= v[2]; _mat[2][1] *= v[2]; _mat[2][2] *= v[2]; _mat[2][3] *= v[2]; -} - -inline void Matrixf::preMultScale( const Vec3f& v ) -{ - _mat[0][0] *= v[0]; _mat[0][1] *= v[0]; _mat[0][2] *= v[0]; _mat[0][3] *= v[0]; - _mat[1][0] *= v[1]; _mat[1][1] *= v[1]; _mat[1][2] *= v[1]; _mat[1][3] *= v[1]; - _mat[2][0] *= v[2]; _mat[2][1] *= v[2]; _mat[2][2] *= v[2]; _mat[2][3] *= v[2]; -} - -inline void Matrixf::postMultScale( const Vec3d& v ) -{ - _mat[0][0] *= v[0]; _mat[1][0] *= v[0]; _mat[2][0] *= v[0]; _mat[3][0] *= v[0]; - _mat[0][1] *= v[1]; _mat[1][1] *= v[1]; _mat[2][1] *= v[1]; _mat[3][1] *= v[1]; - _mat[0][2] *= v[2]; _mat[1][2] *= v[2]; _mat[2][2] *= v[2]; _mat[3][2] *= v[2]; -} - -inline void Matrixf::postMultScale( const Vec3f& v ) -{ - _mat[0][0] *= v[0]; _mat[1][0] *= v[0]; _mat[2][0] *= v[0]; _mat[3][0] *= v[0]; - _mat[0][1] *= v[1]; _mat[1][1] *= v[1]; _mat[2][1] *= v[1]; _mat[3][1] *= v[1]; - _mat[0][2] *= v[2]; _mat[1][2] *= v[2]; _mat[2][2] *= v[2]; _mat[3][2] *= v[2]; -} - - -inline void Matrixf::preMultRotate( const Quat& q ) -{ - if (q.zeroRotation()) - return; - Matrixf r; - r.setRotate(q); - preMult(r); -} - -inline void Matrixf::postMultRotate( const Quat& q ) -{ - if (q.zeroRotation()) - return; - Matrixf r; - r.setRotate(q); - postMult(r); -} - -inline Vec3f operator* (const Vec3f& v, const Matrixf& m ) -{ - return m.preMult(v); -} -inline Vec3d operator* (const Vec3d& v, const Matrixf& m ) -{ - return m.preMult(v); -} -inline Vec4f operator* (const Vec4f& v, const Matrixf& m ) -{ - return m.preMult(v); -} -inline Vec4d operator* (const Vec4d& v, const Matrixf& m ) -{ - return m.preMult(v); -} - -inline Vec3f Matrixf::operator* (const Vec3f& v) const -{ - return postMult(v); -} -inline Vec3d Matrixf::operator* (const Vec3d& v) const -{ - return postMult(v); -} -inline Vec4f Matrixf::operator* (const Vec4f& v) const -{ - return postMult(v); -} -inline Vec4d Matrixf::operator* (const Vec4d& v) const -{ - return postMult(v); -} - - -} //namespace osg - - -#endif diff --git a/libs/lib/mac32/include/osg/MixinVector b/libs/lib/mac32/include/osg/MixinVector deleted file mode 100644 index 0ed454c38..000000000 --- a/libs/lib/mac32/include/osg/MixinVector +++ /dev/null @@ -1,199 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_MIXIN_VECTOR -#define OSG_MIXIN_VECTOR 1 - -#include - -namespace osg { - -/** MixinVector is a base class that allows inheritance to be used to easily - * emulate derivation from std::vector but without introducing undefined - * behaviour through violation of virtual destructor rules. - * - * @author Neil Groves - */ -template -class MixinVector -{ - typedef typename std::vector vector_type; -public: - typedef typename vector_type::allocator_type allocator_type; - typedef typename vector_type::value_type value_type; - typedef typename vector_type::const_pointer const_pointer; - typedef typename vector_type::pointer pointer; - typedef typename vector_type::const_reference const_reference; - typedef typename vector_type::reference reference; - typedef typename vector_type::const_iterator const_iterator; - typedef typename vector_type::iterator iterator; - typedef typename vector_type::const_reverse_iterator const_reverse_iterator; - typedef typename vector_type::reverse_iterator reverse_iterator; - typedef typename vector_type::size_type size_type; - typedef typename vector_type::difference_type difference_type; - - explicit MixinVector() : _impl() - { - } - - explicit MixinVector(size_type initial_size, const value_type& fill_value = value_type()) - : _impl(initial_size, fill_value) - { - } - - template - MixinVector(InputIterator first, InputIterator last) - : _impl(first, last) - { - } - - MixinVector(const vector_type& other) - : _impl(other) - { - } - - MixinVector(const MixinVector& other) - : _impl(other._impl) - { - } - - MixinVector& operator=(const vector_type& other) - { - _impl = other; - return *this; - } - - MixinVector& operator=(const MixinVector& other) - { - _impl = other._impl; - return *this; - } - - virtual ~MixinVector() {} - - void clear() { _impl.clear(); } - void resize(size_type new_size, const value_type& fill_value = value_type()) { _impl.resize(new_size, fill_value); } - void reserve(size_type new_capacity) { _impl.reserve(new_capacity); } - - void swap(vector_type& other) { _impl.swap(other); } - void swap(MixinVector& other) { _impl.swap(other._impl); } - - bool empty() const { return _impl.empty(); } - size_type size() const { return _impl.size(); } - size_type capacity() const { return _impl.capacity(); } - size_type max_size() const { return _impl.max_size(); } - allocator_type get_allocator() const { return _impl.get_allocator(); } - - const_iterator begin() const { return _impl.begin(); } - iterator begin() { return _impl.begin(); } - const_iterator end() const { return _impl.end(); } - iterator end() { return _impl.end(); } - - const_reverse_iterator rbegin() const { return _impl.rbegin(); } - reverse_iterator rbegin() { return _impl.rbegin(); } - const_reverse_iterator rend() const { return _impl.rend(); } - reverse_iterator rend() { return _impl.rend(); } - - const_reference operator[](size_type index) const { return _impl[index]; } - reference operator[](size_type index) { return _impl[index]; } - - const_reference at(size_type index) const { return _impl.at(index); } - reference at(size_type index) { return _impl.at(index); } - - void assign(size_type count, const value_type& value) { _impl.assign(count, value); } - template - void assign(Iter first, Iter last) { _impl.assign(first, last); } - - void push_back(const value_type& value) { _impl.push_back(value); } - void pop_back() { _impl.pop_back(); } - - iterator erase(iterator where) { return _impl.erase(where); } - iterator erase(iterator first, iterator last) { return _impl.erase(first, last); } - - iterator insert(iterator where, const value_type& value) { return _impl.insert(where, value); } - - template - void insert(iterator where, InputIterator first, InputIterator last) - { - _impl.insert(where, first, last); - } - - void insert(iterator where, size_type count, const value_type& value) - { - _impl.insert(where, count, value); - } - - const_reference back() const { return _impl.back(); } - reference back() { return _impl.back(); } - const_reference front() const { return _impl.front(); } - reference front() { return _impl.front(); } - - vector_type& asVector() { return _impl; } - const vector_type& asVector() const { return _impl; } - - friend inline bool operator==(const MixinVector& left, const MixinVector& right) { return left._impl == right._impl; } - friend inline bool operator==(const MixinVector& left, const std::vector& right) { return left._impl == right; } - friend inline bool operator==(const std::vector& left, const MixinVector& right) { return left == right._impl; } - - friend inline bool operator!=(const MixinVector& left, const MixinVector& right) { return left._impl != right._impl; } - friend inline bool operator!=(const MixinVector& left, const std::vector& right) { return left._impl != right; } - friend inline bool operator!=(const std::vector& left, const MixinVector& right) { return left != right._impl; } - - friend inline bool operator<(const MixinVector& left, const MixinVector& right) { return left._impl < right._impl; } - friend inline bool operator<(const MixinVector& left, const std::vector& right) { return left._impl < right; } - friend inline bool operator<(const std::vector& left, const MixinVector& right) { return left < right._impl; } - - friend inline bool operator>(const MixinVector& left, const MixinVector& right) { return left._impl > right._impl; } - friend inline bool operator>(const MixinVector& left, const std::vector& right) { return left._impl > right; } - friend inline bool operator>(const std::vector& left, const MixinVector& right) { return left > right._impl; } - - friend inline bool operator<=(const MixinVector& left, const MixinVector& right) { return left._impl <= right._impl; } - friend inline bool operator<=(const MixinVector& left, const std::vector& right) { return left._impl <= right; } - friend inline bool operator<=(const std::vector& left, const MixinVector& right) { return left <= right._impl; } - - friend inline bool operator>=(const MixinVector& left, const MixinVector& right) { return left._impl >= right._impl; } - friend inline bool operator>=(const MixinVector& left, const std::vector& right) { return left._impl >= right; } - friend inline bool operator>=(const std::vector& left, const MixinVector& right) { return left >= right._impl; } - -private: - vector_type _impl; -}; - -template inline -void -swap(MixinVector& left, - MixinVector& right) -{ - std::swap(left.asVector(), right.asVector()); -} - -template inline -void -swap(MixinVector& left, - std::vector& right) -{ - std::swap(left.asVector(), right); -} - -template inline -void -swap(std::vector& left, - MixinVector& right) -{ - std::swap(left, right.asVector()); -} - -} // namespace osg - -#endif - diff --git a/libs/lib/mac32/include/osg/Multisample b/libs/lib/mac32/include/osg/Multisample deleted file mode 100644 index 322085a02..000000000 --- a/libs/lib/mac32/include/osg/Multisample +++ /dev/null @@ -1,158 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_MULTISAMPLE -#define OSG_MULTISAMPLE 1 - - -#include -#include -#include - - -#ifndef GL_ARB_multisample -#define GL_MULTISAMPLE_ARB 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F -#define GL_SAMPLE_COVERAGE_ARB 0x80A0 -#define GL_SAMPLE_BUFFERS_ARB 0x80A8 -#define GL_SAMPLES_ARB 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB -#define GL_MULTISAMPLE_BIT_ARB 0x20000000 -#endif -#ifndef GL_NV_multisample_filter_hint -#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 -#endif - - -namespace osg { - -/** Multisample - encapsulates the OpenGL Multisample state.*/ -class OSG_EXPORT Multisample : public StateAttribute -{ - public : - - enum Mode - { - FASTEST = GL_FASTEST, - NICEST = GL_NICEST, - DONT_CARE = GL_DONT_CARE - }; - - Multisample(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Multisample(const Multisample& trans,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(trans,copyop), - _coverage(trans._coverage), - _invert(trans._invert), - _mode(trans._mode) {} - - META_StateAttribute(osg, Multisample,MULTISAMPLE); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Multisample,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_coverage) - COMPARE_StateAttribute_Parameter(_invert) - COMPARE_StateAttribute_Parameter(_mode) - - return 0; // passed all the above comparison macros, must be equal. - } - - void setSampleCoverage(float coverage, bool invert) - { - _coverage = coverage; - _invert = invert; - } - inline void setCoverage(float coverage) { _coverage=coverage; } - inline float getCoverage() const { return _coverage; } - - inline void setInvert(bool invert) { _invert=invert; } - inline bool getInvert() const { return _invert; } - - inline void setHint(Mode mode) { _mode = mode; } - inline Mode getHint() const { return _mode; } - - virtual void apply(State& state) const; - - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provide convenience wrappers to - * check for the extensions or use the associated functions.*/ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setMultisampleSupported(bool flag) { _isMultisampleSupported=flag; } - void setMultisampleFilterHintSupported(bool flag) { _isMultisampleFilterHintSupported=flag; } - bool isMultisampleSupported() const { return _isMultisampleSupported; } - bool isMultisampleFilterHintSupported() const { return _isMultisampleFilterHintSupported; } - - void glSampleCoverage(GLclampf value, GLboolean invert) const; - - protected: - - ~Extensions() {} - - bool _isMultisampleSupported; - bool _isMultisampleFilterHintSupported; - - typedef void (GL_APIENTRY * GLSampleCoverageProc) (GLclampf value, GLboolean invert); - GLSampleCoverageProc _glSampleCoverage; - - }; - - /** Function to call to get the extension of a specified context. - * If the Extension object for that context has not yet been created - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object will - * only be created with the graphics context associated with ContextID..*/ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions.*/ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - - protected : - - virtual ~Multisample(); - - float _coverage; - bool _invert; - Mode _mode; -}; - -} - -#endif - - - diff --git a/libs/lib/mac32/include/osg/Node b/libs/lib/mac32/include/osg/Node deleted file mode 100644 index 242f3e11f..000000000 --- a/libs/lib/mac32/include/osg/Node +++ /dev/null @@ -1,465 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - - -#ifndef OSG_NODE -#define OSG_NODE 1 - -#include -#include -#include -#include - -#include -#include - - -// forward declare osgTerrrain::Terrain to enable declaration of asTerrain() method. -namespace osgTerrain { -class Terrain; -} - -namespace osg { - -// forcing declare classes to enable declaration of as*() methods. -class NodeVisitor; -class Group; -class Transform; -class Node; -class Switch; -class Geode; - -/** A vector of Nodes pointers which is used to describe the path from a root node to a descendant.*/ -typedef std::vector< Node* > NodePath; - -/** A vector of NodePath, typically used to describe all the paths from a node to the potential root nodes it has.*/ -typedef std::vector< NodePath > NodePathList; - -/** A vector of NodePath, typically used to describe all the paths from a node to the potential root nodes it has.*/ -typedef std::vector< Matrix > MatrixList; - -/** META_Node macro define the standard clone, isSameKindAs, className - * and accept methods. Use when subclassing from Node to make it - * more convenient to define the required pure virtual methods.*/ -#define META_Node(library,name) \ - virtual osg::Object* cloneType() const { return new name (); } \ - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ - virtual const char* className() const { return #name; } \ - virtual const char* libraryName() const { return #library; } \ - virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } } \ - - -/** Base class for all internal nodes in the scene graph. - Provides interface for most common node operations (Composite Pattern). -*/ -class OSG_EXPORT Node : public Object -{ - public: - - /** Construct a node. - Initialize the parent list to empty, node name to "" and - bounding sphere dirty flag to true.*/ - Node(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Node(const Node&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - /** clone an object of the same type as the node.*/ - virtual Object* cloneType() const { return new Node(); } - - /** return a clone of a node, with Object* return type.*/ - virtual Object* clone(const CopyOp& copyop) const { return new Node(*this,copyop); } - - /** return true if this and obj are of the same kind of object.*/ - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - - /** return the name of the node's library.*/ - virtual const char* libraryName() const { return "osg"; } - - /** return the name of the node's class type.*/ - virtual const char* className() const { return "Node"; } - - /** convert 'this' into a Group pointer if Node is a Group, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual Group* asGroup() { return 0; } - /** convert 'const this' into a const Group pointer if Node is a Group, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual const Group* asGroup() const { return 0; } - - /** Convert 'this' into a Transform pointer if Node is a Transform, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual Transform* asTransform() { return 0; } - - /** convert 'const this' into a const Transform pointer if Node is a Transform, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual const Transform* asTransform() const { return 0; } - - /** Convert 'this' into a Switch pointer if Node is a Switch, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual Switch* asSwitch() { return 0; } - - /** convert 'const this' into a const Switch pointer if Node is a Switch, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual const Switch* asSwitch() const { return 0; } - - /** Convert 'this' into a Geode pointer if Node is a Geode, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual Geode* asGeode() { return 0; } - - /** convert 'const this' into a const Geode pointer if Node is a Geode, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual const Geode* asGeode() const { return 0; } - - /** Convert 'this' into a Transform pointer if Node is a Terrain, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual osgTerrain::Terrain* asTerrain() { return 0; } - - /** convert 'const this' into a const Terrain pointer if Node is a Terrain, otherwise return 0. - * Equivalent to dynamic_cast(this).*/ - virtual const osgTerrain::Terrain* asTerrain() const { return 0; } - - - /** Visitor Pattern : calls the apply method of a NodeVisitor with this node's type.*/ - virtual void accept(NodeVisitor& nv); - /** Traverse upwards : calls parents' accept method with NodeVisitor.*/ - virtual void ascend(NodeVisitor& nv); - /** Traverse downwards : calls children's accept method with NodeVisitor.*/ - virtual void traverse(NodeVisitor& /*nv*/) {} - - /** A vector of osg::Group pointers which is used to store the parent(s) of node.*/ - typedef std::vector ParentList; - - /** Get the parent list of node. */ - inline const ParentList& getParents() const { return _parents; } - - /** Get the a copy of parent list of node. A copy is returned to - * prevent modification of the parent list.*/ - inline ParentList getParents() { return _parents; } - - inline Group* getParent(unsigned int i) { return _parents[i]; } - - /** - * Get a single const parent of node. - * @param i index of the parent to get. - * @return the parent i. - */ - inline const Group* getParent(unsigned int i) const { return _parents[i]; } - - /** - * Get the number of parents of node. - * @return the number of parents of this node. - */ - inline unsigned int getNumParents() const { return static_cast(_parents.size()); } - - /** Get the list of node paths parent paths. - * The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */ - NodePathList getParentalNodePaths(osg::Node* haltTraversalAtNode=0) const; - - /** Get the list of matrices that transform this node from local coordinates to world coordinates. - * The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */ - MatrixList getWorldMatrices(const osg::Node* haltTraversalAtNode=0) const; - - - /** Set update node callback, called during update traversal. */ - void setUpdateCallback(NodeCallback* nc); - - /** Get update node callback, called during update traversal. */ - inline NodeCallback* getUpdateCallback() { return _updateCallback.get(); } - - /** Get const update node callback, called during update traversal. */ - inline const NodeCallback* getUpdateCallback() const { return _updateCallback.get(); } - - /** Convenience method that sets the update callback of the node if it doesn't exist, or nest it into the existing one. */ - inline void addUpdateCallback(NodeCallback* nc) { - if (nc != NULL) { - if (_updateCallback.valid()) _updateCallback->addNestedCallback(nc); - else setUpdateCallback(nc); - } - } - - /** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */ - inline void removeUpdateCallback(NodeCallback* nc) { - if (nc != NULL && _updateCallback.valid()) { - if (_updateCallback == nc) setUpdateCallback(nc->getNestedCallback()); // replace the callback by the nested one - else _updateCallback->removeNestedCallback(nc); - } - } - - /** Get the number of Children of this node which require Update traversal, - * since they have an Update Callback attached to them or their children.*/ - inline unsigned int getNumChildrenRequiringUpdateTraversal() const { return _numChildrenRequiringUpdateTraversal; } - - - /** Set event node callback, called during event traversal. */ - void setEventCallback(NodeCallback* nc); - - /** Get event node callback, called during event traversal. */ - inline NodeCallback* getEventCallback() { return _eventCallback.get(); } - - /** Get const event node callback, called during event traversal. */ - inline const NodeCallback* getEventCallback() const { return _eventCallback.get(); } - - /** Convenience method that sets the event callback of the node if it doesn't exist, or nest it into the existing one. */ - inline void addEventCallback(NodeCallback* nc) { - if (nc != NULL) { - if (_eventCallback.valid()) _eventCallback->addNestedCallback(nc); - else setEventCallback(nc); - } - } - - /** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */ - inline void removeEventCallback(NodeCallback* nc) { - if (nc != NULL && _eventCallback.valid()) { - if (_eventCallback == nc) setEventCallback(nc->getNestedCallback()); // replace the callback by the nested one - else _eventCallback->removeNestedCallback(nc); - } - } - - /** Get the number of Children of this node which require Event traversal, - * since they have an Event Callback attached to them or their children.*/ - inline unsigned int getNumChildrenRequiringEventTraversal() const { return _numChildrenRequiringEventTraversal; } - - - /** Set cull node callback, called during cull traversal. */ - void setCullCallback(NodeCallback* nc) { _cullCallback = nc; } - - /** Get cull node callback, called during cull traversal. */ - inline NodeCallback* getCullCallback() { return _cullCallback.get(); } - - /** Get const cull node callback, called during cull traversal. */ - inline const NodeCallback* getCullCallback() const { return _cullCallback.get(); } - - /** Convenience method that sets the cull callback of the node if it doesn't exist, or nest it into the existing one. */ - inline void addCullCallback(NodeCallback* nc) { - if (nc != NULL) { - if (_cullCallback.valid()) _cullCallback->addNestedCallback(nc); - else setCullCallback(nc); - } - } - - /** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */ - inline void removeCullCallback(NodeCallback* nc) { - if (nc != NULL && _cullCallback.valid()) { - if (_cullCallback == nc) setCullCallback(nc->getNestedCallback()); // replace the callback by the nested one - else _cullCallback->removeNestedCallback(nc); - } - } - - /** Set the view frustum/small feature culling of this node to be active or inactive. - * The default value is true for _cullingActive. Used as a guide - * to the cull traversal.*/ - void setCullingActive(bool active); - - /** Get the view frustum/small feature _cullingActive flag for this node. Used as a guide - * to the cull traversal.*/ - inline bool getCullingActive() const { return _cullingActive; } - - /** Get the number of Children of this node which have culling disabled.*/ - inline unsigned int getNumChildrenWithCullingDisabled() const { return _numChildrenWithCullingDisabled; } - - /** Return true if this node can be culled by view frustum, occlusion or small feature culling during the cull traversal. - * Note, returns true only if no children have culling disabled, and the local _cullingActive flag is true.*/ - inline bool isCullingActive() const { return _numChildrenWithCullingDisabled==0 && _cullingActive && getBound().valid(); } - - /** Get the number of Children of this node which are or have OccluderNode's.*/ - inline unsigned int getNumChildrenWithOccluderNodes() const { return _numChildrenWithOccluderNodes; } - - - /** return true if this node is an OccluderNode or the subgraph below this node are OccluderNodes.*/ - bool containsOccluderNodes() const; - - - /** - * This is a set of bits (flags) that represent the Node. - * The default value is 0xffffffff (all bits set). - * - * The most common use of these is during traversal of the scene graph. - * For instance, when traversing the scene graph the osg::NodeVisitor does a bitwise - * AND of its TraversalMask with the Node#s NodeMask to - * determine if the Node should be processed/traversed. - * - * For example, if a Node has a NodeMask value of 0x02 (only 2nd bit set) - * and the osg::Camera has a CullMask of 0x4 (2nd bit not set) then during cull traversal, - * which takes it's TraversalMask from the Camera's CullMask, the node and any children - * would be ignored and thereby treated as "culled" and thus not rendered. - * Conversely, if the osg::Camera CullMask were 0x3 (2nd bit set) then the node - * would be processed and child Nodes would be examined. - */ - typedef unsigned int NodeMask; - /** Set the node mask.*/ - inline void setNodeMask(NodeMask nm) { _nodeMask = nm; } - /** Get the node Mask.*/ - inline NodeMask getNodeMask() const { return _nodeMask; } - - - - /** Set the node's StateSet.*/ - void setStateSet(osg::StateSet* stateset); - - /** return the node's StateSet, if one does not already exist create it - * set the node and return the newly created StateSet. This ensures - * that a valid StateSet is always returned and can be used directly.*/ - osg::StateSet* getOrCreateStateSet(); - - /** Return the node's StateSet. returns NULL if a stateset is not attached.*/ - inline osg::StateSet* getStateSet() { return _stateset.get(); } - - /** Return the node's const StateSet. Returns NULL if a stateset is not attached.*/ - inline const osg::StateSet* getStateSet() const { return _stateset.get(); } - - - /** A vector of std::string's which are used to describe the object.*/ - typedef std::vector DescriptionList; - - /** Set the list of string descriptions.*/ - void setDescriptions(const DescriptionList& descriptions); - - /** Get the description list of the node.*/ - DescriptionList& getDescriptions(); - - /** Get the const description list of the const node.*/ - const DescriptionList& getDescriptions() const; - - - /** Get a single const description of the const node.*/ - const std::string& getDescription(unsigned int i) const; - - /** Get a single description of the node.*/ - std::string& getDescription(unsigned int i); - - /** Get the number of descriptions of the node.*/ - unsigned int getNumDescriptions() const; - - /** Add a description string to the node.*/ - void addDescription(const std::string& desc); - - - /** Set the initial bounding volume to use when computing the overall bounding volume.*/ - void setInitialBound(const osg::BoundingSphere& bsphere) { _initialBound = bsphere; dirtyBound(); } - - /** Set the initial bounding volume to use when computing the overall bounding volume.*/ - const BoundingSphere& getInitialBound() const { return _initialBound; } - - /** Mark this node's bounding sphere dirty. - Forcing it to be computed on the next call to getBound().*/ - void dirtyBound(); - - /** Get the bounding sphere of node. - Using lazy evaluation computes the bounding sphere if it is 'dirty'.*/ - inline const BoundingSphere& getBound() const - { - if(!_boundingSphereComputed) - { - _boundingSphere = _initialBound; - if (_computeBoundCallback.valid()) - _boundingSphere.expandBy(_computeBoundCallback->computeBound(*this)); - else - _boundingSphere.expandBy(computeBound()); - - _boundingSphereComputed = true; - } - return _boundingSphere; - } - - - /** Compute the bounding sphere around Node's geometry or children. - This method is automatically called by getBound() when the bounding - sphere has been marked dirty via dirtyBound().*/ - virtual BoundingSphere computeBound() const; - - /** Callback to allow users to override the default computation of bounding volume.*/ - struct ComputeBoundingSphereCallback : public osg::Object - { - ComputeBoundingSphereCallback() {} - - ComputeBoundingSphereCallback(const ComputeBoundingSphereCallback&,const CopyOp&) {} - - META_Object(osg,ComputeBoundingSphereCallback); - - virtual BoundingSphere computeBound(const osg::Node&) const { return BoundingSphere(); } - }; - - /** Set the compute bound callback to override the default computeBound.*/ - void setComputeBoundingSphereCallback(ComputeBoundingSphereCallback* callback) { _computeBoundCallback = callback; } - - /** Get the compute bound callback.*/ - ComputeBoundingSphereCallback* getComputeBoundingSphereCallback() { return _computeBoundCallback.get(); } - - /** Get the const compute bound callback.*/ - const ComputeBoundingSphereCallback* getComputeBoundingSphereCallback() const { return _computeBoundCallback.get(); } - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int /*maxSize*/); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - - protected: - - /** Node destructor. Note, is protected so that Nodes cannot - be deleted other than by being dereferenced and the reference - count being zero (see osg::Referenced), preventing the deletion - of nodes which are still in use. This also means that - Nodes cannot be created on stack i.e Node node will not compile, - forcing all nodes to be created on the heap i.e Node* node - = new Node().*/ - virtual ~Node(); - - - - BoundingSphere _initialBound; - ref_ptr _computeBoundCallback; - mutable BoundingSphere _boundingSphere; - mutable bool _boundingSphereComputed; - - void addParent(osg::Group* node); - void removeParent(osg::Group* node); - - ParentList _parents; - friend class osg::Group; - friend class osg::Drawable; - friend class osg::StateSet; - - ref_ptr _updateCallback; - unsigned int _numChildrenRequiringUpdateTraversal; - void setNumChildrenRequiringUpdateTraversal(unsigned int num); - - ref_ptr _eventCallback; - unsigned int _numChildrenRequiringEventTraversal; - void setNumChildrenRequiringEventTraversal(unsigned int num); - - ref_ptr _cullCallback; - - bool _cullingActive; - unsigned int _numChildrenWithCullingDisabled; - void setNumChildrenWithCullingDisabled(unsigned int num); - - unsigned int _numChildrenWithOccluderNodes; - void setNumChildrenWithOccluderNodes(unsigned int num); - - NodeMask _nodeMask; - - ref_ptr _stateset; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/NodeCallback b/libs/lib/mac32/include/osg/NodeCallback deleted file mode 100644 index 949f97ca0..000000000 --- a/libs/lib/mac32/include/osg/NodeCallback +++ /dev/null @@ -1,98 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_NODECALLBACK -#define OSG_NODECALLBACK 1 - -#include -#include - -namespace osg { - -class Node; -class NodeVisitor; - -class OSG_EXPORT NodeCallback : public virtual Object { - - public : - - - NodeCallback(){} - - NodeCallback(const NodeCallback& nc,const CopyOp&): - _nestedCallback(nc._nestedCallback) {} - - - META_Object(osg,NodeCallback); - - - /** Callback method called by the NodeVisitor when visiting a node.*/ - virtual void operator()(Node* node, NodeVisitor* nv) - { - // note, callback is responsible for scenegraph traversal so - // they must call traverse(node,nv) to ensure that the - // scene graph subtree (and associated callbacks) are traversed. - traverse(node,nv); - } - - /** Call any nested callbacks and then traverse the scene graph. */ - void traverse(Node* node,NodeVisitor* nv); - - void setNestedCallback(NodeCallback* nc) { _nestedCallback = nc; } - NodeCallback* getNestedCallback() { return _nestedCallback.get(); } - const NodeCallback* getNestedCallback() const { return _nestedCallback.get(); } - - inline void addNestedCallback(NodeCallback* nc) - { - if (nc) - { - if (_nestedCallback.valid()) - { - nc->addNestedCallback(_nestedCallback.get()); - _nestedCallback = nc; - } - else - { - _nestedCallback = nc; - } - } - } - - inline void removeNestedCallback(NodeCallback* nc) - { - if (nc) - { - if (_nestedCallback==nc) - { - _nestedCallback = _nestedCallback->getNestedCallback(); - } - else if (_nestedCallback.valid()) - { - _nestedCallback->removeNestedCallback(nc); - } - } - } - - public: - - ref_ptr _nestedCallback; - - protected: - - virtual ~NodeCallback() {} -}; - -} // namespace - -#endif - diff --git a/libs/lib/mac32/include/osg/NodeTrackerCallback b/libs/lib/mac32/include/osg/NodeTrackerCallback deleted file mode 100644 index 3b79bca3e..000000000 --- a/libs/lib/mac32/include/osg/NodeTrackerCallback +++ /dev/null @@ -1,54 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_NODETRACKERCALLBACK -#define OSG_NODETRACKERCALLBACK 1 - -#include - -#include -#include -#include - -namespace osg -{ - -class OSG_EXPORT NodeTrackerCallback : public NodeCallback -{ - public: - - void setTrackNodePath(const osg::NodePath& nodePath) { _trackNodePath.setNodePath(nodePath); } - - void setTrackNodePath(const ObserverNodePath& nodePath) { _trackNodePath = nodePath; } - - ObserverNodePath& getTrackNodePath() { return _trackNodePath; } - - void setTrackNode(osg::Node* node); - osg::Node* getTrackNode(); - const osg::Node* getTrackNode() const; - - /** Implements the callback. */ - virtual void operator()(Node* node, NodeVisitor* nv); - - /** Update the node to track the nodepath.*/ - void update(osg::Node& node); - - protected: - - ObserverNodePath _trackNodePath; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/NodeVisitor b/libs/lib/mac32/include/osg/NodeVisitor deleted file mode 100644 index fe85bbe7e..000000000 --- a/libs/lib/mac32/include/osg/NodeVisitor +++ /dev/null @@ -1,369 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_NODEVISITOR -#define OSG_NODEVISITOR 1 - -#include -#include -#include - -namespace osg { - -class Billboard; -class ClearNode; -class ClipNode; -class CoordinateSystemNode; -class Geode; -class Group; -class LightSource; -class LOD; -class MatrixTransform; -class OccluderNode; -class OcclusionQueryNode; -class PagedLOD; -class PositionAttitudeTransform; -class Projection; -class ProxyNode; -class Sequence; -class Switch; -class TexGenNode; -class Transform; -class Camera; -class CameraView; - -const unsigned int UNINITIALIZED_FRAME_NUMBER=0xffffffff; - -#define META_NodeVisitor(library,name) \ - virtual const char* libraryName() const { return #library; }\ - virtual const char* className() const { return #name; } - -/** Visitor for type safe operations on osg::Nodes. - Based on GOF's Visitor pattern. The NodeVisitor - is useful for developing type safe operations to nodes - in the scene graph (as per Visitor pattern), and adds to this - support for optional scene graph traversal to allow - operations to be applied to whole scenes at once. The Visitor - pattern uses a technique of double dispatch as a mechanism to - call the appropriate apply(..) method of the NodeVisitor. To - use this feature one must use the Node::accept(NodeVisitor) which - is extended in each Node subclass, rather than the NodeVisitor - apply directly. So use root->accept(myVisitor); instead of - myVisitor.apply(*root). The later method will bypass the double - dispatch and the appropriate NodeVisitor::apply(..) method will - not be called. */ -class OSG_EXPORT NodeVisitor : public virtual Referenced -{ - public: - - enum TraversalMode - { - TRAVERSE_NONE, - TRAVERSE_PARENTS, - TRAVERSE_ALL_CHILDREN, - TRAVERSE_ACTIVE_CHILDREN - }; - - enum VisitorType - { - NODE_VISITOR = 0, - UPDATE_VISITOR, - EVENT_VISITOR, - COLLECT_OCCLUDER_VISITOR, - CULL_VISITOR - }; - - NodeVisitor(TraversalMode tm=TRAVERSE_NONE); - - NodeVisitor(VisitorType type,TraversalMode tm=TRAVERSE_NONE); - - virtual ~NodeVisitor(); - - /** return the library name/namespapce of the visitor's. Should be defined by derived classes.*/ - virtual const char* libraryName() const { return "osg"; } - - /** return the name of the visitor's class type. Should be defined by derived classes.*/ - virtual const char* className() const { return "NodeVisitor"; } - - /** Method to call to reset visitor. Useful if your visitor accumulates - state during a traversal, and you plan to reuse the visitor. - To flush that state for the next traversal: call reset() prior - to each traversal.*/ - virtual void reset() {} - - - /** Set the VisitorType, used to distinguish different visitors during - * traversal of the scene, typically used in the Node::traverse() method - * to select which behaviour to use for different types of traversal/visitors.*/ - inline void setVisitorType(VisitorType type) { _visitorType = type; } - - /** Get the VisitorType.*/ - inline VisitorType getVisitorType() const { return _visitorType; } - - /** Set the traversal number. Typically used to denote the frame count.*/ - inline void setTraversalNumber(unsigned int fn) { _traversalNumber = fn; } - - /** Get the traversal number. Typically used to denote the frame count.*/ - inline unsigned int getTraversalNumber() const { return _traversalNumber; } - - /** Set the FrameStamp that this traversal is associated with.*/ - inline void setFrameStamp(FrameStamp* fs) { _frameStamp = fs; } - - /** Get the FrameStamp that this traversal is associated with.*/ - inline const FrameStamp* getFrameStamp() const { return _frameStamp.get(); } - - - /** Set the TraversalMask of this NodeVisitor. - * The TraversalMask is used by the NodeVisitor::validNodeMask() method - * to determine whether to operate on a node and its subgraph. - * validNodeMask() is called automatically in the Node::accept() method before - * any call to NodeVisitor::apply(), apply() is only ever called if validNodeMask - * returns true. Note, if NodeVisitor::_traversalMask is 0 then all operations - * will be switched off for all nodes. Whereas setting both _traversalMask and - * _nodeMaskOverride to 0xffffffff will allow a visitor to work on all nodes - * regardless of their own Node::_nodeMask state.*/ - inline void setTraversalMask(Node::NodeMask mask) { _traversalMask = mask; } - - /** Get the TraversalMask.*/ - inline Node::NodeMask getTraversalMask() const { return _traversalMask; } - - /** Set the NodeMaskOverride mask. - * Used in validNodeMask() to determine whether to operate on a node or its - * subgraph, by OR'ing NodeVisitor::_nodeMaskOverride with the Node's own Node::_nodeMask. - * Typically used to force on nodes which may have - * been switched off by their own Node::_nodeMask.*/ - inline void setNodeMaskOverride(Node::NodeMask mask) { _nodeMaskOverride = mask; } - - /** Get the NodeMaskOverride mask.*/ - inline Node::NodeMask getNodeMaskOverride() const { return _nodeMaskOverride; } - - /** Method to called by Node and its subclass' Node::accept() method, if the result is true - * it is used to cull operations of nodes and their subgraphs. - * Return true if the result of a bit wise and of the NodeVisitor::_traversalMask - * with the bit or between NodeVistor::_nodeMaskOverride and the Node::_nodeMask. - * default values for _traversalMask is 0xffffffff, _nodeMaskOverride is 0x0, - * and osg::Node::_nodeMask is 0xffffffff. */ - inline bool validNodeMask(const osg::Node& node) const - { - return (getTraversalMask() & (getNodeMaskOverride() | node.getNodeMask()))!=0; - } - - /** Set the traversal mode for Node::traverse() to use when - deciding which children of a node to traverse. If a - NodeVisitor has been attached via setTraverseVisitor() - and the new mode is not TRAVERSE_VISITOR then the attached - visitor is detached. Default mode is TRAVERSE_NONE.*/ - inline void setTraversalMode(TraversalMode mode) { _traversalMode = mode; } - - /** Get the traversal mode.*/ - inline TraversalMode getTraversalMode() const { return _traversalMode; } - - /** - * Set user data, data must be subclassed from Referenced to allow - * automatic memory handling. If your own data isn't directly - * subclassed from Referenced then create an adapter object - * which points to your own objects and handles the memory addressing. - */ - inline void setUserData(Referenced* obj) { _userData = obj; } - - /** Get user data.*/ - inline Referenced* getUserData() { return _userData.get(); } - - /** Get const user data.*/ - inline const Referenced* getUserData() const { return _userData.get(); } - - - /** Method for handling traversal of a nodes. - If you intend to use the visitor for actively traversing - the scene graph then make sure the accept() methods call - this method unless they handle traversal directly.*/ - inline void traverse(Node& node) - { - if (_traversalMode==TRAVERSE_PARENTS) node.ascend(*this); - else if (_traversalMode!=TRAVERSE_NONE) node.traverse(*this); - } - - /** Method called by osg::Node::accept() method before - * a call to the NodeVisitor::apply(..). The back of the list will, - * therefore, be the current node being visited inside the apply(..), - * and the rest of the list will be the parental sequence of nodes - * from the top most node applied down the graph to the current node. - * Note, the user does not typically call pushNodeOnPath() as it - * will be called automatically by the Node::accept() method.*/ - inline void pushOntoNodePath(Node* node) { if (_traversalMode!=TRAVERSE_PARENTS) _nodePath.push_back(node); else _nodePath.insert(_nodePath.begin(),node); } - - /** Method called by osg::Node::accept() method after - * a call to NodeVisitor::apply(..). - * Note, the user does not typically call popFromNodePath() as it - * will be called automatically by the Node::accept() method.*/ - inline void popFromNodePath() { if (_traversalMode!=TRAVERSE_PARENTS) _nodePath.pop_back(); else _nodePath.erase(_nodePath.begin()); } - - /** Get the non const NodePath from the top most node applied down - * to the current Node being visited.*/ - NodePath& getNodePath() { return _nodePath; } - - /** Get the const NodePath from the top most node applied down - * to the current Node being visited.*/ - const NodePath& getNodePath() const { return _nodePath; } - - /** Get the eye point in local coordinates. - * Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.*/ - virtual osg::Vec3 getEyePoint() const { return Vec3(0.0f,0.0f,0.0f); } - - /** Get the view point in local coordinates. - * Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.*/ - virtual osg::Vec3 getViewPoint() const { return getEyePoint(); } - - /** Get the distance from a point to the eye point, distance value in local coordinate system. - * Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement. - * If the getDistanceFromEyePoint(pos) is not implemented then a default value of 0.0 is returned.*/ - virtual float getDistanceToEyePoint(const Vec3& /*pos*/, bool /*useLODScale*/) const { return 0.0f; } - - /** Get the distance of a point from the eye point, distance value in the eye coordinate system. - * Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement. - * If the getDistanceFromEyePoint(pos) is not implemented than a default value of 0.0 is returned.*/ - virtual float getDistanceFromEyePoint(const Vec3& /*pos*/, bool /*useLODScale*/) const { return 0.0f; } - - /** Get the distance from a point to the view point, distance value in local coordinate system. - * Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement. - * If the getDistanceToViewPoint(pos) is not implemented then a default value of 0.0 is returned.*/ - virtual float getDistanceToViewPoint(const Vec3& /*pos*/, bool /*useLODScale*/) const { return 0.0f; } - - - virtual void apply(Node& node); - - virtual void apply(Geode& node); - virtual void apply(Billboard& node); - - virtual void apply(Group& node); - - virtual void apply(ProxyNode& node); - - virtual void apply(Projection& node); - - virtual void apply(CoordinateSystemNode& node); - - virtual void apply(ClipNode& node); - virtual void apply(TexGenNode& node); - virtual void apply(LightSource& node); - - virtual void apply(Transform& node); - virtual void apply(Camera& node); - virtual void apply(CameraView& node); - virtual void apply(MatrixTransform& node); - virtual void apply(PositionAttitudeTransform& node); - - virtual void apply(Switch& node); - virtual void apply(Sequence& node); - virtual void apply(LOD& node); - virtual void apply(PagedLOD& node); - virtual void apply(ClearNode& node); - virtual void apply(OccluderNode& node); - virtual void apply(OcclusionQueryNode& node); - - - /** Callback for managing database paging, such as generated by PagedLOD nodes.*/ - class DatabaseRequestHandler : public osg::Referenced - { - public: - - DatabaseRequestHandler(): - Referenced(true) {} - - virtual void requestNodeFile(const std::string& fileName, osg::NodePath& nodePath, float priority, const FrameStamp* framestamp, osg::ref_ptr& databaseRequest, const osg::Referenced* options=0) = 0; - - protected: - virtual ~DatabaseRequestHandler() {} - }; - - /** Set the handler for database requests.*/ - void setDatabaseRequestHandler(DatabaseRequestHandler* handler) { _databaseRequestHandler = handler; } - - /** Get the handler for database requests.*/ - DatabaseRequestHandler* getDatabaseRequestHandler() { return _databaseRequestHandler.get(); } - - /** Get the const handler for database requests.*/ - const DatabaseRequestHandler* getDatabaseRequestHandler() const { return _databaseRequestHandler.get(); } - - - /** Callback for managing image paging, such as generated by PagedLOD nodes.*/ - class ImageRequestHandler : public osg::Referenced - { - public: - - ImageRequestHandler(): - Referenced(true) {} - - virtual double getPreLoadTime() const = 0; - - virtual osg::Image* readImageFile(const std::string& fileName) = 0; - - virtual void requestImageFile(const std::string& fileName,osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const FrameStamp* framestamp) = 0; - - protected: - virtual ~ImageRequestHandler() {} - }; - - /** Set the handler for image requests.*/ - void setImageRequestHandler(ImageRequestHandler* handler) { _imageRequestHandler = handler; } - - /** Get the handler for image requests.*/ - ImageRequestHandler* getImageRequestHandler() { return _imageRequestHandler.get(); } - - /** Get the const handler for image requests.*/ - const ImageRequestHandler* getImageRequestHandler() const { return _imageRequestHandler.get(); } - - - - protected: - - VisitorType _visitorType; - unsigned int _traversalNumber; - - ref_ptr _frameStamp; - - TraversalMode _traversalMode; - Node::NodeMask _traversalMask; - Node::NodeMask _nodeMaskOverride; - - NodePath _nodePath; - - ref_ptr _userData; - - ref_ptr _databaseRequestHandler; - ref_ptr _imageRequestHandler; - -}; - - -/** Convenience functor for assisting visiting of arrays of osg::Node's.*/ -class NodeAcceptOp -{ - public: - - NodeAcceptOp(NodeVisitor& nv):_nv(nv) {} - NodeAcceptOp(const NodeAcceptOp& naop):_nv(naop._nv) {} - - void operator () (Node* node) { node->accept(_nv); } - void operator () (ref_ptr node) { node->accept(_nv); } - - protected: - - NodeAcceptOp& operator = (const NodeAcceptOp&) { return *this; } - - NodeVisitor& _nv; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Notify b/libs/lib/mac32/include/osg/Notify deleted file mode 100644 index b7ad579b4..000000000 --- a/libs/lib/mac32/include/osg/Notify +++ /dev/null @@ -1,145 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_NOTIFY_H -#define OSG_NOTIFY_H 1 - -#include -#include // for NotifyHandler - -#include - -namespace osg { - -/** Range of notify levels from DEBUG_FP through to FATAL, ALWAYS - * is reserved for forcing the absorption of all messages. The - * keywords are also used verbatim when specified by the environmental - * variable OSGNOTIFYLEVEL or OSG_NOTIFY_LEVEL. - * See documentation on osg::notify() for further details. - */ -enum NotifySeverity { - ALWAYS=0, - FATAL=1, - WARN=2, - NOTICE=3, - INFO=4, - DEBUG_INFO=5, - DEBUG_FP=6 -}; - -/** set the notify level, overriding the default or the value set by - * the environmental variable OSGNOTIFYLEVEL or OSG_NOTIFY_LEVEL. - */ -extern OSG_EXPORT void setNotifyLevel(NotifySeverity severity); - -/** get the notify level. */ -extern OSG_EXPORT NotifySeverity getNotifyLevel(); - -/** initialize notify level. */ -extern OSG_EXPORT bool initNotifyLevel(); - -#ifdef OSG_NOTIFY_DISABLED - inline bool isNotifyEnabled(NotifySeverity) { return false; } -#else - /** is notification enabled, given the current setNotifyLevel() setting? */ - extern OSG_EXPORT bool isNotifyEnabled(NotifySeverity severity); -#endif - -/** notify messaging function for providing fatal through to verbose - * debugging messages. Level of messages sent to the console can - * be controlled by setting the NotifyLevel either within your - * application or via the an environmental variable i.e. - * - setenv OSGNOTIFYLEVEL DEBUG (for tsh) - * - export OSGNOTIFYLEVEL=DEBUG (for bourne shell) - * - set OSGNOTIFYLEVEL=DEBUG (for Windows) - * - * All tell the osg to redirect all debugging and more important messages - * to the notification stream (useful for debugging) setting ALWAYS will force - * all messages to be absorbed, which might be appropriate for final - * applications. Default NotifyLevel is NOTICE. Check the enum - * #NotifySeverity for full range of possibilities. To use the notify - * with your code simply use the notify function as a normal file - * stream (like std::cout) i.e - * @code - * osg::notify(osg::DEBUG) << "Hello Bugs!" << std::endl; - * @endcode - * @see setNotifyLevel, setNotifyHandler - */ -extern OSG_EXPORT std::ostream& notify(const NotifySeverity severity); - -inline std::ostream& notify(void) { return notify(osg::INFO); } - -#define OSG_NOTIFY(level) if (osg::isNotifyEnabled(level)) osg::notify(level) -#define OSG_ALWAYS OSG_NOTIFY(osg::ALWAYS) -#define OSG_FATAL OSG_NOTIFY(osg::FATAL) -#define OSG_WARN OSG_NOTIFY(osg::WARN) -#define OSG_NOTICE OSG_NOTIFY(osg::NOTICE) -#define OSG_INFO OSG_NOTIFY(osg::INFO) -#define OSG_DEBUG OSG_NOTIFY(osg::DEBUG_INFO) -#define OSG_DEBUG_FP OSG_NOTIFY(osg::DEBUG_FP) - -/** Handler processing output of notification stream. It acts as a sink to - * notification messages. It is called when notification stream needs to be - * synchronized (i.e. after osg::notify() << std::endl). - * StandardNotifyHandler is used by default, it writes notifications to stderr - * (severity <= WARN) or stdout (severity > WARN). - * Notifications can be redirected to other sinks such as GUI widgets or - * windows debugger (WinDebugNotifyHandler) with custom handlers. - * Use setNotifyHandler to set custom handler. - * Note that osg notification API is not thread safe although notification - * handler is called from many threads. When incorporating handlers into GUI - * widgets you must take care of thread safety on your own. - * @see setNotifyHandler - */ -class OSG_EXPORT NotifyHandler : public osg::Referenced -{ -public: - virtual void notify(osg::NotifySeverity severity, const char *message) = 0; -}; - -/** Set notification handler, by default StandardNotifyHandler is used. - * @see NotifyHandler - */ -extern OSG_EXPORT void setNotifyHandler(NotifyHandler *handler); - -/** Get currrent notification handler. */ -extern OSG_EXPORT NotifyHandler *getNotifyHandler(); - -/** Redirects notification stream to stderr (severity <= WARN) or stdout (severity > WARN). - * The fputs() function is used to write messages to standard files. Note that - * std::out and std::cerr streams are not used. - * @see setNotifyHandler - */ -class OSG_EXPORT StandardNotifyHandler : public NotifyHandler -{ -public: - void notify(osg::NotifySeverity severity, const char *message); -}; - -#if defined(WIN32) && !defined(__CYGWIN__) - -/** Redirects notification stream to windows debugger with use of - * OuputDebugString functions. - * @see setNotifyHandler - */ -class OSG_EXPORT WinDebugNotifyHandler : public NotifyHandler -{ -public: - void notify(osg::NotifySeverity severity, const char *message); -}; - -#endif - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Object b/libs/lib/mac32/include/osg/Object deleted file mode 100644 index 458796755..000000000 --- a/libs/lib/mac32/include/osg/Object +++ /dev/null @@ -1,267 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_OBJECT -#define OSG_OBJECT 1 - -#include -#include -#include -#include - -#include -#include - -namespace osg { - -// forward declare -class State; -class UserDataContainer; - -#define _ADDQUOTES(def) #def -#define ADDQUOTES(def) _ADDQUOTES(def) - -/** META_Object macro define the standard clone, isSameKindAs and className methods. - * Use when subclassing from Object to make it more convenient to define - * the standard pure virtual clone, isSameKindAs and className methods - * which are required for all Object subclasses.*/ -#define META_Object(library,name) \ - virtual osg::Object* cloneType() const { return new name (); } \ - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ - virtual const char* libraryName() const { return #library; }\ - virtual const char* className() const { return #name; } - -/** Base class/standard interface for objects which require IO support, - cloning and reference counting. - Based on GOF Composite, Prototype and Template Method patterns. -*/ -class OSG_EXPORT Object : public Referenced -{ - public: - - - /** Construct an object. Note Object is a pure virtual base class - and therefore cannot be constructed on its own, only derived - classes which override the clone and className methods are - concrete classes and can be constructed.*/ - inline Object():Referenced(),_dataVariance(UNSPECIFIED), _userDataContainer(0) {} - - inline explicit Object(bool threadSafeRefUnref):Referenced(threadSafeRefUnref),_dataVariance(UNSPECIFIED),_userDataContainer(0) {} - - /** Copy constructor, optional CopyOp object can be used to control - * shallow vs deep copying of dynamic data.*/ - Object(const Object&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - /** Clone the type of an object, with Object* return type. - Must be defined by derived classes.*/ - virtual Object* cloneType() const = 0; - - /** Clone an object, with Object* return type. - Must be defined by derived classes.*/ - virtual Object* clone(const CopyOp&) const = 0; - - virtual bool isSameKindAs(const Object*) const { return true; } - - /** return the name of the object's library. Must be defined - by derived classes. The OpenSceneGraph convention is that the - namespace of a library is the same as the library name.*/ - virtual const char* libraryName() const = 0; - - /** return the name of the object's class type. Must be defined - by derived classes.*/ - virtual const char* className() const = 0; - - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Set the name of object using C++ style string.*/ - virtual void setName( const std::string& name ) { _name = name; } - - /** Set the name of object using a C style string.*/ - inline void setName( const char* name ) - { - if (name) setName(std::string(name)); - else setName(std::string()); - } - - /** Get the name of object.*/ - inline const std::string& getName() const { return _name; } - - - enum DataVariance - { - DYNAMIC, - STATIC, - UNSPECIFIED - }; - - /** Set the data variance of this object. - * Can be set to either STATIC for values that do not change over the lifetime of the object, - * or DYNAMIC for values that vary over the lifetime of the object. The DataVariance value - * can be used by routines such as optimization codes that wish to share static data. - * UNSPECIFIED is used to specify that the DataVariance hasn't been set yet. */ - inline void setDataVariance(DataVariance dv) { _dataVariance = dv; } - - /** Get the data variance of this object.*/ - inline DataVariance getDataVariance() const { return _dataVariance; } - - /** Compute the DataVariance based on an assessment of callback etc.*/ - virtual void computeDataVariance() {} - - - /** set the UserDataContainer object.*/ - void setUserDataContainer(osg::UserDataContainer* udc); - - /** get the UserDataContainer attached to this object.*/ - osg::UserDataContainer* getUserDataContainer() { return _userDataContainer; } - - /** get the const UserDataContainer attached to this object.*/ - const osg::UserDataContainer* getUserDataContainer() const { return _userDataContainer; } - - /** Convinience method that returns the UserDataContainer, and if one doesn't already exist creates and assigns - * a DefaultUserDataContainer to the Object and then return this new UserDataContainer.*/ - osg::UserDataContainer* getOrCreateUserDataContainer(); - - - /** - * Set user data, data must be subclassed from Referenced to allow - * automatic memory handling. If your own data isn't directly - * subclassed from Referenced then create an adapter object - * which points to your own object and handles the memory addressing. - */ - virtual void setUserData(Referenced* obj); - - /** Get user data.*/ - virtual Referenced* getUserData(); - - /** Get const user data.*/ - virtual const Referenced* getUserData() const; - - - - /** Convinience method that casts the named UserObject to osg::TemplateValueObject and gets the value. - * To use this template method you need to include the osg/ValueObject header.*/ - template - bool getUserValue(const std::string& name, T& value) const; - - /** Convinience method that creates the osg::TemplateValueObject to store the - * specified value and adds it as a named UserObject. - * To use this template method you need to include the osg/ValueObject header. */ - template - void setUserValue(const std::string& name, const T& value); - - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int /*maxSize*/) {} - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const {} - - - protected: - - /** Object destructor. Note, is protected so that Objects cannot - be deleted other than by being dereferenced and the reference - count being zero (see osg::Referenced), preventing the deletion - of nodes which are still in use. This also means that - Nodes cannot be created on stack i.e Node node will not compile, - forcing all nodes to be created on the heap i.e Node* node - = new Node().*/ - virtual ~Object(); - - std::string _name; - DataVariance _dataVariance; - - osg::UserDataContainer* _userDataContainer; - - private: - - /** disallow any copy operator.*/ - Object& operator = (const Object&) { return *this; } -}; - -template -T* clone(const T* t, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) -{ - if (t) - { - osg::ref_ptr obj = t->clone(copyop); - - T* ptr = dynamic_cast(obj.get()); - if (ptr) - { - obj.release(); - return ptr; - } - else - { - OSG_WARN<<"Warning: osg::clone(const T*, osg::CopyOp&) cloned object not of type T, returning NULL."< -T* clone(const T* t, const std::string& name, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) -{ - T* newObject = osg::clone(t, copyop); - if (newObject) - { - newObject->setName(name); - return newObject; - } - else - { - OSG_WARN<<"Warning: osg::clone(const T*, const std::string&, const osg::CopyOp) passed null object to clone, returning NULL."< -T* cloneType(const T* t) -{ - if (t) - { - osg::ref_ptr obj = t->cloneType(); - - T* ptr = dynamic_cast(obj.get()); - if (ptr) - { - obj.release(); - return ptr; - } - else - { - OSG_WARN<<"Warning: osg::cloneType(const T*) cloned object not of type T, returning NULL."< -#include -#include - -namespace osg { - -/** Observer base class for tracking when objects are unreferenced (there reference count goes to 0) and are being deleted.*/ -class OSG_EXPORT Observer -{ - public: - Observer(); - virtual ~Observer(); - - /** objectDeleted is called when the observed object is about to be deleted. The observer will be automatically - * removed from the observerd objects observer set so there is no need for the objectDeleted implementation - * to call removeObserver() on the observed object. */ - virtual void objectDeleted(void*) {} - -}; - -/** Class used by osg::Referenced to track the observers associated with it.*/ -class OSG_EXPORT ObserverSet : public osg::Referenced -{ - public: - - ObserverSet(const Referenced* observedObject); - - Referenced* getObserverdObject() { return _observedObject; } - const Referenced* getObserverdObject() const { return _observedObject; } - - /** "Lock" a Referenced object i.e., protect it from being deleted - * by incrementing its reference count. - * - * returns null if object doesn't exist anymore. */ - Referenced* addRefLock(); - - inline OpenThreads::Mutex* getObserverSetMutex() const { return &_mutex; } - - void addObserver(Observer* observer); - void removeObserver(Observer* observer); - - void signalObjectDeleted(void* ptr); - - typedef std::set Observers; - Observers& getObservers() { return _observers; } - const Observers& getObservers() const { return _observers; } - - protected: - - ObserverSet(const ObserverSet& rhs): osg::Referenced(rhs) {} - ObserverSet& operator = (const ObserverSet& /*rhs*/) { return *this; } - virtual ~ObserverSet(); - - mutable OpenThreads::Mutex _mutex; - Referenced* _observedObject; - Observers _observers; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ObserverNodePath b/libs/lib/mac32/include/osg/ObserverNodePath deleted file mode 100644 index a9a06bc14..000000000 --- a/libs/lib/mac32/include/osg/ObserverNodePath +++ /dev/null @@ -1,76 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_OBSERVERNODEPATH -#define OSG_OBSERVERNODEPATH 1 - -#include -#include -#include - -namespace osg { - -typedef std::vector< osg::ref_ptr > RefNodePath; - -/** ObserverNodePath is an observer class for tracking changes to a NodePath, - * that automatically invalidates it when nodes are deleted.*/ -class OSG_EXPORT ObserverNodePath -{ - public: - ObserverNodePath(); - - ObserverNodePath(const ObserverNodePath& rhs); - - ObserverNodePath(const osg::NodePath& nodePath); - - ~ObserverNodePath(); - - ObserverNodePath& operator = (const ObserverNodePath& rhs); - - /** get the NodePath from the first parental chain back to root, plus the specified node.*/ - void setNodePathTo(osg::Node* node); - - void setNodePath(const osg::RefNodePath& nodePath); - - void setNodePath(const osg::NodePath& nodePath); - - void clearNodePath(); - - /** Get a thread safe RefNodePath, return true if NodePath is valid.*/ - bool getRefNodePath(RefNodePath& refNodePath) const; - - /** Get a lightweight NodePath that isn't thread safe but - * may be safely used in single threaded applications, or when - * its known that the NodePath won't be invalidated during usage - * of the NodePath. return true if NodePath is valid.*/ - bool getNodePath(NodePath& nodePath) const; - - bool empty() const - { - OpenThreads::ScopedLock lock(_mutex); - return _nodePath.empty(); - } - - protected: - - void _setNodePath(const osg::NodePath& nodePath); - void _clearNodePath(); - - typedef std::vector< osg::observer_ptr > ObsNodePath; - mutable OpenThreads::Mutex _mutex; - ObsNodePath _nodePath; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/OccluderNode b/libs/lib/mac32/include/osg/OccluderNode deleted file mode 100644 index 5250ad1d9..000000000 --- a/libs/lib/mac32/include/osg/OccluderNode +++ /dev/null @@ -1,59 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_OCCLUDERNODE -#define OSG_OCCLUDERNODE 1 - -#include -#include - -namespace osg { - -/** - * OccluderNode is a Group node which provides hooks for adding - * ConvexPlanarOccluders to the scene. - */ -class OSG_EXPORT OccluderNode : public Group -{ - public : - - OccluderNode(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - OccluderNode(const OccluderNode&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, OccluderNode); - - - /** Attach a ConvexPlanarOccluder to an OccluderNode.*/ - void setOccluder(ConvexPlanarOccluder* occluder) { _occluder = occluder; } - - /** Get the ConvexPlanarOccluder* attached to a OccluderNode. */ - ConvexPlanarOccluder* getOccluder() { return _occluder.get(); } - - /** Get the const ConvexPlanarOccluder* attached to a OccluderNode.*/ - const ConvexPlanarOccluder* getOccluder() const { return _occluder.get(); } - - /** Overrides Group's computeBound.*/ - virtual BoundingSphere computeBound() const; - - protected : - - virtual ~OccluderNode() {} - - ref_ptr _occluder; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/OcclusionQueryNode b/libs/lib/mac32/include/osg/OcclusionQueryNode deleted file mode 100644 index b45cf3e78..000000000 --- a/libs/lib/mac32/include/osg/OcclusionQueryNode +++ /dev/null @@ -1,202 +0,0 @@ -// -// Copyright (C) 2007 Skew Matrix Software LLC (http://www.skew-matrix.com) -// -// This library is open source and may be redistributed and/or modified under -// the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or -// (at your option) any later version. The full license is in LICENSE file -// included with this distribution, and on the openscenegraph.org website. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// OpenSceneGraph Public License for more details. -// - -#ifndef OSG_OCCLUSION_QUERY_NODE -#define OSG_OCCLUSION_QUERY_NODE 1 - -#include -#include -#include -#include - - -namespace osg { - -// Create and return a StateSet appropriate for performing an occlusion -// query test (disable lighting, texture mapping, etc). Probably some -// room for improvement here. Could disable shaders, for example. -osg::StateSet* initOQState(); - -// Create and return a StateSet for rendering a debug representation of query geometry. -osg::StateSet* initOQDebugState(); - -// TestResult -- stores (per context) results of an occlusion query -// test performed by QueryGeometry. An OcclusionQueryNode has a -// Geode owning a single QueryGeometry that -// draws the occlusion query geometry. QueryGeometry keeps a -// TestResult per context to store the result/status of each query. -// Accessed during the cull and draw traversals. -class TestResult : public osg::Referenced -{ -public: - TestResult() : _init( false ), _id( 0 ), _contextID( 0 ), _active( false ), _numPixels( 0 ) {} - ~TestResult() {} - - bool _init; - - // Query ID for this context. - GLuint _id; - // Context ID owning this query ID. - unsigned int _contextID; - - // Set to true when a query gets issued and set to - // false when the result is retrieved. - mutable bool _active; - - // Result of last query. - GLint _numPixels; -}; - -// QueryGeometry -- A Drawable that performs an occlusion query, -// using its geometric data as the query geometry. -class QueryGeometry : public osg::Geometry -{ -public: - QueryGeometry( const std::string& oqnName=std::string("") ); - ~QueryGeometry(); - - void reset(); - - // TBD implement copy constructor - - virtual void drawImplementation( osg::RenderInfo& renderInfo ) const; - - unsigned int getNumPixels( const osg::Camera* cam ); - - virtual void releaseGLObjects( osg::State* state = 0 ) const; - - static void deleteQueryObject( unsigned int contextID, GLuint handle ); - static void flushDeletedQueryObjects( unsigned int contextID, double currentTime, double& availableTime ); - static void discardDeletedQueryObjects( unsigned int contextID ); - -protected: - typedef std::map< const osg::Camera*, TestResult > ResultMap; - mutable ResultMap _results; - mutable OpenThreads::Mutex _mapMutex; - - // Needed for debug only - std::string _oqnName; -}; - -// This Node performs occlusion query testing on its children. -// You can use it directly to occlusion query test a portion -// of your scene graph, or you can use it implicitly with an -// OcclusionQueryRoot, which places OcclusionQueryNodes where -// needed and acts as a master control. -class OSG_EXPORT OcclusionQueryNode : public osg::Group -{ -public: - OcclusionQueryNode(); - - // Copy constructor using CopyOp to manage deep vs shallow copy. - OcclusionQueryNode( const OcclusionQueryNode& oqn, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY ); - - META_Node( osg, OcclusionQueryNode ); - - virtual osg::BoundingSphere computeBound() const; - - virtual void releaseGLObjects( osg::State* state = 0 ) const; - - - // When disabled, OQN doesn't perform occlusion queries, and simply - // renders its children. - void setQueriesEnabled( bool enable=true ); - bool getQueriesEnabled() const { return _enabled; } - - - // Sets/gets the visibility threshold. If the test indicates that - // the number of visible pixels is less than the specified - // threshold, don't draw the actual geometry. - void setVisibilityThreshold( unsigned int pixels ) { _visThreshold = pixels; } - unsigned int getVisibilityThreshold() const { return _visThreshold; } - - // Specifies how many frames to wait before issuing another query. - void setQueryFrameCount( unsigned int frames ) { _queryFrameCount = frames; } - unsigned int getQueryFrameCount() const { return _queryFrameCount; } - - // Indicate whether or not the bounding box used in the occlusion query test - // should be rendered. Handy for debugging and development. - // Should only be called outside of cull/draw. No thread issues. - void setDebugDisplay( bool enable ); - bool getDebugDisplay() const; - - - // Set and get the StateSet used by the OcclusionQueryNode - // when rendering the query geometry. OQN creates its own by - // default, but if you use many OQNs you might want to use - // this method to set all OQNs to use the same StateSet - // for more efficient processing. - void setQueryStateSet( osg::StateSet* ss ); - osg::StateSet* getQueryStateSet(); - const osg::StateSet* getQueryStateSet() const; - - // Set and get the StateSet used by the OcclusionQueryNode - // when rendering the debug query geometry (see setDebugDisplay). - void setDebugStateSet( osg::StateSet* ss ); - osg::StateSet* getDebugStateSet(); - const osg::StateSet* getDebugStateSet() const; - - // For statistics gathering, e.g., by a NodeVisitor. - bool getPassed() const; - - - // These methods are public so that osgUtil::CullVisitor can access them. - // Not intended for application use. - virtual bool getPassed( const osg::Camera* camera, osg::NodeVisitor& nv ); - void traverseQuery( const osg::Camera* camera, osg::NodeVisitor& nv ); - void traverseDebug( osg::NodeVisitor& nv ); - - - // Delete unused query IDs for this contextID. - static void flushDeletedQueryObjects( unsigned int contextID, double currentTime, double& availableTime ); - - // discard all the cached query objects which need to be deleted - // in the OpenGL context related to contextID. - // Note, unlike flush no OpenGL calls are made, instead the handles are all removed. - // this call is useful for when an OpenGL context has been destroyed. - static void discardDeletedQueryObjects( unsigned int contextID ); - -protected: - virtual ~OcclusionQueryNode(); - - virtual void createSupportNodes(); - - osg::ref_ptr< osg::Geode > _queryGeode; - osg::ref_ptr< osg::Geode > _debugGeode; - - bool _enabled; - - // Tracks the last frame number that we performed a query. - // User can set how many times (See setQueryFrameCount). - typedef std::map< const osg::Camera*, unsigned int > FrameCountMap; - FrameCountMap _frameCountMap; - mutable OpenThreads::Mutex _frameCountMutex; - - // For statistics gathering - bool _passed; - - // User-settable variables - unsigned int _visThreshold; - unsigned int _queryFrameCount; - bool _debugBB; - - - // Required to ensure that computeBound() is thread-safe. - mutable OpenThreads::Mutex _computeBoundMutex; -}; - -} - - -#endif diff --git a/libs/lib/mac32/include/osg/OperationThread b/libs/lib/mac32/include/osg/OperationThread deleted file mode 100644 index 6d3ef2c6e..000000000 --- a/libs/lib/mac32/include/osg/OperationThread +++ /dev/null @@ -1,227 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_OPERATIONTHREAD -#define OSG_OPERATIONTHREAD 1 - -#include -#include - -#include -#include -#include -#include - -#include -#include - -namespace osg { - -class RefBlock : virtual public osg::Referenced, public OpenThreads::Block -{ - public: - - RefBlock(): - osg::Referenced(true) {} - -}; - -class RefBlockCount : virtual public osg::Referenced, public OpenThreads::BlockCount -{ - public: - - RefBlockCount(unsigned blockCount): - osg::Referenced(true), - OpenThreads::BlockCount(blockCount) {} - -}; - -/** Base class for implementing graphics operations.*/ -class Operation : virtual public Referenced -{ - public: - - Operation(const std::string& name, bool keep): - osg::Referenced(true), - _name(name), - _keep(keep) {} - - - /** Set the human readable name of the operation.*/ - void setName(const std::string& name) { _name = name; } - - /** Get the human readable name of the operation.*/ - const std::string& getName() const { return _name; } - - /** Set whether the operation should be kept once its been applied.*/ - void setKeep(bool keep) { _keep = keep; } - - /** Get whether the operation should be kept once its been applied.*/ - bool getKeep() const { return _keep; } - - /** if this operation is a barrier then release it.*/ - virtual void release() {} - - /** Do the actual task of this operation.*/ - virtual void operator () (Object*) = 0; - - protected: - - Operation(): - Referenced(true), - _keep(false) {} - - Operation(const Operation& op): - Referenced(true), - _name(op._name), - _keep(op._keep) {} - - virtual ~Operation() {} - - std::string _name; - bool _keep; -}; - -class OperationThread; - -class OSG_EXPORT OperationQueue : public Referenced -{ - public: - - OperationQueue(); - - /** Get the next operation from the operation queue. - * Return null ref_ptr<> if no operations are left in queue. */ - osg::ref_ptr getNextOperation(bool blockIfEmpty = false); - - /** Return true if the operation queue is empty. */ - bool empty(); - - /** Return the num of pending operations that are sitting in the OperationQueue.*/ - unsigned int getNumOperationsInQueue(); - - /** Add operation to end of OperationQueue, this will be - * executed by the operation thread once this operation gets to the head of the queue.*/ - void add(Operation* operation); - - /** Remove operation from OperationQueue.*/ - void remove(Operation* operation); - - /** Remove named operation from OperationQueue.*/ - void remove(const std::string& name); - - /** Remove all operations from OperationQueue.*/ - void removeAllOperations(); - - /** Run the operations. */ - void runOperations(Object* callingObject=0); - - /** Call release on all operations. */ - void releaseAllOperations(); - - /** Release operations block that is used to block threads that are waiting on an empty operations queue.*/ - void releaseOperationsBlock(); - - typedef std::set OperationThreads; - - /** Get the set of OperationThreads that are sharing this OperationQueue. */ - const OperationThreads& getOperationThreads() const { return _operationThreads; } - - protected: - - virtual ~OperationQueue(); - - friend class OperationThread; - - void addOperationThread(OperationThread* thread); - void removeOperationThread(OperationThread* thread); - - typedef std::list< osg::ref_ptr > Operations; - - OpenThreads::Mutex _operationsMutex; - osg::ref_ptr _operationsBlock; - Operations _operations; - Operations::iterator _currentOperationIterator; - - OperationThreads _operationThreads; -}; - -/** OperationThread is a helper class for running Operation within a single thread.*/ -class OSG_EXPORT OperationThread : public Referenced, public OpenThreads::Thread -{ - public: - OperationThread(); - - void setParent(Object* parent) { _parent = parent; } - - Object* getParent() { return _parent.get(); } - - const Object* getParent() const { return _parent.get(); } - - - /** Set the OperationQueue. */ - void setOperationQueue(OperationQueue* opq); - - /** Get the OperationQueue. */ - OperationQueue* getOperationQueue() { return _operationQueue.get(); } - - /** Get the const OperationQueue. */ - const OperationQueue* getOperationQueue() const { return _operationQueue.get(); } - - - /** Add operation to end of OperationQueue, this will be - * executed by the graphics thread once this operation gets to the head of the queue.*/ - void add(Operation* operation); - - /** Remove operation from OperationQueue.*/ - void remove(Operation* operation); - - /** Remove named operation from OperationQueue.*/ - void remove(const std::string& name); - - /** Remove all operations from OperationQueue.*/ - void removeAllOperations(); - - - /** Get the operation currently being run.*/ - osg::ref_ptr getCurrentOperation() { return _currentOperation; } - - /** Run does the opertion thread run loop.*/ - virtual void run(); - - void setDone(bool done); - - bool getDone() const { return _done; } - - /** Cancel this graphics thread.*/ - virtual int cancel(); - - protected: - - virtual ~OperationThread(); - - observer_ptr _parent; - - bool _done; - - OpenThreads::Mutex _threadMutex; - osg::ref_ptr _operationQueue; - osg::ref_ptr _currentOperation; - -}; - -typedef OperationThread OperationsThread; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/PagedLOD b/libs/lib/mac32/include/osg/PagedLOD deleted file mode 100644 index 3f2711e4f..000000000 --- a/libs/lib/mac32/include/osg/PagedLOD +++ /dev/null @@ -1,160 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_PagedLOD -#define OSG_PagedLOD 1 - -#include - -namespace osg { - -/** PagedLOD. -*/ -class OSG_EXPORT PagedLOD : public LOD -{ - public : - - PagedLOD(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - PagedLOD(const PagedLOD&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, PagedLOD); - - - - virtual void traverse(NodeVisitor& nv); - - virtual bool addChild(Node *child); - - virtual bool addChild(Node *child, float min, float max); - - virtual bool addChild(Node *child, float min, float max,const std::string& filename, float priorityOffset=0.0f, float priorityScale=1.0f); - - virtual bool removeChildren(unsigned int pos,unsigned int numChildrenToRemove=1); - - - /** Set the optional database osgDB::Options object to use when loaded children.*/ - void setDatabaseOptions(osg::Referenced* options) { _databaseOptions = options; } - - /** Get the optional database osgDB::Options object used when loaded children.*/ - osg::Referenced* getDatabaseOptions() { return _databaseOptions.get(); } - - /** Get the optional database osgDB::Options object used when loaded children.*/ - const osg::Referenced* getDatabaseOptions() const { return _databaseOptions.get(); } - - - /** Set the database path to prepend to children's filenames.*/ - void setDatabasePath(const std::string& path); - - /** Get the database path used to prepend to children's filenames.*/ - inline const std::string& getDatabasePath() const { return _databasePath; } - - - struct OSG_EXPORT PerRangeData - { - PerRangeData(); - PerRangeData(const PerRangeData& prd); - PerRangeData& operator = (const PerRangeData& prd); - - std::string _filename; - float _priorityOffset; - float _priorityScale; - double _timeStamp; - unsigned int _frameNumber; - unsigned int _frameNumberOfLastReleaseGLObjects; - osg::ref_ptr _databaseRequest; - }; - - typedef std::vector PerRangeDataList; - - void setFileName(unsigned int childNo, const std::string& filename) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._filename=filename; } - const std::string& getFileName(unsigned int childNo) const { return _perRangeDataList[childNo]._filename; } - unsigned int getNumFileNames() const { return _perRangeDataList.size(); } - - - void setPriorityOffset(unsigned int childNo, float priorityOffset) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._priorityOffset=priorityOffset; } - float getPriorityOffset(unsigned int childNo) const { return _perRangeDataList[childNo]._priorityOffset; } - unsigned int getNumPriorityOffsets() const { return _perRangeDataList.size(); } - - void setPriorityScale(unsigned int childNo, float priorityScale) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._priorityScale=priorityScale; } - float getPriorityScale(unsigned int childNo) const { return _perRangeDataList[childNo]._priorityScale; } - unsigned int getNumPriorityScales() const { return _perRangeDataList.size(); } - - - void setTimeStamp(unsigned int childNo, double timeStamp) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._timeStamp=timeStamp; } - double getTimeStamp(unsigned int childNo) const { return _perRangeDataList[childNo]._timeStamp; } - unsigned int getNumTimeStamps() const { return _perRangeDataList.size(); } - - void setFrameNumber(unsigned int childNo, unsigned int frameNumber) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._frameNumber=frameNumber; } - unsigned getFrameNumber(unsigned int childNo) const { return _perRangeDataList[childNo]._frameNumber; } - unsigned int getNumFrameNumbers() const { return _perRangeDataList.size(); } - - - /** Return the DatabaseRequest object used by the DatabasePager to keep track of file load requests - * being carried on behalf of the DatabasePager. - * Note, in normal OSG usage you should not set this value yourself, as this will be managed by - * the osgDB::DatabasePager.*/ - osg::ref_ptr& getDatabaseRequest(unsigned int childNo) { return _perRangeDataList[childNo]._databaseRequest; } - - /** Return the const DatabaseRequest object.*/ - const osg::ref_ptr& getDatabaseRequest(unsigned int childNo) const { return _perRangeDataList[childNo]._databaseRequest; } - - - /** Set the frame number of the last time that this PageLOD node was traversed. - * Note, this frame number is automatically set by the traverse() method for all traversals (update, cull etc.). - */ - inline void setFrameNumberOfLastTraversal(unsigned int frameNumber) { _frameNumberOfLastTraversal=frameNumber; } - - /** Get the frame number of the last time that this PageLOD node was traversed.*/ - inline unsigned int getFrameNumberOfLastTraversal() const { return _frameNumberOfLastTraversal; } - - - /** Set the number of children that the PagedLOD must keep around, even if they are older than their expiry time.*/ - inline void setNumChildrenThatCannotBeExpired(unsigned int num) { _numChildrenThatCannotBeExpired = num; } - - /** Get the number of children that the PagedLOD must keep around, even if they are older than their expiry time.*/ - unsigned int getNumChildrenThatCannotBeExpired() const { return _numChildrenThatCannotBeExpired; } - - /** Set wether you want to disable the paging in of external nodes.*/ - void setDisableExternalChildrenPaging(bool flag) { _disableExternalChildrenPaging = flag; } - - bool getDisableExternalChildrenPaging() const { return _disableExternalChildrenPaging; } - - - - /** Remove the children from the PagedLOD which haven't been visited since specified expiry time and expiry frame number. - * The removed children are added to the removeChildren list passed into the method, - * this allows the children to be deleted later at the caller's discretion. - * Return true if children are removed, false otherwise. */ - virtual bool removeExpiredChildren(double expiryTime, unsigned int expiryFrame, NodeList& removedChildren); - - protected : - - virtual ~PagedLOD(); - - void expandPerRangeDataTo(unsigned int pos); - - ref_ptr _databaseOptions; - std::string _databasePath; - - unsigned int _frameNumberOfLastTraversal; - unsigned int _numChildrenThatCannotBeExpired; - bool _disableExternalChildrenPaging; - - PerRangeDataList _perRangeDataList; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Plane b/libs/lib/mac32/include/osg/Plane deleted file mode 100644 index 4af8c8f27..000000000 --- a/libs/lib/mac32/include/osg/Plane +++ /dev/null @@ -1,362 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_PLANE -#define OSG_PLANE 1 - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace osg { - -/** @brief A plane class. It can be used to represent an infinite plane. - * - * The infinite plane is described by an implicit plane equation a*x+b*y+c*z+d = 0. Though it is not mandatory that - * a^2+b^2+c^2 = 1 is fulfilled in general some methods require it (@see osg::Plane::distance). */ -class OSG_EXPORT Plane -{ - - public: - -#ifdef OSG_USE_FLOAT_PLANE - /** Type of Plane class.*/ - typedef float value_type; - typedef Vec3f Vec3_type; - typedef Vec4f Vec4_type; -#else - /** Type of Plane class.*/ - typedef double value_type; - typedef Vec3d Vec3_type; - typedef Vec4d Vec4_type; -#endif - - /** Number of vector components. */ - enum { num_components = 3 }; - - - /// Default constructor - /** The default constructor initializes all values to zero. - * @warning Although the method osg::Plane::valid() will return true after the default constructors call the plane - * is mathematically invalid! Default data do not describe a valid plane. */ - inline Plane() { _fv[0]=0.0; _fv[1]=0.0; _fv[2]=0.0; _fv[3]=0.0; _lowerBBCorner = 0; _upperBBCorner = 0; } - inline Plane(const Plane& pl) { set(pl); } - /// Constructor - /** The plane is described as a*x+b*y+c*z+d = 0. - * @remark You may call osg::Plane::MakeUnitLength afterwards if the passed values are not normalized. */ - inline Plane(value_type a,value_type b,value_type c,value_type d) { set(a,b,c,d); } - - /// Constructor - /** The plane can also be described as vec*[x,y,z,1]. - * @remark You may call osg::Plane::MakeUnitLength afterwards if the passed values are not normalized. */ - inline Plane(const Vec4f& vec) { set(vec); } - /// Constructor - /** The plane can also be described as vec*[x,y,z,1]. - * @remark You may call osg::Plane::MakeUnitLength afterwards if the passed values are not normalized. */ - inline Plane(const Vec4d& vec) { set(vec); } - - /// Constructor - /** This constructor initializes the internal values directly without any checking or manipulation. - * @param norm The normal of the plane. - * @param d The negative distance from the point of origin to the plane. - * @remark You may call osg::Plane::MakeUnitLength afterwards if the passed normal was not normalized. */ - inline Plane(const Vec3_type& norm,value_type d) { set(norm,d); } - - /// Constructor - /** This constructor calculates from the three points describing an infinite plane the internal values. - * @param v1 Point in the plane. - * @param v2 Point in the plane. - * @param v3 Point in the plane. - * @remark After this constructor call the plane's normal is normalized in case the three points described a mathematically - * valid plane. - * @remark The normal is determined by building the cross product of (v2-v1) ^ (v3-v2). */ - inline Plane(const Vec3_type& v1, const Vec3_type& v2, const Vec3_type& v3) { set(v1,v2,v3); } - - /// Constructor - /** This constructor initializes the internal values directly without any checking or manipulation. - * @param norm The normal of the plane. - * @param point A point of the plane. - * @remark You may call osg::Plane::MakeUnitLength afterwards if the passed normal was not normalized. */ - inline Plane(const Vec3_type& norm, const Vec3_type& point) { set(norm,point); } - - inline Plane& operator = (const Plane& pl) - { - if (&pl==this) return *this; - set(pl); - return *this; - } - - inline void set(const Plane& pl) { _fv[0]=pl._fv[0]; _fv[1]=pl._fv[1]; _fv[2]=pl._fv[2]; _fv[3]=pl._fv[3]; calculateUpperLowerBBCorners(); } - inline void set(value_type a, value_type b, value_type c, value_type d) { _fv[0]=a; _fv[1]=b; _fv[2]=c; _fv[3]=d; calculateUpperLowerBBCorners(); } - - inline void set(const Vec4f& vec) { set(vec[0],vec[1],vec[2],vec[3]); } - inline void set(const Vec4d& vec) { set(vec[0],vec[1],vec[2],vec[3]); } - - inline void set(const Vec3_type& norm, double d) { set(norm[0],norm[1],norm[2],d); } - - inline void set(const Vec3_type& v1, const Vec3_type& v2, const Vec3_type& v3) - { - Vec3_type norm = (v2-v1)^(v3-v2); - value_type length = norm.length(); - if (length>1e-6) norm/= length; - else norm.set(0.0,0.0,0.0); - set(norm[0],norm[1],norm[2],-(v1*norm)); - } - - inline void set(const Vec3_type& norm, const Vec3_type& point) - { - value_type d = -norm[0]*point[0] - norm[1]*point[1] - norm[2]*point[2]; - set(norm[0],norm[1],norm[2],d); - } - - /** flip/reverse the orientation of the plane.*/ - inline void flip() - { - _fv[0] = -_fv[0]; - _fv[1] = -_fv[1]; - _fv[2] = -_fv[2]; - _fv[3] = -_fv[3]; - calculateUpperLowerBBCorners(); - } - - /** This method multiplies the coefficients of the plane equation with a constant factor so that the - * equation a^2+b^2+c^2 = 1 holds. */ - inline void makeUnitLength() - { - value_type inv_length = 1.0 / sqrt(_fv[0]*_fv[0] + _fv[1]*_fv[1]+ _fv[2]*_fv[2]); - _fv[0] *= inv_length; - _fv[1] *= inv_length; - _fv[2] *= inv_length; - _fv[3] *= inv_length; - } - - /** calculate the upper and lower bounding box corners to be used - * in the intersect(BoundingBox&) method for speeding calculations.*/ - inline void calculateUpperLowerBBCorners() - { - _upperBBCorner = (_fv[0]>=0.0?1:0) | - (_fv[1]>=0.0?2:0) | - (_fv[2]>=0.0?4:0); - - _lowerBBCorner = (~_upperBBCorner)&7; - - } - - /// Checks if all internal values describing the plane have valid numbers - /** @warning This method does not check if the plane is mathematically correctly described! - * @remark The only case where all elements have valid numbers and the plane description is invalid occurs if the plane's normal - * is zero. */ - inline bool valid() const { return !isNaN(); } - inline bool isNaN() const { return osg::isNaN(_fv[0]) || osg::isNaN(_fv[1]) || osg::isNaN(_fv[2]) || osg::isNaN(_fv[3]); } - - inline bool operator == (const Plane& plane) const { return _fv[0]==plane._fv[0] && _fv[1]==plane._fv[1] && _fv[2]==plane._fv[2] && _fv[3]==plane._fv[3]; } - - inline bool operator != (const Plane& plane) const { return _fv[0]!=plane._fv[0] || _fv[1]!=plane._fv[1] || _fv[2]!=plane._fv[2] || _fv[3]!=plane._fv[3]; } - - /** A plane is said to be smaller than another plane if the first non-identical element of the internal array is smaller than the - * corresponding element of the other plane. */ - inline bool operator < (const Plane& plane) const - { - if (_fv[0]plane._fv[0]) return false; - else if (_fv[1]plane._fv[1]) return false; - else if (_fv[2]plane._fv[2]) return false; - else return (_fv[3]& vertices) const - { - if (vertices.empty()) return -1; - - int noAbove = 0; - int noBelow = 0; - int noOn = 0; - for(std::vector::const_iterator itr=vertices.begin(); - itr != vertices.end(); - ++itr) - { - float d = distance(*itr); - if (d>0.0f) ++noAbove; - else if (d<0.0f) ++noBelow; - else ++noOn; - } - - if (noAbove>0) - { - if (noBelow>0) return 0; - else return 1; - } - return -1; // treat points on line as outside... - } - - /** intersection test between plane and vertex list - return 1 if the bs is completely above plane, - return 0 if the bs intersects the plane, - return -1 if the bs is completely below the plane.*/ - inline int intersect(const std::vector& vertices) const - { - if (vertices.empty()) return -1; - - int noAbove = 0; - int noBelow = 0; - int noOn = 0; - for(std::vector::const_iterator itr=vertices.begin(); - itr != vertices.end(); - ++itr) - { - double d = distance(*itr); - if (d>0.0) ++noAbove; - else if (d<0.0) ++noBelow; - else ++noOn; - } - - if (noAbove>0) - { - if (noBelow>0) return 0; - else return 1; - } - return -1; // treat points on line as outside... - } - - /** intersection test between plane and bounding sphere. - return 1 if the bs is completely above plane, - return 0 if the bs intersects the plane, - return -1 if the bs is completely below the plane.*/ - inline int intersect(const BoundingSphere& bs) const - { - float d = distance(bs.center()); - - if (d>bs.radius()) return 1; - else if (d<-bs.radius()) return -1; - else return 0; - } - - - /** intersection test between plane and bounding sphere. - return 1 if the bs is completely above plane, - return 0 if the bs intersects the plane, - return -1 if the bs is completely below the plane.*/ - inline int intersect(const BoundingBox& bb) const - { - // if lowest point above plane than all above. - if (distance(bb.corner(_lowerBBCorner))>0.0f) return 1; - - // if highest point is below plane then all below. - if (distance(bb.corner(_upperBBCorner))<0.0f) return -1; - - // d_lower<=0.0f && d_upper>=0.0f - // therefore must be crossing plane. - return 0; - - } - - /** Transform the plane by matrix. Note, this operation carries out - * the calculation of the inverse of the matrix since a plane - * must be multiplied by the inverse transposed to transform it. This - * make this operation expensive. If the inverse has been already - * calculated elsewhere then use transformProvidingInverse() instead. - * See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf*/ - inline void transform(const osg::Matrix& matrix) - { - osg::Matrix inverse; - inverse.invert(matrix); - transformProvidingInverse(inverse); - } - - /** Transform the plane by providing a pre inverted matrix. - * see transform for details. */ - inline void transformProvidingInverse(const osg::Matrix& matrix) - { - // note pre multiplications, which effectively transposes matrix. - Vec4_type vec(_fv[0],_fv[1],_fv[2],_fv[3]); - vec = matrix * vec; - set(vec); - makeUnitLength(); - } - - protected: - - /** Vec member variable. */ - value_type _fv[4]; - - // variables cached to optimize calcs against bounding boxes. - unsigned int _upperBBCorner; - unsigned int _lowerBBCorner; - - -}; - -} // end of namespace - -#endif diff --git a/libs/lib/mac32/include/osg/Point b/libs/lib/mac32/include/osg/Point deleted file mode 100644 index e364612bb..000000000 --- a/libs/lib/mac32/include/osg/Point +++ /dev/null @@ -1,157 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_POINT -#define OSG_POINT 1 - -#include -#include - -#ifndef GL_POINT_SMOOTH - #define GL_POINT_SMOOTH 0x0B10 -#endif - -#ifndef GL_POINT_SMOOTH_HINT - #define GL_POINT_SMOOTH_HINT 0x0C51 -#endif - -namespace osg { - -/** Point - encapsulates the OpenGL point smoothing and size state.*/ -class OSG_EXPORT Point : public StateAttribute -{ - public : - - Point(); - - Point(float size); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Point(const Point& point,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(point,copyop), - _size(point._size), - _fadeThresholdSize(point._fadeThresholdSize), - _distanceAttenuation(point._distanceAttenuation), - _minSize(point._minSize), - _maxSize(point._maxSize) {} - - META_StateAttribute(osg, Point, POINT); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Point,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_size) - COMPARE_StateAttribute_Parameter(_fadeThresholdSize) - COMPARE_StateAttribute_Parameter(_distanceAttenuation) - COMPARE_StateAttribute_Parameter(_minSize) - COMPARE_StateAttribute_Parameter(_maxSize) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_POINT_SMOOTH); - return true; - } - - void setSize(float size); - inline float getSize() const { return _size; } - - void setFadeThresholdSize(float fadeThresholdSize); - inline float getFadeThresholdSize() const { return _fadeThresholdSize; } - - void setDistanceAttenuation(const Vec3& distanceAttenuation); - inline const Vec3& getDistanceAttenuation() const { return _distanceAttenuation; } - - void setMinSize(float minSize); - inline float getMinSize() const {return _minSize;} - - void setMaxSize(float maxSize); - inline float getMaxSize() const {return _maxSize;} - - virtual void apply(State& state) const; - - /** Encapsulates queries of extension availability, obtains extension - * function pointers, and provides convenience wrappers for - * calling extension functions. */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setPointParametersSupported(bool flag) { _isPointParametersSupported=flag; } - bool isPointParametersSupported() const { return _isPointParametersSupported; } - - void setPointSpriteCoordOriginSupported(bool flag) { _isPointSpriteCoordOriginSupported=flag; } - bool isPointSpriteCoordOriginSupported() const { return _isPointSpriteCoordOriginSupported; } - - void glPointParameteri(GLenum pname, GLint param) const; - void glPointParameterf(GLenum pname, GLfloat param) const; - void glPointParameterfv(GLenum pname, const GLfloat *params) const; - - protected: - - ~Extensions() {} - - bool _isPointParametersSupported; - bool _isPointSpriteCoordOriginSupported; - - typedef void (GL_APIENTRY * GLPointParameteriProc) (GLenum pname, GLint param); - typedef void (GL_APIENTRY * GLPointParameterfProc) (GLenum pname, GLfloat param); - typedef void (GL_APIENTRY * GLPointParameterfvProc) (GLenum pname, const GLfloat *params); - - GLPointParameteriProc _glPointParameteri; - GLPointParameterfProc _glPointParameterf; - GLPointParameterfvProc _glPointParameterfv; - - }; - - /** Returns the Extensions object for the given context. - * If createIfNotInitalized is true and the Extensions object doesn't - * exist, getExtensions() creates it on the given context. - * Returns NULL if createIfNotInitalized is false and the Extensions - * object doesn't exist. */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** setExtensions() allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes, - * but need to ensure that they all use the same low common denominator extensions. */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - protected : - - virtual ~Point(); - - float _size; - float _fadeThresholdSize; - Vec3 _distanceAttenuation; - float _minSize; - float _maxSize; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/PointSprite b/libs/lib/mac32/include/osg/PointSprite deleted file mode 100644 index 349fa816b..000000000 --- a/libs/lib/mac32/include/osg/PointSprite +++ /dev/null @@ -1,80 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSG_POINTSPRITE -#define OSG_POINTSPRITE 1 - -#include -#include - -#ifndef GL_ARB_point_sprite -#define GL_POINT_SPRITE_ARB 0x8861 -#define GL_COORD_REPLACE_ARB 0x8862 -#endif - -#ifndef GL_POINT_SPRITE_COORD_ORIGIN -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#endif - -namespace osg { - -/** PointSprite base class which encapsulates enabling of point sprites .*/ -class OSG_EXPORT PointSprite : public osg::StateAttribute { -public: - - PointSprite(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - PointSprite(const PointSprite& ps,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - StateAttribute(ps,copyop), - _coordOriginMode(ps._coordOriginMode) {} - - - META_StateAttribute(osg, PointSprite, POINTSPRITE); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const; - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_POINT_SPRITE_ARB); - return true; - } - - virtual bool checkValidityOfAssociatedModes(osg::State&) const; - - virtual bool isTextureAttribute() const { return true; } - - virtual void apply(osg::State& state) const; - - static bool isPointSpriteSupported(unsigned int context); - - enum CoordOriginMode { - UPPER_LEFT = GL_UPPER_LEFT, - LOWER_LEFT = GL_LOWER_LEFT - }; - - inline void setCoordOriginMode(CoordOriginMode mode) { _coordOriginMode = mode; } - inline CoordOriginMode getCoordOriginMode() const { return _coordOriginMode; } - -protected: - virtual ~PointSprite(); - - CoordOriginMode _coordOriginMode; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/PolygonMode b/libs/lib/mac32/include/osg/PolygonMode deleted file mode 100644 index 98d549998..000000000 --- a/libs/lib/mac32/include/osg/PolygonMode +++ /dev/null @@ -1,90 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_POLYGONMODE -#define OSG_POLYGONMODE 1 - -#include -#include - -#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) - #define GL_POINT 0x1B00 - #define GL_LINE 0x1B01 - #define GL_FILL 0x1B02 -#endif - -namespace osg { - -/** State Class for setting OpenGL's polygon culling mode. -*/ -class OSG_EXPORT PolygonMode : public StateAttribute -{ - public : - - enum Mode { - POINT = GL_POINT, - LINE = GL_LINE, - FILL = GL_FILL - }; - - enum Face { - FRONT_AND_BACK, - FRONT, - BACK - }; - - PolygonMode(); - - PolygonMode(Face face,Mode mode); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - PolygonMode(const PolygonMode& pm,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(pm,copyop), - _modeFront(pm._modeFront), - _modeBack(pm._modeBack) {} - - META_StateAttribute(osg, PolygonMode, POLYGONMODE); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(PolygonMode,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_modeFront) - COMPARE_StateAttribute_Parameter(_modeBack) - - return 0; // passed all the above comparison macros, must be equal. - } - - void setMode(Face face,Mode mode); - Mode getMode(Face face) const; - - inline bool getFrontAndBack() const { return _modeFront==_modeBack; } - - virtual void apply(State& state) const; - - protected: - - virtual ~PolygonMode(); - - Mode _modeFront; - Mode _modeBack; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/PolygonOffset b/libs/lib/mac32/include/osg/PolygonOffset deleted file mode 100644 index 360fd0490..000000000 --- a/libs/lib/mac32/include/osg/PolygonOffset +++ /dev/null @@ -1,99 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_POLYGONOFFSET -#define OSG_POLYGONOFFSET 1 - -#include - -#ifndef GL_POLYGON_OFFSET_LINE - #define GL_POLYGON_OFFSET_LINE 0x2A02 - #define GL_POLYGON_OFFSET_POINT 0x2A01 -#endif - -namespace osg { - -/** PolygonOffset - encapsulates the OpenGL glPolygonOffset state.*/ -class OSG_EXPORT PolygonOffset : public StateAttribute -{ - public : - - PolygonOffset(); - - PolygonOffset(float factor, float units); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - PolygonOffset(const PolygonOffset& po,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(po,copyop), - _factor(po._factor), - _units(po._units) {} - - META_StateAttribute(osg, PolygonOffset, POLYGONOFFSET); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(PolygonOffset,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_factor) - COMPARE_StateAttribute_Parameter(_units) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_POLYGON_OFFSET_FILL); -#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) - usage.usesMode(GL_POLYGON_OFFSET_LINE); - usage.usesMode(GL_POLYGON_OFFSET_POINT); -#endif - return true; - } - - inline void setFactor(float factor) { _factor = factor; } - inline float getFactor() const { return _factor; } - - inline void setUnits(float units) { _units = units; } - inline float getUnits() const { return _units; } - - virtual void apply(State& state) const; - - - static void setFactorMultiplier(float multiplier); - static float getFactorMultiplier(); - - static void setUnitsMultiplier(float multiplier); - static float getUnitsMultiplier(); - - static bool areFactorAndUnitsMultipliersSet(); - - /** Checks with the OpenGL driver to try and pick multiplier appropriate for the hardware. - note, requires a valid graphics context to be current. */ - static void setFactorAndUnitsMultipliersUsingBestGuessForDriver(); - - protected : - - virtual ~PolygonOffset(); - - float _factor; - float _units; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/PolygonStipple b/libs/lib/mac32/include/osg/PolygonStipple deleted file mode 100644 index 5d9720566..000000000 --- a/libs/lib/mac32/include/osg/PolygonStipple +++ /dev/null @@ -1,68 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// -*- Mode: c++ -*- - -#ifndef OSG_POLYGONSTIPPLE -#define OSG_POLYGONSTIPPLE 1 - -#include - -#ifndef GL_POLYGON_STIPPLE - #define GL_POLYGON_STIPPLE 0x0B42 -#endif - -namespace osg -{ - -class OSG_EXPORT PolygonStipple : public StateAttribute -{ - public : - - PolygonStipple(); - - PolygonStipple(const GLubyte* mask); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - PolygonStipple(const PolygonStipple& lw,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, PolygonStipple, POLYGONSTIPPLE); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const; - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_POLYGON_STIPPLE); - return true; - } - - /** set the mask up, copying 128 bytes (32x32 bitfield) from mask into the local _mask.*/ - void setMask(const GLubyte* mask); - - /** get a pointer to the mask.*/ - inline const GLubyte* getMask() const {return _mask;} - - - virtual void apply(State& state) const; - - protected : - - virtual ~PolygonStipple(); - - GLubyte _mask[128]; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Polytope b/libs/lib/mac32/include/osg/Polytope deleted file mode 100644 index f70cb5234..000000000 --- a/libs/lib/mac32/include/osg/Polytope +++ /dev/null @@ -1,406 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_POLYTOPE -#define OSG_POLYTOPE 1 - -#include -#include - -namespace osg { - - -/** A Polytope class for representing convex clipping volumes made up of a set of planes. - * When adding planes, their normals should point inwards (into the volume) */ -class OSG_EXPORT Polytope -{ - - public: - - typedef unsigned int ClippingMask; - typedef std::vector PlaneList; - typedef std::vector VertexList; - typedef fast_back_stack MaskStack; - - inline Polytope() {setupMask();} - - inline Polytope(const Polytope& cv) : - _maskStack(cv._maskStack), - _resultMask(cv._resultMask), - _planeList(cv._planeList), - _referenceVertexList(cv._referenceVertexList) {} - - inline Polytope(const PlaneList& pl) : _planeList(pl) {setupMask();} - - inline ~Polytope() {} - - inline void clear() { _planeList.clear(); setupMask(); } - - inline Polytope& operator = (const Polytope& cv) - { - if (&cv==this) return *this; - _maskStack = cv._maskStack; - _resultMask = cv._resultMask; - _planeList = cv._planeList; - _referenceVertexList = cv._referenceVertexList; - return *this; - } - - /** Create a Polytope which is a cube, centered at 0,0,0, with sides of 2 units.*/ - void setToUnitFrustum(bool withNear=true, bool withFar=true) - { - _planeList.clear(); - _planeList.push_back(Plane(1.0,0.0,0.0,1.0)); // left plane. - _planeList.push_back(Plane(-1.0,0.0,0.0,1.0)); // right plane. - _planeList.push_back(Plane(0.0,1.0,0.0,1.0)); // bottom plane. - _planeList.push_back(Plane(0.0,-1.0,0.0,1.0)); // top plane. - if (withNear) _planeList.push_back(Plane(0.0,0.0,1.0,1.0)); // near plane - if (withFar) _planeList.push_back(Plane(0.0,0.0,-1.0,1.0)); // far plane - setupMask(); - } - - /** Create a Polytope which is a equivalent to BoundingBox.*/ - void setToBoundingBox(const BoundingBox& bb) - { - _planeList.clear(); - _planeList.push_back(Plane(1.0,0.0,0.0,-bb.xMin())); // left plane. - _planeList.push_back(Plane(-1.0,0.0,0.0,bb.xMax())); // right plane. - _planeList.push_back(Plane(0.0,1.0,0.0,-bb.yMin())); // bottom plane. - _planeList.push_back(Plane(0.0,-1.0,0.0,bb.yMax())); // top plane. - _planeList.push_back(Plane(0.0,0.0,1.0,-bb.zMin())); // near plane - _planeList.push_back(Plane(0.0,0.0,-1.0,bb.zMax())); // far plane - setupMask(); - } - - inline void setAndTransformProvidingInverse(const Polytope& pt, const osg::Matrix& matrix) - { - _referenceVertexList = pt._referenceVertexList; - - unsigned int resultMask = pt._maskStack.back(); - if (resultMask==0) - { - _maskStack.back() = 0; - _resultMask = 0; - _planeList.clear(); - return; - } - - ClippingMask selector_mask = 0x1; - - unsigned int numActivePlanes = 0; - - // count number of active planes. - PlaneList::const_iterator itr; - for(itr=pt._planeList.begin(); - itr!=pt._planeList.end(); - ++itr) - { - if (resultMask&selector_mask) ++numActivePlanes; - selector_mask <<= 1; - } - - _planeList.resize(numActivePlanes); - _resultMask = 0; - selector_mask = 0x1; - unsigned int index = 0; - for(itr=pt._planeList.begin(); - itr!=pt._planeList.end(); - ++itr) - { - if (resultMask&selector_mask) - { - _planeList[index] = *itr; - _planeList[index++].transformProvidingInverse(matrix); - _resultMask = (_resultMask<<1) | 1; - } - selector_mask <<= 1; - } - - _maskStack.back() = _resultMask; - } - - inline void set(const PlaneList& pl) { _planeList = pl; setupMask(); } - - - inline void add(const osg::Plane& pl) { _planeList.push_back(pl); setupMask(); } - - /** flip/reverse the orientation of all the planes.*/ - inline void flip() - { - for(PlaneList::iterator itr=_planeList.begin(); - itr!=_planeList.end(); - ++itr) - { - itr->flip(); - } - } - - - inline PlaneList& getPlaneList() { return _planeList; } - - inline const PlaneList& getPlaneList() const { return _planeList; } - - - inline void setReferenceVertexList(VertexList& vertices) { _referenceVertexList=vertices; } - - inline VertexList& getReferenceVertexList() { return _referenceVertexList; } - - inline const VertexList& getReferenceVertexList() const { return _referenceVertexList; } - - - inline void setupMask() - { - _resultMask = 0; - for(unsigned int i=0;i<_planeList.size();++i) - { - _resultMask = (_resultMask<<1) | 1; - } - _maskStack.push_back(_resultMask); - } - - inline ClippingMask& getCurrentMask() { return _maskStack.back(); } - - inline ClippingMask getCurrentMask() const { return _maskStack.back(); } - - inline void setResultMask(ClippingMask mask) { _resultMask=mask; } - - inline ClippingMask getResultMask() const { return _resultMask; } - - MaskStack& getMaskStack() { return _maskStack; } - - const MaskStack& getMaskStack() const { return _maskStack; } - - - inline void pushCurrentMask() - { - _maskStack.push_back(_resultMask); - } - - inline void popCurrentMask() - { - _maskStack.pop_back(); - } - - /** Check whether a vertex is contained within clipping set.*/ - inline bool contains(const osg::Vec3& v) const - { - if (!_maskStack.back()) return true; - - unsigned int selector_mask = 0x1; - for(PlaneList::const_iterator itr=_planeList.begin(); - itr!=_planeList.end(); - ++itr) - { - if ((_maskStack.back()&selector_mask) && (itr->distance(v)<0.0f)) return false; - selector_mask <<= 1; - } - return true; - } - - /** Check whether any part of vertex list is contained within clipping set.*/ - inline bool contains(const std::vector& vertices) - { - if (!_maskStack.back()) return true; - - _resultMask = _maskStack.back(); - - for(std::vector::const_iterator vitr = vertices.begin(); - vitr != vertices.end(); - ++vitr) - { - const osg::Vec3& v = *vitr; - bool outside = false; - ClippingMask selector_mask = 0x1; - for(PlaneList::const_iterator itr=_planeList.begin(); - itr!=_planeList.end() && !outside; - ++itr) - { - if ((_maskStack.back()&selector_mask) && (itr->distance(v)<0.0f)) outside = true; - selector_mask <<= 1; - } - - if (!outside) return true; - } - return false; - } - - /** Check whether any part of a bounding sphere is contained within clipping set. - Using a mask to determine which planes should be used for the check, and - modifying the mask to turn off planes which wouldn't contribute to clipping - of any internal objects. This feature is used in osgUtil::CullVisitor - to prevent redundant plane checking.*/ - inline bool contains(const osg::BoundingSphere& bs) - { - if (!_maskStack.back()) return true; - - _resultMask = _maskStack.back(); - ClippingMask selector_mask = 0x1; - - for(PlaneList::const_iterator itr=_planeList.begin(); - itr!=_planeList.end(); - ++itr) - { - if (_resultMask&selector_mask) - { - int res=itr->intersect(bs); - if (res<0) return false; // outside clipping set. - else if (res>0) _resultMask ^= selector_mask; // subsequent checks against this plane not required. - } - selector_mask <<= 1; - } - return true; - } - - /** Check whether any part of a bounding box is contained within clipping set. - Using a mask to determine which planes should be used for the check, and - modifying the mask to turn off planes which wouldn't contribute to clipping - of any internal objects. This feature is used in osgUtil::CullVisitor - to prevent redundant plane checking.*/ - inline bool contains(const osg::BoundingBox& bb) - { - if (!_maskStack.back()) return true; - - _resultMask = _maskStack.back(); - ClippingMask selector_mask = 0x1; - - for(PlaneList::const_iterator itr=_planeList.begin(); - itr!=_planeList.end(); - ++itr) - { - if (_resultMask&selector_mask) - { - int res=itr->intersect(bb); - if (res<0) return false; // outside clipping set. - else if (res>0) _resultMask ^= selector_mask; // subsequent checks against this plane not required. - } - selector_mask <<= 1; - } - return true; - } - - /** Check whether all of vertex list is contained with clipping set.*/ - inline bool containsAllOf(const std::vector& vertices) - { - if (!_maskStack.back()) return false; - - _resultMask = _maskStack.back(); - ClippingMask selector_mask = 0x1; - - for(PlaneList::const_iterator itr=_planeList.begin(); - itr!=_planeList.end(); - ++itr) - { - if (_resultMask&selector_mask) - { - int res=itr->intersect(vertices); - if (res<1) return false; // intersects, or is below plane. - _resultMask ^= selector_mask; // subsequent checks against this plane not required. - } - selector_mask <<= 1; - } - return true; - } - - /** Check whether the entire bounding sphere is contained within clipping set.*/ - inline bool containsAllOf(const osg::BoundingSphere& bs) - { - if (!_maskStack.back()) return false; - - _resultMask = _maskStack.back(); - ClippingMask selector_mask = 0x1; - - for(PlaneList::const_iterator itr=_planeList.begin(); - itr!=_planeList.end(); - ++itr) - { - if (_resultMask&selector_mask) - { - int res=itr->intersect(bs); - if (res<1) return false; // intersects, or is below plane. - _resultMask ^= selector_mask; // subsequent checks against this plane not required. - } - selector_mask <<= 1; - } - return true; - } - - /** Check whether the entire bounding box is contained within clipping set.*/ - inline bool containsAllOf(const osg::BoundingBox& bb) - { - if (!_maskStack.back()) return false; - - _resultMask = _maskStack.back(); - ClippingMask selector_mask = 0x1; - - for(PlaneList::const_iterator itr=_planeList.begin(); - itr!=_planeList.end(); - ++itr) - { - if (_resultMask&selector_mask) - { - int res=itr->intersect(bb); - if (res<1) return false; // intersects, or is below plane. - _resultMask ^= selector_mask; // subsequent checks against this plane not required. - } - selector_mask <<= 1; - } - return true; - } - - - /** Transform the clipping set by matrix. Note, this operations carries out - * the calculation of the inverse of the matrix since a plane must - * be multiplied by the inverse transposed to transform it. This - * makes this operation expensive. If the inverse has been already - * calculated elsewhere then use transformProvidingInverse() instead. - * See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf*/ - inline void transform(const osg::Matrix& matrix) - { - osg::Matrix inverse; - inverse.invert(matrix); - transformProvidingInverse(inverse); - } - - /** Transform the clipping set by provide a pre inverted matrix. - * see transform for details. */ - inline void transformProvidingInverse(const osg::Matrix& matrix) - { - if (!_maskStack.back()) return; - - _resultMask = _maskStack.back(); - ClippingMask selector_mask = 0x1; - for(PlaneList::iterator itr=_planeList.begin(); - itr!=_planeList.end(); - ++itr) - { - if (_resultMask&selector_mask) - { - itr->transformProvidingInverse(matrix); - selector_mask <<= 1; - } - } - } - - protected: - - - MaskStack _maskStack; - ClippingMask _resultMask; - PlaneList _planeList; - VertexList _referenceVertexList; - -}; - -} // end of namespace - -#endif diff --git a/libs/lib/mac32/include/osg/PositionAttitudeTransform b/libs/lib/mac32/include/osg/PositionAttitudeTransform deleted file mode 100644 index 001734832..000000000 --- a/libs/lib/mac32/include/osg/PositionAttitudeTransform +++ /dev/null @@ -1,78 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_POSITIONATTITUDETRANSFORM -#define OSG_POSITIONATTITUDETRANSFORM 1 - -#include -#include -#include -#include -#include - -namespace osg { - -/** PositionAttitudeTransform - is a Transform. Sets the coordinate transform - via a Vec3 position and Quat attitude. -*/ -class OSG_EXPORT PositionAttitudeTransform : public Transform -{ - public : - PositionAttitudeTransform(); - - PositionAttitudeTransform(const PositionAttitudeTransform& pat,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Transform(pat,copyop), - _position(pat._position), - _attitude(pat._attitude), - _scale(pat._scale), - _pivotPoint(pat._pivotPoint) {} - - - META_Node(osg, PositionAttitudeTransform); - - virtual PositionAttitudeTransform* asPositionAttitudeTransform() { return this; } - virtual const PositionAttitudeTransform* asPositionAttitudeTransform() const { return this; } - - inline void setPosition(const Vec3d& pos) { _position = pos; dirtyBound(); } - inline const Vec3d& getPosition() const { return _position; } - - - inline void setAttitude(const Quat& quat) { _attitude = quat; dirtyBound(); } - inline const Quat& getAttitude() const { return _attitude; } - - - inline void setScale(const Vec3d& scale) { _scale = scale; dirtyBound(); } - inline const Vec3d& getScale() const { return _scale; } - - - inline void setPivotPoint(const Vec3d& pivot) { _pivotPoint = pivot; dirtyBound(); } - inline const Vec3d& getPivotPoint() const { return _pivotPoint; } - - - virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor* nv) const; - virtual bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor* nv) const; - - - protected : - - virtual ~PositionAttitudeTransform() {} - - Vec3d _position; - Quat _attitude; - Vec3d _scale; - Vec3d _pivotPoint; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/PrimitiveSet b/libs/lib/mac32/include/osg/PrimitiveSet deleted file mode 100644 index 294725ba1..000000000 --- a/libs/lib/mac32/include/osg/PrimitiveSet +++ /dev/null @@ -1,565 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_PRIMITIVESET -#define OSG_PRIMITIVESET 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -namespace osg { - -typedef MixinVector VectorGLsizei; -typedef MixinVector VectorGLubyte; -typedef MixinVector VectorGLushort; -typedef MixinVector VectorGLuint; - -class State; - -/** A \c PrimitiveFunctor is used (in conjunction with - * osg::Drawable::accept (PrimitiveFunctor&)) to get access to the - * primitives that compose the things drawn by OSG. - *

If \c osg::Drawable::accept() is called with a \c PrimitiveFunctor - * parameter, the \c Drawable will "pretend" it is drawing itself, but instead - * of calling real OpenGL functions, it will call PrimitiveFunctor's - * member functions that "mimic" the OpenGL calls. - *

Concrete subclasses of \c PrimitiveFunctor must implement these methods - * so that they performs whatever they want. - */ -class PrimitiveFunctor -{ -public: - - virtual ~PrimitiveFunctor() {} - - /** Sets the array of vertices used to describe the primitives. Somehow - * mimics the OpenGL \c glVertexPointer() function. - */ - virtual void setVertexArray(unsigned int count,const Vec2* vertices) = 0; - - /** Sets the array of vertices used to describe the primitives. Somehow - * mimics the OpenGL \c glVertexPointer() function. - */ - virtual void setVertexArray(unsigned int count,const Vec3* vertices) = 0; - - /** Sets the array of vertices used to describe the primitives. Somehow - * mimics the OpenGL \c glVertexPointer() function. - */ - virtual void setVertexArray(unsigned int count,const Vec4* vertices) = 0; - - /** Sets the array of vertices used to describe the primitives. Somehow - * mimics the OpenGL \c glVertexPointer() function. - */ - virtual void setVertexArray(unsigned int count,const Vec2d* vertices) = 0; - - /** Sets the array of vertices used to describe the primitives. Somehow - * mimics the OpenGL \c glVertexPointer() function. - */ - virtual void setVertexArray(unsigned int count,const Vec3d* vertices) = 0; - - /** Sets the array of vertices used to describe the primitives. Somehow - * mimics the OpenGL \c glVertexPointer() function. - */ - virtual void setVertexArray(unsigned int count,const Vec4d* vertices) = 0; - - /// Mimics the OpenGL \c glDrawArrays() function. - virtual void drawArrays(GLenum mode,GLint first,GLsizei count) = 0; - - /// Mimics the OpenGL \c glDrawElements() function. - virtual void drawElements(GLenum mode,GLsizei count,const GLubyte* indices) = 0; - - /// Mimics the OpenGL \c glDrawElements() function. - virtual void drawElements(GLenum mode,GLsizei count,const GLushort* indices) = 0; - - /// Mimics the OpenGL \c glDrawElements() function. - virtual void drawElements(GLenum mode,GLsizei count,const GLuint* indices) = 0; - - /// Mimics the OpenGL \c glBegin() function. - virtual void begin(GLenum mode) = 0; - - /// Mimics the OpenGL \c glVertex() "family of functions". - virtual void vertex(const Vec2& vert) = 0; - - /// Mimics the OpenGL \c glVertex() "family of functions". - virtual void vertex(const Vec3& vert) = 0; - - /// Mimics the OpenGL \c glVertex() "family of functions". - virtual void vertex(const Vec4& vert) = 0; - - /// Mimics the OpenGL \c glVertex() "family of functions". - virtual void vertex(float x,float y) = 0; - - /// Mimics the OpenGL \c glVertex() "family of functions". - virtual void vertex(float x,float y,float z) = 0; - - /// Mimics the OpenGL \c glVertex() "family of functions". - virtual void vertex(float x,float y,float z,float w) = 0; - - /// Mimics the OpenGL \c glEnd() function. - virtual void end() = 0; -}; - -class PrimitiveIndexFunctor -{ -public: - - virtual ~PrimitiveIndexFunctor() {} - - virtual void setVertexArray(unsigned int count,const Vec2* vertices) = 0; - virtual void setVertexArray(unsigned int count,const Vec3* vertices) = 0; - virtual void setVertexArray(unsigned int count,const Vec4* vertices) = 0; - - virtual void setVertexArray(unsigned int count,const Vec2d* vertices) = 0; - virtual void setVertexArray(unsigned int count,const Vec3d* vertices) = 0; - virtual void setVertexArray(unsigned int count,const Vec4d* vertices) = 0; - - virtual void drawArrays(GLenum mode,GLint first,GLsizei count) = 0; - virtual void drawElements(GLenum mode,GLsizei count,const GLubyte* indices) = 0; - virtual void drawElements(GLenum mode,GLsizei count,const GLushort* indices) = 0; - virtual void drawElements(GLenum mode,GLsizei count,const GLuint* indices) = 0; - - virtual void begin(GLenum mode) = 0; - virtual void vertex(unsigned int pos) = 0; - virtual void end() = 0; -}; - -class DrawElements; - -class OSG_EXPORT PrimitiveSet : public BufferData -{ - public: - - enum Type - { - PrimitiveType, - DrawArraysPrimitiveType, - DrawArrayLengthsPrimitiveType, - DrawElementsUBytePrimitiveType, - DrawElementsUShortPrimitiveType, - DrawElementsUIntPrimitiveType - }; - - enum Mode - { - POINTS = GL_POINTS, - LINES = GL_LINES, - LINE_STRIP = GL_LINE_STRIP, - LINE_LOOP = GL_LINE_LOOP, - TRIANGLES = GL_TRIANGLES, - TRIANGLE_STRIP = GL_TRIANGLE_STRIP, - TRIANGLE_FAN = GL_TRIANGLE_FAN, - QUADS = GL_QUADS, - QUAD_STRIP = GL_QUAD_STRIP, - POLYGON = GL_POLYGON, - LINES_ADJACENCY = GL_LINES_ADJACENCY_EXT, - LINE_STRIP_ADJACENCY = GL_LINE_STRIP_ADJACENCY_EXT, - TRIANGLES_ADJACENCY = GL_TRIANGLES_ADJACENCY_EXT, - TRIANGLE_STRIP_ADJACENCY = GL_TRIANGLE_STRIP_ADJACENCY_EXT, - PATCHES = GL_PATCHES - }; - - PrimitiveSet(Type primType=PrimitiveType,GLenum mode=0, int numInstances=0): - _primitiveType(primType), - _numInstances(numInstances), - _mode(mode) {} - - PrimitiveSet(const PrimitiveSet& prim,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - BufferData(prim,copyop), - _primitiveType(prim._primitiveType), - _numInstances(prim._numInstances), - _mode(prim._mode) {} - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "PrimitiveSet"; } - - Type getType() const { return _primitiveType; } - virtual const GLvoid* getDataPointer() const { return 0; } - virtual unsigned int getTotalDataSize() const { return 0; } - virtual bool supportsBufferObject() const { return false; } - - virtual DrawElements* getDrawElements() { return 0; } - virtual const DrawElements* getDrawElements() const { return 0; } - - void setNumInstances(int n) { _numInstances = n; } - int getNumInstances() const { return _numInstances; } - - void setMode(GLenum mode) { _mode = mode; } - GLenum getMode() const { return _mode; } - - virtual void draw(State& state, bool useVertexBufferObjects) const = 0; - - virtual void accept(PrimitiveFunctor& functor) const = 0; - virtual void accept(PrimitiveIndexFunctor& functor) const = 0; - - virtual unsigned int index(unsigned int pos) const = 0; - virtual unsigned int getNumIndices() const = 0; - virtual void offsetIndices(int offset) = 0; - - virtual unsigned int getNumPrimitives() const; - - virtual void computeRange() const {} - - protected: - - virtual ~PrimitiveSet() {} - - Type _primitiveType; - int _numInstances; - GLenum _mode; -}; - -class OSG_EXPORT DrawArrays : public PrimitiveSet -{ - public: - - DrawArrays(GLenum mode=0): - PrimitiveSet(DrawArraysPrimitiveType,mode), - _first(0), - _count(0) {} - - DrawArrays(GLenum mode, GLint first, GLsizei count, int numInstances=0): - PrimitiveSet(DrawArraysPrimitiveType, mode, numInstances), - _first(first), - _count(count) {} - - DrawArrays(const DrawArrays& da,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - PrimitiveSet(da,copyop), - _first(da._first), - _count(da._count) {} - - virtual Object* cloneType() const { return new DrawArrays(); } - virtual Object* clone(const CopyOp& copyop) const { return new DrawArrays(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "DrawArrays"; } - - - void set(GLenum mode,GLint first, GLsizei count) - { - _mode = mode; - _first = first; - _count = count; - } - - void setFirst(GLint first) { _first = first; } - GLint getFirst() const { return _first; } - - void setCount(GLsizei count) { _count = count; } - GLsizei getCount() const { return _count; } - - virtual void draw(State& state, bool useVertexBufferObjects) const; - - virtual void accept(PrimitiveFunctor& functor) const; - virtual void accept(PrimitiveIndexFunctor& functor) const; - - virtual unsigned int getNumIndices() const { return static_cast(_count); } - virtual unsigned int index(unsigned int pos) const { return static_cast(_first)+pos; } - virtual void offsetIndices(int offset) { _first += offset; } - - protected: - - virtual ~DrawArrays() {} - - GLint _first; - GLsizei _count; -}; - -class OSG_EXPORT DrawArrayLengths : public PrimitiveSet, public VectorGLsizei -{ - public: - - typedef VectorGLsizei vector_type; - - DrawArrayLengths(GLenum mode=0): - PrimitiveSet(DrawArrayLengthsPrimitiveType,mode), - _first(0) {} - - DrawArrayLengths(const DrawArrayLengths& dal,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - PrimitiveSet(dal,copyop), - vector_type(dal), - _first(dal._first) {} - - DrawArrayLengths(GLenum mode, GLint first, unsigned int no, GLsizei* ptr) : - PrimitiveSet(DrawArrayLengthsPrimitiveType,mode), - vector_type(ptr,ptr+no), - _first(first) {} - - DrawArrayLengths(GLenum mode,GLint first, unsigned int no) : - PrimitiveSet(DrawArrayLengthsPrimitiveType,mode), - vector_type(no), - _first(first) {} - - DrawArrayLengths(GLenum mode,GLint first) : - PrimitiveSet(DrawArrayLengthsPrimitiveType,mode), - vector_type(), - _first(first) {} - - - virtual Object* cloneType() const { return new DrawArrayLengths(); } - virtual Object* clone(const CopyOp& copyop) const { return new DrawArrayLengths(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "DrawArrayLengths"; } - - - void setFirst(GLint first) { _first = first; } - GLint getFirst() const { return _first; } - - virtual void draw(State& state, bool useVertexBufferObjects) const; - - virtual void accept(PrimitiveFunctor& functor) const; - virtual void accept(PrimitiveIndexFunctor& functor) const; - - virtual unsigned int getNumIndices() const; - virtual unsigned int index(unsigned int pos) const { return _first+pos; } - virtual void offsetIndices(int offset) { _first += offset; } - - virtual unsigned int getNumPrimitives() const; - - protected: - - virtual ~DrawArrayLengths() {} - - GLint _first; -}; - -class DrawElements : public PrimitiveSet -{ - public: - - DrawElements(Type primType=PrimitiveType, GLenum mode=0, int numInstances=0): - PrimitiveSet(primType,mode, numInstances) {} - - DrawElements(const DrawElements& copy,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - PrimitiveSet(copy,copyop) {} - - - virtual DrawElements* getDrawElements() { return this; } - virtual const DrawElements* getDrawElements() const { return this; } - - /** Set the ElementBufferObject.*/ - inline void setElementBufferObject(osg::ElementBufferObject* ebo) { setBufferObject(ebo); } - - /** Get the ElementBufferObject. If no EBO is assigned returns NULL*/ - inline osg::ElementBufferObject* getElementBufferObject() { return dynamic_cast(_bufferObject.get()); } - - /** Get the const ElementBufferObject. If no EBO is assigned returns NULL*/ - inline const osg::ElementBufferObject* getElementBufferObject() const { return dynamic_cast(_bufferObject.get()); } - - virtual void reserveElements(unsigned int numIndices) = 0; - virtual void setElement(unsigned int, unsigned int) = 0; - virtual unsigned int getElement(unsigned int) = 0; - virtual void addElement(unsigned int) = 0; - - protected: - - virtual ~DrawElements() {} -}; - -class OSG_EXPORT DrawElementsUByte : public DrawElements, public VectorGLubyte -{ - public: - - typedef VectorGLubyte vector_type; - - DrawElementsUByte(GLenum mode=0): - DrawElements(DrawElementsUBytePrimitiveType,mode) {} - - DrawElementsUByte(const DrawElementsUByte& array, const CopyOp& copyop=CopyOp::SHALLOW_COPY): - DrawElements(array,copyop), - vector_type(array) {} - - /** - * \param no Number of intended elements. This will be the size of the underlying vector. - */ - DrawElementsUByte(GLenum mode, unsigned int no, const GLubyte* ptr, int numInstances=0) : - DrawElements(DrawElementsUBytePrimitiveType,mode,numInstances), - vector_type(ptr,ptr+no) {} - - /** - * \param no Number of intended elements. This will be the size of the underlying vector. - */ - DrawElementsUByte(GLenum mode, unsigned int no) : - DrawElements(DrawElementsUBytePrimitiveType,mode), - vector_type(no) {} - - virtual Object* cloneType() const { return new DrawElementsUByte(); } - virtual Object* clone(const CopyOp& copyop) const { return new DrawElementsUByte(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "DrawElementsUByte"; } - - virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } - virtual unsigned int getTotalDataSize() const { return static_cast(size()); } - virtual bool supportsBufferObject() const { return false; } - - virtual void draw(State& state, bool useVertexBufferObjects) const ; - - virtual void accept(PrimitiveFunctor& functor) const; - virtual void accept(PrimitiveIndexFunctor& functor) const; - - virtual unsigned int getNumIndices() const { return static_cast(size()); } - virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } - virtual void offsetIndices(int offset); - - virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); } - virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; } - virtual unsigned int getElement(unsigned int i) { return (*this)[i]; } - virtual void addElement(unsigned int v) { push_back(GLubyte(v)); } - - protected: - - virtual ~DrawElementsUByte(); -}; - - -class OSG_EXPORT DrawElementsUShort : public DrawElements, public VectorGLushort -{ - public: - - typedef VectorGLushort vector_type; - - DrawElementsUShort(GLenum mode=0): - DrawElements(DrawElementsUShortPrimitiveType,mode) {} - - DrawElementsUShort(const DrawElementsUShort& array,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - DrawElements(array,copyop), - vector_type(array) {} - - /** - * \param no Number of intended elements. This will be the size of the underlying vector. - */ - DrawElementsUShort(GLenum mode, unsigned int no, const GLushort* ptr, int numInstances=0) : - DrawElements(DrawElementsUShortPrimitiveType,mode,numInstances), - vector_type(ptr,ptr+no) {} - - /** - * \param no Number of intended elements. This will be the size of the underlying vector. - */ - DrawElementsUShort(GLenum mode, unsigned int no) : - DrawElements(DrawElementsUShortPrimitiveType,mode), - vector_type(no) {} - - template - DrawElementsUShort(GLenum mode, InputIterator first,InputIterator last) : - DrawElements(DrawElementsUShortPrimitiveType,mode), - vector_type(first,last) {} - - virtual Object* cloneType() const { return new DrawElementsUShort(); } - virtual Object* clone(const CopyOp& copyop) const { return new DrawElementsUShort(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "DrawElementsUShort"; } - - virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } - virtual unsigned int getTotalDataSize() const { return 2u*static_cast(size()); } - virtual bool supportsBufferObject() const { return false; } - - virtual void draw(State& state, bool useVertexBufferObjects) const; - - virtual void accept(PrimitiveFunctor& functor) const; - virtual void accept(PrimitiveIndexFunctor& functor) const; - - virtual unsigned int getNumIndices() const { return static_cast(size()); } - virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } - virtual void offsetIndices(int offset); - - virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); } - virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; } - virtual unsigned int getElement(unsigned int i) { return (*this)[i]; } - virtual void addElement(unsigned int v) { push_back(GLushort(v)); } - - protected: - - virtual ~DrawElementsUShort(); -}; - -class OSG_EXPORT DrawElementsUInt : public DrawElements, public VectorGLuint -{ - public: - - typedef VectorGLuint vector_type; - - DrawElementsUInt(GLenum mode=0): - DrawElements(DrawElementsUIntPrimitiveType,mode) {} - - DrawElementsUInt(const DrawElementsUInt& array,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - DrawElements(array,copyop), - vector_type(array) {} - - /** - * \param mode One of osg::PrimitiveSet::Mode. Determines the type of primitives used. - * \param no Number of intended elements. This will be the size of the underlying vector. - */ - DrawElementsUInt(GLenum mode, unsigned int no, const GLuint* ptr, int numInstances=0) : - DrawElements(DrawElementsUIntPrimitiveType,mode,numInstances), - vector_type(ptr,ptr+no) {} - - /** - * \param no Number of intended elements. This will be the size of the underlying vector. - */ - DrawElementsUInt(GLenum mode, unsigned int no) : - DrawElements(DrawElementsUIntPrimitiveType,mode), - vector_type(no) {} - - template - DrawElementsUInt(GLenum mode, InputIterator first,InputIterator last) : - DrawElements(DrawElementsUIntPrimitiveType,mode), - vector_type(first,last) {} - - virtual Object* cloneType() const { return new DrawElementsUInt(); } - virtual Object* clone(const CopyOp& copyop) const { return new DrawElementsUInt(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "DrawElementsUInt"; } - - virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } - virtual unsigned int getTotalDataSize() const { return 4u*static_cast(size()); } - virtual bool supportsBufferObject() const { return false; } - - virtual void draw(State& state, bool useVertexBufferObjects) const; - - virtual void accept(PrimitiveFunctor& functor) const; - virtual void accept(PrimitiveIndexFunctor& functor) const; - - virtual unsigned int getNumIndices() const { return static_cast(size()); } - virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } - virtual void offsetIndices(int offset); - - virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); } - virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; } - virtual unsigned int getElement(unsigned int i) { return (*this)[i]; } - virtual void addElement(unsigned int v) { push_back(GLuint(v)); } - - protected: - - virtual ~DrawElementsUInt(); -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Program b/libs/lib/mac32/include/osg/Program deleted file mode 100644 index 0d7febfec..000000000 --- a/libs/lib/mac32/include/osg/Program +++ /dev/null @@ -1,406 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * Copyright (C) 2003-2005 3Dlabs Inc. Ltd. - * Copyright (C) 2004-2005 Nathan Cournia - * Copyright (C) 2008 Zebra Imaging - * Copyright (C) 2010 Vires Simulationstechnologie GmbH - * - * This application is open source and may be redistributed and/or modified - * freely and without restriction, both in commercial and non commercial - * applications, as long as this copyright notice is maintained. - * - * This application is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/* file: include/osg/Program - * author: Mike Weiblen 2008-01-02 - * Holger Helmich 2010-10-21 -*/ - -#ifndef OSG_PROGRAM -#define OSG_PROGRAM 1 - -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace osg { - -class State; - - -/////////////////////////////////////////////////////////////////////////// -/** osg::Program is an application-level abstraction of an OpenGL glProgram. - * It is an osg::StateAttribute that, when applied, will activate a - * glProgram for subsequent rendering. - * osg::Shaders containing the actual shader source code are - * attached to a Program, which will then manage the compilation, - * linking, and activation of the GLSL program. - * osg::Program will automatically manage per-context instancing of the - * OpenGL glPrograms, if that is necessary for a particular display - * configuration. - */ - -class OSG_EXPORT Program : public osg::StateAttribute -{ - public: - Program(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Program(const Program& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, Program, PROGRAM); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const osg::StateAttribute& sa) const; - - /** If enabled, activate our program in the GL pipeline, - * performing any rebuild operations that might be pending. */ - virtual void apply(osg::State& state) const; - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Compile program and associated shaders.*/ - virtual void compileGLObjects(osg::State& state) const; - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** release OpenGL objects in specified graphics context if State - object is passed, otherwise release OpenGL objects for all graphics context if - State object pointer NULL.*/ - virtual void releaseGLObjects(osg::State* state=0) const; - - /** Mark our PCSOs as needing relink */ - void dirtyProgram(); - - /** Attach an osg::Shader to this osg::Program. - * Mark Program as needing relink. Return true for success */ - bool addShader( Shader* shader ); - - unsigned int getNumShaders() const { return static_cast(_shaderList.size()); } - - Shader* getShader( unsigned int i ) { return _shaderList[i].get(); } - const Shader* getShader( unsigned int i ) const { return _shaderList[i].get(); } - - /** Remove osg::Shader from this osg::Program. - * Mark Program as needing relink. Return true for success */ - bool removeShader( Shader* shader ); - - /** Set/get GL program parameters */ - void setParameter( GLenum pname, GLint value ); - GLint getParameter( GLenum pname ) const; - - void setParameterfv( GLenum pname, const GLfloat* value ); - const GLfloat* getParameterfv( GLenum pname ) const; - - /** Add an attribute location binding. */ - void addBindAttribLocation( const std::string& name, GLuint index ); - - /** Remove an attribute location binding. */ - void removeBindAttribLocation( const std::string& name ); - - /** Add an frag data location binding. See EXT_gpu_shader4 for BindFragDataLocationEXT */ - void addBindFragDataLocation( const std::string& name, GLuint index ); - - /** Remove an frag data location binding. */ - void removeBindFragDataLocation( const std::string& name ); - - /** Add a uniform block binding to an index target. XXX This - * should not be an attribute of the program. It should be a - * pseudo-uniform that can live in StateSet objects because - * it is cheap to set. */ - void addBindUniformBlock(const std::string& name, GLuint index); - - /** Remove a uniform block binding. */ - void removeBindUniformBlock(const std::string& name); - - /** Simple class for wrapping up the data used in glProgramBinary and glGetProgramBinary. - * On the first run of your application Programs should be assigned an empty ProgramBinary. - * Before your application exits it should retrieve the program binary via - * Program::PerContextProgram::compileProgramBinary and save it to disk. - * When your application is run subsequently, load your binary from disk and use it to set - * the data of a ProgramBinary, and set the ProgramBinary on the associated Program. - * This will typically result in Program::compileGLObjects executing much faster.*/ - class OSG_EXPORT ProgramBinary : public osg::Object - { - public: - - ProgramBinary(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ProgramBinary(const ProgramBinary& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osg, ProgramBinary); - - /** Allocated a data buffer of specified size/*/ - void allocate(unsigned int size); - - /** Assign program binary data, copying the specified data into locally stored data buffer, the original data can then be deleted.*/ - void assign(unsigned int size, const unsigned char* data); - - /** Set the format of the program binary data.*/ - void setFormat(GLenum format) {_format = format;} - - /** Get the format of the program binary data.*/ - GLenum getFormat() const {return _format;} - - /** Get the size of the program binary data.*/ - unsigned int getSize() const { return _data.size(); } - - /** Get a ptr to the program binary data.*/ - unsigned char* getData() { return _data.empty() ? 0 : &(_data.front()); } - - /** Get a const ptr to the program binary data.*/ - const unsigned char* getData() const { return _data.empty() ? 0 : &(_data.front()); } - - protected: - std::vector _data; - GLenum _format; - }; - - - /** Set the Program using a ProgramBinary. If a ProgramBinary is not yet - * available then setting an empty one signals that compileProgramBinary - * will be called later.*/ - void setProgramBinary(ProgramBinary* programBinary) { _programBinary = programBinary; } - - /** Get the Program's ProgramBinary, return NULL if none is assigned. */ - ProgramBinary* getProgramBinary() { return _programBinary.get(); } - - /** Get the const Program's ProgramBinary, return NULL if none is assigned. */ - const ProgramBinary* getProgramBinary() const { return _programBinary.get(); } - - typedef std::map AttribBindingList; - typedef std::map FragDataBindingList; - typedef std::map UniformBlockBindingList; - - const AttribBindingList& getAttribBindingList() const { return _attribBindingList; } - const FragDataBindingList& getFragDataBindingList() const { return _fragDataBindingList; } - const UniformBlockBindingList& getUniformBlockBindingList() const { return _uniformBlockBindingList; } - - /** Return true if this Program represents "fixed-functionality" rendering */ - bool isFixedFunction() const; - - /** Query InfoLog from a glProgram */ - bool getGlProgramInfoLog(unsigned int contextID, std::string& log) const; - - /** Mark internal glProgram for deletion. - * Deletion requests are queued until they can be executed - * in the proper GL context. */ - static void deleteGlProgram(unsigned int contextID, GLuint program); - - /** flush all the cached glPrograms which need to be deleted - * in the OpenGL context related to contextID.*/ - static void flushDeletedGlPrograms(unsigned int contextID,double currentTime, double& availableTime); - - /** discard all the cached glPrograms which need to be deleted - * in the OpenGL context related to contextID. - * Note, unlike flush no OpenGL calls are made, instead the handles are all removed. - * this call is useful for when an OpenGL context has been destroyed. */ - static void discardDeletedGlPrograms(unsigned int contextID); - - struct ActiveVarInfo { - ActiveVarInfo() : _location(-1), _type(Uniform::UNDEFINED), _size(-1) {} - ActiveVarInfo( GLint loc, GLenum type, GLint size ) : _location(loc), _type(type), _size(size) {} - GLint _location; - GLenum _type; - GLint _size; - }; - typedef std::map< unsigned int, ActiveVarInfo > ActiveUniformMap; - typedef std::map< std::string, ActiveVarInfo > ActiveVarInfoMap; - const ActiveUniformMap& getActiveUniforms(unsigned int contextID) const; - const ActiveVarInfoMap& getActiveAttribs(unsigned int contextID) const; - struct UniformBlockInfo - { - UniformBlockInfo() : _index(GL_INVALID_INDEX), _size(0) {} - UniformBlockInfo(GLuint index, GLsizei size) - : _index(index), _size(size) - { - } - GLuint _index; - GLsizei _size; - }; - typedef std::map UniformBlockMap; - const UniformBlockMap& getUniformBlocks(unsigned contextID) const; - public: - - // make PerContextProgram a friend to allow it access Program's protected - // methods and member variables. - class PerContextProgram; - friend class PerContextProgram; - - /** PerContextProgram (PCP) is an OSG-internal encapsulation of glPrograms per-GL context. */ - class OSG_EXPORT PerContextProgram : public osg::Referenced - { - public: - PerContextProgram(const Program* program, unsigned int contextID); - - GLuint getHandle() const {return _glProgramHandle;} - - void requestLink(); - void linkProgram(osg::State& state); - bool validateProgram(); - bool needsLink() const {return _needsLink;} - bool isLinked() const {return _isLinked;} - bool getInfoLog( std::string& infoLog ) const; - - /** Was glProgramBinary called successfully? */ - bool loadedBinary() const {return _loadedBinary;} - - /** Compile a program binary. For this to work setProgramBinary must have - * been called on the osg::Program with an empty ProgramBinary prior to - * compileGLObjects being called. - * compileProgramBinary should be called after the program has been - * "exercised" by rendering with it. The ProgramBinary can then be saved - * to disk for faster subsequent compiling. */ - ProgramBinary* compileProgramBinary(osg::State& state); - - void useProgram() const; - - void resetAppliedUniforms() const - { - for(LastAppliedUniformList::iterator itr=_lastAppliedUniformList.begin(); - itr!=_lastAppliedUniformList.end(); - ++itr) - { - (*itr).first = 0; - (*itr).second = 0; - } - } - - - inline void apply(const Uniform& uniform) const - { - GLint location = getUniformLocation(uniform.getNameID()); - if (location>=0) - { - if ((unsigned int)location>=_lastAppliedUniformList.size()) _lastAppliedUniformList.resize(location+1); - const Uniform* lastAppliedUniform = _lastAppliedUniformList[location].first.get(); - if (lastAppliedUniform != &uniform) - { - // new attribute - uniform.apply(_extensions.get(),location); - _lastAppliedUniformList[location].first = &uniform; - _lastAppliedUniformList[location].second = uniform.getModifiedCount(); - } - else if (_lastAppliedUniformList[location].second != uniform.getModifiedCount()) - { - // existing attribute has been modified - uniform.apply(_extensions.get(),location); - _lastAppliedUniformList[location].first = &uniform; - _lastAppliedUniformList[location].second = uniform.getModifiedCount(); - } - } - } - - const ActiveUniformMap& getActiveUniforms() const {return _uniformInfoMap;} - const ActiveVarInfoMap& getActiveAttribs() const {return _attribInfoMap;} - const UniformBlockMap& getUniformBlocks() const {return _uniformBlockMap; } - inline GLint getUniformLocation( unsigned int uniformNameID ) const { ActiveUniformMap::const_iterator itr = _uniformInfoMap.find(uniformNameID); return (itr!=_uniformInfoMap.end()) ? itr->second._location : -1; } - - /** - * Alternative version of getUniformLocation( unsigned int uniformNameID ) - * retrofited into OSG for backward compatibility with osgCal, - * after uniform ids were refactored from std::strings to GLints in OSG version 2.9.10. - * - * Drawbacks: This method is not particularly fast. It has to access mutexed static - * map of uniform ids. So don't overuse it or your app performance will suffer. - */ - inline GLint getUniformLocation( const std::string & uniformName ) const { return getUniformLocation( Uniform::getNameID( uniformName ) ); } - - inline GLint getAttribLocation( const std::string& name ) const { ActiveVarInfoMap::const_iterator itr = _attribInfoMap.find(name); return (itr!=_attribInfoMap.end()) ? itr->second._location : -1; } - - inline void addShaderToAttach(Shader *shader) - { - _shadersToAttach.push_back(shader); - } - - inline void addShaderToDetach(Shader *shader) - { - _shadersToDetach.push_back(shader); - } - - protected: /*methods*/ - ~PerContextProgram(); - - protected: /*data*/ - /** Pointer to our parent Program */ - const Program* _program; - /** Pointer to this context's extension functions */ - osg::ref_ptr _extensions; - /** Handle to the actual OpenGL glProgram */ - GLuint _glProgramHandle; - /** Does our glProgram need to be linked? */ - bool _needsLink; - /** Is our glProgram successfully linked? */ - bool _isLinked; - /** Was glProgramBinary called successfully? */ - bool _loadedBinary; - const unsigned int _contextID; - - ActiveUniformMap _uniformInfoMap; - ActiveVarInfoMap _attribInfoMap; - UniformBlockMap _uniformBlockMap; - - typedef std::pair, unsigned int> UniformModifiedCountPair; - typedef std::vector LastAppliedUniformList; - mutable LastAppliedUniformList _lastAppliedUniformList; - - typedef std::vector< ref_ptr > ShaderList; - ShaderList _shadersToDetach; - ShaderList _shadersToAttach; - - private: - PerContextProgram(); // disallowed - PerContextProgram(const PerContextProgram&); // disallowed - PerContextProgram& operator=(const PerContextProgram&); // disallowed - }; - - /** Get the PCP for a particular GL context */ - PerContextProgram* getPCP(unsigned int contextID) const; - - protected: /*methods*/ - virtual ~Program(); - - protected: /*data*/ - - mutable osg::buffered_value< osg::ref_ptr > _pcpList; - AttribBindingList _attribBindingList; - FragDataBindingList _fragDataBindingList; - UniformBlockBindingList _uniformBlockBindingList; - - typedef std::vector< ref_ptr > ShaderList; - ShaderList _shaderList; - - osg::ref_ptr _programBinary; - - /** Parameters maintained with glProgramParameteriEXT */ - GLint _geometryVerticesOut; - GLint _geometryInputType; - GLint _geometryOutputType; - - /** Parameter maintained with glPatchParameteri */ - GLint _patchVertices; - - /** Parameter maintained with glPatchParameterfv */ - // todo add tessellation default level - //GLfloat _patchDefaultInnerLevel[2]; - //GLfloat _patchDefaultOuterLevel[4]; - - private: - Program& operator=(const Program&); // disallowed - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Projection b/libs/lib/mac32/include/osg/Projection deleted file mode 100644 index 327fe9999..000000000 --- a/libs/lib/mac32/include/osg/Projection +++ /dev/null @@ -1,61 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_PROJECTION -#define OSG_PROJECTION 1 - -#include -#include - -namespace osg { - -/** Projection nodes set up the frustum/orthographic projection used when rendering the scene. -*/ -class OSG_EXPORT Projection : public Group -{ - public : - - - Projection(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Projection(const Projection&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - Projection(const Matrix& matix); - - META_Node(osg, Projection); - - /** Set the transform's matrix.*/ - void setMatrix(const Matrix& mat) { _matrix = mat; } - - /** Get the transform's matrix. */ - inline const Matrix& getMatrix() const { return _matrix; } - - /** preMult transform.*/ - void preMult(const Matrix& mat) { _matrix.preMult(mat); } - - /** postMult transform.*/ - void postMult(const Matrix& mat) { _matrix.postMult(mat); } - - - protected : - - virtual ~Projection(); - - Matrix _matrix; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ProxyNode b/libs/lib/mac32/include/osg/ProxyNode deleted file mode 100644 index a9d5c233e..000000000 --- a/libs/lib/mac32/include/osg/ProxyNode +++ /dev/null @@ -1,141 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_ProxyNode -#define OSG_ProxyNode 1 - -#include - -namespace osg { - -/** ProxyNode. -*/ -class OSG_EXPORT ProxyNode : public Group -{ - public : - - ProxyNode(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ProxyNode(const ProxyNode&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, ProxyNode); - - typedef osg::BoundingSphere::vec_type vec_type; - typedef osg::BoundingSphere::value_type value_type; - - virtual void traverse(NodeVisitor& nv); - - virtual bool addChild(Node *child); - virtual bool addChild(Node *child, const std::string& filename); - - virtual bool removeChildren(unsigned int pos,unsigned int numChildrenToRemove); - - - /** Set the optional database osgDB::Options object to use when loaded children.*/ - void setDatabaseOptions(osg::Referenced* options) { _databaseOptions = options; } - - /** Get the optional database osgDB::Options object used when loaded children.*/ - osg::Referenced* getDatabaseOptions() { return _databaseOptions.get(); } - - /** Get the optional database osgDB::Options object used when loaded children.*/ - const osg::Referenced* getDatabaseOptions() const { return _databaseOptions.get(); } - - - /** Set the database path to prepend to children's filenames.*/ - void setDatabasePath(const std::string& path); - /** Get the database path used to prepend to children's filenames.*/ - inline const std::string& getDatabasePath() const { return _databasePath; } - - void setFileName(unsigned int childNo, const std::string& filename) { expandFileNameListTo(childNo); _filenameList[childNo].first=filename; } - const std::string& getFileName(unsigned int childNo) const { return _filenameList[childNo].first; } - unsigned int getNumFileNames() const { return _filenameList.size(); } - - /** Return the DatabaseRequest object used by the DatabasePager to keep track of file load requests - * being carried on behalf of the DatabasePager. - * Note, in normal OSG usage you should not set this value yourself, as this will be managed by - * the osgDB::DatabasePager.*/ - osg::ref_ptr& getDatabaseRequest(unsigned int childNo) { return _filenameList[childNo].second; } - - /** Return the const DatabaseRequest object.*/ - const osg::ref_ptr& getDatabaseRequest(unsigned int childNo) const { return _filenameList[childNo].second; } - - - /** Modes which control how the center of object should be determined when computed which child is active.*/ - enum CenterMode - { - USE_BOUNDING_SPHERE_CENTER, - USER_DEFINED_CENTER - }; - - /** Set how the center of object should be determined when computed which child is active.*/ - void setCenterMode(CenterMode mode) { _centerMode=mode; } - - /** Get how the center of object should be determined when computed which child is active.*/ - CenterMode getCenterMode() const { return _centerMode; } - - /** Modes which control how the proxynode external reference are loaded.*/ - enum LoadingExternalReferenceMode - { - LOAD_IMMEDIATELY, - DEFER_LOADING_TO_DATABASE_PAGER, - NO_AUTOMATIC_LOADING - }; - - /** Set how the child loading is done.*/ - void setLoadingExternalReferenceMode(LoadingExternalReferenceMode mode) { _loadingExtReference=mode; } - - /** Get the setted mode of loading.*/ - LoadingExternalReferenceMode getLoadingExternalReferenceMode() const { return _loadingExtReference; } - - /** Sets the object-space point which defines the center of the osg::ProxyNode. - center is affected by any transforms in the hierarchy above the osg::ProxyNode.*/ - inline void setCenter(const Vec3& center) { _centerMode=USER_DEFINED_CENTER; _userDefinedCenter = center; } - - /** return the ProxyNode center point. */ - inline const vec_type& getCenter() const { if (_centerMode==USER_DEFINED_CENTER) return _userDefinedCenter; else return getBound().center(); } - - - /** Set the object-space reference radius of the volume enclosed by the ProxyNode. - * Used to determine the bounding sphere of the ProxyNode in the absence of any children.*/ - inline void setRadius(value_type radius) { _radius = radius; } - - /** Get the object-space radius of the volume enclosed by the ProxyNode.*/ - inline value_type getRadius() const { return _radius; } - - virtual BoundingSphere computeBound() const; - - protected : - - virtual ~ProxyNode() {} - - void expandFileNameListTo(unsigned int pos); - - typedef std::pair< std::string, osg::ref_ptr > FileNameDatabaseRequestPair; - typedef std::vector FileNameDatabaseRequestList; - - FileNameDatabaseRequestList _filenameList; - ref_ptr _databaseOptions; - std::string _databasePath; - - LoadingExternalReferenceMode _loadingExtReference; - - CenterMode _centerMode; - vec_type _userDefinedCenter; - value_type _radius; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Quat b/libs/lib/mac32/include/osg/Quat deleted file mode 100644 index eac627893..000000000 --- a/libs/lib/mac32/include/osg/Quat +++ /dev/null @@ -1,393 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_QUAT -#define OSG_QUAT 1 - -#include -#include -#include -#include -#include - -namespace osg { - -class Matrixf; -class Matrixd; - -/** A quaternion class. It can be used to represent an orientation in 3D space.*/ -class OSG_EXPORT Quat -{ - - public: - - typedef double value_type; - - value_type _v[4]; // a four-vector - - inline Quat() { _v[0]=0.0; _v[1]=0.0; _v[2]=0.0; _v[3]=1.0; } - - inline Quat( value_type x, value_type y, value_type z, value_type w ) - { - _v[0]=x; - _v[1]=y; - _v[2]=z; - _v[3]=w; - } - - inline Quat( const Vec4f& v ) - { - _v[0]=v.x(); - _v[1]=v.y(); - _v[2]=v.z(); - _v[3]=v.w(); - } - - inline Quat( const Vec4d& v ) - { - _v[0]=v.x(); - _v[1]=v.y(); - _v[2]=v.z(); - _v[3]=v.w(); - } - - inline Quat( value_type angle, const Vec3f& axis) - { - makeRotate(angle,axis); - } - inline Quat( value_type angle, const Vec3d& axis) - { - makeRotate(angle,axis); - } - - inline Quat( value_type angle1, const Vec3f& axis1, - value_type angle2, const Vec3f& axis2, - value_type angle3, const Vec3f& axis3) - { - makeRotate(angle1,axis1,angle2,axis2,angle3,axis3); - } - - inline Quat( value_type angle1, const Vec3d& axis1, - value_type angle2, const Vec3d& axis2, - value_type angle3, const Vec3d& axis3) - { - makeRotate(angle1,axis1,angle2,axis2,angle3,axis3); - } - - inline Quat& operator = (const Quat& v) { _v[0]=v._v[0]; _v[1]=v._v[1]; _v[2]=v._v[2]; _v[3]=v._v[3]; return *this; } - - inline bool operator == (const Quat& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2] && _v[3]==v._v[3]; } - - inline bool operator != (const Quat& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2] || _v[3]!=v._v[3]; } - - inline bool operator < (const Quat& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else if (_v[2]v._v[2]) return false; - else return (_v[3] - -#include -#include -#include - -#if !defined(_OPENTHREADS_ATOMIC_USE_MUTEX) -# define _OSG_REFERENCED_USE_ATOMIC_OPERATIONS -#endif - -namespace osg { - -// forward declare, declared after Referenced below. -class DeleteHandler; -class Observer; -class ObserverSet; - -/** template class to help enforce static initialization order. */ -template -struct depends_on -{ - depends_on() { M(); } -}; - -/** Base class for providing reference counted objects.*/ -class OSG_EXPORT Referenced -{ - - public: - - - Referenced(); - - explicit Referenced(bool threadSafeRefUnref); - - Referenced(const Referenced&); - - inline Referenced& operator = (const Referenced&) { return *this; } - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Get whether a mutex is used to ensure ref() and unref() are thread safe.*/ - -#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS) - bool getThreadSafeRefUnref() const { return true; } -#else - bool getThreadSafeRefUnref() const { return _refMutex!=0; } -#endif - - /** Get the mutex used to ensure thread safety of ref()/unref(). */ -#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS) - OpenThreads::Mutex* getRefMutex() const { return getGlobalReferencedMutex(); } -#else - OpenThreads::Mutex* getRefMutex() const { return _refMutex; } -#endif - - /** Get the optional global Referenced mutex, this can be shared between all osg::Referenced.*/ - static OpenThreads::Mutex* getGlobalReferencedMutex(); - - /** Increment the reference count by one, indicating that - this object has another pointer which is referencing it.*/ - inline int ref() const; - - /** Decrement the reference count by one, indicating that - a pointer to this object is referencing it. If the - reference count goes to zero, it is assumed that this object - is no longer referenced and is automatically deleted.*/ - inline int unref() const; - - /** Decrement the reference count by one, indicating that - a pointer to this object is referencing it. However, do - not delete it, even if ref count goes to 0. Warning, unref_nodelete() - should only be called if the user knows exactly who will - be responsible for, one should prefer unref() over unref_nodelete() - as the latter can lead to memory leaks.*/ - int unref_nodelete() const; - - /** Return the number of pointers currently referencing this object. */ - inline int referenceCount() const { return _refCount; } - - - /** Get the ObserverSet if one is attached, otherwise return NULL.*/ - ObserverSet* getObserverSet() const - { - #if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS) - return static_cast(_observerSet.get()); - #else - return static_cast(_observerSet); - #endif - } - - /** Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet.*/ - ObserverSet* getOrCreateObserverSet() const; - - /** Add a Observer that is observing this object, notify the Observer when this object gets deleted.*/ - void addObserver(Observer* observer) const; - - /** Remove Observer that is observing this object.*/ - void removeObserver(Observer* observer) const; - - public: - - /** Set whether reference counting should use a mutex for thread safe reference counting.*/ - static void setThreadSafeReferenceCounting(bool enableThreadSafeReferenceCounting); - - /** Get whether reference counting is active.*/ - static bool getThreadSafeReferenceCounting(); - - friend class DeleteHandler; - - /** Set a DeleteHandler to which deletion of all referenced counted objects - * will be delegated.*/ - static void setDeleteHandler(DeleteHandler* handler); - - /** Get a DeleteHandler.*/ - static DeleteHandler* getDeleteHandler(); - - - protected: - - virtual ~Referenced(); - - void signalObserversAndDelete(bool signalDelete, bool doDelete) const; - - void deleteUsingDeleteHandler() const; - -#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS) - mutable OpenThreads::AtomicPtr _observerSet; - - mutable OpenThreads::Atomic _refCount; -#else - - mutable OpenThreads::Mutex* _refMutex; - - mutable int _refCount; - - mutable void* _observerSet; -#endif -}; - -inline int Referenced::ref() const -{ -#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS) - return ++_refCount; -#else - if (_refMutex) - { - OpenThreads::ScopedLock lock(*_refMutex); - return ++_refCount; - } - else - { - return ++_refCount; - } -#endif -} - -inline int Referenced::unref() const -{ - int newRef; -#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS) - newRef = --_refCount; - bool needDelete = (newRef == 0); -#else - bool needDelete = false; - if (_refMutex) - { - OpenThreads::ScopedLock lock(*_refMutex); - newRef = --_refCount; - needDelete = newRef==0; - } - else - { - newRef = --_refCount; - needDelete = newRef==0; - } -#endif - - if (needDelete) - { - signalObserversAndDelete(true,true); - } - return newRef; -} - -// intrusive_ptr_add_ref and intrusive_ptr_release allow -// use of osg Referenced classes with boost::intrusive_ptr -inline void intrusive_ptr_add_ref(Referenced* p) { p->ref(); } -inline void intrusive_ptr_release(Referenced* p) { p->unref(); } - -} - -#endif diff --git a/libs/lib/mac32/include/osg/RenderInfo b/libs/lib/mac32/include/osg/RenderInfo deleted file mode 100644 index cd8846724..000000000 --- a/libs/lib/mac32/include/osg/RenderInfo +++ /dev/null @@ -1,79 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_RENDERINFO -#define OSG_RENDERINFO 1 - -#include -#include - -namespace osg { - -class RenderInfo -{ -public: - - RenderInfo(): - _view(0) {} - - RenderInfo(const RenderInfo& rhs): - _state(rhs._state), - _view(rhs._view), - _cameras(rhs._cameras), - _userData(rhs._userData) {} - - RenderInfo(State* state, View* view): - _state(state), - _view(view) {} - - RenderInfo& operator = (const RenderInfo& rhs) - { - _state = rhs._state; - _view = rhs._view; - _cameras = rhs._cameras; - _userData = rhs._userData; - return *this; - } - - unsigned int getContextID() const { return _state.valid() ? _state->getContextID() : 0; } - - void setState(State* state) { _state = state; } - State* getState() { return _state.get(); } - const State* getState() const { return _state.get(); } - - void setView(View* view) { _view = view; } - View* getView() { return _view; } - const View* getView() const { return _view; } - - void pushCamera(Camera* camera) { _cameras.push_back(camera); } - void popCamera() { if (!_cameras.empty()) _cameras.pop_back(); } - - Camera* getCurrentCamera() { return _cameras.empty() ? 0 : _cameras.back(); } - - void setUserData(Referenced* userData) { _userData = userData; } - Referenced* getUserData() { return _userData.get(); } - const Referenced* getUserData() const { return _userData.get(); } - -protected: - - typedef std::vector Cameras; - - ref_ptr _state; - View* _view; - Cameras _cameras; - ref_ptr _userData; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Scissor b/libs/lib/mac32/include/osg/Scissor deleted file mode 100644 index 41c8bcb56..000000000 --- a/libs/lib/mac32/include/osg/Scissor +++ /dev/null @@ -1,110 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_Scissor -#define OSG_Scissor 1 - -#include - -namespace osg { - -/** Encapsulate OpenGL glScissor. */ -class OSG_EXPORT Scissor : public StateAttribute -{ - public : - Scissor(); - - Scissor(int x,int y,int width,int height): - _x(x), - _y(y), - _width(width), - _height(height) {} - - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Scissor(const Scissor& vp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(vp,copyop), - _x(vp._x), - _y(vp._y), - _width(vp._width), - _height(vp._height) {} - - META_StateAttribute(osg, Scissor, SCISSOR); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Scissor,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_x) - COMPARE_StateAttribute_Parameter(_y) - COMPARE_StateAttribute_Parameter(_width) - COMPARE_StateAttribute_Parameter(_height) - - return 0; // passed all the above comparison macros, must be equal. - } - - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_SCISSOR_TEST); - return true; - } - - inline void setScissor(int x,int y,int width,int height) - { - _x = x; - _y = y; - _width = width; - _height = height; - } - - void getScissor(int& x,int& y,int& width,int& height) const - { - x = _x; - y = _y; - width = _width; - height = _height; - } - - inline int& x() { return _x; } - inline int x() const { return _x; } - - inline int& y() { return _y; } - inline int y() const { return _y; } - - inline int& width() { return _width; } - inline int width() const { return _width; } - - inline int& height() { return _height; } - inline int height() const { return _height; } - - virtual void apply(State& state) const; - - protected: - - virtual ~Scissor(); - - int _x; - int _y; - int _width; - int _height; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Sequence b/libs/lib/mac32/include/osg/Sequence deleted file mode 100644 index 0cca0c095..000000000 --- a/libs/lib/mac32/include/osg/Sequence +++ /dev/null @@ -1,252 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSG_SEQUENCE -#define OSG_SEQUENCE 1 - -#include - -namespace osg -{ - -/** Sequence is a Group node which allows automatic, time based -switching between children. -*/ -class OSG_EXPORT Sequence : public Group -{ - public : - - Sequence(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Sequence(const Sequence&, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, Sequence); - - virtual void traverse(NodeVisitor& nv); - - // the relationship between the _frameTime vector and the _children - // vector is a bit of a mess. This is how it was in previous versions, - // and there's no way out of it if upward compatibility needs to be - // maintained. New code should set defaultTime and use addChild, and - // not mess with the setTime method - - virtual bool addChild( Node *child); - - virtual bool addChild( Node *child, double t); - - virtual bool insertChild( unsigned int index, Node *child); - - virtual bool insertChild( unsigned int index, Node *child, double t); - - virtual bool removeChild( Node *child ); - - virtual bool removeChildren(unsigned int pos,unsigned int numChildrenToRemove); - - - /** value is which child node is to be displayed */ - void setValue(int value) { _value = value ; } - int getValue() const { return _value; } - - /** Set time in seconds for child. */ - void setTime(unsigned int frame, double t); - - /** Get time for child. */ - double getTime(unsigned int frame) const; - - /** Set the time list for children. */ - void setTimeList(const std::vector& timeList) { _frameTime = timeList; } - - /** Get the time list for children. */ - const std::vector& getTimeList() const { return _frameTime; } - - /** Set default time in seconds for new child. - if t<0, t=0 */ - void setDefaultTime(double t) {_defaultTime = (t<0.?0.:t);} - - /** Get default time in seconds for new child. */ - double getDefaultTime(void) const {return _defaultTime;}; - - /** Set time of last frame of last loop, in seconds. - if t<= 0, then ignored */ - void setLastFrameTime(double t) {_lastFrameTime = (t<0.?0.:t);} - - /** Get last frame time in seconds */ - double getLastFrameTime(void) const {return _lastFrameTime;}; - - /** Get number of frames */ - inline unsigned int getNumFrames() const { return _frameTime.size(); } - - /** Interval modes. 'Loop' repeats frames 1-N; 'swing' repeats 1->N, (N-1)->1. */ - enum LoopMode - { - LOOP, - SWING - }; - - /** Set sequence mode. */ - void setLoopMode(LoopMode mode) { _loopMode = mode; _value = -1; } - - /** Get sequence mode. */ - LoopMode getLoopMode() const { return _loopMode; } - - /** Set interval beginning. */ - void setBegin(int begin) { _begin = begin; _value = -1; } - - /** Get interval beginning. */ - int getBegin() const { return _begin; } - - /** Set interval ending. */ - void setEnd(int end) { _end = end; _value = -1; } - - /** Get interval ending. */ - int getEnd() const { return _end; } - - /** Set sequence mode & interval (range of children to be displayed). */ - void setInterval(LoopMode mode, int begin, int end); - - /** Get sequence mode & interval. */ - inline void getInterval(LoopMode& mode, int& begin, int& end) const - { - mode = _loopMode; - begin = _begin; - end = _end; - } - - /** Set speed. */ - void setSpeed(float speed) { _speed = speed; } - - /** Get speed. */ - float getSpeed() const { return _speed; } - - /** Set number of repeats. */ - void setNumRepeats(int nreps) { _nreps = (nreps<0?-1:nreps); _nrepsRemain = _nreps; } - - /** Get number of repeats. */ - int getNumRepeats() const { return _nreps; } - - /** Set duration: speed-up & number of repeats */ - void setDuration(float speed, int nreps = -1); - - /** Get duration & number of repeats. */ - inline void getDuration(float& speed, int& nreps) const - { - speed = _speed; - nreps = _nreps; - } - - /** Sequence modes. */ - enum SequenceMode - { - START, - STOP, - PAUSE, - RESUME - }; - - /** Set sequence mode. Start/stop & pause/resume. */ - void setMode(SequenceMode mode); - - /** Get sequence mode. */ - inline SequenceMode getMode() const { return _mode; } - - /** If false (default), frames will not be sync'd to frameTime. If - true, frames will be sync'd to frameTime. */ - void setSync(bool sync) { _sync = sync; } - - /** Get sync value */ - bool getSync() const { return _sync; } - - /** If true, show no child nodes after stopping */ - void setClearOnStop(bool clearOnStop) { _clearOnStop = clearOnStop; } - - /** Get whether to show no child nodes after stopping */ - bool getClearOnStop() const { return _clearOnStop; } - - protected : - - virtual ~Sequence() {} - - // get next _value in sequence - int _getNextValue(void) ; - - // update local variables - void _update(void) ; - - // init to -1 to mean "restart" - int _value; - - // current time, set by traverse - double _now ; - - // time this frame started. init to -1.0f- means get current time - double _start; - - // a vector of frame times, one per value - std::vector _frameTime; - - // the total time for one sequence, from BEGIN to END - double _totalTime ; - - // true if _totalTime needs to be recalculated because setTime or - // setInterval was invoked, or a new child was added - bool _resetTotalTime ; - - // store "loop mde", either LOOP or SWING - // init to LOOP- set by setInterval - LoopMode _loopMode; - - // first and last "values" to sequence through - // begin inits to 0 - // end inits to -1- means to init to number of values - int _begin, _end; - - // multiplier of real-time clock- set to N to go N times faster - // init to 0- going nowhere - float _speed; - - // _nreps: how many times to repeat- default param is -1, repeat forever - // init to 0, no repetitions - // _nrepsRemain: set to nreps and counts down every traversal, - // stopping when it gets to zero. init to 0 - int _nreps, _nrepsRemain; - - // frame step (are we stepping forward or backward?) - int _step; - - // default frame time for newly created frames or children- default is 1. - // set by setDefaultTime - double _defaultTime ; - - // special time to display last frame of last loop - // <= zero means to not do anything special - double _lastFrameTime ; - - // save the actual time of the last frame, and what value was stored - double _saveRealLastFrameTime ; - unsigned int _saveRealLastFrameValue ; - - // the current mode - SequenceMode _mode; - - // the current sync value - bool _sync ; - - // the current clearOnStop value - bool _clearOnStop ; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ShadeModel b/libs/lib/mac32/include/osg/ShadeModel deleted file mode 100644 index 82b2e4032..000000000 --- a/libs/lib/mac32/include/osg/ShadeModel +++ /dev/null @@ -1,77 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_SHADEMODEL -#define OSG_SHADEMODEL 1 - -#include -#include - -namespace osg { - -#ifndef OSG_GL_FIXED_FUNCTION_AVAILABLE - #define GL_FLAT 0x1D00 - #define GL_SMOOTH 0x1D01 -#endif - -/** Class which encapsulates glShadeModel(..). -*/ -class OSG_EXPORT ShadeModel : public StateAttribute -{ - public : - - enum Mode { - FLAT = GL_FLAT, - SMOOTH = GL_SMOOTH - }; - - ShadeModel(Mode mode=SMOOTH); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ShadeModel(const ShadeModel& sm,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(sm,copyop), - _mode(sm._mode) {} - - - META_StateAttribute(osg, ShadeModel, SHADEMODEL); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(ShadeModel,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_mode) - - return 0; // passed all the above comparison macros, must be equal. - } - - inline void setMode(Mode mode) { _mode = mode; } - - inline Mode getMode() const { return _mode; } - - virtual void apply(State& state) const; - - protected: - - virtual ~ShadeModel(); - - Mode _mode; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Shader b/libs/lib/mac32/include/osg/Shader deleted file mode 100644 index 5587f34a7..000000000 --- a/libs/lib/mac32/include/osg/Shader +++ /dev/null @@ -1,311 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * Copyright (C) 2003-2005 3Dlabs Inc. Ltd. - * Copyright (C) 2004-2005 Nathan Cournia - * Copyright (C) 2008 Zebra Imaging - * Copyright (C) 2010 VIRES Simulationstechnologie GmbH - * - * This application is open source and may be redistributed and/or modified - * freely and without restriction, both in commercial and non commercial - * applications, as long as this copyright notice is maintained. - * - * This application is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/* file: include/osg/Shader - * author: Mike Weiblen 2008-01-02 - * Holger Helmich 2010-10-21 -*/ - -#ifndef OSG_SHADER -#define OSG_SHADER 1 - - -#include -#include -#include - -#include -#include - -namespace osg { - -class Program; - -/** Simple class for wrapping up the data used in OpenGL ES 2's glShaderBinary calls. - * ShaderBinary is set up with the binary data then assigned to one or more osg::Shader. */ -class OSG_EXPORT ShaderBinary : public osg::Object -{ - public: - - ShaderBinary(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ShaderBinary(const ShaderBinary& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osg, ShaderBinary); - - /** Allocated a data buffer of specified size/*/ - void allocate(unsigned int size); - - /** Assign shader binary data, copying the specified data into locally stored data buffer, the original data can then be deleted.*/ - void assign(unsigned int size, const unsigned char* data); - - /** Get the size of the shader binary data.*/ - unsigned int getSize() const { return _data.size(); } - - /** Get a ptr to the shader binary data.*/ - unsigned char* getData() { return _data.empty() ? 0 : &(_data.front()); } - - /** Get a const ptr to the shader binary data.*/ - const unsigned char* getData() const { return _data.empty() ? 0 : &(_data.front()); } - - /** Read shader binary from file. - * Return the resulting Shader or 0 if no valid shader binary could be read.*/ - static ShaderBinary* readShaderBinaryFile(const std::string& fileName); - - protected: - - typedef std::vector Data; - Data _data; -}; - - -/////////////////////////////////////////////////////////////////////////// -/** osg::Shader is an application-level abstraction of an OpenGL glShader. - * It is a container to load the shader source code text and manage its - * compilation. - * An osg::Shader may be attached to more than one osg::Program. - * Shader will automatically manage per-context instancing of the - * internal objects, if that is necessary for a particular display - * configuration. - */ - -class OSG_EXPORT Shader : public osg::Object -{ - public: - - enum Type { - VERTEX = GL_VERTEX_SHADER, - TESSCONTROL = GL_TESS_CONTROL_SHADER, - TESSEVALUATION = GL_TESS_EVALUATION_SHADER, - GEOMETRY = GL_GEOMETRY_SHADER_EXT, - FRAGMENT = GL_FRAGMENT_SHADER, - UNDEFINED = -1 - }; - - Shader(Type type = UNDEFINED); - Shader(Type type, const std::string& source ); - Shader(Type type, ShaderBinary* shaderBinary ); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Shader(const Shader& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osg, Shader); - - int compare(const Shader& rhs) const; - - /** Set the Shader type as an enum. */ - bool setType(Type t); - - /** Get the Shader type as an enum. */ - inline Type getType() const { return _type; } - - /** Get the Shader type as a descriptive string. */ - const char* getTypename() const; - - - /** Set file name for the shader source code. */ - inline void setFileName(const std::string& fileName) { _shaderFileName = fileName; } - - /** Get filename to which the shader source code belongs. */ - inline const std::string& getFileName() const { return _shaderFileName; } - - - /** Set the Shader's source code text from a string. */ - void setShaderSource(const std::string& sourceText); - - /** Query the shader's source code text */ - inline const std::string& getShaderSource() const { return _shaderSource; } - - - /** Set the Shader using a ShaderBinary. */ - void setShaderBinary(ShaderBinary* shaderBinary) { _shaderBinary = shaderBinary; } - - /** Get the Shader's ShaderBinary, return NULL if none is assigned. */ - ShaderBinary* getShaderBinary() { return _shaderBinary.get(); } - - /** Get the const Shader's ShaderBinary, return NULL if none is assigned. */ - const ShaderBinary* getShaderBinary() const { return _shaderBinary.get(); } - - - /** Read shader source from file and then constructor shader of specified type. - * Return the resulting Shader or 0 if no valid shader source could be read.*/ - static Shader* readShaderFile( Type type, const std::string& fileName ); - - /** Load the Shader's source code text from a file. */ - bool loadShaderSourceFromFile( const std::string& fileName ); - - - /** The code injection map used when generating the main shader during main shader composition.*/ - typedef std::multimap CodeInjectionMap; - - /** Add code injection that will be placed in the main shader to enable support for this shader. - * The position is set up so that code to be inserted before the main() will have a negative value, - * a position between 0 and 1.0 will be inserted in main() and a position greater than 1.0 will - * be placed after the main(). - * During shader composition all the code injections are sorted in ascending order and then - * placed in the appropriate section of the main shader. */ - void addCodeInjection(float position, const std::string& code) { _codeInjectionMap.insert(CodeInjectionMap::value_type(position, code)); } - - /** Get the code injection map.*/ - CodeInjectionMap& getCodeInjectionMap() { return _codeInjectionMap; } - - /** Get the const code injection map.*/ - const CodeInjectionMap& getCodeInjectionMap() const { return _codeInjectionMap; } - - - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** release OpenGL objects in specified graphics context if State - object is passed, otherwise release OpenGL objects for all graphics context if - State object pointer NULL.*/ - void releaseGLObjects(osg::State* state=0) const; - - /** Mark our PCSs as needing recompilation. - * Also mark Programs that depend on us as needing relink */ - void dirtyShader(); - - /** If needed, compile the PCS's glShader */ - void compileShader(osg::State& state) const; - - /** For a given GL context, attach a glShader to a glProgram */ - void attachShader(unsigned int contextID, GLuint program) const; - - /** For a given GL context, detach a glShader to a glProgram */ - void detachShader(unsigned int contextID, GLuint program) const; - - /** Query InfoLog from a glShader */ - bool getGlShaderInfoLog(unsigned int contextID, std::string& log) const; - - /** Mark internal glShader for deletion. - * Deletion requests are queued until they can be executed - * in the proper GL context. */ - static void deleteGlShader(unsigned int contextID, GLuint shader); - - /** flush all the cached glShaders which need to be deleted - * in the OpenGL context related to contextID.*/ - static void flushDeletedGlShaders(unsigned int contextID,double currentTime, double& availableTime); - - /** discard all the cached glShaders which need to be deleted in the OpenGL context related to contextID. - * Note, unlike flush no OpenGL calls are made, instead the handles are all removed. - * this call is useful for when an OpenGL context has been destroyed. */ - static void discardDeletedGlShaders(unsigned int contextID); - - static Shader::Type getTypeId( const std::string& tname ); - - public: - /** PerContextShader (PCS) is an OSG-internal encapsulation of glShader per-GL context. */ - class OSG_EXPORT PerContextShader : public osg::Referenced - { - public: - PerContextShader(const Shader* shader, unsigned int contextID); - - GLuint getHandle() const {return _glShaderHandle;} - - void requestCompile(); - void compileShader(osg::State& state); - bool needsCompile() const {return _needsCompile;} - bool isCompiled() const {return _isCompiled;} - bool getInfoLog( std::string& infoLog ) const; - - /** Attach our glShader to a glProgram */ - void attachShader(GLuint program) const; - - /** Detach our glShader from a glProgram */ - void detachShader(GLuint program) const; - - protected: /*methods*/ - ~PerContextShader(); - - protected: /*data*/ - /** Pointer to our parent osg::Shader */ - const Shader* _shader; - /** Pointer to this context's extension functions. */ - osg::ref_ptr _extensions; - /** Handle to the actual glShader. */ - GLuint _glShaderHandle; - /** Does our glShader need to be recompiled? */ - bool _needsCompile; - /** Is our glShader successfully compiled? */ - bool _isCompiled; - const unsigned int _contextID; - - private: - PerContextShader(); // disallowed - PerContextShader(const PerContextShader&); // disallowed - PerContextShader& operator=(const PerContextShader&); // disallowed - }; - - PerContextShader* getPCS(unsigned int contextID) const; - - protected: /*methods*/ - virtual ~Shader(); - - - friend class osg::Program; - bool addProgramRef( osg::Program* program ); - bool removeProgramRef( osg::Program* program ); - - protected: /*data*/ - Type _type; - std::string _shaderFileName; - std::string _shaderSource; - osg::ref_ptr _shaderBinary; - - CodeInjectionMap _codeInjectionMap; - - /** osg::Programs that this osg::Shader is attached to */ - typedef std::set< osg::Program* > ProgramSet; - ProgramSet _programSet; - mutable osg::buffered_value< osg::ref_ptr > _pcsList; - - private: - Shader& operator=(const Shader&); // disallowed -}; - - -class OSG_EXPORT ShaderComponent : public osg::Object -{ - public: - - ShaderComponent(); - ShaderComponent(const ShaderComponent& sc,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg, ShaderComponent) - - unsigned int addShader(osg::Shader* shader); - void removeShader(unsigned int i); - - osg::Shader* getShader(unsigned int i) { return _shaders[i].get(); } - const osg::Shader* getShader(unsigned int i) const { return _shaders[i].get(); } - - unsigned int getNumShaders() const { return _shaders.size(); } - - virtual void compileGLObjects(State& state) const; - virtual void resizeGLObjectBuffers(unsigned int maxSize); - virtual void releaseGLObjects(State* state=0) const; - - protected: - - typedef std::vector< osg::ref_ptr > Shaders; - Shaders _shaders; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ShaderAttribute b/libs/lib/mac32/include/osg/ShaderAttribute deleted file mode 100644 index 09d24cae7..000000000 --- a/libs/lib/mac32/include/osg/ShaderAttribute +++ /dev/null @@ -1,79 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_SHADERATTRIBUTE -#define OSG_SHADERATTRIBUTE 1 - -#include -#include -#include - -namespace osg { - -class OSG_EXPORT ShaderAttribute : public StateAttribute -{ - public : - - ShaderAttribute(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - ShaderAttribute(const ShaderAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual osg::Object* cloneType() const; - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new ShaderAttribute(*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "ShaderAttribute"; } - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const; - - - void setType(Type type); - virtual Type getType() const { return _type; } - - unsigned int addShader(Shader* shader) { return _shaderComponent->addShader(shader); } - void removeShader(unsigned int i) { _shaderComponent->removeShader(i); } - unsigned int getNumShaders() const { return _shaderComponent->getNumShaders(); } - Shader* getShader(unsigned int i) { return _shaderComponent->getShader(i); } - const Shader* getShader(unsigned int i) const { return _shaderComponent->getShader(i); } - - unsigned int addUniform(Uniform* uniform); - void removeUniform(unsigned int i); - unsigned int getNumUniforms() const { return _uniforms.size(); } - Uniform* getUniform(unsigned int i) { return _uniforms[i].get(); } - const Uniform* getUniform(unsigned int i) const { return _uniforms[i].get(); } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const; - - virtual void apply(State& state) const; - - virtual void compileGLObjects(State& state) const; - - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - virtual void releaseGLObjects(State* state=0) const; - - protected : - - virtual ~ShaderAttribute(); - - typedef std::vector< osg::ref_ptr > Uniforms; - - Type _type; - Uniforms _uniforms; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ShaderComposer b/libs/lib/mac32/include/osg/ShaderComposer deleted file mode 100644 index 97ea26cd7..000000000 --- a/libs/lib/mac32/include/osg/ShaderComposer +++ /dev/null @@ -1,58 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_SHADERCOMPOSER -#define OSG_SHADERCOMPOSER 1 - -#include -#include -#include - -namespace osg { - -// forward declare osg::State -class State; - -typedef std::vector ShaderComponents; - -class OSG_EXPORT ShaderComposer : public osg::Object -{ - public: - - ShaderComposer(); - ShaderComposer(const ShaderComposer& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - META_Object(osg, ShaderComposer) - - virtual osg::Program* getOrCreateProgram(const ShaderComponents& shaderComponents); - - - typedef std::vector< const osg::Shader* > Shaders; - virtual osg::Shader* composeMain(const Shaders& shaders); - virtual void addShaderToProgram(Program* program, const Shaders& shaders); - - protected: - - virtual ~ShaderComposer(); - - - typedef std::map< ShaderComponents, ref_ptr > ProgramMap; - ProgramMap _programMap; - - typedef std::map< Shaders, ref_ptr > ShaderMainMap; - ShaderMainMap _shaderMainMap; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ShadowVolumeOccluder b/libs/lib/mac32/include/osg/ShadowVolumeOccluder deleted file mode 100644 index dfc0bcb7c..000000000 --- a/libs/lib/mac32/include/osg/ShadowVolumeOccluder +++ /dev/null @@ -1,172 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_SHADOWVOLUMEOCCLUDER -#define OSG_SHADOWVOLUMEOCCLUDER 1 - -#include -#include -#include - -namespace osg { - -class CullStack; - -/** ShadowVolumeOccluder is a helper class for implementing shadow occlusion culling. */ -class OSG_EXPORT ShadowVolumeOccluder -{ - - public: - - - typedef std::vector HoleList; - - ShadowVolumeOccluder(const ShadowVolumeOccluder& svo): - _volume(svo._volume), - _nodePath(svo._nodePath), - _projectionMatrix(svo._projectionMatrix), - _occluderVolume(svo._occluderVolume), - _holeList(svo._holeList) {} - - ShadowVolumeOccluder(): - _volume(0.0f) {} - - - bool operator < (const ShadowVolumeOccluder& svo) const { return getVolume()>svo.getVolume(); } // not greater volume first. - - /** compute the shadow volume occluder. */ - bool computeOccluder(const NodePath& nodePath,const ConvexPlanarOccluder& occluder,CullStack& cullStack,bool createDrawables=false); - - - inline void disableResultMasks(); - - inline void pushCurrentMask(); - inline void popCurrentMask(); - - - /** return true if the matrix passed in matches the projection matrix that this ShadowVolumeOccluder is - * associated with.*/ - bool matchProjectionMatrix(const osg::Matrix& matrix) const - { - if (_projectionMatrix.valid()) return matrix==*_projectionMatrix; - else return false; - } - - - /** Set the NodePath which describes which node in the scene graph - * that this occluder is attached to. */ - inline void setNodePath(NodePath& nodePath) { _nodePath = nodePath; } - inline NodePath& getNodePath() { return _nodePath; } - inline const NodePath& getNodePath() const { return _nodePath; } - - - /** get the volume of the occluder minus its holes, in eye coords, the volume is normalized by dividing by - * the volume of the view frustum in eye coords.*/ - float getVolume() const { return _volume; } - - /** return the occluder polytope.*/ - Polytope& getOccluder() { return _occluderVolume; } - - /** return the const occluder polytope.*/ - const Polytope& getOccluder() const { return _occluderVolume; } - - /** return the list of holes.*/ - HoleList& getHoleList() { return _holeList; } - - /** return the const list of holes.*/ - const HoleList& getHoleList() const { return _holeList; } - - - /** return true if the specified vertex list is contained entirely - * within this shadow occluder volume.*/ - bool contains(const std::vector& vertices); - - /** return true if the specified bounding sphere is contained entirely - * within this shadow occluder volume.*/ - bool contains(const BoundingSphere& bound); - - /** return true if the specified bounding box is contained entirely - * within this shadow occluder volume.*/ - bool contains(const BoundingBox& bound); - - inline void transformProvidingInverse(const osg::Matrix& matrix) - { - _occluderVolume.transformProvidingInverse(matrix); - for(HoleList::iterator itr=_holeList.begin(); - itr!=_holeList.end(); - ++itr) - { - itr->transformProvidingInverse(matrix); - } - } - - - protected: - - float _volume; - NodePath _nodePath; - ref_ptr _projectionMatrix; - Polytope _occluderVolume; - HoleList _holeList; -}; - - -/** A list of ShadowVolumeOccluder, used by CollectOccluderVisitor and CullVistor's.*/ -typedef std::vector ShadowVolumeOccluderList; - - -inline void ShadowVolumeOccluder::disableResultMasks() -{ - //std::cout<<"ShadowVolumeOccluder::disableResultMasks() - _occluderVolume.getMaskStack().size()="<<_occluderVolume.getMaskStack().size()<<" "<<_occluderVolume.getCurrentMask()<setResultMask(0); - } -} - -inline void ShadowVolumeOccluder::pushCurrentMask() -{ - //std::cout<<"ShadowVolumeOccluder::pushCurrentMasks() - _occluderVolume.getMaskStack().size()="<<_occluderVolume.getMaskStack().size()<<" "<<_occluderVolume.getCurrentMask()<pushCurrentMask(); - } - } -} - -inline void ShadowVolumeOccluder::popCurrentMask() -{ - _occluderVolume.popCurrentMask(); - if (!_holeList.empty()) - { - for(HoleList::iterator itr=_holeList.begin(); - itr!=_holeList.end(); - ++itr) - { - itr->popCurrentMask(); - } - } - //std::cout<<"ShadowVolumeOccluder::popCurrentMasks() - _occluderVolume.getMaskStack().size()="<<_occluderVolume.getMaskStack().size()<<" "<<_occluderVolume.getCurrentMask()< -#include -#include -#include -#include - -namespace osg { - -// forward decare visitors. -class ShapeVisitor; -class ConstShapeVisitor; - - -/** META_StateAttribute macro define the standard clone, isSameKindAs, - * className and getType methods. - * Use when subclassing from Object to make it more convenient to define - * the standard pure virtual methods which are required for all Object - * subclasses.*/ -#define META_Shape(library,name) \ - virtual osg::Object* cloneType() const { return new name(); } \ - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ - virtual const char* libraryName() const { return #library; } \ - virtual const char* className() const { return #name; } \ - virtual void accept(osg::ShapeVisitor& sv) { sv.apply(*this); } \ - virtual void accept(osg::ConstShapeVisitor& csv) const { csv.apply(*this); } - -/** Base class for all shape types. - * Shapes are used to either for culling and collision detection or - * to define the geometric shape of procedurally generate Geometry. -*/ -class OSG_EXPORT Shape : public Object -{ - public: - - Shape() {} - - Shape(const Shape& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Object(sa,copyop) {} - - /** Clone the type of an attribute, with Object* return type. - Must be defined by derived classes.*/ - virtual Object* cloneType() const = 0; - - /** Clone an attribute, with Object* return type. - Must be defined by derived classes.*/ - virtual Object* clone(const CopyOp&) const = 0; - - - /** return true if this and obj are of the same kind of object.*/ - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - - /** return the name of the attribute's library.*/ - virtual const char* libraryName() const { return "osg"; } - - /** return the name of the attribute's class type.*/ - virtual const char* className() const { return "Shape"; } - - /** accept a non const shape visitor which can be used on non const shape objects. - Must be defined by derived classes.*/ - virtual void accept(ShapeVisitor&)=0; - - /** accept a const shape visitor which can be used on const shape objects. - Must be defined by derived classes.*/ - virtual void accept(ConstShapeVisitor&) const =0; - - protected: - - virtual ~Shape(); -}; - -// forward declarations of Shape types. -class Sphere; -class Box; -class Cone; -class Cylinder; -class Capsule; -class InfinitePlane; - -class TriangleMesh; -class ConvexHull; -class HeightField; - -class CompositeShape; - -class OSG_EXPORT ShapeVisitor -{ - public: - - ShapeVisitor() {} - virtual ~ShapeVisitor(); - - virtual void apply(Shape&) {} - virtual void apply(Sphere&) {} - virtual void apply(Box&) {} - virtual void apply(Cone&) {} - virtual void apply(Cylinder&) {} - virtual void apply(Capsule&) {} - virtual void apply(InfinitePlane&) {} - - virtual void apply(TriangleMesh&) {} - virtual void apply(ConvexHull&) {} - virtual void apply(HeightField&) {} - - virtual void apply(CompositeShape&) {} -}; - -class OSG_EXPORT ConstShapeVisitor -{ - public: - - ConstShapeVisitor() {} - virtual ~ConstShapeVisitor(); - - virtual void apply(const Shape&) {} - virtual void apply(const Sphere&) {} - virtual void apply(const Box&) {} - virtual void apply(const Cone&) {} - virtual void apply(const Cylinder&) {} - virtual void apply(const Capsule&) {} - virtual void apply(const InfinitePlane&) {} - - virtual void apply(const TriangleMesh&) {} - virtual void apply(const ConvexHull&) {} - virtual void apply(const HeightField&) {} - - virtual void apply(const CompositeShape&) {} -}; - -class OSG_EXPORT Sphere : public Shape -{ - public: - - Sphere(): - _center(0.0f,0.0f,0.0f), - _radius(1.0f) {} - - Sphere(const osg::Vec3& center,float radius): - _center(center), - _radius(radius) {} - - Sphere(const Sphere& sphere,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Shape(sphere,copyop), - _center(sphere._center), - _radius(sphere._radius) {} - - META_Shape(osg, Sphere); - - inline bool valid() const { return _radius>=0.0f; } - - inline void set(const Vec3& center,float radius) - { - _center = center; - _radius = radius; - } - - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setRadius(float radius) { _radius = radius; } - inline float getRadius() const { return _radius; } - - protected: - - virtual ~Sphere(); - - Vec3 _center; - float _radius; - -}; - -class OSG_EXPORT Box : public Shape -{ - public: - - Box(): - _center(0.0f,0.0f,0.0f), - _halfLengths(0.5f,0.5f,0.5f) {} - - Box(const osg::Vec3& center,float width): - _center(center), - _halfLengths(width*0.5f,width*0.5f,width*0.5f) {} - - Box(const osg::Vec3& center,float lengthX,float lengthY, float lengthZ): - _center(center), - _halfLengths(lengthX*0.5f,lengthY*0.5f,lengthZ*0.5f) {} - - Box(const Box& box,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Shape(box,copyop), - _center(box._center), - _halfLengths(box._halfLengths), - _rotation(box._rotation) {} - - META_Shape(osg, Box); - - inline bool valid() const { return _halfLengths.x()>=0.0f; } - - inline void set(const Vec3& center,const Vec3& halfLengths) - { - _center = center; - _halfLengths = halfLengths; - } - - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setHalfLengths(const Vec3& halfLengths) { _halfLengths = halfLengths; } - inline const Vec3& getHalfLengths() const { return _halfLengths; } - - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - inline bool zeroRotation() const { return _rotation.zeroRotation(); } - - protected: - - virtual ~Box(); - - Vec3 _center; - Vec3 _halfLengths; - Quat _rotation; - -}; - - - -class OSG_EXPORT Cone : public Shape -{ - public: - - Cone(): - _center(0.0f,0.0f,0.0f), - _radius(1.0f), - _height(1.0f) {} - - Cone(const osg::Vec3& center,float radius,float height): - _center(center), - _radius(radius), - _height(height) {} - - Cone(const Cone& cone,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Shape(cone,copyop), - _center(cone._center), - _radius(cone._radius), - _height(cone._height), - _rotation(cone._rotation) {} - - META_Shape(osg, Cone); - - inline bool valid() const { return _radius>=0.0f; } - - inline void set(const Vec3& center,float radius, float height) - { - _center = center; - _radius = radius; - _height = height; - } - - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setRadius(float radius) { _radius = radius; } - inline float getRadius() const { return _radius; } - - inline void setHeight(float height) { _height = height; } - inline float getHeight() const { return _height; } - - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - inline bool zeroRotation() const { return _rotation.zeroRotation(); } - - inline float getBaseOffsetFactor() const { return 0.25f; } - inline float getBaseOffset() const { return -getBaseOffsetFactor()*getHeight(); } - - protected: - - virtual ~Cone(); - - Vec3 _center; - float _radius; - float _height; - - Quat _rotation; -}; - -class OSG_EXPORT Cylinder : public Shape -{ - public: - - Cylinder(): - _center(0.0f,0.0f,0.0f), - _radius(1.0f), - _height(1.0f) {} - - Cylinder(const osg::Vec3& center,float radius,float height): - _center(center), - _radius(radius), - _height(height) {} - - Cylinder(const Cylinder& cylinder,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Shape(cylinder,copyop), - _center(cylinder._center), - _radius(cylinder._radius), - _height(cylinder._height), - _rotation(cylinder._rotation) {} - - META_Shape(osg, Cylinder); - - inline bool valid() const { return _radius>=0.0f; } - - inline void set(const Vec3& center,float radius, float height) - { - _center = center; - _radius = radius; - _height = height; - } - - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setRadius(float radius) { _radius = radius; } - inline float getRadius() const { return _radius; } - - inline void setHeight(float height) { _height = height; } - inline float getHeight() const { return _height; } - - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - bool zeroRotation() const { return _rotation.zeroRotation(); } - - protected: - - virtual ~Cylinder(); - - Vec3 _center; - float _radius; - float _height; - Quat _rotation; -}; - -class OSG_EXPORT Capsule : public Shape -{ - public: - - Capsule(): - _center(0.0f,0.0f,0.0f), - _radius(1.0f), - _height(1.0f) {} - - Capsule(const osg::Vec3& center,float radius,float height): - _center(center), - _radius(radius), - _height(height) {} - - Capsule(const Capsule& capsule,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Shape(capsule,copyop), - _center(capsule._center), - _radius(capsule._radius), - _height(capsule._height), - _rotation(capsule._rotation) {} - - META_Shape(osg, Capsule); - - inline bool valid() const { return _radius>=0.0f; } - - inline void set(const Vec3& center,float radius, float height) - { - _center = center; - _radius = radius; - _height = height; - } - - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setRadius(float radius) { _radius = radius; } - inline float getRadius() const { return _radius; } - - inline void setHeight(float height) { _height = height; } - inline float getHeight() const { return _height; } - - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - bool zeroRotation() const { return _rotation.zeroRotation(); } - - protected: - - virtual ~Capsule(); - - Vec3 _center; - float _radius; - float _height; - Quat _rotation; -}; - -class OSG_EXPORT InfinitePlane : public Shape, public Plane -{ - public: - InfinitePlane() {} - - InfinitePlane(const InfinitePlane& plane,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Shape(plane,copyop), - Plane(plane) {} - - META_Shape(osg, InfinitePlane); - - protected: - - virtual ~InfinitePlane(); -}; - -/** Exists to support collision detection engines not for doing rendering, use \ref osg::Geometry instead. - */ -class OSG_EXPORT TriangleMesh : public Shape -{ - public: - - TriangleMesh() {} - - TriangleMesh(const TriangleMesh& mesh,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Shape(mesh,copyop), - _vertices(mesh._vertices), - _indices(mesh._indices) {} - - META_Shape(osg, TriangleMesh); - - - void setVertices(Vec3Array* vertices) { _vertices = vertices; } - Vec3Array* getVertices() { return _vertices.get(); } - const Vec3Array* getVertices() const { return _vertices.get(); } - - - void setIndices(IndexArray* indices) { _indices = indices; } - IndexArray* getIndices() { return _indices.get(); } - const IndexArray* getIndices() const { return _indices.get(); } - - protected: - - virtual ~TriangleMesh(); - - ref_ptr _vertices; - ref_ptr _indices; - -}; - -class OSG_EXPORT ConvexHull : public TriangleMesh -{ - public: - - ConvexHull() {} - - ConvexHull(const ConvexHull& hull,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - TriangleMesh(hull,copyop) {} - - META_Shape(osg, TriangleMesh); - - protected: - - virtual ~ConvexHull(); -}; - -class OSG_EXPORT HeightField : public Shape -{ - public: - - HeightField(); - - HeightField(const HeightField& mesh,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Shape(osg, HeightField); - - typedef std::vector HeightList; - - void allocate(unsigned int numColumns,unsigned int numRows); - - inline unsigned int getNumColumns() const { return _columns; } - inline unsigned int getNumRows() const { return _rows; } - - inline void setOrigin(const osg::Vec3& origin) { _origin = origin; } - inline const osg::Vec3& getOrigin() const { return _origin; } - - inline void setXInterval(float dx) { _dx = dx; } - inline float getXInterval() const { return _dx; } - - inline void setYInterval(float dy) { _dy = dy; } - inline float getYInterval() const { return _dy; } - - /** Get the FloatArray height data.*/ - osg::FloatArray* getFloatArray() { return _heights.get(); } - - /** Get the const FloatArray height data.*/ - const osg::FloatArray* getFloatArray() const { return _heights.get(); } - - HeightList& getHeightList() { return _heights->asVector(); } - - const HeightList& getHeightList() const { return _heights->asVector(); } - - /** Set the height of the skirt to render around the edge of HeightField. - * The skirt is used as a means of disguising edge boundaries between adjacent HeightField, - * particularly of ones with different resolutions.*/ - void setSkirtHeight(float skirtHeight) { _skirtHeight = skirtHeight; } - - /** Get the height of the skirt to render around the edge of HeightField.*/ - float getSkirtHeight() const { return _skirtHeight; } - - /** Set the width in number of cells in from the edge that the height field should be rendered from. - * This exists to allow gradient and curvature continutity to be maintained between adjacent HeightField, where - * the border cells will overlap adjacent HeightField.*/ - void setBorderWidth(unsigned int borderWidth) { _borderWidth = borderWidth; } - - /** Get the width in number of cells in from the edge that the height field should be rendered from.*/ - unsigned int getBorderWidth() const { return _borderWidth; } - - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - inline bool zeroRotation() const { return _rotation.zeroRotation(); } - - /* set a single height point in the height field */ - inline void setHeight(unsigned int c,unsigned int r,float value) - { - (*_heights)[c+r*_columns] = value; - } - - /* Get address of single height point in the height field, allows user to change. */ - inline float& getHeight(unsigned int c,unsigned int r) - { - return (*_heights)[c+r*_columns]; - } - - /* Get value of single height point in the height field, not editable. */ - inline float getHeight(unsigned int c,unsigned int r) const - { - return (*_heights)[c+r*_columns]; - } - - inline Vec3 getVertex(unsigned int c,unsigned int r) const - { - return Vec3(_origin.x()+getXInterval()*(float)c, - _origin.y()+getYInterval()*(float)r, - _origin.z()+(*_heights)[c+r*_columns]); - } - - Vec3 getNormal(unsigned int c,unsigned int r) const; - - Vec2 getHeightDelta(unsigned int c,unsigned int r) const; - - protected: - - virtual ~HeightField(); - - unsigned int _columns,_rows; - - osg::Vec3 _origin; // _origin is the min value of the X and Y coordinates. - float _dx; - float _dy; - - float _skirtHeight; - unsigned int _borderWidth; - - Quat _rotation; - osg::ref_ptr _heights; - -}; - -typedef HeightField Grid; - - -class OSG_EXPORT CompositeShape : public Shape -{ - public: - - - - typedef std::vector< ref_ptr > ChildList; - - CompositeShape() {} - - CompositeShape(const CompositeShape& cs,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Shape(cs,copyop), - _children(cs._children) {} - - META_Shape(osg, CompositeShape); - - /** Set the shape that encloses all of the children.*/ - void setShape(Shape* shape) { _shape = shape; } - - /** Get the shape that encloses all of the children.*/ - Shape* getShape() { return _shape.get(); } - - /** Get the const shape that encloses all of the children.*/ - const Shape* getShape() const { return _shape.get(); } - - /** Get the number of children of this composite shape.*/ - unsigned int getNumChildren() const { return static_cast(_children.size()); } - - /** Get a child.*/ - Shape* getChild(unsigned int i) { return _children[i].get(); } - - /** Get a const child.*/ - const Shape* getChild(unsigned int i) const { return _children[i].get(); } - - /** Add a child to the list.*/ - void addChild(Shape* shape) { _children.push_back(shape); } - - /** remove a child from the list.*/ - void removeChild(unsigned int i) { _children.erase(_children.begin()+i); } - - /** find the index number of child, if child is not found then it returns getNumChildren(), - * so should be used in similar style to STL's result!=end().*/ - unsigned int findChildNo(Shape* shape) const - { - for (unsigned int childNo=0;childNo<_children.size();++childNo) - { - if (_children[childNo]==shape) return childNo; - } - return static_cast(_children.size()); // node not found. - - } - - protected: - - virtual ~CompositeShape(); - - ref_ptr _shape; - ChildList _children; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ShapeDrawable b/libs/lib/mac32/include/osg/ShapeDrawable deleted file mode 100644 index af3913708..000000000 --- a/libs/lib/mac32/include/osg/ShapeDrawable +++ /dev/null @@ -1,201 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_SHAPEDRAWABLE -#define OSG_SHAPEDRAWABLE 1 - -#include -#include -#include -#include -#include -#include - -namespace osg { - -/** Describe several hints that can be passed to a Tessellator (like the one used - * by \c ShapeDrawable) as a mean to try to influence the way it works. - */ -class TessellationHints : public Object -{ - public: - - TessellationHints(): - _TessellationMode(USE_SHAPE_DEFAULTS), - _detailRatio(1.0f), - _targetNumFaces(100), - _createFrontFace(true), - _createBackFace(false), - _createNormals(true), - _createTextureCoords(false), - _createTop(true), - _createBody(true), - _createBottom(true) {} - - - TessellationHints(const TessellationHints& tess, const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Object(tess,copyop), - _TessellationMode(tess._TessellationMode), - _detailRatio(tess._detailRatio), - _targetNumFaces(tess._targetNumFaces), - _createFrontFace(tess._createFrontFace), - _createBackFace(tess._createBackFace), - _createNormals(tess._createNormals), - _createTextureCoords(tess._createTextureCoords), - _createTop(tess._createTop), - _createBody(tess._createBody), - _createBottom(tess._createBottom) {} - - META_Object(osg,TessellationHints); - - - enum TessellationMode - { - USE_SHAPE_DEFAULTS, - USE_TARGET_NUM_FACES - }; - - inline void setTessellationMode(TessellationMode mode) { _TessellationMode=mode; } - inline TessellationMode getTessellationMode() const { return _TessellationMode; } - - inline void setDetailRatio(float ratio) { _detailRatio = ratio; } - inline float getDetailRatio() const { return _detailRatio; } - - inline void setTargetNumFaces(unsigned int target) { _targetNumFaces=target; } - inline unsigned int getTargetNumFaces() const { return _targetNumFaces; } - - inline void setCreateFrontFace(bool on) { _createFrontFace=on; } - inline bool getCreateFrontFace() const { return _createFrontFace; } - - inline void setCreateBackFace(bool on) { _createBackFace=on; } - inline bool getCreateBackFace() const { return _createBackFace; } - - inline void setCreateNormals(bool on) { _createNormals=on; } - inline bool getCreateNormals() const { return _createNormals; } - - inline void setCreateTextureCoords(bool on) { _createTextureCoords=on; } - inline bool getCreateTextureCoords() const { return _createTextureCoords; } - - inline void setCreateTop(bool on) { _createTop=on; } - inline bool getCreateTop() const { return _createTop; } - - inline void setCreateBody(bool on) { _createBody=on; } - inline bool getCreateBody() const { return _createBody; } - - inline void setCreateBottom(bool on) { _createBottom=on; } - inline bool getCreateBottom() const { return _createBottom; } - - protected: - - ~TessellationHints() {} - - - TessellationMode _TessellationMode; - - float _detailRatio; - unsigned int _targetNumFaces; - - bool _createFrontFace; - bool _createBackFace; - bool _createNormals; - bool _createTextureCoords; - - bool _createTop; - bool _createBody; - bool _createBottom; - -}; - - -/** Allow the use of Shapes as Drawables, so that they can - * be rendered with reduced effort. The implementation of \c ShapeDrawable is - * not geared to efficiency; it's better to think of it as a convenience to - * render Shapes easily (perhaps for test or debugging purposes) than - * as the right way to render basic shapes in some efficiency-critical section - * of code. - */ -class OSG_EXPORT ShapeDrawable : public Drawable -{ - public: - - ShapeDrawable(); - - ShapeDrawable(Shape* shape, TessellationHints* hints=0); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ShapeDrawable(const ShapeDrawable& pg,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new ShapeDrawable(); } - virtual Object* clone(const CopyOp& copyop) const { return new ShapeDrawable(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "ShapeDrawable"; } - - /** Set the color of the shape.*/ - void setColor(const Vec4& color); - - /** Get the color of the shape.*/ - const Vec4& getColor() const { return _color; } - - void setTessellationHints(TessellationHints* hints); - - TessellationHints* getTessellationHints() { return _tessellationHints.get(); } - const TessellationHints* getTessellationHints() const { return _tessellationHints.get(); } - - - - /** Draw ShapeDrawable directly ignoring an OpenGL display list which - * could be attached. This is the internal draw method which does the - * drawing itself, and is the method to override when deriving from - * ShapeDrawable for user-drawn objects. - */ - virtual void drawImplementation(RenderInfo& renderInfo) const; - - /* Not all virtual overloads of these methods are overridden in this class, so - bring the base class implementation in to avoid hiding the non-used ones. */ - using Drawable::supports; - using Drawable::accept; - - /** Return false, osg::ShapeDrawable does not support accept(AttributeFunctor&).*/ - virtual bool supports(const AttributeFunctor&) const { return false; } - - /** Return true, osg::ShapeDrawable does support accept(Drawable::ConstAttributeFunctor&).*/ - virtual bool supports(const Drawable::ConstAttributeFunctor&) const { return true; } - - /** Accept a Drawable::ConstAttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.*/ - virtual void accept(Drawable::ConstAttributeFunctor& af) const; - - /** Return true, osg::ShapeDrawable does support accept(PrimitiveFunctor&) .*/ - virtual bool supports(const PrimitiveFunctor&) const { return true; } - - /** Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Drawable has.*/ - virtual void accept(PrimitiveFunctor& pf) const; - - virtual BoundingBox computeBound() const; - - protected: - - ShapeDrawable& operator = (const ShapeDrawable&) { return *this;} - - virtual ~ShapeDrawable(); - - Vec4 _color; - - ref_ptr _tessellationHints; - -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/State b/libs/lib/mac32/include/osg/State deleted file mode 100644 index 971f8df8c..000000000 --- a/libs/lib/mac32/include/osg/State +++ /dev/null @@ -1,2676 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_STATE -#define OSG_STATE 1 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifndef GL_FOG_COORDINATE_ARRAY - #ifdef GL_FOG_COORDINATE_ARRAY_EXT - #define GL_FOG_COORDINATE_ARRAY GL_FOG_COORDINATE_ARRAY_EXT - #else - #define GL_FOG_COORDINATE_ARRAY 0x8457 - #endif -#endif - -#ifndef GL_SECONDARY_COLOR_ARRAY - #ifdef GL_SECONDARY_COLOR_ARRAY_EXT - #define GL_SECONDARY_COLOR_ARRAY GL_SECONDARY_COLOR_ARRAY_EXT - #else - #define GL_SECONDARY_COLOR_ARRAY 0x845E - #endif -#endif - -#if !defined(GL_EXT_timer_query) && !defined(OSG_GL3_AVAILABLE) - #ifdef _WIN32 - typedef __int64 GLint64EXT; - typedef unsigned __int64 GLuint64EXT; - #else - typedef long long int GLint64EXT; - typedef unsigned long long int GLuint64EXT; - #endif -#endif - -namespace osg { - -/** macro for use with osg::StateAttribute::apply methods for detecting and - * reporting OpenGL error messages.*/ -#define OSG_GL_DEBUG(message) \ - if (state.getFineGrainedErrorDetection()) \ - { \ - GLenum errorNo = glGetError(); \ - if (errorNo!=GL_NO_ERROR) \ - { \ - osg::notify(WARN)<<"Warning: detected OpenGL error '"<getName()]; - up.first = const_cast(uniform); - up.second = value; - } - - - /** Push stateset onto state stack.*/ - void pushStateSet(const StateSet* dstate); - - /** Pop stateset off state stack.*/ - void popStateSet(); - - /** pop all statesets off state stack, ensuring it is empty ready for the next frame. - * Note, to return OpenGL to default state, one should do any state.popAllStatSets(); state.apply().*/ - void popAllStateSets(); - - /** Insert stateset onto state stack.*/ - void insertStateSet(unsigned int pos,const StateSet* dstate); - - /** Pop stateset off state stack.*/ - void removeStateSet(unsigned int pos); - - /** Get the number of StateSet's on the StateSet stack.*/ - unsigned int getStateSetStackSize() { return static_cast(_stateStateStack.size()); } - - /** Pop StateSet's for the StateSet stack till its size equals the specified size.*/ - void popStateSetStackToSize(unsigned int size) { while (_stateStateStack.size()>size) popStateSet(); } - - typedef std::vector StateSetStack; - - /** Get the StateSet stack.*/ - StateSetStack& getStateSetStack() { return _stateStateStack; } - - - /** Copy the modes and attributes which capture the current state.*/ - void captureCurrentState(StateSet& stateset) const; - - /** reset the state object to an empty stack.*/ - void reset(); - - - inline const Viewport* getCurrentViewport() const - { - return static_cast(getLastAppliedAttribute(osg::StateAttribute::VIEWPORT)); - } - - - void setInitialViewMatrix(const osg::RefMatrix* matrix); - - inline const osg::Matrix& getInitialViewMatrix() const { return *_initialViewMatrix; } - inline const osg::Matrix& getInitialInverseViewMatrix() const { return _initialInverseViewMatrix; } - - void applyProjectionMatrix(const osg::RefMatrix* matrix); - - inline const osg::Matrix& getProjectionMatrix() const { return *_projection; } - - void applyModelViewMatrix(const osg::RefMatrix* matrix); - void applyModelViewMatrix(const osg::Matrix&); - - const osg::Matrix& getModelViewMatrix() const { return *_modelView; } - - void setUseModelViewAndProjectionUniforms(bool flag) { _useModelViewAndProjectionUniforms = flag; } - bool getUseModelViewAndProjectionUniforms() const { return _useModelViewAndProjectionUniforms; } - - void updateModelViewAndProjectionMatrixUniforms(); - - void applyModelViewAndProjectionUniformsIfRequired(); - - osg::Uniform* getModelViewMatrixUniform() { return _modelViewMatrixUniform.get(); } - osg::Uniform* getProjectionMatrixUniform() { return _projectionMatrixUniform.get(); } - osg::Uniform* getModelViewProjectionMatrixUniform() { return _modelViewProjectionMatrixUniform.get(); } - osg::Uniform* getNormalMatrixUniform() { return _normalMatrixUniform.get(); } - - - Polytope getViewFrustum() const; - - - void setUseVertexAttributeAliasing(bool flag) { _useVertexAttributeAliasing = flag; } - bool getUseVertexAttributeAliasing() const { return _useVertexAttributeAliasing ; } - - typedef std::vector VertexAttribAliasList; - - const VertexAttribAlias& getVertexAlias() { return _vertexAlias; } - const VertexAttribAlias& getNormalAlias() { return _normalAlias; } - const VertexAttribAlias& getColorAlias() { return _colorAlias; } - const VertexAttribAlias& getSecondaryColorAlias() { return _secondaryColorAlias; } - const VertexAttribAlias& getFogCoordAlias() { return _fogCoordAlias; } - const VertexAttribAliasList& getTexCoordAliasList() { return _texCoordAliasList; } - - - const Program::AttribBindingList& getAttributeBindingList() { return _attributeBindingList; } - - bool convertVertexShaderSourceToOsgBuiltIns(std::string& source) const; - - - /** Apply stateset.*/ - void apply(const StateSet* dstate); - - /** Updates the OpenGL state so that it matches the \c StateSet at the - * top of the stack of StateSets maintained internally by a - * \c State. - */ - void apply(); - - /** Apply any shader composed state.*/ - void applyShaderComposition(); - - /** Set whether a particular OpenGL mode is valid in the current graphics context. - * Use to disable OpenGL modes that are not supported by current graphics drivers/context.*/ - inline void setModeValidity(StateAttribute::GLMode mode,bool valid) - { - ModeStack& ms = _modeMap[mode]; - ms.valid = valid; - } - - /** Get whether a particular OpenGL mode is valid in the current graphics context. - * Use to disable OpenGL modes that are not supported by current graphics drivers/context.*/ - inline bool getModeValidity(StateAttribute::GLMode mode) - { - ModeStack& ms = _modeMap[mode]; - return ms.valid; - } - - inline void setGlobalDefaultModeValue(StateAttribute::GLMode mode,bool enabled) - { - ModeStack& ms = _modeMap[mode]; - ms.global_default_value = enabled; - } - - inline bool getGlobalDefaultModeValue(StateAttribute::GLMode mode) - { - return _modeMap[mode].global_default_value; - } - - - /** Apply an OpenGL mode if required. This is a wrapper around - * \c glEnable() and \c glDisable(), that just actually calls these - * functions if the \c enabled flag is different than the current - * state. - * @return \c true if the state was actually changed. \c false - * otherwise. Notice that a \c false return does not indicate - * an error, it just means that the mode was already set to the - * same value as the \c enabled parameter. - */ - inline bool applyMode(StateAttribute::GLMode mode,bool enabled) - { - ModeStack& ms = _modeMap[mode]; - ms.changed = true; - return applyMode(mode,enabled,ms); - } - - inline void setGlobalDefaultTextureModeValue(unsigned int unit, StateAttribute::GLMode mode,bool enabled) - { - ModeMap& modeMap = getOrCreateTextureModeMap(unit); - ModeStack& ms = modeMap[mode]; - ms.global_default_value = enabled; - } - - inline bool getGlobalDefaultTextureModeValue(unsigned int unit, StateAttribute::GLMode mode) - { - ModeMap& modeMap = getOrCreateTextureModeMap(unit); - ModeStack& ms = modeMap[mode]; - return ms.global_default_value; - } - - inline bool applyTextureMode(unsigned int unit, StateAttribute::GLMode mode,bool enabled) - { - ModeMap& modeMap = getOrCreateTextureModeMap(unit); - ModeStack& ms = modeMap[mode]; - ms.changed = true; - return applyModeOnTexUnit(unit,mode,enabled,ms); - } - - inline void setGlobalDefaultAttribute(const StateAttribute* attribute) - { - AttributeStack& as = _attributeMap[attribute->getTypeMemberPair()]; - as.global_default_attribute = attribute; - } - - inline const StateAttribute* getGlobalDefaultAttribute(StateAttribute::Type type, unsigned int member=0) - { - AttributeStack& as = _attributeMap[StateAttribute::TypeMemberPair(type,member)]; - return as.global_default_attribute.get(); - } - - /** Apply an attribute if required. */ - inline bool applyAttribute(const StateAttribute* attribute) - { - AttributeStack& as = _attributeMap[attribute->getTypeMemberPair()]; - as.changed = true; - return applyAttribute(attribute,as); - } - - inline void setGlobalDefaultTextureAttribute(unsigned int unit, const StateAttribute* attribute) - { - AttributeMap& attributeMap = getOrCreateTextureAttributeMap(unit); - AttributeStack& as = attributeMap[attribute->getTypeMemberPair()]; - as.global_default_attribute = attribute; - } - - inline const StateAttribute* getGlobalDefaultTextureAttribute(unsigned int unit, StateAttribute::Type type, unsigned int member = 0) - { - AttributeMap& attributeMap = getOrCreateTextureAttributeMap(unit); - AttributeStack& as = attributeMap[StateAttribute::TypeMemberPair(type,member)]; - return as.global_default_attribute.get(); - } - - - inline bool applyTextureAttribute(unsigned int unit, const StateAttribute* attribute) - { - AttributeMap& attributeMap = getOrCreateTextureAttributeMap(unit); - AttributeStack& as = attributeMap[attribute->getTypeMemberPair()]; - as.changed = true; - return applyAttributeOnTexUnit(unit,attribute,as); - } - - /** Mode has been set externally, update state to reflect this setting.*/ - void haveAppliedMode(StateAttribute::GLMode mode,StateAttribute::GLModeValue value); - - /** Mode has been set externally, therefore dirty the associated mode in osg::State - * so it is applied on next call to osg::State::apply(..)*/ - void haveAppliedMode(StateAttribute::GLMode mode); - - /** Attribute has been applied externally, update state to reflect this setting.*/ - void haveAppliedAttribute(const StateAttribute* attribute); - - /** Attribute has been applied externally, - * and therefore this attribute type has been dirtied - * and will need to be re-applied on next osg::State.apply(..). - * note, if you have an osg::StateAttribute which you have applied externally - * then use the have_applied(attribute) method as this will cause the osg::State to - * track the current state more accurately and enable lazy state updating such - * that only changed state will be applied.*/ - void haveAppliedAttribute(StateAttribute::Type type, unsigned int member=0); - - /** Get whether the current specified mode is enabled (true) or disabled (false).*/ - bool getLastAppliedMode(StateAttribute::GLMode mode) const; - - /** Get the current specified attribute, return NULL if one has not yet been applied.*/ - const StateAttribute* getLastAppliedAttribute(StateAttribute::Type type, unsigned int member=0) const; - - /** texture Mode has been set externally, update state to reflect this setting.*/ - void haveAppliedTextureMode(unsigned int unit, StateAttribute::GLMode mode,StateAttribute::GLModeValue value); - - /** texture Mode has been set externally, therefore dirty the associated mode in osg::State - * so it is applied on next call to osg::State::apply(..)*/ - void haveAppliedTextureMode(unsigned int unit, StateAttribute::GLMode mode); - - /** texture Attribute has been applied externally, update state to reflect this setting.*/ - void haveAppliedTextureAttribute(unsigned int unit, const StateAttribute* attribute); - - /** texture Attribute has been applied externally, - * and therefore this attribute type has been dirtied - * and will need to be re-applied on next osg::State.apply(..). - * note, if you have an osg::StateAttribute which you have applied externally - * then use the have_applied(attribute) method as this will the osg::State to - * track the current state more accurately and enable lazy state updating such - * that only changed state will be applied.*/ - void haveAppliedTextureAttribute(unsigned int unit, StateAttribute::Type type, unsigned int member=0); - - /** Get whether the current specified texture mode is enabled (true) or disabled (false).*/ - bool getLastAppliedTextureMode(unsigned int unit, StateAttribute::GLMode mode) const; - - /** Get the current specified texture attribute, return NULL if one has not yet been applied.*/ - const StateAttribute* getLastAppliedTextureAttribute(unsigned int unit, StateAttribute::Type type, unsigned int member=0) const; - - - /** Dirty the modes previously applied in osg::State.*/ - void dirtyAllModes(); - - /** Dirty the modes attributes previously applied in osg::State.*/ - void dirtyAllAttributes(); - - /** disable the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.*/ - void disableAllVertexArrays(); - - /** dirty the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.*/ - void dirtyAllVertexArrays(); - - - void setCurrentVertexBufferObject(osg::GLBufferObject* vbo) { _currentVBO = vbo; } - const GLBufferObject* getCurrentVertexBufferObject() { return _currentVBO; } - inline void bindVertexBufferObject(osg::GLBufferObject* vbo) - { - if (vbo == _currentVBO) return; - if (vbo->isDirty()) vbo->compileBuffer(); - else vbo->bindBuffer(); - _currentVBO = vbo; - } - - inline void unbindVertexBufferObject() - { - if (!_currentVBO) return; - _glBindBuffer(GL_ARRAY_BUFFER_ARB,0); - _currentVBO = 0; - } - - void setCurrentElementBufferObject(osg::GLBufferObject* ebo) { _currentEBO = ebo; } - const GLBufferObject* getCurrentElementBufferObject() { return _currentEBO; } - - inline void bindElementBufferObject(osg::GLBufferObject* ebo) - { - if (ebo == _currentEBO) return; - if (ebo->isDirty()) ebo->compileBuffer(); - else ebo->bindBuffer(); - _currentEBO = ebo; - } - - inline void unbindElementBufferObject() - { - if (!_currentEBO) return; - _glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB,0); - _currentEBO = 0; - } - - void setCurrentPixelBufferObject(osg::GLBufferObject* pbo) { _currentPBO = pbo; } - const GLBufferObject* getCurrentPixelBufferObject() { return _currentPBO; } - - inline void bindPixelBufferObject(osg::GLBufferObject* pbo) - { - if (pbo == _currentPBO) return; - - if (pbo->isDirty()) pbo->compileBuffer(); - else pbo->bindBuffer(); - - _currentPBO = pbo; - } - - inline void unbindPixelBufferObject() - { - if (!_currentPBO) return; - - _glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB,0); - _currentPBO = 0; - } - - typedef std::vector IndicesGLushort; - IndicesGLushort _quadIndicesGLushort[4]; - - typedef std::vector IndicesGLuint; - IndicesGLuint _quadIndicesGLuint[4]; - - void drawQuads(GLint first, GLsizei count, GLsizei primCount=0); - - inline void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei primcount) - { - if (primcount>=1 && _glDrawArraysInstanced!=0) _glDrawArraysInstanced(mode, first, count, primcount); - else glDrawArrays(mode, first, count); - } - - inline void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount ) - { - if (primcount>=1 && _glDrawElementsInstanced!=0) _glDrawElementsInstanced(mode, count, type, indices, primcount); - else glDrawElements(mode, count, type, indices); - } - - - inline void Vertex(float x, float y, float z, float w=1.0f) - { - #if defined(OSG_GL_VERTEX_FUNCS_AVAILABLE) && !defined(OSG_GLES1_AVAILABLE) - if (_useVertexAttributeAliasing) _glVertexAttrib4f( _vertexAlias._location, x,y,z,w); - else glVertex4f(x,y,z,w); - #else - _glVertexAttrib4f( _vertexAlias._location, x,y,z,w); - #endif - } - - inline void Color(float r, float g, float b, float a=1.0f) - { - #ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) _glVertexAttrib4f( _colorAlias._location, r,g,b,a); - else glColor4f(r,g,b,a); - #else - _glVertexAttrib4f( _colorAlias._location, r,g,b,a); - #endif - } - - void Normal(float x, float y, float z) - { - #ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) _glVertexAttrib4f( _normalAlias._location, x,y,z,0.0); - else glNormal3f(x,y,z); - #else - _glVertexAttrib4f( _normalAlias._location, x,y,z,0.0); - #endif - } - - void TexCoord(float x, float y=0.0f, float z=0.0f, float w=1.0f) - { - #if !defined(OSG_GLES1_AVAILABLE) - #ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) _glVertexAttrib4f( _texCoordAliasList[0]._location, x,y,z,w); - else glTexCoord4f(x,y,z,w); - #else - _glVertexAttrib4f( _texCoordAliasList[0]._location, x,y,z,w); - #endif - #endif - } - - void MultiTexCoord(unsigned int unit, float x, float y=0.0f, float z=0.0f, float w=1.0f) - { - #if !defined(OSG_GLES1_AVAILABLE) - #ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) _glVertexAttrib4f( _texCoordAliasList[unit]._location, x,y,z,w); - else _glMultiTexCoord4f(GL_TEXTURE0+unit,x,y,z,w); - #else - _glVertexAttrib4f( _texCoordAliasList[unit]._location, x,y,z,w); - #endif - #endif - } - - void VerteAttrib(unsigned int location, float x, float y=0.0f, float z=0.0f, float w=0.0f) - { - _glVertexAttrib4f( location, x,y,z,w); - } - - - /** Mark all the vertex attributes as being disabled but leave the disabling till a later call to applyDisablingOfVertexAttributes.*/ - void lazyDisablingOfVertexAttributes(); - - /** Disable all the vertex attributes that have been marked as to be disabled.*/ - void applyDisablingOfVertexAttributes(); - - /** Wrapper around glInterleavedArrays(..). - * also resets the internal array points and modes within osg::State to keep the other - * vertex array operations consistent. */ - void setInterleavedArrays( GLenum format, GLsizei stride, const GLvoid* pointer); - - /** Set the vertex pointer using an osg::Array, and manage any VBO that are required.*/ - inline void setVertexPointer(const Array* array) - { - if (array) - { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); - if (vbo) - { - bindVertexBufferObject(vbo); - setVertexPointer(array->getDataSize(),array->getDataType(),0,(const GLvoid *)(vbo->getOffset(array->getBufferIndex()))); - } - else - { - unbindVertexBufferObject(); - setVertexPointer(array->getDataSize(),array->getDataType(),0,array->getDataPointer()); - } - } - } - - /** wrapper around glEnableClientState(GL_VERTEX_ARRAY);glVertexPointer(..); - * note, only updates values that change.*/ - inline void setVertexPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ) - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - setVertexAttribPointer(_vertexAlias._location, size, type, GL_FALSE, stride, ptr); - } - else - { - if (!_vertexArray._enabled || _vertexArray._dirty) - { - _vertexArray._enabled = true; - glEnableClientState(GL_VERTEX_ARRAY); - } - //if (_vertexArray._pointer!=ptr || _vertexArray._dirty) - { - _vertexArray._pointer=ptr; - glVertexPointer( size, type, stride, ptr ); - } - _vertexArray._lazy_disable = false; - _vertexArray._dirty = false; - } - #else - setVertexAttribPointer(_vertexAlias._location, size, type, GL_FALSE, stride, ptr); - #endif - } - - /** wrapper around glDisableClientState(GL_VERTEX_ARRAY). - * note, only updates values that change.*/ - inline void disableVertexPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - disableVertexAttribPointer(_vertexAlias._location); - } - else - { - if (_vertexArray._enabled || _vertexArray._dirty) - { - _vertexArray._lazy_disable = false; - _vertexArray._enabled = false; - _vertexArray._dirty = false; - glDisableClientState(GL_VERTEX_ARRAY); - } - } - #else - disableVertexAttribPointer(_vertexAlias._location); - #endif - } - - inline void dirtyVertexPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - dirtyVertexAttribPointer(_vertexAlias._location); - } - else - { - _vertexArray._pointer = 0; - _vertexArray._dirty = true; - } - #else - dirtyVertexAttribPointer(_vertexAlias._location); - #endif - } - - - /** Set the normal pointer using an osg::Array, and manage any VBO that are required.*/ - inline void setNormalPointer(const Array* array) - { - if (array) - { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); - if (vbo) - { - bindVertexBufferObject(vbo); - setNormalPointer(array->getDataType(),0,(const GLvoid *)(vbo->getOffset(array->getBufferIndex()))); - } - else - { - unbindVertexBufferObject(); - setNormalPointer(array->getDataType(),0,array->getDataPointer()); - } - } - } - - /** wrapper around glEnableClientState(GL_NORMAL_ARRAY);glNormalPointer(..); - * note, only updates values that change.*/ - inline void setNormalPointer( GLenum type, GLsizei stride, - const GLvoid *ptr ) - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - setVertexAttribPointer(_normalAlias._location, 3, type, GL_FALSE, stride, ptr); - } - else - { - if (!_normalArray._enabled || _normalArray._dirty) - { - _normalArray._enabled = true; - glEnableClientState(GL_NORMAL_ARRAY); - } - //if (_normalArray._pointer!=ptr || _normalArray._dirty) - { - _normalArray._pointer=ptr; - glNormalPointer( type, stride, ptr ); - } - _normalArray._lazy_disable = false; - _normalArray._dirty = false; - } - #else - setVertexAttribPointer(_normalAlias._location, 3, type, GL_FALSE, stride, ptr); - #endif - } - - /** wrapper around glDisableClientState(GL_NORMAL_ARRAY); - * note, only updates values that change.*/ - inline void disableNormalPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - disableVertexAttribPointer(_normalAlias._location); - } - else - { - if (_normalArray._enabled || _normalArray._dirty) - { - _normalArray._lazy_disable = false; - _normalArray._enabled = false; - _normalArray._dirty = false; - glDisableClientState(GL_NORMAL_ARRAY); - } - } - #else - disableVertexAttribPointer(_normalAlias._location); - #endif - } - - inline void dirtyNormalPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - dirtyVertexAttribPointer(_normalAlias._location); - } - else - { - _normalArray._pointer = 0; - _normalArray._dirty = true; - } - #else - dirtyVertexAttribPointer(_normalAlias._location); - #endif - } - - /** Set the color pointer using an osg::Array, and manage any VBO that are required.*/ - inline void setColorPointer(const Array* array) - { - if (array) - { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); - if (vbo) - { - bindVertexBufferObject(vbo); - setColorPointer(array->getDataSize(),array->getDataType(),0,(const GLvoid *)(vbo->getOffset(array->getBufferIndex()))); - } - else - { - unbindVertexBufferObject(); - setColorPointer(array->getDataSize(),array->getDataType(),0,array->getDataPointer()); - } - } - } - - - /** wrapper around glEnableClientState(GL_COLOR_ARRAY);glColorPointer(..); - * note, only updates values that change.*/ - inline void setColorPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ) - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - setVertexAttribPointer(_colorAlias._location, size, type, GL_FALSE, stride, ptr); - } - else - { - if (!_colorArray._enabled || _colorArray._dirty) - { - _colorArray._enabled = true; - glEnableClientState(GL_COLOR_ARRAY); - } - //if (_colorArray._pointer!=ptr || _colorArray._dirty) - { - _colorArray._pointer=ptr; - glColorPointer( size, type, stride, ptr ); - } - _colorArray._lazy_disable = false; - _colorArray._dirty = false; - } - #else - setVertexAttribPointer(_colorAlias._location, size, type, GL_FALSE, stride, ptr); - #endif - } - - /** wrapper around glDisableClientState(GL_COLOR_ARRAY); - * note, only updates values that change.*/ - inline void disableColorPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - disableVertexAttribPointer(_colorAlias._location); - } - else - { - if (_colorArray._enabled || _colorArray._dirty) - { - _colorArray._lazy_disable = false; - _colorArray._enabled = false; - _colorArray._dirty = false; - glDisableClientState(GL_COLOR_ARRAY); - } - } - #else - disableVertexAttribPointer(_colorAlias._location); - #endif - } - - inline void dirtyColorPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - dirtyVertexAttribPointer(_colorAlias._location); - } - else - { - _colorArray._pointer = 0; - _colorArray._dirty = true; - } - #else - dirtyVertexAttribPointer(_colorAlias._location); - #endif - } - - - inline bool isSecondaryColorSupported() const { return _isSecondaryColorSupportResolved?_isSecondaryColorSupported:computeSecondaryColorSupported(); } - - - /** Set the secondary color pointer using an osg::Array, and manage any VBO that are required.*/ - inline void setSecondaryColorPointer(const Array* array) - { - if (array) - { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); - if (vbo) - { - bindVertexBufferObject(vbo); - setSecondaryColorPointer(array->getDataSize(),array->getDataType(),0,(const GLvoid *)(vbo->getOffset(array->getBufferIndex()))); - } - else - { - unbindVertexBufferObject(); - setSecondaryColorPointer(array->getDataSize(),array->getDataType(),0,array->getDataPointer()); - } - } - } - - /** wrapper around glEnableClientState(GL_SECONDARY_COLOR_ARRAY);glSecondayColorPointer(..); - * note, only updates values that change.*/ - void setSecondaryColorPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ); - - /** wrapper around glDisableClientState(GL_SECONDARY_COLOR_ARRAY); - * note, only updates values that change.*/ - inline void disableSecondaryColorPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - disableVertexAttribPointer(_secondaryColorAlias._location); - } - else - { - if (_secondaryColorArray._enabled || _secondaryColorArray._dirty) - { - _secondaryColorArray._lazy_disable = false; - _secondaryColorArray._enabled = false; - _secondaryColorArray._dirty = false; - if (isSecondaryColorSupported()) glDisableClientState(GL_SECONDARY_COLOR_ARRAY); - } - } - #else - disableVertexAttribPointer(_secondaryColorAlias._location); - #endif - } - - inline void dirtySecondaryColorPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - dirtyVertexAttribPointer(_secondaryColorAlias._location); - } - else - { - _secondaryColorArray._pointer = 0; - _secondaryColorArray._dirty = true; - } - #else - dirtyVertexAttribPointer(_secondaryColorAlias._location); - #endif - } - - inline bool isFogCoordSupported() const { return _isFogCoordSupportResolved?_isFogCoordSupported:computeFogCoordSupported(); } - - - /** Set the fog coord pointer using an osg::Array, and manage any VBO that are required.*/ - inline void setFogCoordPointer(const Array* array) - { - if (array) - { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); - if (vbo) - { - bindVertexBufferObject(vbo); - setFogCoordPointer(array->getDataType(),0,(const GLvoid *)(vbo->getOffset(array->getBufferIndex()))); - } - else - { - unbindVertexBufferObject(); - setFogCoordPointer(array->getDataType(),0,array->getDataPointer()); - } - } - } - - - /** wrapper around glEnableClientState(GL_FOG_COORDINATE_ARRAY);glFogCoordPointer(..); - * note, only updates values that change.*/ - void setFogCoordPointer( GLenum type, GLsizei stride, const GLvoid *ptr ); - - /** wrapper around glDisableClientState(GL_FOG_COORDINATE_ARRAY); - * note, only updates values that change.*/ - inline void disableFogCoordPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - disableVertexAttribPointer(_fogCoordAlias._location); - } - else - { - if (_fogArray._enabled || _fogArray._dirty) - { - _fogArray._lazy_disable = false; - _fogArray._enabled = false; - _fogArray._dirty = false; - if (isFogCoordSupported()) glDisableClientState(GL_FOG_COORDINATE_ARRAY); - } - } - #else - disableVertexAttribPointer(_fogCoordAlias._location); - #endif - } - - inline void dirtyFogCoordPointer() - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - dirtyVertexAttribPointer(_fogCoordAlias._location); - } - else - { - _fogArray._pointer = 0; - _fogArray._dirty = true; - } - #else - dirtyVertexAttribPointer(_fogCoordAlias._location); - #endif - } - - - - /** Set the tex coord pointer using an osg::Array, and manage any VBO that are required.*/ - inline void setTexCoordPointer(unsigned int unit, const Array* array) - { - if (array) - { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); - if (vbo) - { - bindVertexBufferObject(vbo); - setTexCoordPointer(unit, array->getDataSize(),array->getDataType(),0, (const GLvoid *)(vbo->getOffset(array->getBufferIndex()))); - } - else - { - unbindVertexBufferObject(); - setTexCoordPointer(unit, array->getDataSize(),array->getDataType(),0,array->getDataPointer()); - } - } - } - - /** wrapper around glEnableClientState(GL_TEXTURE_COORD_ARRAY);glTexCoordPointer(..); - * note, only updates values that change.*/ - inline void setTexCoordPointer( unsigned int unit, - GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ) - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - setVertexAttribPointer(_texCoordAliasList[unit]._location, size, type, GL_FALSE, stride, ptr); - } - else - { - if (setClientActiveTextureUnit(unit)) - { - if ( unit >= _texCoordArrayList.size()) _texCoordArrayList.resize(unit+1); - EnabledArrayPair& eap = _texCoordArrayList[unit]; - - if (!eap._enabled || eap._dirty) - { - eap._enabled = true; - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - } - //if (eap._pointer!=ptr || eap._dirty) - { - glTexCoordPointer( size, type, stride, ptr ); - eap._pointer = ptr; - } - eap._lazy_disable = false; - eap._dirty = false; - } - } - #else - setVertexAttribPointer(_texCoordAliasList[unit]._location, size, type, GL_FALSE, stride, ptr); - #endif - } - - /** wrapper around glDisableClientState(GL_TEXTURE_COORD_ARRAY); - * note, only updates values that change.*/ - inline void disableTexCoordPointer( unsigned int unit ) - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - disableVertexAttribPointer(_texCoordAliasList[unit]._location); - } - else - { - if (setClientActiveTextureUnit(unit)) - { - if ( unit >= _texCoordArrayList.size()) _texCoordArrayList.resize(unit+1); - EnabledArrayPair& eap = _texCoordArrayList[unit]; - - if (eap._enabled || eap._dirty) - { - eap._lazy_disable = false; - eap._enabled = false; - eap._dirty = false; - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - } - } - #else - disableVertexAttribPointer(_texCoordAliasList[unit]._location); - #endif - } - - inline void dirtyTexCoordPointer( unsigned int unit ) - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - dirtyVertexAttribPointer(_texCoordAliasList[unit]._location); - } - else - { - if ( unit >= _texCoordArrayList.size()) return; // _texCoordArrayList.resize(unit+1); - EnabledArrayPair& eap = _texCoordArrayList[unit]; - eap._pointer = 0; - eap._dirty = true; - } - #else - dirtyVertexAttribPointer(_texCoordAliasList[unit]._location); - #endif - } - - - inline void disableTexCoordPointersAboveAndIncluding( unsigned int unit ) - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - disableVertexAttribPointersAboveAndIncluding(_texCoordAliasList[unit]._location); - } - else - { - while (unit<_texCoordArrayList.size()) - { - EnabledArrayPair& eap = _texCoordArrayList[unit]; - if (eap._enabled || eap._dirty) - { - if (setClientActiveTextureUnit(unit)) - { - eap._lazy_disable = false; - eap._enabled = false; - eap._dirty = false; - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - } - ++unit; - } - } - #else - disableVertexAttribPointersAboveAndIncluding(_texCoordAliasList[unit]._location); - #endif - } - - inline void dirtyTexCoordPointersAboveAndIncluding( unsigned int unit ) - { - #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE - if (_useVertexAttributeAliasing) - { - dirtyVertexAttribPointersAboveAndIncluding(_texCoordAliasList[unit]._location); - } - else - { - while (unit<_texCoordArrayList.size()) - { - EnabledArrayPair& eap = _texCoordArrayList[unit]; - eap._pointer = 0; - eap._dirty = true; - ++unit; - } - } - #else - dirtyVertexAttribPointersAboveAndIncluding(_texCoordAliasList[unit]._location); - #endif - } - - - /** Set the current texture unit, return true if selected, - * false if selection failed such as when multi texturing is not supported. - * note, only updates values that change.*/ - inline bool setActiveTextureUnit( unsigned int unit ); - - /** Get the current texture unit.*/ - unsigned int getActiveTextureUnit() const { return _currentActiveTextureUnit; } - - /** Set the current tex coord array texture unit, return true if selected, - * false if selection failed such as when multi texturing is not supported. - * note, only updates values that change.*/ - bool setClientActiveTextureUnit( unsigned int unit ); - - /** Get the current tex coord array texture unit.*/ - unsigned int getClientActiveTextureUnit() const { return _currentClientActiveTextureUnit; } - - /** Set the vertex attrib pointer using an osg::Array, and manage any VBO that are required.*/ - inline void setVertexAttribPointer(unsigned int unit, const Array* array, GLboolean normalized) - { - if (array) - { - GLBufferObject* vbo = array->getOrCreateGLBufferObject(_contextID); - if (vbo) - { - bindVertexBufferObject(vbo); - setVertexAttribPointer(unit, array->getDataSize(),array->getDataType(),normalized,0,(const GLvoid *)(vbo->getOffset(array->getBufferIndex()))); - } - else - { - unbindVertexBufferObject(); - setVertexAttribPointer(unit, array->getDataSize(),array->getDataType(),normalized,0,array->getDataPointer()); - } - } - } - - /** wrapper around glEnableVertexAttribArrayARB(index);glVertexAttribPointerARB(..); - * note, only updates values that change.*/ - void setVertexAttribPointer( unsigned int index, - GLint size, GLenum type, GLboolean normalized, - GLsizei stride, const GLvoid *ptr ); - - /** wrapper around DisableVertexAttribArrayARB(index); - * note, only updates values that change.*/ - void disableVertexAttribPointer( unsigned int index ); - - void disableVertexAttribPointersAboveAndIncluding( unsigned int index ); - - inline void dirtyVertexAttribPointer( unsigned int index ) - { - if (index<_vertexAttribArrayList.size()) - { - EnabledArrayPair& eap = _vertexAttribArrayList[index]; - eap._pointer = 0; - eap._dirty = true; - } - } - - inline void dirtyVertexAttribPointersAboveAndIncluding( unsigned int index ) - { - while (index<_vertexAttribArrayList.size()) - { - EnabledArrayPair& eap = _vertexAttribArrayList[index]; - eap._pointer = 0; - eap._dirty = true; - ++index; - } - } - - bool isVertexBufferObjectSupported() const { return _isVertexBufferObjectSupportResolved?_isVertexBufferObjectSupported:computeVertexBufferObjectSupported(); } - - - inline void setLastAppliedProgramObject(const Program::PerContextProgram* program) - { - if (_lastAppliedProgramObject!=program) - { - _lastAppliedProgramObject = program; - if (program && _appliedProgramObjectSet.count(program)==0) - { - _appliedProgramObjectSet.insert(program); - program->addObserver(this); - } - } - } - inline const Program::PerContextProgram* getLastAppliedProgramObject() const { return _lastAppliedProgramObject; } - - inline GLint getUniformLocation( unsigned int uniformNameID ) const { return _lastAppliedProgramObject ? _lastAppliedProgramObject->getUniformLocation(uniformNameID) : -1; } - /** - * Alternative version of getUniformLocation( unsigned int uniformNameID ) - * retrofited into OSG for backward compatibility with osgCal, - * after uniform ids were refactored from std::strings to GLints in OSG version 2.9.10. - * - * Drawbacks: This method is not particularly fast. It has to access mutexed static - * map of uniform ids. So don't overuse it or your app performance will suffer. - */ - inline GLint getUniformLocation( const std::string & uniformName ) const { return _lastAppliedProgramObject ? _lastAppliedProgramObject->getUniformLocation(uniformName) : -1; } - inline GLint getAttribLocation( const std::string& name ) const { return _lastAppliedProgramObject ? _lastAppliedProgramObject->getAttribLocation(name) : -1; } - - typedef std::pair AttributePair; - typedef std::vector AttributeVec; - - AttributeVec& getAttributeVec( const osg::StateAttribute* attribute ) - { - AttributeStack& as = _attributeMap[ attribute->getTypeMemberPair() ]; - return as.attributeVec; - } - - /** Set the frame stamp for the current frame.*/ - inline void setFrameStamp(FrameStamp* fs) { _frameStamp = fs; } - - /** Get the frame stamp for the current frame.*/ - inline FrameStamp* getFrameStamp() { return _frameStamp.get(); } - - /** Get the const frame stamp for the current frame.*/ - inline const FrameStamp* getFrameStamp() const { return _frameStamp.get(); } - - - /** Set the DisplaySettings. Note, nothing is applied, the visual settings are just - * used in the State object to pass the current visual settings to Drawables - * during rendering. */ - inline void setDisplaySettings(DisplaySettings* vs) { _displaySettings = vs; } - - /** Get the DisplaySettings */ - inline const DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); } - - - - /** Set flag for early termination of the draw traversal.*/ - void setAbortRenderingPtr(bool* abortPtr) { _abortRenderingPtr = abortPtr; } - - /** Get flag for early termination of the draw traversal, - * if true steps should be taken to complete rendering early.*/ - bool getAbortRendering() const { return _abortRenderingPtr!=0?(*_abortRenderingPtr):false; } - - - struct DynamicObjectRenderingCompletedCallback : public osg::Referenced - { - virtual void completed(osg::State*) = 0; - }; - - /** Set the callback to be called when the dynamic object count hits 0.*/ - void setDynamicObjectRenderingCompletedCallback(DynamicObjectRenderingCompletedCallback* cb){ _completeDynamicObjectRenderingCallback = cb; } - - /** Get the callback to be called when the dynamic object count hits 0.*/ - DynamicObjectRenderingCompletedCallback* getDynamicObjectRenderingCompletedCallback() { return _completeDynamicObjectRenderingCallback.get(); } - - /** Set the number of dynamic objects that will be rendered in this graphics context this frame.*/ - void setDynamicObjectCount(unsigned int count, bool callCallbackOnZero = false) - { - if (_dynamicObjectCount != count) - { - _dynamicObjectCount = count; - if (_dynamicObjectCount==0 && callCallbackOnZero && _completeDynamicObjectRenderingCallback.valid()) - { - _completeDynamicObjectRenderingCallback->completed(this); - } - } - } - - /** Get the number of dynamic objects that will be rendered in this graphics context this frame.*/ - unsigned int getDynamicObjectCount() const { return _dynamicObjectCount; } - - /** Decrement the number of dynamic objects left to render this frame, and once the count goes to zero call the - * DynamicObjectRenderingCompletedCallback to inform of completion.*/ - inline void decrementDynamicObjectCount() - { - --_dynamicObjectCount; - if (_dynamicObjectCount==0 && _completeDynamicObjectRenderingCallback.valid()) - { - _completeDynamicObjectRenderingCallback->completed(this); - } - } - - void setMaxTexturePoolSize(unsigned int size); - unsigned int getMaxTexturePoolSize() const { return _maxTexturePoolSize; } - - void setMaxBufferObjectPoolSize(unsigned int size); - unsigned int getMaxBufferObjectPoolSize() const { return _maxBufferObjectPoolSize; } - - - enum CheckForGLErrors - { - /** NEVER_CHECK_GL_ERRORS hints that OpenGL need not be checked for, this - is the fastest option since checking for errors does incurr a small overhead.*/ - NEVER_CHECK_GL_ERRORS, - /** ONCE_PER_FRAME means that OpenGl errors will be checked for once per - frame, the overhead is still small, but at least OpenGL errors that are occurring - will be caught, the reporting isn't fine grained enough for debugging purposes.*/ - ONCE_PER_FRAME, - /** ONCE_PER_ATTRIBUTE means that OpenGL errors will be checked for after - every attribute is applied, allow errors to be directly associated with - particular operations which makes debugging much easier.*/ - ONCE_PER_ATTRIBUTE - }; - - /** Set whether and how often OpenGL errors should be checked for.*/ - void setCheckForGLErrors(CheckForGLErrors check) { _checkGLErrors = check; } - - /** Get whether and how often OpenGL errors should be checked for.*/ - CheckForGLErrors getCheckForGLErrors() const { return _checkGLErrors; } - - bool checkGLErrors(const char* str) const; - bool checkGLErrors(StateAttribute::GLMode mode) const; - bool checkGLErrors(const StateAttribute* attribute) const; - - /** print out the internal details of osg::State - useful for debugging.*/ - void print(std::ostream& fout) const; - - /** Initialize extension used by osg:::State.*/ - void initializeExtensionProcs(); - - virtual void objectDeleted(void* object); - - /** Get the GL adapter object used to map OpenGL 1.0 glBegin/glEnd usage to vertex arrays.*/ - inline GLBeginEndAdapter& getGLBeginEndAdapter() { return _glBeginEndAdapter; } - - /** Get the helper class for dispatching osg::Arrays as OpenGL attribute data.*/ - inline ArrayDispatchers& getArrayDispatchers() { return _arrayDispatchers; } - - - /** Set the helper class that provides applications with estimate on how much different graphics operations will cost.*/ - inline void setGraphicsCostEstimator(GraphicsCostEstimator* gce) { _graphicsCostEstimator = gce; } - - /** Get the helper class that provides applications with estimate on how much different graphics operations will cost.*/ - inline GraphicsCostEstimator* getGraphicsCostEstimator() { return _graphicsCostEstimator.get(); } - - /** Get the cont helper class that provides applications with estimate on how much different graphics operations will cost.*/ - inline const GraphicsCostEstimator* getGraphicsCostEstimator() const { return _graphicsCostEstimator.get(); } - - - - /** Support for synchronizing the system time and the timestamp - * counter available with ARB_timer_query. Note that State - * doesn't update these values itself. - */ - Timer_t getStartTick() const { return _startTick; } - void setStartTick(Timer_t tick) { _startTick = tick; } - Timer_t getGpuTick() const { return _gpuTick; } - - double getGpuTime() const - { - return osg::Timer::instance()->delta_s(_startTick, _gpuTick); - } - GLuint64EXT getGpuTimestamp() const { return _gpuTimestamp; } - - void setGpuTimestamp(Timer_t tick, GLuint64EXT timestamp) - { - _gpuTick = tick; - _gpuTimestamp = timestamp; - } - int getTimestampBits() const { return _timestampBits; } - void setTimestampBits(int bits) { _timestampBits = bits; } - - /** called by the GraphicsContext just before GraphicsContext::swapBuffersImplementation().*/ - virtual void frameCompleted(); - - protected: - - virtual ~State(); - - GraphicsContext* _graphicsContext; - unsigned int _contextID; - - bool _shaderCompositionEnabled; - bool _shaderCompositionDirty; - osg::ref_ptr _shaderComposer; - osg::Program* _currentShaderCompositionProgram; - StateSet::UniformList _currentShaderCompositionUniformList; - - ref_ptr _frameStamp; - - ref_ptr _identity; - ref_ptr _initialViewMatrix; - ref_ptr _projection; - ref_ptr _modelView; - ref_ptr _modelViewCache; - - bool _useModelViewAndProjectionUniforms; - ref_ptr _modelViewMatrixUniform; - ref_ptr _projectionMatrixUniform; - ref_ptr _modelViewProjectionMatrixUniform; - ref_ptr _normalMatrixUniform; - - Matrix _initialInverseViewMatrix; - - ref_ptr _displaySettings; - - bool* _abortRenderingPtr; - CheckForGLErrors _checkGLErrors; - - - bool _useVertexAttributeAliasing; - VertexAttribAlias _vertexAlias; - VertexAttribAlias _normalAlias; - VertexAttribAlias _colorAlias; - VertexAttribAlias _secondaryColorAlias; - VertexAttribAlias _fogCoordAlias; - VertexAttribAliasList _texCoordAliasList; - - Program::AttribBindingList _attributeBindingList; - - void setUpVertexAttribAlias(VertexAttribAlias& alias, GLuint location, const std::string glName, const std::string osgName, const std::string& declaration); - - - struct ModeStack - { - typedef std::vector ValueVec; - - ModeStack() - { - valid = true; - changed = false; - last_applied_value = false; - global_default_value = false; - } - - void print(std::ostream& fout) const; - - bool valid; - bool changed; - bool last_applied_value; - bool global_default_value; - ValueVec valueVec; - }; - - struct AttributeStack - { - AttributeStack() - { - changed = false; - last_applied_attribute = 0L; - last_applied_shadercomponent = 0L; - global_default_attribute = 0L; - - } - - void print(std::ostream& fout) const; - - /** apply an attribute if required, passing in attribute and appropriate attribute stack */ - bool changed; - const StateAttribute* last_applied_attribute; - const ShaderComponent* last_applied_shadercomponent; - ref_ptr global_default_attribute; - AttributeVec attributeVec; - }; - - - struct UniformStack - { - typedef std::pair UniformPair; - typedef std::vector UniformVec; - - UniformStack() {} - - void print(std::ostream& fout) const; - - UniformVec uniformVec; - }; - - - /** Apply an OpenGL mode if required, passing in mode, enable flag and - * appropriate mode stack. This is a wrapper around \c glEnable() and - * \c glDisable(), that just actually calls these functions if the - * \c enabled flag is different than the current state. - * @return \c true if the state was actually changed. \c false - * otherwise. Notice that a \c false return does not indicate - * an error, it just means that the mode was already set to the - * same value as the \c enabled parameter. - */ - inline bool applyMode(StateAttribute::GLMode mode,bool enabled,ModeStack& ms) - { - if (ms.valid && ms.last_applied_value != enabled) - { - ms.last_applied_value = enabled; - - if (enabled) glEnable(mode); - else glDisable(mode); - - if (_checkGLErrors==ONCE_PER_ATTRIBUTE) checkGLErrors(mode); - - return true; - } - else - return false; - } - - inline bool applyModeOnTexUnit(unsigned int unit,StateAttribute::GLMode mode,bool enabled,ModeStack& ms) - { - if (ms.valid && ms.last_applied_value != enabled) - { - if (setActiveTextureUnit(unit)) - { - ms.last_applied_value = enabled; - - if (enabled) glEnable(mode); - else glDisable(mode); - - if (_checkGLErrors==ONCE_PER_ATTRIBUTE) checkGLErrors(mode); - - return true; - } - else - return false; - } - else - return false; - } - - /** apply an attribute if required, passing in attribute and appropriate attribute stack */ - inline bool applyAttribute(const StateAttribute* attribute,AttributeStack& as) - { - if (as.last_applied_attribute != attribute) - { - if (!as.global_default_attribute.valid()) as.global_default_attribute = dynamic_cast(attribute->cloneType()); - - as.last_applied_attribute = attribute; - attribute->apply(*this); - - const ShaderComponent* sc = attribute->getShaderComponent(); - if (as.last_applied_shadercomponent != sc) - { - as.last_applied_shadercomponent = sc; - _shaderCompositionDirty = true; - } - - if (_checkGLErrors==ONCE_PER_ATTRIBUTE) checkGLErrors(attribute); - - return true; - } - else - return false; - } - - inline bool applyAttributeOnTexUnit(unsigned int unit,const StateAttribute* attribute,AttributeStack& as) - { - if (as.last_applied_attribute != attribute) - { - if (setActiveTextureUnit(unit)) - { - if (!as.global_default_attribute.valid()) as.global_default_attribute = dynamic_cast(attribute->cloneType()); - - as.last_applied_attribute = attribute; - attribute->apply(*this); - - const ShaderComponent* sc = attribute->getShaderComponent(); - if (as.last_applied_shadercomponent != sc) - { - as.last_applied_shadercomponent = sc; - _shaderCompositionDirty = true; - } - - if (_checkGLErrors==ONCE_PER_ATTRIBUTE) checkGLErrors(attribute); - - return true; - } - else - return false; - } - else - return false; - } - - - inline bool applyGlobalDefaultAttribute(AttributeStack& as) - { - if (as.last_applied_attribute != as.global_default_attribute.get()) - { - as.last_applied_attribute = as.global_default_attribute.get(); - if (as.global_default_attribute.valid()) - { - as.global_default_attribute->apply(*this); - const ShaderComponent* sc = as.global_default_attribute->getShaderComponent(); - if (as.last_applied_shadercomponent != sc) - { - as.last_applied_shadercomponent = sc; - _shaderCompositionDirty = true; - } - - if (_checkGLErrors==ONCE_PER_ATTRIBUTE) checkGLErrors(as.global_default_attribute.get()); - } - return true; - } - else - return false; - } - - inline bool applyGlobalDefaultAttributeOnTexUnit(unsigned int unit,AttributeStack& as) - { - if (as.last_applied_attribute != as.global_default_attribute.get()) - { - if (setActiveTextureUnit(unit)) - { - as.last_applied_attribute = as.global_default_attribute.get(); - if (as.global_default_attribute.valid()) - { - as.global_default_attribute->apply(*this); - const ShaderComponent* sc = as.global_default_attribute->getShaderComponent(); - if (as.last_applied_shadercomponent != sc) - { - as.last_applied_shadercomponent = sc; - _shaderCompositionDirty = true; - } - if (_checkGLErrors==ONCE_PER_ATTRIBUTE) checkGLErrors(as.global_default_attribute.get()); - } - return true; - } - else - return false; - } - else - return false; - } - - - typedef std::map ModeMap; - typedef std::vector TextureModeMapList; - - typedef std::map AttributeMap; - typedef std::vector TextureAttributeMapList; - - typedef std::map UniformMap; - - typedef std::vector > MatrixStack; - - typedef std::set AppliedProgramObjectSet; - - ModeMap _modeMap; - AttributeMap _attributeMap; - UniformMap _uniformMap; - - TextureModeMapList _textureModeMapList; - TextureAttributeMapList _textureAttributeMapList; - - AppliedProgramObjectSet _appliedProgramObjectSet; - const Program::PerContextProgram* _lastAppliedProgramObject; - - StateSetStack _stateStateStack; - - unsigned int _maxTexturePoolSize; - unsigned int _maxBufferObjectPoolSize; - - - struct EnabledArrayPair - { - EnabledArrayPair():_lazy_disable(false),_dirty(true),_enabled(false),_normalized(0),_pointer(0) {} - EnabledArrayPair(const EnabledArrayPair& eap):_lazy_disable(eap._lazy_disable),_dirty(eap._dirty), _enabled(eap._enabled),_normalized(eap._normalized),_pointer(eap._pointer) {} - EnabledArrayPair& operator = (const EnabledArrayPair& eap) { _lazy_disable = eap._lazy_disable;_dirty=eap._dirty; _enabled=eap._enabled; _normalized=eap._normalized;_pointer=eap._pointer; return *this; } - - bool _lazy_disable; - bool _dirty; - bool _enabled; - GLboolean _normalized; - const GLvoid* _pointer; - }; - - typedef std::vector EnabledTexCoordArrayList; - typedef std::vector EnabledVertexAttribArrayList; - - EnabledArrayPair _vertexArray; - EnabledArrayPair _normalArray; - EnabledArrayPair _colorArray; - EnabledArrayPair _secondaryColorArray; - EnabledArrayPair _fogArray; - EnabledTexCoordArrayList _texCoordArrayList; - EnabledVertexAttribArrayList _vertexAttribArrayList; - - unsigned int _currentActiveTextureUnit; - unsigned int _currentClientActiveTextureUnit; - GLBufferObject* _currentVBO; - GLBufferObject* _currentEBO; - GLBufferObject* _currentPBO; - - - inline ModeMap& getOrCreateTextureModeMap(unsigned int unit) - { - if (unit>=_textureModeMapList.size()) _textureModeMapList.resize(unit+1); - return _textureModeMapList[unit]; - } - - - inline AttributeMap& getOrCreateTextureAttributeMap(unsigned int unit) - { - if (unit>=_textureAttributeMapList.size()) _textureAttributeMapList.resize(unit+1); - return _textureAttributeMapList[unit]; - } - - inline void pushModeList(ModeMap& modeMap,const StateSet::ModeList& modeList); - inline void pushAttributeList(AttributeMap& attributeMap,const StateSet::AttributeList& attributeList); - inline void pushUniformList(UniformMap& uniformMap,const StateSet::UniformList& uniformList); - - inline void popModeList(ModeMap& modeMap,const StateSet::ModeList& modeList); - inline void popAttributeList(AttributeMap& attributeMap,const StateSet::AttributeList& attributeList); - inline void popUniformList(UniformMap& uniformMap,const StateSet::UniformList& uniformList); - - inline void applyModeList(ModeMap& modeMap,const StateSet::ModeList& modeList); - inline void applyAttributeList(AttributeMap& attributeMap,const StateSet::AttributeList& attributeList); - inline void applyUniformList(UniformMap& uniformMap,const StateSet::UniformList& uniformList); - - inline void applyModeMap(ModeMap& modeMap); - inline void applyAttributeMap(AttributeMap& attributeMap); - inline void applyUniformMap(UniformMap& uniformMap); - - inline void applyModeListOnTexUnit(unsigned int unit,ModeMap& modeMap,const StateSet::ModeList& modeList); - inline void applyAttributeListOnTexUnit(unsigned int unit,AttributeMap& attributeMap,const StateSet::AttributeList& attributeList); - - inline void applyModeMapOnTexUnit(unsigned int unit,ModeMap& modeMap); - inline void applyAttributeMapOnTexUnit(unsigned int unit,AttributeMap& attributeMap); - - void haveAppliedMode(ModeMap& modeMap,StateAttribute::GLMode mode,StateAttribute::GLModeValue value); - void haveAppliedMode(ModeMap& modeMap,StateAttribute::GLMode mode); - void haveAppliedAttribute(AttributeMap& attributeMap,const StateAttribute* attribute); - void haveAppliedAttribute(AttributeMap& attributeMap,StateAttribute::Type type, unsigned int member); - bool getLastAppliedMode(const ModeMap& modeMap,StateAttribute::GLMode mode) const; - const StateAttribute* getLastAppliedAttribute(const AttributeMap& attributeMap,StateAttribute::Type type, unsigned int member) const; - - void loadModelViewMatrix(); - - - mutable bool _isSecondaryColorSupportResolved; - mutable bool _isSecondaryColorSupported; - bool computeSecondaryColorSupported() const; - - mutable bool _isFogCoordSupportResolved; - mutable bool _isFogCoordSupported; - bool computeFogCoordSupported() const; - - mutable bool _isVertexBufferObjectSupportResolved; - mutable bool _isVertexBufferObjectSupported; - bool computeVertexBufferObjectSupported() const; - - typedef void (GL_APIENTRY * ActiveTextureProc) (GLenum texture); - typedef void (GL_APIENTRY * FogCoordPointerProc) (GLenum type, GLsizei stride, const GLvoid *pointer); - typedef void (GL_APIENTRY * SecondaryColorPointerProc) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); - typedef void (GL_APIENTRY * MultiTexCoord4fProc) (GLenum target, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - typedef void (GL_APIENTRY * VertexAttrib4fProc)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - typedef void (GL_APIENTRY * VertexAttrib4fvProc)(GLuint index, const GLfloat *v); - typedef void (GL_APIENTRY * VertexAttribPointerProc) (unsigned int, GLint, GLenum, GLboolean normalized, GLsizei stride, const GLvoid *pointer); - typedef void (GL_APIENTRY * EnableVertexAttribProc) (unsigned int); - typedef void (GL_APIENTRY * DisableVertexAttribProc) (unsigned int); - typedef void (GL_APIENTRY * BindBufferProc) (GLenum target, GLuint buffer); - - typedef void (GL_APIENTRY * DrawArraysInstancedProc)( GLenum mode, GLint first, GLsizei count, GLsizei primcount ); - typedef void (GL_APIENTRY * DrawElementsInstancedProc)( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount ); - - bool _extensionProcsInitialized; - GLint _glMaxTextureCoords; - GLint _glMaxTextureUnits; - ActiveTextureProc _glClientActiveTexture; - ActiveTextureProc _glActiveTexture; - MultiTexCoord4fProc _glMultiTexCoord4f; - VertexAttrib4fProc _glVertexAttrib4f; - VertexAttrib4fvProc _glVertexAttrib4fv; - FogCoordPointerProc _glFogCoordPointer; - SecondaryColorPointerProc _glSecondaryColorPointer; - VertexAttribPointerProc _glVertexAttribPointer; - EnableVertexAttribProc _glEnableVertexAttribArray; - DisableVertexAttribProc _glDisableVertexAttribArray; - BindBufferProc _glBindBuffer; - DrawArraysInstancedProc _glDrawArraysInstanced; - DrawElementsInstancedProc _glDrawElementsInstanced; - - unsigned int _dynamicObjectCount; - osg::ref_ptr _completeDynamicObjectRenderingCallback; - - GLBeginEndAdapter _glBeginEndAdapter; - ArrayDispatchers _arrayDispatchers; - - osg::ref_ptr _graphicsCostEstimator; - - Timer_t _startTick; - Timer_t _gpuTick; - GLuint64EXT _gpuTimestamp; - int _timestampBits; -}; - -inline void State::pushModeList(ModeMap& modeMap,const StateSet::ModeList& modeList) -{ - for(StateSet::ModeList::const_iterator mitr=modeList.begin(); - mitr!=modeList.end(); - ++mitr) - { - // get the mode stack for incoming GLmode {mitr->first}. - ModeStack& ms = modeMap[mitr->first]; - if (ms.valueVec.empty()) - { - // first pair so simply push incoming pair to back. - ms.valueVec.push_back(mitr->second); - } - else if ((ms.valueVec.back() & StateAttribute::OVERRIDE) && !(mitr->second & StateAttribute::PROTECTED)) // check the existing override flag - { - // push existing back since override keeps the previous value. - ms.valueVec.push_back(ms.valueVec.back()); - } - else - { - // no override on so simply push incoming pair to back. - ms.valueVec.push_back(mitr->second); - } - ms.changed = true; - } -} - -inline void State::pushAttributeList(AttributeMap& attributeMap,const StateSet::AttributeList& attributeList) -{ - for(StateSet::AttributeList::const_iterator aitr=attributeList.begin(); - aitr!=attributeList.end(); - ++aitr) - { - // get the attribute stack for incoming type {aitr->first}. - AttributeStack& as = attributeMap[aitr->first]; - if (as.attributeVec.empty()) - { - // first pair so simply push incoming pair to back. - as.attributeVec.push_back( - AttributePair(aitr->second.first.get(),aitr->second.second)); - } - else if ((as.attributeVec.back().second & StateAttribute::OVERRIDE) && !(aitr->second.second & StateAttribute::PROTECTED)) // check the existing override flag - { - // push existing back since override keeps the previous value. - as.attributeVec.push_back(as.attributeVec.back()); - } - else - { - // no override on so simply push incoming pair to back. - as.attributeVec.push_back( - AttributePair(aitr->second.first.get(),aitr->second.second)); - } - as.changed = true; - } -} - - -inline void State::pushUniformList(UniformMap& uniformMap,const StateSet::UniformList& uniformList) -{ - for(StateSet::UniformList::const_iterator aitr=uniformList.begin(); - aitr!=uniformList.end(); - ++aitr) - { - // get the attribute stack for incoming type {aitr->first}. - UniformStack& us = uniformMap[aitr->first]; - if (us.uniformVec.empty()) - { - // first pair so simply push incoming pair to back. - us.uniformVec.push_back( - UniformStack::UniformPair(aitr->second.first.get(),aitr->second.second)); - } - else if ((us.uniformVec.back().second & StateAttribute::OVERRIDE) && !(aitr->second.second & StateAttribute::PROTECTED)) // check the existing override flag - { - // push existing back since override keeps the previous value. - us.uniformVec.push_back(us.uniformVec.back()); - } - else - { - // no override on so simply push incoming pair to back. - us.uniformVec.push_back( - UniformStack::UniformPair(aitr->second.first.get(),aitr->second.second)); - } - } -} - -inline void State::popModeList(ModeMap& modeMap,const StateSet::ModeList& modeList) -{ - for(StateSet::ModeList::const_iterator mitr=modeList.begin(); - mitr!=modeList.end(); - ++mitr) - { - // get the mode stack for incoming GLmode {mitr->first}. - ModeStack& ms = modeMap[mitr->first]; - if (!ms.valueVec.empty()) - { - ms.valueVec.pop_back(); - } - ms.changed = true; - } -} - -inline void State::popAttributeList(AttributeMap& attributeMap,const StateSet::AttributeList& attributeList) -{ - for(StateSet::AttributeList::const_iterator aitr=attributeList.begin(); - aitr!=attributeList.end(); - ++aitr) - { - // get the attribute stack for incoming type {aitr->first}. - AttributeStack& as = attributeMap[aitr->first]; - if (!as.attributeVec.empty()) - { - as.attributeVec.pop_back(); - } - as.changed = true; - } -} - -inline void State::popUniformList(UniformMap& uniformMap,const StateSet::UniformList& uniformList) -{ - for(StateSet::UniformList::const_iterator aitr=uniformList.begin(); - aitr!=uniformList.end(); - ++aitr) - { - // get the attribute stack for incoming type {aitr->first}. - UniformStack& us = uniformMap[aitr->first]; - if (!us.uniformVec.empty()) - { - us.uniformVec.pop_back(); - } - } -} - -inline void State::applyModeList(ModeMap& modeMap,const StateSet::ModeList& modeList) -{ - StateSet::ModeList::const_iterator ds_mitr = modeList.begin(); - ModeMap::iterator this_mitr=modeMap.begin(); - - while (this_mitr!=modeMap.end() && ds_mitr!=modeList.end()) - { - if (this_mitr->firstfirst) - { - - // note GLMode = this_mitr->first - ModeStack& ms = this_mitr->second; - if (ms.changed) - { - ms.changed = false; - if (!ms.valueVec.empty()) - { - bool new_value = ms.valueVec.back() & StateAttribute::ON; - applyMode(this_mitr->first,new_value,ms); - } - else - { - // assume default of disabled. - applyMode(this_mitr->first,ms.global_default_value,ms); - - } - - } - - ++this_mitr; - - } - else if (ds_mitr->firstfirst) - { - - // ds_mitr->first is a new mode, therefore - // need to insert a new mode entry for ds_mistr->first. - ModeStack& ms = modeMap[ds_mitr->first]; - - bool new_value = ds_mitr->second & StateAttribute::ON; - applyMode(ds_mitr->first,new_value,ms); - - // will need to disable this mode on next apply so set it to changed. - ms.changed = true; - - ++ds_mitr; - - } - else - { - // this_mitr & ds_mitr refer to the same mode, check the override - // if any otherwise just apply the incoming mode. - - ModeStack& ms = this_mitr->second; - - if (!ms.valueVec.empty() && (ms.valueVec.back() & StateAttribute::OVERRIDE) && !(ds_mitr->second & StateAttribute::PROTECTED)) - { - // override is on, just treat as a normal apply on modes. - - if (ms.changed) - { - ms.changed = false; - bool new_value = ms.valueVec.back() & StateAttribute::ON; - applyMode(this_mitr->first,new_value,ms); - - } - } - else - { - // no override on or no previous entry, therefore consider incoming mode. - bool new_value = ds_mitr->second & StateAttribute::ON; - if (applyMode(ds_mitr->first,new_value,ms)) - { - ms.changed = true; - } - } - - ++this_mitr; - ++ds_mitr; - } - } - - // iterator over the remaining state modes to apply any previous changes. - for(; - this_mitr!=modeMap.end(); - ++this_mitr) - { - // note GLMode = this_mitr->first - ModeStack& ms = this_mitr->second; - if (ms.changed) - { - ms.changed = false; - if (!ms.valueVec.empty()) - { - bool new_value = ms.valueVec.back() & StateAttribute::ON; - applyMode(this_mitr->first,new_value,ms); - } - else - { - // assume default of disabled. - applyMode(this_mitr->first,ms.global_default_value,ms); - - } - - } - } - - // iterator over the remaining incoming modes to apply any new mode. - for(; - ds_mitr!=modeList.end(); - ++ds_mitr) - { - ModeStack& ms = modeMap[ds_mitr->first]; - - bool new_value = ds_mitr->second & StateAttribute::ON; - applyMode(ds_mitr->first,new_value,ms); - - // will need to disable this mode on next apply so set it to changed. - ms.changed = true; - } -} - -inline void State::applyModeListOnTexUnit(unsigned int unit,ModeMap& modeMap,const StateSet::ModeList& modeList) -{ - StateSet::ModeList::const_iterator ds_mitr = modeList.begin(); - ModeMap::iterator this_mitr=modeMap.begin(); - - while (this_mitr!=modeMap.end() && ds_mitr!=modeList.end()) - { - if (this_mitr->firstfirst) - { - - // note GLMode = this_mitr->first - ModeStack& ms = this_mitr->second; - if (ms.changed) - { - ms.changed = false; - if (!ms.valueVec.empty()) - { - bool new_value = ms.valueVec.back() & StateAttribute::ON; - applyModeOnTexUnit(unit,this_mitr->first,new_value,ms); - } - else - { - // assume default of disabled. - applyModeOnTexUnit(unit,this_mitr->first,ms.global_default_value,ms); - - } - - } - - ++this_mitr; - - } - else if (ds_mitr->firstfirst) - { - - // ds_mitr->first is a new mode, therefore - // need to insert a new mode entry for ds_mistr->first. - ModeStack& ms = modeMap[ds_mitr->first]; - - bool new_value = ds_mitr->second & StateAttribute::ON; - applyModeOnTexUnit(unit,ds_mitr->first,new_value,ms); - - // will need to disable this mode on next apply so set it to changed. - ms.changed = true; - - ++ds_mitr; - - } - else - { - // this_mitr & ds_mitr refer to the same mode, check the override - // if any otherwise just apply the incoming mode. - - ModeStack& ms = this_mitr->second; - - if (!ms.valueVec.empty() && (ms.valueVec.back() & StateAttribute::OVERRIDE) && !(ds_mitr->second & StateAttribute::PROTECTED)) - { - // override is on, just treat as a normal apply on modes. - - if (ms.changed) - { - ms.changed = false; - bool new_value = ms.valueVec.back() & StateAttribute::ON; - applyModeOnTexUnit(unit,this_mitr->first,new_value,ms); - - } - } - else - { - // no override on or no previous entry, therefore consider incoming mode. - bool new_value = ds_mitr->second & StateAttribute::ON; - if (applyModeOnTexUnit(unit,ds_mitr->first,new_value,ms)) - { - ms.changed = true; - } - } - - ++this_mitr; - ++ds_mitr; - } - } - - // iterator over the remaining state modes to apply any previous changes. - for(; - this_mitr!=modeMap.end(); - ++this_mitr) - { - // note GLMode = this_mitr->first - ModeStack& ms = this_mitr->second; - if (ms.changed) - { - ms.changed = false; - if (!ms.valueVec.empty()) - { - bool new_value = ms.valueVec.back() & StateAttribute::ON; - applyModeOnTexUnit(unit,this_mitr->first,new_value,ms); - } - else - { - // assume default of disabled. - applyModeOnTexUnit(unit,this_mitr->first,ms.global_default_value,ms); - - } - - } - } - - // iterator over the remaining incoming modes to apply any new mode. - for(; - ds_mitr!=modeList.end(); - ++ds_mitr) - { - ModeStack& ms = modeMap[ds_mitr->first]; - - bool new_value = ds_mitr->second & StateAttribute::ON; - applyModeOnTexUnit(unit,ds_mitr->first,new_value,ms); - - // will need to disable this mode on next apply so set it to changed. - ms.changed = true; - } -} - -inline void State::applyAttributeList(AttributeMap& attributeMap,const StateSet::AttributeList& attributeList) -{ - StateSet::AttributeList::const_iterator ds_aitr=attributeList.begin(); - - AttributeMap::iterator this_aitr=attributeMap.begin(); - - while (this_aitr!=attributeMap.end() && ds_aitr!=attributeList.end()) - { - if (this_aitr->firstfirst) - { - - // note attribute type = this_aitr->first - AttributeStack& as = this_aitr->second; - if (as.changed) - { - as.changed = false; - if (!as.attributeVec.empty()) - { - const StateAttribute* new_attr = as.attributeVec.back().first; - applyAttribute(new_attr,as); - } - else - { - applyGlobalDefaultAttribute(as); - } - } - - ++this_aitr; - - } - else if (ds_aitr->firstfirst) - { - - // ds_aitr->first is a new attribute, therefore - // need to insert a new attribute entry for ds_aitr->first. - AttributeStack& as = attributeMap[ds_aitr->first]; - - const StateAttribute* new_attr = ds_aitr->second.first.get(); - applyAttribute(new_attr,as); - - as.changed = true; - - ++ds_aitr; - - } - else - { - // this_mitr & ds_mitr refer to the same attribute, check the override - // if any otherwise just apply the incoming attribute - - AttributeStack& as = this_aitr->second; - - if (!as.attributeVec.empty() && (as.attributeVec.back().second & StateAttribute::OVERRIDE) && !(ds_aitr->second.second & StateAttribute::PROTECTED)) - { - // override is on, just treat as a normal apply on attribute. - - if (as.changed) - { - as.changed = false; - const StateAttribute* new_attr = as.attributeVec.back().first; - applyAttribute(new_attr,as); - } - } - else - { - // no override on or no previous entry, therefore consider incoming attribute. - const StateAttribute* new_attr = ds_aitr->second.first.get(); - if (applyAttribute(new_attr,as)) - { - as.changed = true; - } - } - - ++this_aitr; - ++ds_aitr; - } - } - - // iterator over the remaining state attributes to apply any previous changes. - for(; - this_aitr!=attributeMap.end(); - ++this_aitr) - { - // note attribute type = this_aitr->first - AttributeStack& as = this_aitr->second; - if (as.changed) - { - as.changed = false; - if (!as.attributeVec.empty()) - { - const StateAttribute* new_attr = as.attributeVec.back().first; - applyAttribute(new_attr,as); - } - else - { - applyGlobalDefaultAttribute(as); - } - } - } - - // iterator over the remaining incoming attribute to apply any new attribute. - for(; - ds_aitr!=attributeList.end(); - ++ds_aitr) - { - // ds_aitr->first is a new attribute, therefore - // need to insert a new attribute entry for ds_aitr->first. - AttributeStack& as = attributeMap[ds_aitr->first]; - - const StateAttribute* new_attr = ds_aitr->second.first.get(); - applyAttribute(new_attr,as); - - // will need to update this attribute on next apply so set it to changed. - as.changed = true; - } - -} - -inline void State::applyAttributeListOnTexUnit(unsigned int unit,AttributeMap& attributeMap,const StateSet::AttributeList& attributeList) -{ - StateSet::AttributeList::const_iterator ds_aitr=attributeList.begin(); - - AttributeMap::iterator this_aitr=attributeMap.begin(); - - while (this_aitr!=attributeMap.end() && ds_aitr!=attributeList.end()) - { - if (this_aitr->firstfirst) - { - - // note attribute type = this_aitr->first - AttributeStack& as = this_aitr->second; - if (as.changed) - { - as.changed = false; - if (!as.attributeVec.empty()) - { - const StateAttribute* new_attr = as.attributeVec.back().first; - applyAttributeOnTexUnit(unit,new_attr,as); - } - else - { - applyGlobalDefaultAttributeOnTexUnit(unit,as); - } - } - - ++this_aitr; - - } - else if (ds_aitr->firstfirst) - { - - // ds_aitr->first is a new attribute, therefore - // need to insert a new attribute entry for ds_aitr->first. - AttributeStack& as = attributeMap[ds_aitr->first]; - - const StateAttribute* new_attr = ds_aitr->second.first.get(); - applyAttributeOnTexUnit(unit,new_attr,as); - - as.changed = true; - - ++ds_aitr; - - } - else - { - // this_mitr & ds_mitr refer to the same attribute, check the override - // if any otherwise just apply the incoming attribute - - AttributeStack& as = this_aitr->second; - - if (!as.attributeVec.empty() && (as.attributeVec.back().second & StateAttribute::OVERRIDE) && !(ds_aitr->second.second & StateAttribute::PROTECTED)) - { - // override is on, just treat as a normal apply on attribute. - - if (as.changed) - { - as.changed = false; - const StateAttribute* new_attr = as.attributeVec.back().first; - applyAttributeOnTexUnit(unit,new_attr,as); - } - } - else - { - // no override on or no previous entry, therefore consider incoming attribute. - const StateAttribute* new_attr = ds_aitr->second.first.get(); - if (applyAttributeOnTexUnit(unit,new_attr,as)) - { - as.changed = true; - } - } - - ++this_aitr; - ++ds_aitr; - } - } - - // iterator over the remaining state attributes to apply any previous changes. - for(; - this_aitr!=attributeMap.end(); - ++this_aitr) - { - // note attribute type = this_aitr->first - AttributeStack& as = this_aitr->second; - if (as.changed) - { - as.changed = false; - if (!as.attributeVec.empty()) - { - const StateAttribute* new_attr = as.attributeVec.back().first; - applyAttributeOnTexUnit(unit,new_attr,as); - } - else - { - applyGlobalDefaultAttributeOnTexUnit(unit,as); - } - } - } - - // iterator over the remaining incoming attribute to apply any new attribute. - for(; - ds_aitr!=attributeList.end(); - ++ds_aitr) - { - // ds_aitr->first is a new attribute, therefore - // need to insert a new attribute entry for ds_aitr->first. - AttributeStack& as = attributeMap[ds_aitr->first]; - - const StateAttribute* new_attr = ds_aitr->second.first.get(); - applyAttributeOnTexUnit(unit,new_attr,as); - - // will need to update this attribute on next apply so set it to changed. - as.changed = true; - } - -} - -inline void State::applyUniformList(UniformMap& uniformMap,const StateSet::UniformList& uniformList) -{ - if (!_lastAppliedProgramObject) return; - - StateSet::UniformList::const_iterator ds_aitr=uniformList.begin(); - - UniformMap::iterator this_aitr=uniformMap.begin(); - - while (this_aitr!=uniformMap.end() && ds_aitr!=uniformList.end()) - { - if (this_aitr->firstfirst) - { - // note attribute type = this_aitr->first - UniformStack& as = this_aitr->second; - if (!as.uniformVec.empty()) - { - _lastAppliedProgramObject->apply(*as.uniformVec.back().first); - } - - ++this_aitr; - - } - else if (ds_aitr->firstfirst) - { - _lastAppliedProgramObject->apply(*(ds_aitr->second.first.get())); - - ++ds_aitr; - } - else - { - // this_mitr & ds_mitr refer to the same attribute, check the override - // if any otherwise just apply the incoming attribute - - UniformStack& as = this_aitr->second; - - if (!as.uniformVec.empty() && (as.uniformVec.back().second & StateAttribute::OVERRIDE) && !(ds_aitr->second.second & StateAttribute::PROTECTED)) - { - // override is on, just treat as a normal apply on uniform. - _lastAppliedProgramObject->apply(*as.uniformVec.back().first); - } - else - { - // no override on or no previous entry, therefore consider incoming attribute. - _lastAppliedProgramObject->apply(*(ds_aitr->second.first.get())); - } - - ++this_aitr; - ++ds_aitr; - } - } - - // iterator over the remaining state attributes to apply any previous changes. - for(; - this_aitr!=uniformMap.end(); - ++this_aitr) - { - // note attribute type = this_aitr->first - UniformStack& as = this_aitr->second; - if (!as.uniformVec.empty()) - { - _lastAppliedProgramObject->apply(*as.uniformVec.back().first); - } - } - - // iterator over the remaining incoming attribute to apply any new attribute. - for(; - ds_aitr!=uniformList.end(); - ++ds_aitr) - { - _lastAppliedProgramObject->apply(*(ds_aitr->second.first.get())); - } - -} - -inline void State::applyModeMap(ModeMap& modeMap) -{ - for(ModeMap::iterator mitr=modeMap.begin(); - mitr!=modeMap.end(); - ++mitr) - { - // note GLMode = mitr->first - ModeStack& ms = mitr->second; - if (ms.changed) - { - ms.changed = false; - if (!ms.valueVec.empty()) - { - bool new_value = ms.valueVec.back() & StateAttribute::ON; - applyMode(mitr->first,new_value,ms); - } - else - { - // assume default of disabled. - applyMode(mitr->first,ms.global_default_value,ms); - } - - } - } -} - -inline void State::applyModeMapOnTexUnit(unsigned int unit,ModeMap& modeMap) -{ - for(ModeMap::iterator mitr=modeMap.begin(); - mitr!=modeMap.end(); - ++mitr) - { - // note GLMode = mitr->first - ModeStack& ms = mitr->second; - if (ms.changed) - { - ms.changed = false; - if (!ms.valueVec.empty()) - { - bool new_value = ms.valueVec.back() & StateAttribute::ON; - applyModeOnTexUnit(unit,mitr->first,new_value,ms); - } - else - { - // assume default of disabled. - applyModeOnTexUnit(unit,mitr->first,ms.global_default_value,ms); - } - - } - } -} - -inline void State::applyAttributeMap(AttributeMap& attributeMap) -{ - for(AttributeMap::iterator aitr=attributeMap.begin(); - aitr!=attributeMap.end(); - ++aitr) - { - AttributeStack& as = aitr->second; - if (as.changed) - { - as.changed = false; - if (!as.attributeVec.empty()) - { - const StateAttribute* new_attr = as.attributeVec.back().first; - applyAttribute(new_attr,as); - } - else - { - applyGlobalDefaultAttribute(as); - } - - } - } -} - -inline void State::applyAttributeMapOnTexUnit(unsigned int unit,AttributeMap& attributeMap) -{ - for(AttributeMap::iterator aitr=attributeMap.begin(); - aitr!=attributeMap.end(); - ++aitr) - { - AttributeStack& as = aitr->second; - if (as.changed) - { - as.changed = false; - if (!as.attributeVec.empty()) - { - const StateAttribute* new_attr = as.attributeVec.back().first; - applyAttributeOnTexUnit(unit,new_attr,as); - } - else - { - applyGlobalDefaultAttributeOnTexUnit(unit,as); - } - - } - } -} - -inline void State::applyUniformMap(UniformMap& uniformMap) -{ - if (!_lastAppliedProgramObject) return; - - for(UniformMap::iterator aitr=uniformMap.begin(); - aitr!=uniformMap.end(); - ++aitr) - { - UniformStack& as = aitr->second; - if (!as.uniformVec.empty()) - { - _lastAppliedProgramObject->apply(*as.uniformVec.back().first); - } - } -} - -inline bool State::setActiveTextureUnit( unsigned int unit ) -{ - if (unit!=_currentActiveTextureUnit) - { - if (_glActiveTexture && unit < (unsigned int)(maximum(_glMaxTextureCoords,_glMaxTextureUnits)) ) - { - _glActiveTexture(GL_TEXTURE0+unit); - _currentActiveTextureUnit = unit; - } - else - { - return unit==0; - } - } - return true; -} - -} - -#endif diff --git a/libs/lib/mac32/include/osg/StateAttribute b/libs/lib/mac32/include/osg/StateAttribute deleted file mode 100644 index b867b774a..000000000 --- a/libs/lib/mac32/include/osg/StateAttribute +++ /dev/null @@ -1,358 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_STATEATTRIBUTE -#define OSG_STATEATTRIBUTE 1 - -#include -#include -#include -#include -#include - -#include -#include -#include - -// define for the GL_EXT_secondary_color extension, GL_COLOR_SUM is OpenGL -// mode to be used to enable and disable the second color. -#ifndef GL_COLOR_SUM -#define GL_COLOR_SUM 0x8458 -#endif - -namespace osg { - - -// forward declare NodeVisitor, State & StateSet -class NodeVisitor; -class State; -class ShaderComposer; -class StateSet; -class Texture; - -/** META_StateAttribute macro define the standard clone, isSameKindAs, - * className and getType methods. - * Use when subclassing from Object to make it more convenient to define - * the standard pure virtual methods which are required for all Object - * subclasses.*/ -#define META_StateAttribute(library,name,type) \ - virtual osg::Object* cloneType() const { return new name(); } \ - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ - virtual const char* libraryName() const { return #library; } \ - virtual const char* className() const { return #name; } \ - virtual Type getType() const { return type; } - -/** COMPARE_StateAttribute_Types macro is a helper for implementing the StateAtribute::compare(..) method.*/ -#define COMPARE_StateAttribute_Types(TYPE,rhs_attribute) \ - if (this==&rhs_attribute) return 0;\ - const std::type_info* type_lhs = &typeid(*this);\ - const std::type_info* type_rhs = &typeid(rhs_attribute);\ - if (type_lhs->before(*type_rhs)) return -1;\ - if (*type_lhs != *type_rhs) return 1;\ - const TYPE& rhs = static_cast(rhs_attribute); - - -/** COMPARE_StateAttribute_Parameter macro is a helper for implementing the StatateAtribute::compare(..) method. - * Macro assumes that variable rhs has been correctly defined by preceding code - * macro.*/ -#define COMPARE_StateAttribute_Parameter(parameter) \ - if (parameter TypeMemberPair; - - StateAttribute(); - - StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - Object(sa,copyop), - _shaderComponent(sa._shaderComponent), - _updateCallback(copyop(sa._updateCallback.get())), - _eventCallback(copyop(sa._eventCallback.get())) - {} - - - /** Clone the type of an attribute, with Object* return type. - Must be defined by derived classes.*/ - virtual Object* cloneType() const = 0; - - /** Clone an attribute, with Object* return type. - Must be defined by derived classes.*/ - virtual Object* clone(const CopyOp&) const = 0; - - /** Return true if this and obj are of the same kind of object.*/ - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - - /** Return the name of the attribute's library.*/ - virtual const char* libraryName() const { return "osg"; } - - /** Return the name of the attribute's class type.*/ - virtual const char* className() const { return "StateAttribute"; } - - - /** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/ - virtual Texture* asTexture() { return 0; } - - /** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/ - virtual const Texture* asTexture() const { return 0; } - - - /** Return the Type identifier of the attribute's class type.*/ - virtual Type getType() const = 0; - - /** Return the member identifier within the attribute's class type. Used for light number/clip plane number etc.*/ - virtual unsigned int getMember() const { return 0; } - - /** Return the TypeMemberPair that uniquely identifies this type member.*/ - inline TypeMemberPair getTypeMemberPair() const { return TypeMemberPair(getType(),getMember()); } - - /** Return true if StateAttribute is a type which controls texturing and needs to be issued w.r.t to specific texture unit.*/ - virtual bool isTextureAttribute() const { return false; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const = 0; - - bool operator < (const StateAttribute& rhs) const { return compare(rhs)<0; } - bool operator == (const StateAttribute& rhs) const { return compare(rhs)==0; } - bool operator != (const StateAttribute& rhs) const { return compare(rhs)!=0; } - - - /** A vector of osg::StateSet pointers which is used to store the parent(s) of this StateAttribute.*/ - typedef std::vector ParentList; - - /** Get the parent list of this StateAttribute. */ - inline const ParentList& getParents() const { return _parents; } - - inline StateSet* getParent(unsigned int i) { return _parents[i]; } - /** - * Get a single const parent of this StateAttribute. - * @param i index of the parent to get. - * @return the parent i. - */ - inline const StateSet* getParent(unsigned int i) const { return _parents[i]; } - - /** - * Get the number of parents of this StateAttribute. - * @return the number of parents of this StateAttribute. - */ - inline unsigned int getNumParents() const { return static_cast(_parents.size()); } - - void setShaderComponent(ShaderComponent* sc) { _shaderComponent = sc; } - ShaderComponent* getShaderComponent() { return _shaderComponent.get(); } - const ShaderComponent* getShaderComponent() const { return _shaderComponent.get(); } - - struct ModeUsage - { - virtual ~ModeUsage() {} - virtual void usesMode(GLMode mode) = 0; - virtual void usesTextureMode(GLMode mode) = 0; - }; - - /** Return the modes associated with this StateAttribute.*/ - virtual bool getModeUsage(ModeUsage&) const - { - // default to no GLMode's associated with use of the StateAttribute. - return false; - } - - /** Check the modes associated with this StateAttribute are supported by current OpenGL drivers, - * and if not set the associated mode in osg::State to be black listed/invalid. - * Return true if all associated modes are valid.*/ - virtual bool checkValidityOfAssociatedModes(osg::State&) const - { - // default to no black listed GLMode's associated with use of the StateAttribute. - return true; - } - - // provide callback for backwards compatibility. - typedef osg::StateAttributeCallback Callback; - - /** Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.*/ - void setUpdateCallback(StateAttributeCallback* uc); - - /** Get the non const UpdateCallback.*/ - StateAttributeCallback* getUpdateCallback() { return _updateCallback.get(); } - - /** Get the const UpdateCallback.*/ - const StateAttributeCallback* getUpdateCallback() const { return _updateCallback.get(); } - - - /** Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.*/ - void setEventCallback(StateAttributeCallback* ec); - - /** Get the non const EventCallback.*/ - StateAttributeCallback* getEventCallback() { return _eventCallback.get(); } - - /** Get the const EventCallback.*/ - const StateAttributeCallback* getEventCallback() const { return _eventCallback.get(); } - - - /** apply the OpenGL state attributes. - * The render info for the current OpenGL context is passed - * in to allow the StateAttribute to obtain details on the - * the current context and state. - */ - virtual void apply(State&) const {} - - /** Default to nothing to compile - all state is applied immediately. */ - virtual void compileGLObjects(State&) const {} - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int /*maxSize*/) {} - - /** Release OpenGL objects in specified graphics context if State - object is passed, otherwise release OpenGL objects for all graphics context if - State object pointer NULL.*/ - virtual void releaseGLObjects(State* =0) const {} - - - protected: - - virtual ~StateAttribute() {} - - void addParent(osg::StateSet* object); - void removeParent(osg::StateSet* object); - - ParentList _parents; - friend class osg::StateSet; - - ref_ptr _shaderComponent; - - ref_ptr _updateCallback; - ref_ptr _eventCallback; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/StateAttributeCallback b/libs/lib/mac32/include/osg/StateAttributeCallback deleted file mode 100644 index 947259b54..000000000 --- a/libs/lib/mac32/include/osg/StateAttributeCallback +++ /dev/null @@ -1,39 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -#ifndef OSG_STATEATTRIBUTECALLBACK -#define OSG_STATEATTRIBUTECALLBACK 1 - -#include -#include - -namespace osg { - -class StateAttribute; -class NodeVisitor; - -class OSG_EXPORT StateAttributeCallback : public virtual osg::Object -{ - public: - StateAttributeCallback() {} - - StateAttributeCallback(const StateAttributeCallback&,const CopyOp&) {} - - META_Object(osg,StateAttributeCallback); - - /** do customized update code.*/ - virtual void operator () (StateAttribute*, NodeVisitor*) {} -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/StateSet b/libs/lib/mac32/include/osg/StateSet deleted file mode 100644 index 5b4752bcd..000000000 --- a/libs/lib/mac32/include/osg/StateSet +++ /dev/null @@ -1,520 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_STATESET -#define OSG_STATESET 1 - -#include -#include -#include -#include - -#include -#include -#include - -#ifndef GL_RESCALE_NORMAL -// allow compilation against GL1.1 headers. -#define GL_RESCALE_NORMAL 0x803A -#endif - -namespace osg { - -// forward declare for the purposes of the UpdateCallback. -class NodeVisitor; - -/** Stores a set of modes and attributes which represent a set of OpenGL state. - * Notice that a \c StateSet contains just a subset of the whole OpenGL state. - *

In OSG, each \c Drawable and each \c Node has a reference to a - * \c StateSet. These StateSets can be shared between - * different Drawables and Nodes (that is, several - * Drawables and Nodes can reference the same \c StateSet). - * Indeed, this practice is recommended whenever possible, - * as this minimizes expensive state changes in the graphics pipeline. -*/ -class OSG_EXPORT StateSet : public Object -{ - public : - - - StateSet(); - StateSet(const StateSet&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new StateSet(); } - virtual Object* clone(const CopyOp& copyop) const { return new StateSet(*this,copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "StateSet"; } - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - int compare(const StateSet& rhs,bool compareAttributeContents=false) const; - - bool operator < (const StateSet& rhs) const { return compare(rhs)<0; } - bool operator == (const StateSet& rhs) const { return compare(rhs)==0; } - bool operator != (const StateSet& rhs) const { return compare(rhs)!=0; } - - - /** A vector of osg::Object pointers which is used to store the parent(s) of this Stateset, the parents could be osg::Node or osg::Drawable.*/ - typedef std::vector ParentList; - - /** Get the parent list of this StateSet. */ - inline const ParentList& getParents() const { return _parents; } - - /** Get the a copy of parent list of node. A copy is returned to - * prevent modification of the parent list.*/ - inline ParentList getParents() { return _parents; } - - inline Object* getParent(unsigned int i) { return _parents[i]; } - /** - * Get a single const parent of this StateSet. - * @param i index of the parent to get. - * @return the parent i. - */ - inline const Object* getParent(unsigned int i) const { return _parents[i]; } - - /** - * Get the number of parents of this StateSet. - * @return the number of parents of this StateSet. - */ - inline unsigned int getNumParents() const { return static_cast(_parents.size()); } - - - /** Compute the DataVariance based on an assessment of callback etc.*/ - virtual void computeDataVariance(); - - - /** Set all the modes to on or off so that it defines a - complete state, typically used for a default global state.*/ - void setGlobalDefaults(); - - /** Clear the StateSet of all modes and attributes.*/ - void clear(); - - /** Merge this \c StateSet with the \c StateSet passed as parameter. - * Every mode and attribute in this \c StateSet that is marked with - * \c StateAttribute::OVERRIDE is replaced with the - * equivalent mode or attribute from \c rhs. - */ - void merge(const StateSet& rhs); - - /** a container to map GLModes to their respective GLModeValues.*/ - typedef std::map ModeList; - - /** Set this \c StateSet to contain the specified \c GLMode with a given - * value. - * @note Don't use this method to set modes related to textures. For this - * purpose, use \c setTextureMode(), that accepts an extra parameter - * specifying which texture unit shall be affected by the call. - */ - void setMode(StateAttribute::GLMode mode, StateAttribute::GLModeValue value); - - /** Remove \c mode from this \c StateSet. - * @note Don't use this method to remove modes related to textures. For - * this purpose, use \c removeTextureMode(), that accepts an extra - * parameter specifying which texture unit shall be affected by - * the call. - */ - void removeMode(StateAttribute::GLMode mode); - - /** Get the value for a given \c GLMode. - * @param mode The \c GLMode whose value is desired. - * @return If \c mode is contained within this \c StateSet, returns the - * value associated with it. Otherwise, returns - * \c StateAttribute::INHERIT. - * @note Don't use this method to get the value of modes related to - * textures. For this purpose, use \c removeTextureMode(), that - * accepts an extra parameter specifying which texture unit shall - * be affected by the call. - */ - StateAttribute::GLModeValue getMode(StateAttribute::GLMode mode) const; - - /** Set the list of all GLModes contained in this \c StateSet.*/ - inline void setModeList(ModeList& ml) { _modeList=ml; } - - /** Return the list of all GLModes contained in this \c StateSet.*/ - inline ModeList& getModeList() { return _modeList; } - - /** Return the \c const list of all GLModes contained in this - * const StateSet. - */ - inline const ModeList& getModeList() const { return _modeList; } - - - - /** Simple pairing between an attribute and its override flag.*/ - typedef std::pair,StateAttribute::OverrideValue> RefAttributePair; - - /** a container to map to their respective RefAttributePair.*/ - typedef std::map AttributeList; - - /** Set this StateSet to contain specified attribute and override flag.*/ - void setAttribute(StateAttribute *attribute, StateAttribute::OverrideValue value=StateAttribute::OFF); - - /** Set this StateSet to contain specified attribute and set the associated GLMode's to specified value.*/ - void setAttributeAndModes(StateAttribute *attribute, StateAttribute::GLModeValue value=StateAttribute::ON); - - /** remove attribute of specified type from StateSet.*/ - void removeAttribute(StateAttribute::Type type, unsigned int member=0); - - /** remove attribute from StateSet.*/ - void removeAttribute(StateAttribute *attribute); - - /** Get specified StateAttribute for specified type. - * Returns NULL if no type is contained within StateSet.*/ - StateAttribute* getAttribute(StateAttribute::Type type, unsigned int member = 0); - - /** Get specified const StateAttribute for specified type. - * Returns NULL if no type is contained within const StateSet.*/ - const StateAttribute* getAttribute(StateAttribute::Type type, unsigned int member = 0) const; - - /** Get specified RefAttributePair for specified type. - * Returns NULL if no type is contained within StateSet.*/ - const RefAttributePair* getAttributePair(StateAttribute::Type type, unsigned int member = 0) const; - - /** set the list of all StateAttributes contained in this StateSet.*/ - inline void setAttributeList(AttributeList& al) { _attributeList=al; } - - /** return the list of all StateAttributes contained in this StateSet.*/ - inline AttributeList& getAttributeList() { return _attributeList; } - - /** return the const list of all StateAttributes contained in this const StateSet.*/ - inline const AttributeList& getAttributeList() const { return _attributeList; } - - - - typedef std::vector TextureModeList; - - /** Set this \c StateSet to contain specified \c GLMode with a given - * value. - * @param unit The texture unit to be affected (used with - * multi-texturing). - * @param mode The OpenGL mode to be added to the \c StateSet. - * @param value The value to be assigned to \c mode. - */ - void setTextureMode(unsigned int unit,StateAttribute::GLMode mode, StateAttribute::GLModeValue value); - - /** Remove texture mode from StateSet.*/ - void removeTextureMode(unsigned int unit,StateAttribute::GLMode mode); - - /** Get specified GLModeValue for specified GLMode. - * returns INHERIT if no GLModeValue is contained within StateSet.*/ - StateAttribute::GLModeValue getTextureMode(unsigned int unit,StateAttribute::GLMode mode) const; - - /** set the list of all Texture related GLModes contained in this StateSet.*/ - inline void setTextureModeList(TextureModeList& tml) { _textureModeList=tml; } - - /** return the list of all Texture related GLModes contained in this StateSet.*/ - inline TextureModeList& getTextureModeList() { return _textureModeList; } - - /** return the const list of all Texture related GLModes contained in this const StateSet.*/ - inline const TextureModeList& getTextureModeList() const { return _textureModeList; } - - /** Return the number texture units active in the TextureModeList.*/ - inline unsigned int getNumTextureModeLists() const { return _textureModeList.size(); } - - typedef std::vector TextureAttributeList; - - /** Set this StateSet to contain specified attribute and override flag.*/ - void setTextureAttribute(unsigned int unit,StateAttribute *attribute, StateAttribute::OverrideValue value=StateAttribute::OFF); - /** Set this StateSet to contain specified attribute and set the associated GLMode's to specified value.*/ - void setTextureAttributeAndModes(unsigned int unit,StateAttribute *attribute, StateAttribute::GLModeValue value=StateAttribute::ON); - - /** remove texture attribute of specified type from StateSet.*/ - void removeTextureAttribute(unsigned int unit, StateAttribute::Type type); - - /** remove texture attribute from StateSet.*/ - void removeTextureAttribute(unsigned int unit, StateAttribute *attribute); - - /** Get specified Texture related StateAttribute for specified type. - * Returns NULL if no type is contained within StateSet.*/ - StateAttribute* getTextureAttribute(unsigned int unit,StateAttribute::Type type); - - /** Get specified Texture related const StateAttribute for specified type. - * Returns NULL if no type is contained within const StateSet.*/ - const StateAttribute* getTextureAttribute(unsigned int unit,StateAttribute::Type type) const; - - /** Get specified Texture related RefAttributePair for specified type. - * Returns NULL if no type is contained within StateSet.*/ - const RefAttributePair* getTextureAttributePair(unsigned int unit,StateAttribute::Type type) const; - - /** Set the list of all Texture related StateAttributes contained in this StateSet.*/ - inline void setTextureAttributeList(TextureAttributeList& tal) { _textureAttributeList=tal; } - - /** Return the list of all Texture related StateAttributes contained in this StateSet.*/ - inline TextureAttributeList& getTextureAttributeList() { return _textureAttributeList; } - - /** Return the const list of all Texture related StateAttributes contained in this const StateSet.*/ - inline const TextureAttributeList& getTextureAttributeList() const { return _textureAttributeList; } - - /** Return the number of texture units active in the TextureAttributeList.*/ - inline unsigned int getNumTextureAttributeLists() const { return _textureAttributeList.size(); } - - - void setAssociatedModes(const StateAttribute* attribute, StateAttribute::GLModeValue value); - void removeAssociatedModes(const StateAttribute* attribute); - - void setAssociatedTextureModes(unsigned int unit,const StateAttribute* attribute, StateAttribute::GLModeValue value); - void removeAssociatedTextureModes(unsigned int unit,const StateAttribute* attribute); - - - - - /** Simple pairing between a Uniform and its override flag.*/ - typedef std::pair,StateAttribute::OverrideValue> RefUniformPair; - - /** a container to map Uniform name to its respective RefUniformPair.*/ - typedef std::map UniformList; - - /** Set this StateSet to contain specified uniform and override flag.*/ - void addUniform(Uniform* uniform, StateAttribute::OverrideValue value=StateAttribute::ON); - - /** remove uniform of specified name from StateSet.*/ - void removeUniform(const std::string& name); - - /** remove Uniform from StateSet.*/ - void removeUniform(Uniform* uniform); - - /** Get Uniform for specified name. - * Returns NULL if no matching Uniform is contained within StateSet.*/ - Uniform* getUniform(const std::string& name); - - /** Get Uniform for specified name, if one is not available create it, add it to this StateSet and return a pointer to it.*/ - Uniform* getOrCreateUniform(const std::string& name, Uniform::Type type, unsigned int numElements=1); - - /** Get const Uniform for specified name. - * Returns NULL if no matching Uniform is contained within StateSet.*/ - const Uniform* getUniform(const std::string& name) const; - - /** Get specified RefUniformPair for specified Uniform name. - * Returns NULL if no Uniform is contained within StateSet.*/ - const RefUniformPair* getUniformPair(const std::string& name) const; - - /** set the list of all Uniforms contained in this StateSet.*/ - inline void setUniformList(UniformList& al) { _uniformList=al; } - - /** return the list of all Uniforms contained in this StateSet.*/ - inline UniformList& getUniformList() { return _uniformList; } - - /** return the const list of all Uniforms contained in this const StateSet.*/ - inline const UniformList& getUniformList() const { return _uniformList; } - - enum RenderingHint - { - DEFAULT_BIN = 0, - OPAQUE_BIN = 1, - TRANSPARENT_BIN = 2 - }; - - /** Set the \c RenderingHint of this \c StateSet. \c RenderingHint is - * used by the renderer to determine which draw bin to drop associated - * osg::Drawables in. Typically, users will set this to either - * \c StateSet::OPAQUE_BIN or \c StateSet::TRANSPARENT_BIN. - * Drawables in the opaque bin are sorted by their - * \c StateSet, so that the number of expensive changes in the OpenGL - * state is minimized. Drawables in the transparent bin are - * sorted by depth, so that objects farther from the viewer are - * rendered first (and hence alpha blending works nicely for - * translucent objects). - */ - void setRenderingHint(int hint); - - /** Get the \c RenderingHint of this \c StateSet.*/ - inline int getRenderingHint() const { return _renderingHint; } - - enum RenderBinMode - { - INHERIT_RENDERBIN_DETAILS, - USE_RENDERBIN_DETAILS, - OVERRIDE_RENDERBIN_DETAILS - }; - - /** Set the render bin details.*/ - void setRenderBinDetails(int binNum,const std::string& binName,RenderBinMode mode=USE_RENDERBIN_DETAILS); - - /** Set the render bin details to inherit.*/ - void setRenderBinToInherit(); - - /** Get whether the render bin details are set and should be used.*/ - inline bool useRenderBinDetails() const { return _binMode!=INHERIT_RENDERBIN_DETAILS; } - - /** Set the render bin mode.*/ - inline void setRenderBinMode(RenderBinMode mode) { _binMode=mode; } - - /** Get the render bin mode.*/ - inline RenderBinMode getRenderBinMode() const { return _binMode; } - - /** Set the render bin number.*/ - inline void setBinNumber(int num) { _binNum=num; } - - /** Get the render bin number.*/ - inline int getBinNumber() const { return _binNum; } - - /** Set the render bin name.*/ - inline void setBinName(const std::string& name) { _binName=name; } - - /** Get the render bin name.*/ - inline const std::string& getBinName() const { return _binName; } - - /** By default render bins will be nested within each other dependent - * upon where they are set in the scene graph. This can be problematic - * if a transparent render bin is attached to an opaque render bin - * which is attached to another transparent render bin as these render - * bins will be sorted separately, giving the wrong draw ordering for - * back-to-front transparency. Therefore, to prevent render bins being - * nested, call setNestRenderBins(false). */ - inline void setNestRenderBins(bool val) { _nestRenderBins = val; } - - /** Get whether associated RenderBin should be nested within parents RenderBin.*/ - inline bool getNestRenderBins() const { return _nestRenderBins; } - - - struct Callback : public virtual osg::Object - { - Callback() {} - - Callback(const Callback&,const CopyOp&) {} - - META_Object(osg,Callback); - - /** do customized callback code.*/ - virtual void operator() (StateSet*, NodeVisitor*) {} - }; - - /** Set the Update Callback which allows users to attach customize the updating of an object during the update traversal.*/ - void setUpdateCallback(Callback* ac); - - /** Get the non const Update Callback.*/ - Callback* getUpdateCallback() { return _updateCallback.get(); } - - /** Get the const Update Callback.*/ - const Callback* getUpdateCallback() const { return _updateCallback.get(); } - - /** Return whether this StateSet has update callbacks associated with it, and therefore must be traversed.*/ - bool requiresUpdateTraversal() const { return _updateCallback.valid() || getNumChildrenRequiringUpdateTraversal()!=0; } - - /** Get the number of Objects of this StateSet which require Update traversal, - * since they have an Update Callback attached to them or their children.*/ - inline unsigned int getNumChildrenRequiringUpdateTraversal() const { return _numChildrenRequiringUpdateTraversal; } - - /** Run the update callbacks attached directly to this StateSet or to its children.*/ - void runUpdateCallbacks(osg::NodeVisitor* nv); - - - /** Set the Event Callback which allows users to attach customize the updating of an object during the event traversal.*/ - void setEventCallback(Callback* ac); - - /** Get the non const Event Callback.*/ - Callback* getEventCallback() { return _eventCallback.get(); } - - /** Get the const Event Callback.*/ - const Callback* getEventCallback() const { return _eventCallback.get(); } - - /** Return whether this StateSet has event callbacks associated with it, and therefore must be traversed.*/ - bool requiresEventTraversal() const { return _eventCallback.valid() || getNumChildrenRequiringEventTraversal()!=0; } - - /** Get the number of Objects of this StateSet which require Event traversal, - * since they have an Eevnt Callback attached to them or their children.*/ - inline unsigned int getNumChildrenRequiringEventTraversal() const { return _numChildrenRequiringEventTraversal; } - - /** Run the event callbacks attached directly to this StateSet or to its children.*/ - void runEventCallbacks(osg::NodeVisitor* nv); - - /** Check the modes associated with this StateSet are supported by current OpenGL drivers, - * and if not set the associated mode in osg::State to be black listed/invalid. - * Return true if all associated modes are valid.*/ - bool checkValidityOfAssociatedModes(State& state) const; - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** call compile on all StateAttributes contained within this StateSet.*/ - void compileGLObjects(State& state) const; - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** call release on all StateAttributes contained within this StateSet.*/ - virtual void releaseGLObjects(State* state=0) const; - - protected : - - - virtual ~StateSet(); - - StateSet& operator = (const StateSet&) { return *this; } - - void addParent(osg::Object* object); - void removeParent(osg::Object* object); - - ParentList _parents; - friend class osg::Node; - friend class osg::Drawable; - friend class osg::Uniform; - friend class osg::StateAttribute; - - ModeList _modeList; - AttributeList _attributeList; - - TextureModeList _textureModeList; - TextureAttributeList _textureAttributeList; - - UniformList _uniformList; - - inline ModeList& getOrCreateTextureModeList(unsigned int unit) - { - if (unit>=_textureModeList.size()) _textureModeList.resize(unit+1); - return _textureModeList[unit]; - } - - inline AttributeList& getOrCreateTextureAttributeList(unsigned int unit) - { - if (unit>=_textureAttributeList.size()) _textureAttributeList.resize(unit+1); - return _textureAttributeList[unit]; - } - - int compareModes(const ModeList& lhs,const ModeList& rhs); - int compareAttributePtrs(const AttributeList& lhs,const AttributeList& rhs); - int compareAttributeContents(const AttributeList& lhs,const AttributeList& rhs); - - void setMode(ModeList& modeList,StateAttribute::GLMode mode, StateAttribute::GLModeValue value); - void setModeToInherit(ModeList& modeList,StateAttribute::GLMode mode); - StateAttribute::GLModeValue getMode(const ModeList& modeList,StateAttribute::GLMode mode) const; - - void setAttribute(AttributeList& attributeList,StateAttribute *attribute, const StateAttribute::OverrideValue value=StateAttribute::OFF); - - StateAttribute* getAttribute(AttributeList& attributeList,const StateAttribute::Type type, unsigned int member); - const StateAttribute* getAttribute(const AttributeList& attributeList,const StateAttribute::Type type, unsigned int member) const; - const RefAttributePair* getAttributePair(const AttributeList& attributeList,const StateAttribute::Type type, unsigned int member) const; - - int _renderingHint; - - RenderBinMode _binMode; - int _binNum; - std::string _binName; - bool _nestRenderBins; - - ref_ptr _updateCallback; - unsigned int _numChildrenRequiringUpdateTraversal; - void setNumChildrenRequiringUpdateTraversal(unsigned int num); - - ref_ptr _eventCallback; - unsigned int _numChildrenRequiringEventTraversal; - void setNumChildrenRequiringEventTraversal(unsigned int num); - -}; - -extern OSG_EXPORT bool isTextureMode(StateAttribute::GLMode mode); - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Stats b/libs/lib/mac32/include/osg/Stats deleted file mode 100644 index 0a4dc4ae0..000000000 --- a/libs/lib/mac32/include/osg/Stats +++ /dev/null @@ -1,125 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2007 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_STATS -#define OSG_STATS 1 - -#include -#include -#include - -#include -#include -#include -#include - -namespace osg { - -class OSG_EXPORT Stats : public osg::Referenced -{ - public: - - Stats(const std::string& name); - - Stats(const std::string& name, unsigned int numberOfFrames); - - void setName(const std::string& name) { _name = name; } - const std::string& getName() const { return _name; } - - void allocate(unsigned int numberOfFrames); - - unsigned int getEarliestFrameNumber() const { return _latestFrameNumber < static_cast(_attributeMapList.size()) ? 0 : _latestFrameNumber - static_cast(_attributeMapList.size()) + 1; } - unsigned int getLatestFrameNumber() const { return _latestFrameNumber; } - - typedef std::map AttributeMap; - typedef std::vector AttributeMapList; - - bool setAttribute(unsigned int frameNumber, const std::string& attributeName, double value); - - inline bool getAttribute(unsigned int frameNumber, const std::string& attributeName, double& value) const - { - OpenThreads::ScopedLock lock(_mutex); - return getAttributeNoMutex(frameNumber, attributeName, value); - } - - bool getAveragedAttribute(const std::string& attributeName, double& value, bool averageInInverseSpace=false) const; - - bool getAveragedAttribute(unsigned int startFrameNumber, unsigned int endFrameNumber, const std::string& attributeName, double& value, bool averageInInverseSpace=false) const; - - inline AttributeMap& getAttributeMap(unsigned int frameNumber) - { - OpenThreads::ScopedLock lock(_mutex); - return getAttributeMapNoMutex(frameNumber); - } - - inline const AttributeMap& getAttributeMap(unsigned int frameNumber) const - { - OpenThreads::ScopedLock lock(_mutex); - return getAttributeMapNoMutex(frameNumber); - } - - typedef std::map CollectMap; - - void collectStats(const std::string& str, bool flag) { _collectMap[str] = flag; } - - inline bool collectStats(const std::string& str) const - { - OpenThreads::ScopedLock lock(_mutex); - - CollectMap::const_iterator itr = _collectMap.find(str); - return (itr != _collectMap.end()) ? itr->second : false; - } - - void report(std::ostream& out, const char* indent=0) const; - void report(std::ostream& out, unsigned int frameNumber, const char* indent=0) const; - - protected: - - virtual ~Stats() {} - - bool getAttributeNoMutex(unsigned int frameNumber, const std::string& attributeName, double& value) const; - - AttributeMap& getAttributeMapNoMutex(unsigned int frameNumber); - const AttributeMap& getAttributeMapNoMutex(unsigned int frameNumber) const; - - - int getIndex(unsigned int frameNumber) const - { - // reject frame that are in the future - if (frameNumber > _latestFrameNumber) return -1; - - // reject frames that are too early - if (frameNumber < getEarliestFrameNumber()) return -1; - - if (frameNumber >= _baseFrameNumber) return frameNumber - _baseFrameNumber; - else return static_cast(_attributeMapList.size()) - (_baseFrameNumber-frameNumber); - } - - std::string _name; - - mutable OpenThreads::Mutex _mutex; - - unsigned int _baseFrameNumber; - unsigned int _latestFrameNumber; - - AttributeMapList _attributeMapList; - AttributeMap _invalidAttributeMap; - - CollectMap _collectMap; - -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Stencil b/libs/lib/mac32/include/osg/Stencil deleted file mode 100644 index 912586c2b..000000000 --- a/libs/lib/mac32/include/osg/Stencil +++ /dev/null @@ -1,228 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_STENCIL -#define OSG_STENCIL 1 - -#include - -namespace osg { - -#ifndef GL_INCR_WRAP -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#endif - - -/** Encapsulate OpenGL glStencilFunc/Op/Mask functions. -* -* All functionality except INCR_WRAP and DECR_WRAP is supported by OpenGL 1.1. -* INCR_WRAP an DECR_WRAP are available since OpenGL 1.4 or when -* GL_EXT_stencil_wrap extension is present. -* -* If INCR_WRAP or DECR_WRAP values are used while they are detected to be not supported, -* the INCR or DECR values are sent to OpenGL instead. Note: do not use Stencil::getFunction() -* to detect whether WRAP operations is used as the object's value is kept intact. -* Use osg::Stencil::getExtensions() method instead. -* -* OpenGL 2.0 introduced two side stenciling that is available through -* osg::StencilTwoSided class. -*/ -class OSG_EXPORT Stencil : public StateAttribute -{ - public : - - - Stencil(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Stencil(const Stencil& stencil,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(stencil,copyop), - _func(stencil._func), - _funcRef(stencil._funcRef), - _funcMask(stencil._funcMask), - _sfail(stencil._sfail), - _zfail(stencil._zfail), - _zpass(stencil._zpass), - _writeMask(stencil._writeMask) {} - - - META_StateAttribute(osg, Stencil, STENCIL); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Stencil,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_func) - COMPARE_StateAttribute_Parameter(_funcRef) - COMPARE_StateAttribute_Parameter(_funcMask) - COMPARE_StateAttribute_Parameter(_sfail) - COMPARE_StateAttribute_Parameter(_zfail) - COMPARE_StateAttribute_Parameter(_zpass) - COMPARE_StateAttribute_Parameter(_writeMask) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_STENCIL_TEST); - return true; - } - - enum Function - { - NEVER = GL_NEVER, - LESS = GL_LESS, - EQUAL = GL_EQUAL, - LEQUAL = GL_LEQUAL, - GREATER = GL_GREATER, - NOTEQUAL = GL_NOTEQUAL, - GEQUAL = GL_GEQUAL, - ALWAYS = GL_ALWAYS - }; - - inline void setFunction(Function func,int ref,unsigned int mask) - { - _func = func; - _funcRef = ref; - _funcMask = mask; - } - - inline void setFunction(Function func) { _func = func; } - inline Function getFunction() const { return _func; } - - inline void setFunctionRef(int ref) { _funcRef=ref; } - inline int getFunctionRef() const { return _funcRef; } - - inline void setFunctionMask(unsigned int mask) { _funcMask=mask; } - inline unsigned int getFunctionMask() const { return _funcMask; } - - - enum Operation - { - KEEP = GL_KEEP, - ZERO = GL_ZERO, - REPLACE = GL_REPLACE, - INCR = GL_INCR, - DECR = GL_DECR, - INVERT = GL_INVERT, - INCR_WRAP = GL_INCR_WRAP, - DECR_WRAP = GL_DECR_WRAP - }; - - /** set the operations to apply when the various stencil and depth - * tests fail or pass. First parameter is to control the operation - * when the stencil test fails. The second parameter is to control the - * operation when the stencil test passes, but depth test fails. The - * third parameter controls the operation when both the stencil test - * and depth pass. Ordering of parameter is the same as if using - * glStencilOp(,,).*/ - inline void setOperation(Operation sfail, Operation zfail, Operation zpass) - { - _sfail = sfail; - _zfail = zfail; - _zpass = zpass; - } - - /** set the operation when the stencil test fails.*/ - inline void setStencilFailOperation(Operation sfail) { _sfail = sfail; } - - /** get the operation when the stencil test fails.*/ - inline Operation getStencilFailOperation() const { return _sfail; } - - /** set the operation when the stencil test passes but the depth test fails.*/ - inline void setStencilPassAndDepthFailOperation(Operation zfail) { _zfail=zfail; } - - /** get the operation when the stencil test passes but the depth test fails.*/ - inline Operation getStencilPassAndDepthFailOperation() const { return _zfail; } - - /** set the operation when both the stencil test and the depth test pass.*/ - inline void setStencilPassAndDepthPassOperation(Operation zpass) { _zpass=zpass; } - - /** get the operation when both the stencil test and the depth test pass.*/ - inline Operation getStencilPassAndDepthPassOperation() const { return _zpass; } - - - inline void setWriteMask(unsigned int mask) { _writeMask = mask; } - - inline unsigned int getWriteMask() const { return _writeMask; } - - - virtual void apply(State& state) const; - - - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provide convenience wrappers to - * check for the extensions or use the associated functions. - */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setStencilWrapSupported(bool flag) { _isStencilWrapSupported = flag; } - bool isStencilWrapSupported() const { return _isStencilWrapSupported; } - - protected: - - ~Extensions() {} - - bool _isStencilWrapSupported; - }; - - /** Function to call to get the extension of a specified context. - * If the Extension object for that context has not yet been created - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object - * will only be created with the graphics context associated with ContextID. - */ - static Extensions* getExtensions(unsigned int contextID, bool createIfNotInitalized); - - /** The setExtensions method allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions. - */ - static void setExtensions(unsigned int contextID, Extensions* extensions); - - protected: - - virtual ~Stencil(); - - Function _func; - int _funcRef; - unsigned int _funcMask; - - Operation _sfail; - Operation _zfail; - Operation _zpass; - - unsigned int _writeMask; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/StencilTwoSided b/libs/lib/mac32/include/osg/StencilTwoSided deleted file mode 100644 index 8e5732d10..000000000 --- a/libs/lib/mac32/include/osg/StencilTwoSided +++ /dev/null @@ -1,231 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_STENCILTWOSIDED -#define OSG_STENCILTWOSIDED 1 - -#include - -namespace osg { - -#ifndef GL_STENCIL_TEST_TWO_SIDE -#define GL_STENCIL_TEST_TWO_SIDE 0x8910 -#endif - -/** Provides OpenGL two sided stencil functionality, also known as separate stencil. - * It enables to specify different stencil function for front and back facing polygons. - * Two sided stenciling is used usually to eliminate the need of two rendering passes - * when using standard stenciling functions. See also \sa osg::Stencil. - * - * Two sided stenciling is available since OpenGL 2.0. It is also supported by - * EXT_stencil_two_side extension especially on Nvidia cards. - * Another extension introduced by ATI is ATI_separate_stencil. However, ATI's extension - * is limited to have reference and mask value the same for both faces. - * ATI's extension is currently not supported by the current implementation. - * - * osg::StencilTwoSided does nothing if OpenGL 2.0 or EXT_stencil_two_side are not available. -*/ -class OSG_EXPORT StencilTwoSided : public StateAttribute -{ - public : - - - StencilTwoSided(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - StencilTwoSided(const StencilTwoSided& stencil,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, StencilTwoSided, STENCIL); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const; - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_STENCIL_TEST); - return true; - } - - enum Face - { - FRONT = 0, - BACK = 1 - }; - - enum Function - { - NEVER = GL_NEVER, - LESS = GL_LESS, - EQUAL = GL_EQUAL, - LEQUAL = GL_LEQUAL, - GREATER = GL_GREATER, - NOTEQUAL = GL_NOTEQUAL, - GEQUAL = GL_GEQUAL, - ALWAYS = GL_ALWAYS - }; - - inline void setFunction(Face face, Function func,int ref,unsigned int mask) - { - _func[face] = func; - _funcRef[face] = ref; - _funcMask[face] = mask; - } - - inline void setFunction(Face face, Function func) { _func[face] = func; } - inline Function getFunction(Face face) const { return _func[face]; } - - inline void setFunctionRef(Face face, int ref) { _funcRef[face]=ref; } - inline int getFunctionRef(Face face) const { return _funcRef[face]; } - - inline void setFunctionMask(Face face, unsigned int mask) { _funcMask[face]=mask; } - inline unsigned int getFunctionMask(Face face) const { return _funcMask[face]; } - - - enum Operation - { - KEEP = GL_KEEP, - ZERO = GL_ZERO, - REPLACE = GL_REPLACE, - INCR = GL_INCR, - DECR = GL_DECR, - INVERT = GL_INVERT, - INCR_WRAP = GL_INCR_WRAP, - DECR_WRAP = GL_DECR_WRAP - }; - - /** set the operations to apply when the various stencil and depth - * tests fail or pass. First parameter is to control the operation - * when the stencil test fails. The second parameter is to control the - * operation when the stencil test passes, but depth test fails. The - * third parameter controls the operation when both the stencil test - * and depth pass. Ordering of parameter is the same as if using - * glStencilOp(,,).*/ - inline void setOperation(Face face, Operation sfail, Operation zfail, Operation zpass) - { - _sfail[face] = sfail; - _zfail[face] = zfail; - _zpass[face] = zpass; - } - - /** set the operation when the stencil test fails.*/ - inline void setStencilFailOperation(Face face, Operation sfail) { _sfail[face] = sfail; } - - /** get the operation when the stencil test fails.*/ - inline Operation getStencilFailOperation(Face face) const { return _sfail[face]; } - - /** set the operation when the stencil test passes but the depth test fails.*/ - inline void setStencilPassAndDepthFailOperation(Face face, Operation zfail) { _zfail[face]=zfail; } - - /** get the operation when the stencil test passes but the depth test fails.*/ - inline Operation getStencilPassAndDepthFailOperation(Face face) const { return _zfail[face]; } - - /** set the operation when both the stencil test and the depth test pass.*/ - inline void setStencilPassAndDepthPassOperation(Face face, Operation zpass) { _zpass[face]=zpass; } - - /** get the operation when both the stencil test and the depth test pass.*/ - inline Operation getStencilPassAndDepthPassOperation(Face face) const { return _zpass[face]; } - - - inline void setWriteMask(Face face, unsigned int mask) { _writeMask[face] = mask; } - - inline unsigned int getWriteMask(Face face) const { return _writeMask[face]; } - - - virtual void apply(State& state) const; - - public: - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provide convenience wrappers to - * check for the extensions or use the associated functions. - */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setStencilTwoSidedSupported(bool flag) { _isStencilTwoSidedSupported=flag; } - bool isStencilTwoSidedSupported() const { return _isStencilTwoSidedSupported; } - void setOpenGL20Supported(bool flag) { _isOpenGL20Supported=flag; } - bool isOpenGL20Supported() const { return _isOpenGL20Supported; } - void setSeparateStencilSupported(bool flag) { _isSeparateStencilSupported=flag; } - bool isSeparateStencilSupported() const { return _isSeparateStencilSupported; } - - void glActiveStencilFace(GLenum face) const; - void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) const; - void glStencilMaskSeparate(GLenum face, GLuint mask) const; - void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) const; - void glStencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) const; - - protected: - - ~Extensions() {} - - bool _isStencilTwoSidedSupported; - bool _isOpenGL20Supported; - bool _isSeparateStencilSupported; - - typedef void (GL_APIENTRY * ActiveStencilFaceProc) (GLenum); - typedef void (GL_APIENTRY * StencilOpSeparate) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); - typedef void (GL_APIENTRY * StencilMaskSeparate) (GLenum face, GLuint mask); - typedef void (GL_APIENTRY * StencilFuncSeparate) (GLenum face, GLenum func, GLint ref, GLuint mask); - typedef void (GL_APIENTRY * StencilFuncSeparateATI) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); - - ActiveStencilFaceProc _glActiveStencilFace; - StencilOpSeparate _glStencilOpSeparate; - StencilMaskSeparate _glStencilMaskSeparate; - StencilFuncSeparate _glStencilFuncSeparate; - StencilFuncSeparate _glStencilFuncSeparateATI; - }; - - /** Function to call to get the extension of a specified context. - * If the Extension object for that context has not yet been created - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object - * will only be created with the graphics context associated with ContextID. - */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** The setExtensions method allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions. - */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected: - - virtual ~StencilTwoSided(); - - Function _func[2]; - int _funcRef[2]; - unsigned int _funcMask[2]; - - Operation _sfail[2]; - Operation _zfail[2]; - Operation _zpass[2]; - - unsigned int _writeMask[2]; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Switch b/libs/lib/mac32/include/osg/Switch deleted file mode 100644 index d8c0ca431..000000000 --- a/libs/lib/mac32/include/osg/Switch +++ /dev/null @@ -1,98 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_SWITCH -#define OSG_SWITCH 1 - -#include - -namespace osg { - -/** Switch is a Group node that allows switching between children. - * Typical uses would be for objects which might need to be rendered - * differently at different times, for instance a switch could be used - * to represent the different states of a traffic light. -*/ -class OSG_EXPORT Switch : public Group -{ - public : - - - Switch(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Switch(const Switch&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual Switch* asSwitch() { return this; } - virtual const Switch* asSwitch() const { return this; } - - - META_Node(osg, Switch); - - virtual void traverse(NodeVisitor& nv); - - void setNewChildDefaultValue(bool value) { _newChildDefaultValue = value; } - - bool getNewChildDefaultValue() const { return _newChildDefaultValue; } - - virtual bool addChild( Node *child ); - - virtual bool addChild( Node *child, bool value ); - - virtual bool insertChild( unsigned int index, Node *child ); - - virtual bool insertChild( unsigned int index, Node *child, bool value ); - - virtual bool removeChildren(unsigned int pos,unsigned int numChildrenToRemove); - - - void setValue(unsigned int pos,bool value); - - bool getValue(unsigned int pos) const; - - void setChildValue(const Node* child,bool value); - - bool getChildValue(const Node* child) const; - - /** Set all the children off (false), and set the new default child - * value to off (false). */ - bool setAllChildrenOff(); - - /** Set all the children on (true), and set the new default child - * value to on (true). */ - bool setAllChildrenOn(); - - /** Set a single child on, switch off all other children. */ - bool setSingleChildOn(unsigned int pos); - - - typedef std::vector ValueList; - - void setValueList(const ValueList& values) { _values=values; } - - const ValueList& getValueList() const { return _values; } - - virtual BoundingSphere computeBound() const; - - protected : - - virtual ~Switch() {} - - // This is effectively a bit mask. - bool _newChildDefaultValue; - ValueList _values; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TemplatePrimitiveFunctor b/libs/lib/mac32/include/osg/TemplatePrimitiveFunctor deleted file mode 100644 index 699e0c817..000000000 --- a/libs/lib/mac32/include/osg/TemplatePrimitiveFunctor +++ /dev/null @@ -1,317 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TERMPLATEPRIMITIVEFUNCTOR -#define OSG_TERMPLATEPRIMITIVEFUNCTOR 1 - -#include -#include - -namespace osg { - - - /** Provides access to the primitives that compose an \c osg::Drawable. - *

Notice that \c TemplatePrimitiveFunctor is a class template, and that it inherits - * from its template parameter \c T. This template parameter must implement - * operator()(const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 - * v3, bool treatVertexDataAsTemporary), - * operator()(const osg::Vec3 v1, const osg::Vec3 v2, bool - * treatVertexDataAsTemporary), operator()(const osg::Vec3 v1, - * const osg::Vec3 v2, const osg::Vec3 v3, bool treatVertexDataAsTemporary), - * and operator()(const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 v3, - * const osg::Vec3 v4, bool treatVertexDataAsTemporary) which will be called - * for the matching primitive when the functor is applied to a \c Drawable. - * Parameters \c v1, \c v2, \c v3, and \c v4 are the vertices of the primitive. - * The last parameter, \c treatVertexDataAsTemporary, indicates whether these - * vertices are coming from a "real" vertex array, or from a temporary vertex array, - * created by the \c TemplatePrimitiveFunctor from some other geometry representation. - * @see \c PrimitiveFunctor for general usage hints. - */ - template - class TemplatePrimitiveFunctor : public PrimitiveFunctor, public T - { - public: - - TemplatePrimitiveFunctor() - { - _vertexArraySize=0; - _vertexArrayPtr=0; - _modeCache=0; - _treatVertexDataAsTemporary=false; - } - - virtual ~TemplatePrimitiveFunctor() {} - - void setTreatVertexDataAsTemporary(bool treatVertexDataAsTemporary) { _treatVertexDataAsTemporary=treatVertexDataAsTemporary; } - bool getTreatVertexDataAsTemporary() const { return _treatVertexDataAsTemporary; } - - virtual void setVertexArray(unsigned int,const Vec2*) - { - notify(WARN)<<"Triangle Functor does not support Vec2* vertex arrays"<operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); - break; - } - case(GL_TRIANGLE_STRIP): { - const Vec3* vptr = &_vertexArrayPtr[first]; - for(GLsizei i=2;ioperator()(*(vptr),*(vptr+2),*(vptr+1),_treatVertexDataAsTemporary); - else this->operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUADS): { - const Vec3* vptr = &_vertexArrayPtr[first]; - for(GLsizei i=3;ioperator()(*(vptr),*(vptr+1),*(vptr+2),*(vptr+3),_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUAD_STRIP): { - const Vec3* vptr = &_vertexArrayPtr[first]; - for(GLsizei i=3;ioperator()(*(vptr),*(vptr+1),*(vptr+3),*(vptr+2),_treatVertexDataAsTemporary); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): { - const Vec3* vfirst = &_vertexArrayPtr[first]; - const Vec3* vptr = vfirst+1; - for(GLsizei i=2;ioperator()(*(vfirst),*(vptr),*(vptr+1),_treatVertexDataAsTemporary); - } - break; - } - case(GL_POINTS): { - const Vec3* vlast = &_vertexArrayPtr[first+count]; - for(const Vec3* vptr=&_vertexArrayPtr[first];vptroperator()(*(vptr),_treatVertexDataAsTemporary); - break; - } - case(GL_LINES): { - const Vec3* vlast = &_vertexArrayPtr[first+count-1]; - for(const Vec3* vptr=&_vertexArrayPtr[first];vptroperator()(*(vptr),*(vptr+1),_treatVertexDataAsTemporary); - break; - } - case(GL_LINE_STRIP): { - const Vec3* vlast = &_vertexArrayPtr[first+count-1]; - for(const Vec3* vptr=&_vertexArrayPtr[first];vptroperator()(*(vptr),*(vptr+1),_treatVertexDataAsTemporary); - break; - } - case(GL_LINE_LOOP): { - const Vec3* vlast = &_vertexArrayPtr[first+count-1]; - for(const Vec3* vptr=&_vertexArrayPtr[first];vptroperator()(*(vptr),*(vptr+1),_treatVertexDataAsTemporary); - this->operator()(*(vlast),_vertexArrayPtr[first],_treatVertexDataAsTemporary); - break; - } - default: - break; - } - } - - template - void drawElementsTemplate(GLenum mode,GLsizei count,const IndexType* indices) - { - if (indices==0 || count==0) return; - - typedef const IndexType* IndexPointer; - - switch(mode) - { - case(GL_TRIANGLES): { - IndexPointer ilast = &indices[count]; - for(IndexPointer iptr=indices;iptroperator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - break; - } - case(GL_TRIANGLE_STRIP): { - IndexPointer iptr = indices; - for(GLsizei i=2;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)], - _vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)], - _vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUADS): { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)], - _vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)], - _treatVertexDataAsTemporary); - } - break; - } - case(GL_QUAD_STRIP): { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)], - _vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)], - _treatVertexDataAsTemporary); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): { - IndexPointer iptr = indices; - const Vec3& vfirst = _vertexArrayPtr[*iptr]; - ++iptr; - for(GLsizei i=2;ioperator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)], - _treatVertexDataAsTemporary); - } - break; - } - case(GL_POINTS): { - IndexPointer ilast = &indices[count]; - for(IndexPointer iptr=indices;iptroperator()(_vertexArrayPtr[*iptr],_treatVertexDataAsTemporary); - break; - } - case(GL_LINES): { - IndexPointer ilast = &indices[count-1]; - for(IndexPointer iptr=indices;iptroperator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)], - _treatVertexDataAsTemporary); - break; - } - case(GL_LINE_STRIP): { - IndexPointer ilast = &indices[count-1]; - for(IndexPointer iptr=indices;iptroperator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)], - _treatVertexDataAsTemporary); - break; - } - case(GL_LINE_LOOP): { - IndexPointer ilast = &indices[count-1]; - for(IndexPointer iptr=indices;iptroperator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)], - _treatVertexDataAsTemporary); - this->operator()(_vertexArrayPtr[*(ilast)],_vertexArrayPtr[indices[0]], - _treatVertexDataAsTemporary); - break; - } - default: - break; - } - } - - - virtual void drawElements(GLenum mode,GLsizei count,const GLubyte* indices) - { - drawElementsTemplate(mode, count, indices); - } - - virtual void drawElements(GLenum mode,GLsizei count,const GLushort* indices) - { - drawElementsTemplate(mode, count, indices); - } - - virtual void drawElements(GLenum mode,GLsizei count,const GLuint* indices) - { - drawElementsTemplate(mode, count, indices); - } - - /** Note: - * begin(..),vertex(..) & end() are convenience methods for adapting - * non vertex array primitives to vertex array based primitives. - * This is done to simplify the implementation of primitive functor - * subclasses - users only need override drawArray and drawElements. - */ - virtual void begin(GLenum mode) - { - _modeCache = mode; - _vertexCache.clear(); - } - - virtual void vertex(const Vec2& vert) { _vertexCache.push_back(osg::Vec3(vert[0],vert[1],0.0f)); } - virtual void vertex(const Vec3& vert) { _vertexCache.push_back(vert); } - virtual void vertex(const Vec4& vert) { _vertexCache.push_back(osg::Vec3(vert[0],vert[1],vert[2])/vert[3]); } - virtual void vertex(float x,float y) { _vertexCache.push_back(osg::Vec3(x,y,0.0f)); } - virtual void vertex(float x,float y,float z) { _vertexCache.push_back(osg::Vec3(x,y,z)); } - virtual void vertex(float x,float y,float z,float w) { _vertexCache.push_back(osg::Vec3(x,y,z)/w); } - virtual void end() - { - if (!_vertexCache.empty()) - { - setVertexArray(_vertexCache.size(),&_vertexCache.front()); - _treatVertexDataAsTemporary = true; - drawArrays(_modeCache,0,_vertexCache.size()); - } - } - - protected: - - - unsigned int _vertexArraySize; - const Vec3* _vertexArrayPtr; - - GLenum _modeCache; - std::vector _vertexCache; - bool _treatVertexDataAsTemporary; - }; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TexEnv b/libs/lib/mac32/include/osg/TexEnv deleted file mode 100644 index 47dd8c20d..000000000 --- a/libs/lib/mac32/include/osg/TexEnv +++ /dev/null @@ -1,95 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXENV -#define OSG_TEXENV 1 - -#include -#include -#include - -#ifndef OSG_GL_FIXED_FUNCTION_AVAILABLE - #define GL_MODULATE 0x2100 - #define GL_ADD 0x0104 - #define GL_MODULATE 0x2100 - #define GL_DECAL 0x2101 -#endif - -namespace osg { - -/** TexEnv encapsulates the OpenGL glTexEnv (texture environment) state. -*/ -class OSG_EXPORT TexEnv : public StateAttribute -{ - public : - - enum Mode { - DECAL = GL_DECAL, - MODULATE = GL_MODULATE, - BLEND = GL_BLEND, - REPLACE = GL_REPLACE, - ADD = GL_ADD - }; - - TexEnv(Mode mode=MODULATE); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - TexEnv(const TexEnv& texenv,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(texenv,copyop), - _mode(texenv._mode), - _color(texenv._color) {} - - - META_StateAttribute(osg, TexEnv, TEXENV); - - virtual bool isTextureAttribute() const { return true; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(TexEnv,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_mode) - COMPARE_StateAttribute_Parameter(_color) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - - void setMode( Mode mode ) { _mode = mode; } - - Mode getMode() const { return _mode; } - - void setColor( const Vec4& color ) { _color = color; } - - Vec4& getColor() { return _color; } - - const Vec4& getColor() const { return _color; } - - - virtual void apply(State& state) const; - - protected : - - virtual ~TexEnv( void ); - - Mode _mode; - osg::Vec4 _color; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TexEnvCombine b/libs/lib/mac32/include/osg/TexEnvCombine deleted file mode 100644 index 47992340a..000000000 --- a/libs/lib/mac32/include/osg/TexEnvCombine +++ /dev/null @@ -1,287 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXENVCOMBINE -#define OSG_TEXENVCOMBINE 1 - -#include -#include -#include - -// If not defined by gl.h use the definition found in: -// http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_env_combine.txt -#ifndef GL_ARB_texture_env_combine -#define GL_COMBINE_ARB 0x8570 -#define GL_COMBINE_RGB_ARB 0x8571 -#define GL_COMBINE_ALPHA_ARB 0x8572 -#define GL_SOURCE0_RGB_ARB 0x8580 -#define GL_SOURCE1_RGB_ARB 0x8581 -#define GL_SOURCE2_RGB_ARB 0x8582 -#define GL_SOURCE0_ALPHA_ARB 0x8588 -#define GL_SOURCE1_ALPHA_ARB 0x8589 -#define GL_SOURCE2_ALPHA_ARB 0x858A -#define GL_OPERAND0_RGB_ARB 0x8590 -#define GL_OPERAND1_RGB_ARB 0x8591 -#define GL_OPERAND2_RGB_ARB 0x8592 -#define GL_OPERAND0_ALPHA_ARB 0x8598 -#define GL_OPERAND1_ALPHA_ARB 0x8599 -#define GL_OPERAND2_ALPHA_ARB 0x859A -#define GL_RGB_SCALE_ARB 0x8573 -#define GL_ADD_SIGNED_ARB 0x8574 -#define GL_INTERPOLATE_ARB 0x8575 -#define GL_SUBTRACT_ARB 0x84E7 -#define GL_CONSTANT_ARB 0x8576 -#define GL_PRIMARY_COLOR_ARB 0x8577 -#define GL_PREVIOUS_ARB 0x8578 -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_DOT3_RGB_ARB 0x86AE -#define GL_DOT3_RGBA_ARB 0x86AF -#endif - -#ifndef GL_TEXTURE0 -#define GL_TEXTURE0 0x84C0 -#endif - -namespace osg { - -/** TexEnvCombine encapsulates the OpenGL glTexEnvCombine (texture - * environment) state. */ -class OSG_EXPORT TexEnvCombine : public StateAttribute -{ - public : - - TexEnvCombine(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - TexEnvCombine(const TexEnvCombine& texenv,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(texenv,copyop), - _needsTexEnvCrossbar(texenv._needsTexEnvCrossbar), - _combine_RGB(texenv._combine_RGB), - _combine_Alpha(texenv._combine_Alpha), - _source0_RGB(texenv._source0_RGB), - _source1_RGB(texenv._source1_RGB), - _source2_RGB(texenv._source2_RGB), - _source0_Alpha(texenv._source0_Alpha), - _source1_Alpha(texenv._source1_Alpha), - _source2_Alpha(texenv._source2_Alpha), - _operand0_RGB(texenv._operand0_RGB), - _operand1_RGB(texenv._operand1_RGB), - _operand2_RGB(texenv._operand2_RGB), - _operand0_Alpha(texenv._operand0_Alpha), - _operand1_Alpha(texenv._operand1_Alpha), - _operand2_Alpha(texenv._operand2_Alpha), - _scale_RGB(texenv._scale_RGB), - _scale_Alpha(texenv._scale_Alpha), - _constantColor(texenv._constantColor) {} - - - META_StateAttribute(osg, TexEnvCombine, TEXENV); - - - virtual bool isTextureAttribute() const { return true; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_parameter macros below. - COMPARE_StateAttribute_Types(TexEnvCombine,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_needsTexEnvCrossbar) - COMPARE_StateAttribute_Parameter(_combine_RGB) - COMPARE_StateAttribute_Parameter(_combine_Alpha) - COMPARE_StateAttribute_Parameter(_source0_RGB) - COMPARE_StateAttribute_Parameter(_source1_RGB) - COMPARE_StateAttribute_Parameter(_source2_RGB) - COMPARE_StateAttribute_Parameter(_source0_Alpha) - COMPARE_StateAttribute_Parameter(_source1_Alpha) - COMPARE_StateAttribute_Parameter(_source2_Alpha) - COMPARE_StateAttribute_Parameter(_operand0_RGB) - COMPARE_StateAttribute_Parameter(_operand1_RGB) - COMPARE_StateAttribute_Parameter(_operand2_RGB) - COMPARE_StateAttribute_Parameter(_operand0_Alpha) - COMPARE_StateAttribute_Parameter(_operand1_Alpha) - COMPARE_StateAttribute_Parameter(_operand2_Alpha) - COMPARE_StateAttribute_Parameter(_scale_RGB) - COMPARE_StateAttribute_Parameter(_scale_Alpha) - COMPARE_StateAttribute_Parameter(_constantColor) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - - enum CombineParam - { - REPLACE = GL_REPLACE, - MODULATE = GL_MODULATE, - ADD = GL_ADD, - ADD_SIGNED = GL_ADD_SIGNED_ARB, - INTERPOLATE = GL_INTERPOLATE_ARB, - SUBTRACT = GL_SUBTRACT_ARB, - DOT3_RGB = GL_DOT3_RGB_ARB, - DOT3_RGBA = GL_DOT3_RGBA_ARB - }; - - void setCombine_RGB(GLint cm); - void setCombine_Alpha(GLint cm); - - GLint getCombine_RGB() const { return _combine_RGB; } - GLint getCombine_Alpha() const { return _combine_Alpha; } - - enum SourceParam - { - CONSTANT = GL_CONSTANT_ARB, - PRIMARY_COLOR = GL_PRIMARY_COLOR_ARB, - PREVIOUS = GL_PREVIOUS_ARB, - TEXTURE = GL_TEXTURE, - TEXTURE0 = GL_TEXTURE0, - TEXTURE1 = GL_TEXTURE0+1, - TEXTURE2 = GL_TEXTURE0+2, - TEXTURE3 = GL_TEXTURE0+3, - TEXTURE4 = GL_TEXTURE0+4, - TEXTURE5 = GL_TEXTURE0+5, - TEXTURE6 = GL_TEXTURE0+6, - TEXTURE7 = GL_TEXTURE0+7 - }; - - void setSource0_RGB(GLint sp); - void setSource1_RGB(GLint sp); - void setSource2_RGB(GLint sp); - - void setSource0_Alpha(GLint sp); - void setSource1_Alpha(GLint sp); - void setSource2_Alpha(GLint sp); - - GLint getSource0_RGB() const { return _source0_RGB; } - GLint getSource1_RGB() const { return _source1_RGB; } - GLint getSource2_RGB() const { return _source2_RGB; } - - GLint getSource0_Alpha() const { return _source0_Alpha; } - GLint getSource1_Alpha() const { return _source1_Alpha; } - GLint getSource2_Alpha() const { return _source2_Alpha; } - - enum OperandParam - { - SRC_COLOR = GL_SRC_COLOR, - ONE_MINUS_SRC_COLOR = GL_ONE_MINUS_SRC_COLOR, - SRC_ALPHA = GL_SRC_ALPHA, - ONE_MINUS_SRC_ALPHA = GL_ONE_MINUS_SRC_ALPHA - }; - - void setOperand0_RGB(GLint op); - void setOperand1_RGB(GLint op); - void setOperand2_RGB(GLint op); - - void setOperand0_Alpha(GLint op); - void setOperand1_Alpha(GLint op); - void setOperand2_Alpha(GLint op); - - GLint getOperand0_RGB() const { return _operand0_RGB; } - GLint getOperand1_RGB() const { return _operand1_RGB; } - GLint getOperand2_RGB() const { return _operand2_RGB; } - - GLint getOperand0_Alpha() const { return _operand0_Alpha; } - GLint getOperand1_Alpha() const { return _operand1_Alpha; } - GLint getOperand2_Alpha() const { return _operand2_Alpha; } - - - void setScale_RGB(float scale); - void setScale_Alpha(float scale); - - float getScale_RGB() const { return _scale_RGB; } - float getScale_Alpha() const { return _scale_Alpha; } - - void setConstantColor( const Vec4& color ) { _constantColor = color; } - const Vec4& getConstantColor() const { return _constantColor; } - - /** Set the constant color attribute to the given light direction - * for use with DOT3 combine operation. */ - void setConstantColorAsLightDirection(const Vec3& direction) - { - _constantColor.set((direction.x()+1.0f)*0.5f,(direction.y()+1.0f)*0.5f,(direction.z()+1.0f)*0.5f,1.0f); - } - - Vec3 getConstantColorAsLightDirection() const - { - return Vec3(_constantColor.x()*2.0f-1.0f, _constantColor.y()*2.0f-1.0f, _constantColor.z()*2.0f-1.0f); - } - - virtual void apply(State& state) const; - - protected : - - virtual ~TexEnvCombine(); - - inline bool needsTexEnvCombiner(GLint value) const - { - switch(value) - { - case(CONSTANT): - case(PRIMARY_COLOR): - case(PREVIOUS): - case(TEXTURE): - return false; - } - return true; - } - - void computeNeedForTexEnvCombiners() - { - _needsTexEnvCrossbar = (needsTexEnvCombiner(_source0_RGB) || - needsTexEnvCombiner(_source1_RGB) || - needsTexEnvCombiner(_source2_RGB) || - needsTexEnvCombiner(_source0_Alpha) || - needsTexEnvCombiner(_source1_Alpha) || - needsTexEnvCombiner(_source2_Alpha)); - } - - - - - - bool _needsTexEnvCrossbar; - - GLint _combine_RGB; - GLint _combine_Alpha; - - GLint _source0_RGB; - GLint _source1_RGB; - GLint _source2_RGB; - - GLint _source0_Alpha; - GLint _source1_Alpha; - GLint _source2_Alpha; - - - GLint _operand0_RGB; - GLint _operand1_RGB; - GLint _operand2_RGB; - - GLint _operand0_Alpha; - GLint _operand1_Alpha; - GLint _operand2_Alpha; - - - float _scale_RGB; - float _scale_Alpha; - - osg::Vec4 _constantColor; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TexEnvFilter b/libs/lib/mac32/include/osg/TexEnvFilter deleted file mode 100644 index cffce29bc..000000000 --- a/libs/lib/mac32/include/osg/TexEnvFilter +++ /dev/null @@ -1,70 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXENVFILTER -#define OSG_TEXENVFILTER 1 - -#include -#include - -#ifndef GL_EXT_texture_lod_bias -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif - -namespace osg { - -/** TexEnvFilter - encapsulates the OpenGL glTexEnv (GL_TEXTURE_FILTER_CONTROL) state.*/ -class OSG_EXPORT TexEnvFilter : public StateAttribute -{ - public: - TexEnvFilter(float lodBias = 0.0f); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - TexEnvFilter(const TexEnvFilter& texenv,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(texenv,copyop), - _lodBias(texenv._lodBias) {} - - META_StateAttribute(osg, TexEnvFilter, TEXENVFILTER); - - virtual bool isTextureAttribute() const { return true; } - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(TexEnvFilter, sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_lodBias) - - return 0; // passed all the above comparison macros, must be equal. - } - - void setLodBias( float lodBias ) { _lodBias = lodBias; } - - float getLodBias() const { return _lodBias; } - - virtual void apply(State& state) const; - - protected: - virtual ~TexEnvFilter(); - - float _lodBias; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TexGen b/libs/lib/mac32/include/osg/TexGen deleted file mode 100644 index 1d77e7654..000000000 --- a/libs/lib/mac32/include/osg/TexGen +++ /dev/null @@ -1,142 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXGEN -#define OSG_TEXGEN 1 - -#include -#include - -#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) - #define GL_OBJECT_LINEAR 0x2401 - #define GL_EYE_LINEAR 0x2400 - #define GL_SPHERE_MAP 0x2402 - #define GL_TEXTURE_GEN_S 0x0C60 - #define GL_TEXTURE_GEN_T 0x0C61 - #define GL_TEXTURE_GEN_R 0x0C62 - #define GL_TEXTURE_GEN_Q 0x0C63 -#endif - -#ifndef GL_NORMAL_MAP_ARB - #define GL_NORMAL_MAP_ARB 0x8511 -#endif - -#ifndef GL_REFLECTION_MAP_ARB - #define GL_REFLECTION_MAP_ARB 0x8512 -#endif - -namespace osg { - -/** TexGen encapsulates the OpenGL glTexGen (texture coordinate generation) - * state.*/ -class OSG_EXPORT TexGen : public StateAttribute -{ - public : - - TexGen(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - TexGen(const TexGen& texgen,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(texgen,copyop), - _mode(texgen._mode), - _plane_s(texgen._plane_s), - _plane_t(texgen._plane_t), - _plane_r(texgen._plane_r), - _plane_q(texgen._plane_q) {} - - META_StateAttribute(osg, TexGen, TEXGEN); - - virtual bool isTextureAttribute() const { return true; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(TexGen,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_mode) - COMPARE_StateAttribute_Parameter(_plane_s) - COMPARE_StateAttribute_Parameter(_plane_t) - COMPARE_StateAttribute_Parameter(_plane_r) - COMPARE_StateAttribute_Parameter(_plane_q) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesTextureMode(GL_TEXTURE_GEN_S); - usage.usesTextureMode(GL_TEXTURE_GEN_T); - - // Not happy with turning all tex gen parameters on - // as the OSG currently only supports 2D textures and therefore - // only S and T will be required, R&Q would be redundant... - // So commenting out the following until OSG supports 3D textures. - // I plan to revamp the OpenGL state management later so will - // tidy up then. Robert Osfield. Jan 2001. - - // The tidy up is now happening, but will have a think before - // resolving the below parameters. - - usage.usesTextureMode(GL_TEXTURE_GEN_R); - usage.usesTextureMode(GL_TEXTURE_GEN_Q); - return true; - } - - virtual void apply(State& state) const; - - enum Mode { - OBJECT_LINEAR = GL_OBJECT_LINEAR, - EYE_LINEAR = GL_EYE_LINEAR, - SPHERE_MAP = GL_SPHERE_MAP, - NORMAL_MAP = GL_NORMAL_MAP_ARB, - REFLECTION_MAP = GL_REFLECTION_MAP_ARB - }; - - inline void setMode( Mode mode ) { _mode = mode; } - - Mode getMode() const { return _mode; } - - enum Coord { - S, T, R, Q - }; - - void setPlane(Coord which, const Plane& plane); - - Plane& getPlane(Coord which); - - const Plane& getPlane(Coord which) const; - - /** Set the tex gen planes from specified matrix. - * Typical usage would be to pass in a projection - * matrix to set up projective texturing. - */ - void setPlanesFromMatrix(const Matrixd& matrix); - - protected : - - virtual ~TexGen( void ); - - Mode _mode; - - /** Additional texgen coefficients for GL_OBJECT_PLANE or - * GL_EYE_PLANE, */ - Plane _plane_s, _plane_t, _plane_r, _plane_q; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TexGenNode b/libs/lib/mac32/include/osg/TexGenNode deleted file mode 100644 index 1f5cd21be..000000000 --- a/libs/lib/mac32/include/osg/TexGenNode +++ /dev/null @@ -1,78 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TexGenNode -#define OSG_TexGenNode 1 - -#include -#include - -namespace osg { - -/** Node for defining the position of TexGen in the scene. */ -class OSG_EXPORT TexGenNode : public Group -{ - - public: - - TexGenNode(); - TexGenNode(TexGen* texgen); - - TexGenNode(const TexGenNode& tgb, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, TexGenNode); - - - enum ReferenceFrame - { - RELATIVE_RF, - ABSOLUTE_RF - }; - - /** Set the TexGenNode's ReferenceFrame, either to be relative to its - * parent reference frame. */ - void setReferenceFrame(ReferenceFrame rf); - - /** Get the TexGenNode's ReferenceFrame.*/ - ReferenceFrame getReferenceFrame() const { return _referenceFrame; } - - /** Set the texture unit that this TexGenNode is associated with.*/ - void setTextureUnit(unsigned int textureUnit) { _textureUnit = textureUnit; } - - unsigned int getTextureUnit() const { return _textureUnit; } - - /** Set the TexGen. */ - void setTexGen(TexGen* texgen); - - /** Get the TexGen. */ - inline TexGen* getTexGen() { return _texgen.get(); } - - /** Get the const TexGen. */ - inline const TexGen* getTexGen() const { return _texgen.get(); } - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - protected: - - virtual ~TexGenNode(); - - unsigned int _textureUnit; - osg::ref_ptr _texgen; - - ReferenceFrame _referenceFrame; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TexMat b/libs/lib/mac32/include/osg/TexMat deleted file mode 100644 index 0413f3bf5..000000000 --- a/libs/lib/mac32/include/osg/TexMat +++ /dev/null @@ -1,89 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXMAT -#define OSG_TEXMAT 1 - -#include -#include - -namespace osg { - -/** A texture matrix state class that encapsulates OpenGL texture matrix - * functionality. */ -class OSG_EXPORT TexMat : public StateAttribute -{ - public : - - TexMat(); - - TexMat(const Matrix& matrix):_matrix(matrix),_scaleByTextureRectangleSize(false) {} - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - TexMat(const TexMat& texmat,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(texmat,copyop), - _matrix(texmat._matrix), - _scaleByTextureRectangleSize(texmat._scaleByTextureRectangleSize) {} - - META_StateAttribute(osg, TexMat, TEXMAT); - - virtual bool isTextureAttribute() const { return true; } - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // Check for equal types, then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(TexMat,sa) - - // Compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_matrix) - - return 0; // Passed all the above comparison macros, so must be equal. - } - - /** Set the texture matrix */ - inline void setMatrix(const Matrix& matrix) { _matrix = matrix; } - - /** Get the texture matrix */ - inline Matrix& getMatrix() { return _matrix; } - - /** Get the const texture matrix */ - inline const Matrix& getMatrix() const { return _matrix; } - - /** Switch on/off the post scaling of the TexMat matrix by the size of the last applied texture rectangle. - * Use a TexMat alongside a TextureRectangle with this scaling applied allows one to treat a TextureRectnagles texture coordinate - * range as if it were the usual non dimensional 0.0 to 1.0 range. - * Note, the TexMat matrix itself is not modified by the post scaling, its purely an operation passed to OpenGL to do the post scaling once the - * the TexMat matrix has been loaded.*/ - void setScaleByTextureRectangleSize(bool flag) { _scaleByTextureRectangleSize = flag; } - - /** Get whether the post scaling of the TexMat matrix, by the size of the last applied texture rectangle, is switched on/off.*/ - bool getScaleByTextureRectangleSize() const { return _scaleByTextureRectangleSize; } - - /** Apply texture matrix to OpenGL state. */ - virtual void apply(State& state) const; - - protected: - - virtual ~TexMat( void ); - - Matrix _matrix; - bool _scaleByTextureRectangleSize; - -}; - -} - - -#endif diff --git a/libs/lib/mac32/include/osg/Texture b/libs/lib/mac32/include/osg/Texture deleted file mode 100644 index 119c3cae8..000000000 --- a/libs/lib/mac32/include/osg/Texture +++ /dev/null @@ -1,1284 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXTURE -#define OSG_TEXTURE 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -// If not defined by gl.h use the definition found in: -// http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_filter_anisotropic.txt -#ifndef GL_TEXTURE_MAX_ANISOTROPY_EXT - #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#endif - -#ifndef GL_ARB_texture_compression - #define GL_COMPRESSED_ALPHA_ARB 0x84E9 - #define GL_COMPRESSED_LUMINANCE_ARB 0x84EA - #define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB - #define GL_COMPRESSED_INTENSITY_ARB 0x84EC - #define GL_COMPRESSED_RGB_ARB 0x84ED - #define GL_COMPRESSED_RGBA_ARB 0x84EE - #define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF - #define GL_TEXTURE_COMPRESSED_ARB 0x86A1 - #define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 - #define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 -#endif - -#ifndef GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB - #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 -#endif - -#ifndef GL_EXT_texture_compression_s3tc - #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 - #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 - #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 - #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 -#endif - -#ifndef GL_EXT_texture_compression_rgtc - #define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB - #define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC - #define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD - #define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE -#endif - -#ifndef GL_IMG_texture_compression_pvrtc - #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 - #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 - #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 - #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif - -#ifndef GL_OES_compressed_ETC1_RGB8_texture - #define GL_ETC1_RGB8_OES 0x8D64 -#endif - -#ifndef GL_ARB_INTERNAL_TEXTURE_FORMAT - #define GL_RGBA32F_ARB 0x8814 - #define GL_RGB32F_ARB 0x8815 - #define GL_ALPHA32F_ARB 0x8816 - #define GL_INTENSITY32F_ARB 0x8817 - #define GL_LUMINANCE32F_ARB 0x8818 - #define GL_LUMINANCE_ALPHA32F_ARB 0x8819 - #define GL_RGBA16F_ARB 0x881A - #define GL_RGB16F_ARB 0x881B - #define GL_ALPHA16F_ARB 0x881C - #define GL_INTENSITY16F_ARB 0x881D - #define GL_LUMINANCE16F_ARB 0x881E - #define GL_LUMINANCE_ALPHA16F_ARB 0x881F -#endif - -#ifndef GL_ARB_PIXEL_DATA - #define GL_HALF_FLOAT_ARB 0x140B -#endif - -#ifndef GL_NV_texture_shader - #define GL_HILO_NV 0x86F4 - #define GL_DSDT_NV 0x86F5 - #define GL_DSDT_MAG_NV 0x86F6 - #define GL_DSDT_MAG_VIB_NV 0x86F7 - #define GL_HILO16_NV 0x86F8 - #define GL_SIGNED_HILO_NV 0x86F9 - #define GL_SIGNED_HILO16_NV 0x86FA - #define GL_SIGNED_RGBA_NV 0x86FB - #define GL_SIGNED_RGBA8_NV 0x86FC - #define GL_SIGNED_RGB_NV 0x86FE - #define GL_SIGNED_RGB8_NV 0x86FF - #define GL_SIGNED_LUMINANCE_NV 0x8701 - #define GL_SIGNED_LUMINANCE8_NV 0x8702 - #define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 - #define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 - #define GL_SIGNED_ALPHA_NV 0x8705 - #define GL_SIGNED_ALPHA8_NV 0x8706 - #define GL_SIGNED_INTENSITY_NV 0x8707 - #define GL_SIGNED_INTENSITY8_NV 0x8708 - #define GL_DSDT8_NV 0x8709 - #define GL_DSDT8_MAG8_NV 0x870A - #define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B - #define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C - #define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#endif - -#ifndef GL_NV_float_buffer - #define GL_FLOAT_R_NV 0x8880 - #define GL_FLOAT_RG_NV 0x8881 - #define GL_FLOAT_RGB_NV 0x8882 - #define GL_FLOAT_RGBA_NV 0x8883 - #define GL_FLOAT_R16_NV 0x8884 - #define GL_FLOAT_R32_NV 0x8885 - #define GL_FLOAT_RG16_NV 0x8886 - #define GL_FLOAT_RG32_NV 0x8887 - #define GL_FLOAT_RGB16_NV 0x8888 - #define GL_FLOAT_RGB32_NV 0x8889 - #define GL_FLOAT_RGBA16_NV 0x888A - #define GL_FLOAT_RGBA32_NV 0x888B -#endif - -#ifndef GL_NV_half_float - #define GL_HALF_FLOAT_NV 0x140B -#endif - -#ifndef GL_ATI_texture_float - #define GL_RGBA_FLOAT32_ATI 0x8814 - #define GL_RGB_FLOAT32_ATI 0x8815 - #define GL_ALPHA_FLOAT32_ATI 0x8816 - #define GL_INTENSITY_FLOAT32_ATI 0x8817 - #define GL_LUMINANCE_FLOAT32_ATI 0x8818 - #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 - #define GL_RGBA_FLOAT16_ATI 0x881A - #define GL_RGB_FLOAT16_ATI 0x881B - #define GL_ALPHA_FLOAT16_ATI 0x881C - #define GL_INTENSITY_FLOAT16_ATI 0x881D - #define GL_LUMINANCE_FLOAT16_ATI 0x881E - #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F -#endif - -#ifndef GL_MIRRORED_REPEAT_IBM - #define GL_MIRRORED_REPEAT_IBM 0x8370 -#endif - -#ifndef GL_CLAMP_TO_EDGE - #define GL_CLAMP_TO_EDGE 0x812F -#endif - -#ifndef GL_CLAMP - #define GL_CLAMP 0x2900 -#endif - -#ifndef GL_CLAMP_TO_BORDER_ARB - #define GL_CLAMP_TO_BORDER_ARB 0x812D -#endif - -#ifndef GL_INTENSITY - // OpenGL ES1 and ES2 doesn't provide GL_INTENSITY - #define GL_INTENSITY 0x8049 -#endif - -#ifndef GL_GENERATE_MIPMAP_SGIS - #define GL_GENERATE_MIPMAP_SGIS 0x8191 - #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 -#endif - -#ifndef GL_TEXTURE_3D - #define GL_TEXTURE_3D 0x806F -#endif - -#ifndef GL_TEXTURE_2D_ARRAY_EXT - #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A - #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A - #define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B - #define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D - #define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF - #define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E - #define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 - #define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 - #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#endif - -#ifndef GL_TEXTURE_CUBE_MAP - #define GL_TEXTURE_CUBE_MAP 0x8513 - #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 - #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 - #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 - #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 - #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 - #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 - #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A - #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B - #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#endif - -#ifndef GL_TEXTURE_BINDING_3D - #define GL_TEXTURE_BINDING_3D 0x806A -#endif - -#ifndef GL_DEPTH_TEXTURE_MODE_ARB - #define GL_DEPTH_TEXTURE_MODE_ARB 0x884B -#endif - -#ifndef GL_TEXTURE_COMPARE_MODE_ARB - #define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#endif -#ifndef GL_TEXTURE_COMPARE_FUNC_ARB - #define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#endif -#ifndef GL_COMPARE_R_TO_TEXTURE_ARB - #define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E -#endif - -#ifndef TEXTURE_COMPARE_FAIL_VALUE_ARB - #define TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF -#endif - -#if !defined( GL_MAX_TEXTURE_UNITS ) - #define GL_MAX_TEXTURE_UNITS 0x84E2 -#endif - -#ifndef GL_TEXTURE_DEPTH - #define GL_TEXTURE_DEPTH 0x8071 -#endif - -#ifndef GL_TEXTURE_2D_MULTISAMPLE - #define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#endif - -// Integer texture extension as in http://www.opengl.org/registry/specs/EXT/texture_integer.txt -#ifndef GL_EXT_texture_integer - #define GL_RGBA32UI_EXT 0x8D70 - #define GL_RGB32UI_EXT 0x8D71 - #define GL_ALPHA32UI_EXT 0x8D72 - #define GL_INTENSITY32UI_EXT 0x8D73 - #define GL_LUMINANCE32UI_EXT 0x8D74 - #define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 - - #define GL_RGBA16UI_EXT 0x8D76 - #define GL_RGB16UI_EXT 0x8D77 - #define GL_ALPHA16UI_EXT 0x8D78 - #define GL_INTENSITY16UI_EXT 0x8D79 - #define GL_LUMINANCE16UI_EXT 0x8D7A - #define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B - - #define GL_RGBA8UI_EXT 0x8D7C - #define GL_RGB8UI_EXT 0x8D7D - #define GL_ALPHA8UI_EXT 0x8D7E - #define GL_INTENSITY8UI_EXT 0x8D7F - #define GL_LUMINANCE8UI_EXT 0x8D80 - #define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 - - #define GL_RGBA32I_EXT 0x8D82 - #define GL_RGB32I_EXT 0x8D83 - #define GL_ALPHA32I_EXT 0x8D84 - #define GL_INTENSITY32I_EXT 0x8D85 - #define GL_LUMINANCE32I_EXT 0x8D86 - #define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 - - #define GL_RGBA16I_EXT 0x8D88 - #define GL_RGB16I_EXT 0x8D89 - #define GL_ALPHA16I_EXT 0x8D8A - #define GL_INTENSITY16I_EXT 0x8D8B - #define GL_LUMINANCE16I_EXT 0x8D8C - #define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D - - #define GL_RGBA8I_EXT 0x8D8E - #define GL_RGB8I_EXT 0x8D8F - #define GL_ALPHA8I_EXT 0x8D90 - #define GL_INTENSITY8I_EXT 0x8D91 - #define GL_LUMINANCE8I_EXT 0x8D92 - #define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 - - #define GL_RED_INTEGER_EXT 0x8D94 - #define GL_GREEN_INTEGER_EXT 0x8D95 - #define GL_BLUE_INTEGER_EXT 0x8D96 - #define GL_ALPHA_INTEGER_EXT 0x8D97 - #define GL_RGB_INTEGER_EXT 0x8D98 - #define GL_RGBA_INTEGER_EXT 0x8D99 - #define GL_BGR_INTEGER_EXT 0x8D9A - #define GL_BGRA_INTEGER_EXT 0x8D9B - #define GL_LUMINANCE_INTEGER_EXT 0x8D9C - #define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D - - #define GL_RGBA_INTEGER_MODE_EXT 0x8D9E -#endif - -namespace osg { - - -/** Texture pure virtual base class that encapsulates OpenGL texture - * functionality common to the various types of OSG textures. -*/ -class OSG_EXPORT Texture : public osg::StateAttribute -{ - - public : - - Texture(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Texture(const Texture& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - virtual osg::Object* cloneType() const = 0; - virtual osg::Object* clone(const CopyOp& copyop) const = 0; - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return "Texture"; } - - /** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/ - virtual Texture* asTexture() { return this; } - - /** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/ - virtual const Texture* asTexture() const { return this; } - - virtual Type getType() const { return TEXTURE; } - - virtual bool isTextureAttribute() const { return true; } - - virtual GLenum getTextureTarget() const = 0; - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesTextureMode(getTextureTarget()); - return true; - } - - virtual int getTextureWidth() const { return 0; } - virtual int getTextureHeight() const { return 0; } - virtual int getTextureDepth() const { return 0; } - - enum WrapParameter { - WRAP_S, - WRAP_T, - WRAP_R - }; - - enum WrapMode { - CLAMP = GL_CLAMP, - CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE, - CLAMP_TO_BORDER = GL_CLAMP_TO_BORDER_ARB, - REPEAT = GL_REPEAT, - MIRROR = GL_MIRRORED_REPEAT_IBM - }; - - /** Sets the texture wrap mode. */ - void setWrap(WrapParameter which, WrapMode wrap); - /** Gets the texture wrap mode. */ - WrapMode getWrap(WrapParameter which) const; - - - /** Sets the border color. Only used when wrap mode is CLAMP_TO_BORDER. - * The border color will be casted to the appropriate type to match the - * internal pixel format of the texture. */ - void setBorderColor(const Vec4d& color) { _borderColor = color; dirtyTextureParameters(); } - - /** Gets the border color. */ - const Vec4d& getBorderColor() const { return _borderColor; } - - /** Sets the border width. */ - void setBorderWidth(GLint width) { _borderWidth = width; dirtyTextureParameters(); } - - GLint getBorderWidth() const { return _borderWidth; } - - enum FilterParameter { - MIN_FILTER, - MAG_FILTER - }; - - enum FilterMode { - LINEAR = GL_LINEAR, - LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR, - LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST, - NEAREST = GL_NEAREST, - NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR, - NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST - }; - - - /** Sets the texture filter mode. */ - void setFilter(FilterParameter which, FilterMode filter); - - /** Gets the texture filter mode. */ - FilterMode getFilter(FilterParameter which) const; - - /** Sets the maximum anisotropy value, default value is 1.0 for no - * anisotropic filtering. If hardware does not support anisotropic - * filtering, use normal filtering (equivalent to a max anisotropy - * value of 1.0. Valid range is 1.0f upwards. The maximum value - * depends on the graphics system. */ - void setMaxAnisotropy(float anis); - - /** Gets the maximum anisotropy value. */ - inline float getMaxAnisotropy() const { return _maxAnisotropy; } - - /** Sets the hardware mipmap generation hint. If enabled, it will - * only be used if supported in the graphics system. */ - inline void setUseHardwareMipMapGeneration(bool useHardwareMipMapGeneration) { _useHardwareMipMapGeneration = useHardwareMipMapGeneration; } - - /** Gets the hardware mipmap generation hint. */ - inline bool getUseHardwareMipMapGeneration() const { return _useHardwareMipMapGeneration; } - - /** Sets whether or not the apply() function will unreference the image - * data. If enabled, and the image data is only referenced by this - * Texture, apply() will delete the image data. */ - inline void setUnRefImageDataAfterApply(bool flag) { _unrefImageDataAfterApply = flag; } - - /** Gets whether or not apply() unreferences image data. */ - inline bool getUnRefImageDataAfterApply() const { return _unrefImageDataAfterApply; } - - /** Sets whether to use client storage for the texture, if supported - * by the graphics system. Note: If enabled, and the graphics system - * supports it, the osg::Image(s) associated with this texture cannot - * be deleted, so the UnRefImageDataAfterApply flag would be ignored. */ - inline void setClientStorageHint(bool flag) { _clientStorageHint = flag; } - - /** Gets whether to use client storage for the texture. */ - inline bool getClientStorageHint() const { return _clientStorageHint; } - - /** Sets whether to force the texture to resize images that have dimensions - * that are not a power of two. If enabled, NPOT images will be resized, - * whether or not NPOT textures are supported by the hardware. If disabled, - * NPOT images will not be resized if supported by hardware. */ - inline void setResizeNonPowerOfTwoHint(bool flag) { _resizeNonPowerOfTwoHint = flag; } - - /** Gets whether texture will force non power to two images to be resized. */ - inline bool getResizeNonPowerOfTwoHint() const { return _resizeNonPowerOfTwoHint; } - - enum InternalFormatMode { - USE_IMAGE_DATA_FORMAT, - USE_USER_DEFINED_FORMAT, - USE_ARB_COMPRESSION, - USE_S3TC_DXT1_COMPRESSION, - USE_S3TC_DXT3_COMPRESSION, - USE_S3TC_DXT5_COMPRESSION, - USE_PVRTC_2BPP_COMPRESSION, - USE_PVRTC_4BPP_COMPRESSION, - USE_ETC_COMPRESSION, - USE_RGTC1_COMPRESSION, - USE_RGTC2_COMPRESSION, - USE_S3TC_DXT1c_COMPRESSION, - USE_S3TC_DXT1a_COMPRESSION - }; - - /** Sets the internal texture format mode. Note: If the texture format is - * USE_IMAGE_DATA_FORMAT, USE_ARB_COMPRESSION, or USE_S3TC_COMPRESSION, - * the internal format mode is set automatically and will overwrite the - * previous _internalFormat. */ - inline void setInternalFormatMode(InternalFormatMode mode) { _internalFormatMode = mode; } - - /** Gets the internal texture format mode. */ - inline InternalFormatMode getInternalFormatMode() const { return _internalFormatMode; } - - /** Sets the internal texture format. Implicitly sets the - * internalFormatMode to USE_USER_DEFINED_FORMAT. - * The corresponding internal format type will be computed. */ - inline void setInternalFormat(GLint internalFormat) - { - _internalFormatMode = USE_USER_DEFINED_FORMAT; - _internalFormat = internalFormat; - computeInternalFormatType(); - } - - - /** Gets the internal texture format. */ - inline GLint getInternalFormat() const { if (_internalFormat==0) computeInternalFormat(); return _internalFormat; } - - /** Return true if the internal format is one of the compressed formats.*/ - bool isCompressedInternalFormat() const; - - /** Sets the external source image format, used as a fallback when no osg::Image is attached to provide the source image format. */ - inline void setSourceFormat(GLenum sourceFormat) { _sourceFormat = sourceFormat; } - - /** Gets the external source image format. */ - inline GLenum getSourceFormat() const { return _sourceFormat; } - - /** Sets the external source data type, used as a fallback when no osg::Image is attached to provide the source image format.*/ - inline void setSourceType(GLenum sourceType) { _sourceType = sourceType; } - - /** Gets the external source data type.*/ - inline GLenum getSourceType() const { return _sourceType; } - - /** Texture type determined by the internal texture format */ - enum InternalFormatType{ - - //! default OpenGL format (clamped values to [0,1) or [0,255]) - NORMALIZED = 0x0, - - //! float values, Shader Model 3.0 (see ARB_texture_float) - FLOAT = 0x1, - - //! Signed integer values (see EXT_texture_integer) - SIGNED_INTEGER = 0x2, - - //! Unsigned integer value (see EXT_texture_integer) - UNSIGNED_INTEGER = 0x4 - }; - - /** Get the internal texture format type. */ - inline InternalFormatType getInternalFormatType() const { return _internalFormatType; } - - class TextureObject; - - /** Returns a pointer to the TextureObject for the current context. */ - inline TextureObject* getTextureObject(unsigned int contextID) const - { - return _textureObjectBuffer[contextID].get(); - } - - inline void setTextureObject(unsigned int contextID, TextureObject* to) - { - _textureObjectBuffer[contextID] = to; - } - - /** Forces a recompile on next apply() of associated OpenGL texture - * objects. */ - void dirtyTextureObject(); - - /** Returns true if the texture objects for all the required graphics - * contexts are loaded. */ - bool areAllTextureObjectsLoaded() const; - - - /** Gets the dirty flag for the current contextID. */ - inline unsigned int& getTextureParameterDirty(unsigned int contextID) const - { - return _texParametersDirtyList[contextID]; - } - - - /** Force a reset on next apply() of associated OpenGL texture - * parameters. */ - void dirtyTextureParameters(); - - /** Force a manual allocation of the mipmap levels on the next apply() call. - * User is responsible for filling the mipmap levels with valid data. - * The OpenGL's glGenerateMipmapEXT function is used to generate the mipmap levels. - * If glGenerateMipmapEXT is not supported or texture's internal format is not supported - * by the glGenerateMipmapEXT, then empty mipmap levels will - * be allocated manually. The mipmap levels are also allocated if a non-mipmapped - * min filter is used. */ - void allocateMipmapLevels(); - - - /** Sets GL_TEXTURE_COMPARE_MODE_ARB to GL_COMPARE_R_TO_TEXTURE_ARB - * See http://oss.sgi.com/projects/ogl-sample/registry/ARB/shadow.txt. */ - void setShadowComparison(bool flag) { _use_shadow_comparison = flag; } - bool getShadowComparison() const { return _use_shadow_comparison; } - - enum ShadowCompareFunc { - NEVER = GL_NEVER, - LESS = GL_LESS, - EQUAL = GL_EQUAL, - LEQUAL = GL_LEQUAL, - GREATER = GL_GREATER, - NOTEQUAL = GL_NOTEQUAL, - GEQUAL = GL_GEQUAL, - ALWAYS = GL_ALWAYS - }; - - /** Sets shadow texture comparison function. */ - void setShadowCompareFunc(ShadowCompareFunc func) { _shadow_compare_func = func; } - ShadowCompareFunc getShadowCompareFunc() const { return _shadow_compare_func; } - - enum ShadowTextureMode { - LUMINANCE = GL_LUMINANCE, - INTENSITY = GL_INTENSITY, - ALPHA = GL_ALPHA - }; - - /** Sets shadow texture mode after comparison. */ - void setShadowTextureMode(ShadowTextureMode mode) { _shadow_texture_mode = mode; } - ShadowTextureMode getShadowTextureMode() const { return _shadow_texture_mode; } - - /** Sets the TEXTURE_COMPARE_FAIL_VALUE_ARB texture parameter. See - * http://oss.sgi.com/projects/ogl-sample/registry/ARB/shadow_ambient.txt. */ - void setShadowAmbient(float shadow_ambient) { _shadow_ambient = shadow_ambient; } - float getShadowAmbient() const { return _shadow_ambient; } - - - /** Sets the texture image for the specified face. */ - virtual void setImage(unsigned int face, Image* image) = 0; - - /** Gets the texture image for the specified face. */ - virtual Image* getImage(unsigned int face) = 0; - - /** Gets the const texture image for specified face. */ - virtual const Image* getImage(unsigned int face) const = 0; - - /** Gets the number of images that can be assigned to this Texture. */ - virtual unsigned int getNumImages() const = 0; - - - /** Set the PBuffer graphics context to read from when using PBuffers for RenderToTexture.*/ - void setReadPBuffer(GraphicsContext* context) { _readPBuffer = context; } - - /** Get the PBuffer graphics context to read from when using PBuffers for RenderToTexture.*/ - GraphicsContext* getReadPBuffer() { return _readPBuffer.get(); } - - /** Get the const PBuffer graphics context to read from when using PBuffers for RenderToTexture.*/ - const GraphicsContext* getReadPBuffer() const { return _readPBuffer.get(); } - - /** Texture is a pure virtual base class, apply must be overridden. */ - virtual void apply(State& state) const = 0; - - /** Calls apply(state) to compile the texture. */ - virtual void compileGLObjects(State& state) const; - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(State* state=0) const; - - /** Encapsulates queries of extension availability, obtains extension - * function pointers, and provides convenience wrappers for - * calling extension functions. */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - void setMultiTexturingSupported(bool flag) { _isMultiTexturingSupported=flag; } - bool isMultiTexturingSupported() const { return _isMultiTexturingSupported; } - - void setTextureFilterAnisotropicSupported(bool flag) { _isTextureFilterAnisotropicSupported=flag; } - bool isTextureFilterAnisotropicSupported() const { return _isTextureFilterAnisotropicSupported; } - - void setTextureCompressionARBSupported(bool flag) { _isTextureCompressionARBSupported=flag; } - bool isTextureCompressionARBSupported() const { return _isTextureCompressionARBSupported; } - - void setTextureCompressionS3TCSupported(bool flag) { _isTextureCompressionS3TCSupported=flag; } - bool isTextureCompressionS3TCSupported() const { return _isTextureCompressionS3TCSupported; } - - void setTextureCompressionPVRTC2BPPSupported(bool flag) { _isTextureCompressionPVRTC2BPPSupported=flag; } - bool isTextureCompressionPVRTC2BPPSupported() const { return _isTextureCompressionPVRTC2BPPSupported; } - - void setTextureCompressionPVRTC4BPPSupported(bool flag) { _isTextureCompressionPVRTC4BPPSupported=flag; } - bool isTextureCompressionPVRTC4BPPSupported() const { return _isTextureCompressionPVRTC4BPPSupported; } - - void setTextureCompressionETCSupported(bool flag) { _isTextureCompressionETCSupported=flag; } - bool isTextureCompressionETCSupported() const { return _isTextureCompressionETCSupported; } - - void setTextureCompressionRGTCSupported(bool flag) { _isTextureCompressionRGTCSupported=flag; } - bool isTextureCompressionRGTCSupported() const { return _isTextureCompressionRGTCSupported; } - - void setTextureCompressionPVRTCSupported(bool flag) { _isTextureCompressionPVRTCSupported=flag; } - bool isTextureCompressionPVRTCSupported() const { return _isTextureCompressionPVRTCSupported; } - - void setTextureMirroredRepeatSupported(bool flag) { _isTextureMirroredRepeatSupported=flag; } - bool isTextureMirroredRepeatSupported() const { return _isTextureMirroredRepeatSupported; } - - void setTextureEdgeClampSupported(bool flag) { _isTextureEdgeClampSupported=flag; } - bool isTextureEdgeClampSupported() const { return _isTextureEdgeClampSupported; } - - void setTextureBorderClampSupported(bool flag) { _isTextureBorderClampSupported=flag; } - bool isTextureBorderClampSupported() const { return _isTextureBorderClampSupported; } - - void setGenerateMipMapSupported(bool flag) { _isGenerateMipMapSupported=flag; } - bool isGenerateMipMapSupported() const { return _isGenerateMipMapSupported; } - - void setTextureMultisampledSupported(bool flag) { _isTextureMultisampledSupported=flag; } - bool isTextureMultisampledSupported() const { return _isTextureMultisampledSupported; } - - void setShadowSupported(bool flag) { _isShadowSupported = flag; } - bool isShadowSupported() const { return _isShadowSupported; } - - void setShadowAmbientSupported(bool flag) { _isShadowAmbientSupported = flag; } - bool isShadowAmbientSupported() const { return _isShadowAmbientSupported; } - - void setTextureMaxLevelSupported(bool flag) { _isTextureMaxLevelSupported = flag; } - bool isTextureMaxLevelSupported() const { return _isTextureMaxLevelSupported; } - - void setMaxTextureSize(GLint maxsize) { _maxTextureSize=maxsize; } - GLint maxTextureSize() const { return _maxTextureSize; } - - void setNumTextureUnits(GLint nunits ) { _numTextureUnits=nunits; } - GLint numTextureUnits() const { return _numTextureUnits; } - - bool isCompressedTexImage2DSupported() const { return _glCompressedTexImage2D!=0; } - bool isCompressedTexSubImage2DSupported() const { return _glCompressedTexSubImage2D!=0; } - - bool isClientStorageSupported() const { return _isClientStorageSupported; } - - bool isNonPowerOfTwoTextureSupported(GLenum filter) const - { - return (filter==GL_LINEAR || filter==GL_NEAREST) ? - _isNonPowerOfTwoTextureNonMipMappedSupported : - _isNonPowerOfTwoTextureMipMappedSupported; - } - - void setTextureIntegerSupported(bool flag) { _isTextureIntegerEXTSupported=flag; } - bool isTextureIntegerSupported() const { return _isTextureIntegerEXTSupported; } - - void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) const - { - _glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); - } - - void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) const - { - _glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - void glGetCompressedTexImage(GLenum target, GLint level, GLvoid *data) const - { - _glGetCompressedTexImage(target, level, data); - } - - void glTexImage2DMultisample(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) const - { - _glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - void glTexParameterIiv(GLenum target, GLenum pname, const GLint* data) const - { - _glTexParameterIiv(target, pname, data); - } - - void glTexParameterIuiv(GLenum target, GLenum pname, const GLuint* data) const - { - _glTexParameterIuiv(target, pname, data); - } - - protected: - - ~Extensions() {} - - typedef void (GL_APIENTRY * CompressedTexImage2DArbProc) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); - typedef void (GL_APIENTRY * CompressedTexSubImage2DArbProc) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); - typedef void (GL_APIENTRY * GetCompressedTexImageArbProc) (GLenum target, GLint level, GLvoid *data); - typedef void (GL_APIENTRY * TexImage2DMultisample)(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); - typedef void (GL_APIENTRY * TexParameterIivProc)(GLenum target, GLenum pname, const GLint* data); - typedef void (GL_APIENTRY * TexParameterIuivProc)(GLenum target, GLenum pname, const GLuint* data); - - CompressedTexImage2DArbProc _glCompressedTexImage2D; - CompressedTexSubImage2DArbProc _glCompressedTexSubImage2D; - GetCompressedTexImageArbProc _glGetCompressedTexImage; - TexImage2DMultisample _glTexImage2DMultisample; - TexParameterIivProc _glTexParameterIiv; - TexParameterIuivProc _glTexParameterIuiv; - - - bool _isMultiTexturingSupported; - bool _isTextureFilterAnisotropicSupported; - bool _isTextureCompressionARBSupported; - bool _isTextureCompressionS3TCSupported; - bool _isTextureCompressionPVRTC2BPPSupported; - bool _isTextureCompressionPVRTC4BPPSupported; - bool _isTextureCompressionETCSupported; - bool _isTextureCompressionRGTCSupported; - bool _isTextureCompressionPVRTCSupported; - bool _isTextureMirroredRepeatSupported; - bool _isTextureEdgeClampSupported; - bool _isTextureBorderClampSupported; - bool _isGenerateMipMapSupported; - bool _isTextureMultisampledSupported; - bool _isShadowSupported; - bool _isShadowAmbientSupported; - bool _isClientStorageSupported; - bool _isNonPowerOfTwoTextureMipMappedSupported; - bool _isNonPowerOfTwoTextureNonMipMappedSupported; - bool _isTextureIntegerEXTSupported; - bool _isTextureMaxLevelSupported; - - GLint _maxTextureSize; - GLint _numTextureUnits; - }; - - /** Gets the extension for the specified context. Creates the - * Extensions object for that context if it doesn't exist. - * Returns NULL if the Extensions object for the context doesn't - * exist and the createIfNotInitalized flag is false. */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** Overrides Extensions objects across graphics contexts. Typically - * used to ensure the same lowest common denominator of extensions - * on systems with different graphics pipes. */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - /** Determine whether the given internalFormat is a compressed - * image format. */ - static bool isCompressedInternalFormat(GLint internalFormat); - - /** Determine the size of a compressed image, given the internalFormat, - * the width, the height, and the depth of the image. The block size - * and the size are output parameters. */ - static void getCompressedSize(GLenum internalFormat, GLint width, GLint height, GLint depth, GLint& blockSize, GLint& size); - - - /** Helper method. Creates the texture, but doesn't set or use a - * texture binding. Note: Don't call this method directly unless - * you're implementing a subload callback. */ - void applyTexImage2D_load(State& state, GLenum target, const Image* image, GLsizei width, GLsizei height,GLsizei numMipmapLevels) const; - - /** Helper method. Subloads images into the texture, but doesn't set - * or use a texture binding. Note: Don't call this method directly - * unless you're implementing a subload callback. */ - void applyTexImage2D_subload(State& state, GLenum target, const Image* image, GLsizei width, GLsizei height, GLint inInternalFormat, GLsizei numMipmapLevels) const; - - - /** Returned by mipmapBeforeTexImage() to indicate what - * mipmapAfterTexImage() should do */ - enum GenerateMipmapMode - { - GENERATE_MIPMAP_NONE, - GENERATE_MIPMAP, - GENERATE_MIPMAP_TEX_PARAMETER - }; - - protected : - - virtual ~Texture(); - - virtual void computeInternalFormat() const = 0; - - /** Computes the internal format from Image parameters. */ - void computeInternalFormatWithImage(const osg::Image& image) const; - - /** Computes the texture dimension for the given Image. */ - void computeRequiredTextureDimensions(State& state, const osg::Image& image,GLsizei& width, GLsizei& height,GLsizei& numMipmapLevels) const; - - /** Computes the internal format type. */ - void computeInternalFormatType() const; - - /** Helper method. Sets texture parameters. */ - void applyTexParameters(GLenum target, State& state) const; - - /** Returns true if _useHardwareMipMapGeneration is true and either - * glGenerateMipmapEXT() or GL_GENERATE_MIPMAP_SGIS are supported. */ - bool isHardwareMipmapGenerationEnabled(const State& state) const; - - /** Returns true if the associated Image should be released and it's safe to do so. */ - bool isSafeToUnrefImageData(const State& state) const { - return (_unrefImageDataAfterApply && state.getMaxTexturePoolSize()==0 && areAllTextureObjectsLoaded()); - } - - /** Helper methods to be called before and after calling - * gl[Compressed][Copy]Tex[Sub]Image2D to handle generating mipmaps. */ - GenerateMipmapMode mipmapBeforeTexImage(const State& state, bool hardwareMipmapOn) const; - void mipmapAfterTexImage(State& state, GenerateMipmapMode beforeResult) const; - - /** Helper method to generate mipmap levels by calling of glGenerateMipmapEXT. - * If it is not supported, then call the virtual allocateMipmap() method */ - void generateMipmap(State& state) const; - - /** Allocate mipmap levels of the texture by subsequent calling of glTexImage* function. */ - virtual void allocateMipmap(State& state) const = 0; - - /** Returns -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - int compareTexture(const Texture& rhs) const; - - /** Returns -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - int compareTextureObjects(const Texture& rhs) const; - - typedef buffered_value TexParameterDirtyList; - mutable TexParameterDirtyList _texParametersDirtyList; - mutable TexParameterDirtyList _texMipmapGenerationDirtyList; - - WrapMode _wrap_s; - WrapMode _wrap_t; - WrapMode _wrap_r; - - FilterMode _min_filter; - FilterMode _mag_filter; - float _maxAnisotropy; - bool _useHardwareMipMapGeneration; - bool _unrefImageDataAfterApply; - bool _clientStorageHint; - bool _resizeNonPowerOfTwoHint; - - Vec4d _borderColor; - GLint _borderWidth; - - InternalFormatMode _internalFormatMode; - mutable InternalFormatType _internalFormatType; - mutable GLint _internalFormat; - mutable GLenum _sourceFormat; - mutable GLenum _sourceType; - - bool _use_shadow_comparison; - ShadowCompareFunc _shadow_compare_func; - ShadowTextureMode _shadow_texture_mode; - float _shadow_ambient; - - public: - - struct OSG_EXPORT TextureProfile - { - inline TextureProfile(GLenum target): - _target(target), - _numMipmapLevels(0), - _internalFormat(0), - _width(0), - _height(0), - _depth(0), - _border(0), - _size(0) {} - - inline TextureProfile(GLenum target, - GLint numMipmapLevels, - GLenum internalFormat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border): - _target(target), - _numMipmapLevels(numMipmapLevels), - _internalFormat(internalFormat), - _width(width), - _height(height), - _depth(depth), - _border(border), - _size(0) { computeSize(); } - - - #define LESSTHAN(A,B) if (A > TextureObjectList; - - class OSG_EXPORT TextureObjectSet : public Referenced - { - public: - TextureObjectSet(TextureObjectManager* parent, const TextureProfile& profile); - - const TextureProfile& getProfile() const { return _profile; } - - void handlePendingOrphandedTextureObjects(); - - void deleteAllTextureObjects(); - void discardAllTextureObjects(); - void flushAllDeletedTextureObjects(); - void discardAllDeletedTextureObjects(); - void flushDeletedTextureObjects(double currentTime, double& availableTime); - - TextureObject* takeFromOrphans(Texture* texture); - TextureObject* takeOrGenerate(Texture* texture); - void moveToBack(TextureObject* to); - void addToBack(TextureObject* to); - void orphan(TextureObject* to); - void remove(TextureObject* to); - void moveToSet(TextureObject* to, TextureObjectSet* set); - - unsigned int size() const { return _profile._size * _numOfTextureObjects; } - - bool makeSpace(unsigned int& size); - - bool checkConsistency() const; - - TextureObjectManager* getParent() { return _parent; } - - unsigned int computeNumTextureObjectsInList() const; - unsigned int getNumOfTextureObjects() const { return _numOfTextureObjects; } - unsigned int getNumOrphans() const { return _orphanedTextureObjects.size(); } - unsigned int getNumPendingOrphans() const { return _pendingOrphanedTextureObjects.size(); } - - protected: - - virtual ~TextureObjectSet(); - - OpenThreads::Mutex _mutex; - - TextureObjectManager* _parent; - unsigned int _contextID; - TextureProfile _profile; - unsigned int _numOfTextureObjects; - TextureObjectList _orphanedTextureObjects; - TextureObjectList _pendingOrphanedTextureObjects; - - TextureObject* _head; - TextureObject* _tail; - - }; - - class OSG_EXPORT TextureObjectManager : public osg::Referenced - { - public: - TextureObjectManager(unsigned int contextID); - - unsigned int getContextID() const { return _contextID; } - - - - void setNumberActiveTextureObjects(unsigned int size) { _numActiveTextureObjects = size; } - unsigned int& getNumberActiveTextureObjects() { return _numActiveTextureObjects; } - unsigned int getNumberActiveTextureObjects() const { return _numActiveTextureObjects; } - - void setNumberOrphanedTextureObjects(unsigned int size) { _numOrphanedTextureObjects = size; } - unsigned int& getNumberOrphanedTextureObjects() { return _numOrphanedTextureObjects; } - unsigned int getNumberOrphanedTextureObjects() const { return _numOrphanedTextureObjects; } - - void setCurrTexturePoolSize(unsigned int size) { _currTexturePoolSize = size; } - unsigned int& getCurrTexturePoolSize() { return _currTexturePoolSize; } - unsigned int getCurrTexturePoolSize() const { return _currTexturePoolSize; } - - void setMaxTexturePoolSize(unsigned int size); - unsigned int getMaxTexturePoolSize() const { return _maxTexturePoolSize; } - - bool hasSpace(unsigned int size) const { return (_currTexturePoolSize+size)<=_maxTexturePoolSize; } - bool makeSpace(unsigned int size); - - TextureObject* generateTextureObject(const Texture* texture, GLenum target); - TextureObject* generateTextureObject(const Texture* texture, - GLenum target, - GLint numMipmapLevels, - GLenum internalFormat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border); - void handlePendingOrphandedTextureObjects(); - void deleteAllTextureObjects(); - void discardAllTextureObjects(); - void flushAllDeletedTextureObjects(); - void discardAllDeletedTextureObjects(); - void flushDeletedTextureObjects(double currentTime, double& availableTime); - void releaseTextureObject(TextureObject* to); - - TextureObjectSet* getTextureObjectSet(const TextureProfile& profile); - - void newFrame(osg::FrameStamp* fs); - void resetStats(); - void reportStats(std::ostream& out); - void recomputeStats(std::ostream& out) const; - bool checkConsistency() const; - - unsigned int& getFrameNumber() { return _frameNumber; } - unsigned int& getNumberFrames() { return _numFrames; } - - unsigned int& getNumberDeleted() { return _numDeleted; } - double& getDeleteTime() { return _deleteTime; } - - unsigned int& getNumberGenerated() { return _numGenerated; } - double& getGenerateTime() { return _generateTime; } - - unsigned int& getNumberApplied() { return _numApplied; } - double& getApplyTime() { return _applyTime; } - - - protected: - - typedef std::map< TextureProfile, osg::ref_ptr > TextureSetMap; - unsigned int _contextID; - unsigned int _numActiveTextureObjects; - unsigned int _numOrphanedTextureObjects; - unsigned int _currTexturePoolSize; - unsigned int _maxTexturePoolSize; - TextureSetMap _textureSetMap; - - unsigned int _frameNumber; - - unsigned int _numFrames; - unsigned int _numDeleted; - double _deleteTime; - - unsigned int _numGenerated; - double _generateTime; - - unsigned int _numApplied; - double _applyTime; - - }; - - static osg::ref_ptr& getTextureObjectManager(unsigned int contextID); - - static TextureObject* generateTextureObject(const Texture* texture, unsigned int contextID,GLenum target); - - static TextureObject* generateTextureObject(const Texture* texture, - unsigned int contextID, - GLenum target, - GLint numMipmapLevels, - GLenum internalFormat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border); - - static void deleteAllTextureObjects(unsigned int contextID); - static void discardAllTextureObjects(unsigned int contextID); - static void flushAllDeletedTextureObjects(unsigned int contextID); - static void discardAllDeletedTextureObjects(unsigned int contextID); - static void flushDeletedTextureObjects(unsigned int contextID,double currentTime, double& availableTime); - static void releaseTextureObject(unsigned int contextID, TextureObject* to); - - protected: - - typedef buffered_object< ref_ptr > TextureObjectBuffer; - mutable TextureObjectBuffer _textureObjectBuffer; - mutable ref_ptr _readPBuffer; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Texture1D b/libs/lib/mac32/include/osg/Texture1D deleted file mode 100644 index 1513c56f6..000000000 --- a/libs/lib/mac32/include/osg/Texture1D +++ /dev/null @@ -1,162 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -// -*-c++-*- - -#ifndef OSG_TEXTURE1D -#define OSG_TEXTURE1D 1 - -#include - -#ifndef GL_TEXTURE_1D - #define GL_TEXTURE_1D 0x0DE0 -#endif - -namespace osg { - -/** Encapsulates OpenGL 1D texture functionality. Doesn't support cube maps, - * so ignore \a face parameters. -*/ -class OSG_EXPORT Texture1D : public Texture -{ - - public : - - Texture1D(); - - Texture1D(Image* image); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Texture1D(const Texture1D& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, Texture1D,TEXTURE); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& rhs) const; - - virtual GLenum getTextureTarget() const { return GL_TEXTURE_1D; } - - /** Sets the texture image. */ - void setImage(Image* image); - - /** Gets the texture image. */ - Image* getImage() { return _image.get(); } - - /** Gets the const texture image. */ - inline const Image* getImage() const { return _image.get(); } - - inline unsigned int& getModifiedCount(unsigned int contextID) const - { - // get the modified count for the current contextID. - return _modifiedCount[contextID]; - } - - - /** Sets the texture image, ignoring face. */ - virtual void setImage(unsigned int, Image* image) { setImage(image); } - - /** Gets the texture image, ignoring face. */ - virtual Image* getImage(unsigned int) { return _image.get(); } - - /** Gets the const texture image, ignoring face. */ - virtual const Image* getImage(unsigned int) const { return _image.get(); } - - /** Gets the number of images that can be assigned to the Texture. */ - virtual unsigned int getNumImages() const { return 1; } - - - /** Sets the texture width. If width is zero, calculate the value - * from the source image width. */ - inline void setTextureWidth(int width) { _textureWidth = width; } - - /** Gets the texture width. */ - virtual int getTextureWidth() const { return _textureWidth; } - virtual int getTextureHeight() const { return 1; } - virtual int getTextureDepth() const { return 1; } - - - class OSG_EXPORT SubloadCallback : public Referenced - { - public: - virtual void load(const Texture1D& texture,State& state) const = 0; - virtual void subload(const Texture1D& texture,State& state) const = 0; - }; - - void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } - - SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } - - const SubloadCallback* getSubloadCallback() const { return _subloadCallback.get(); } - - - /** Helper function. Sets the number of mipmap levels created for this - * texture. Should only be called within an osg::Texture::apply(), or - * during a custom OpenGL texture load. */ - void setNumMipmapLevels(unsigned int num) const { _numMipmapLevels=num; } - - /** Gets the number of mipmap levels created. */ - unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } - - - /** Copies pixels into a 1D texture image, as per glCopyTexImage1D. - * Creates an OpenGL texture object from the current OpenGL background - * framebuffer contents at position \a x, \a y with width \a width. - * \a width must be a power of two. */ - void copyTexImage1D(State& state, int x, int y, int width); - - /** Copies a one-dimensional texture subimage, as per - * glCopyTexSubImage1D. Updates a portion of an existing OpenGL - * texture object from the current OpenGL background framebuffer - * contents at position \a x, \a y with width \a width. */ - void copyTexSubImage1D(State& state, int xoffset, int x, int y, int width); - - - /** Bind the texture object. If the texture object hasn't already been - * compiled, create the texture mipmap levels. */ - virtual void apply(State& state) const; - - protected : - - virtual ~Texture1D(); - - virtual void computeInternalFormat() const; - void allocateMipmap(State& state) const; - - /** Helper method. Create the texture without setting or using a - * texture binding. */ - void applyTexImage1D(GLenum target, Image* image, State& state, GLsizei& width, GLsizei& numMipmapLevels) const; - - - /** It's not ideal that _image is mutable, but it's required since - * Image::ensureDimensionsArePowerOfTwo() can only be called in a - * valid OpenGL context, and therefore within Texture::apply, which - * is const. */ - mutable ref_ptr _image; - - /** Subloaded images can have different texture and image sizes. */ - mutable GLsizei _textureWidth; - - /** Number of mipmap levels created. */ - mutable GLsizei _numMipmapLevels; - - ref_ptr _subloadCallback; - - typedef buffered_value ImageModifiedCount; - mutable ImageModifiedCount _modifiedCount; - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Texture2D b/libs/lib/mac32/include/osg/Texture2D deleted file mode 100644 index 7fc528c2c..000000000 --- a/libs/lib/mac32/include/osg/Texture2D +++ /dev/null @@ -1,172 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXTURE2D -#define OSG_TEXTURE2D 1 - -#include - -namespace osg { - -/** Encapsulates OpenGL 2D texture functionality. Doesn't support cube maps, - * so ignore \a face parameters. -*/ -class OSG_EXPORT Texture2D : public Texture -{ - - public : - - Texture2D(); - - Texture2D(Image* image); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Texture2D(const Texture2D& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, Texture2D,TEXTURE); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& rhs) const; - - virtual GLenum getTextureTarget() const { return GL_TEXTURE_2D; } - - /** Sets the texture image. */ - void setImage(Image* image); - - /** Gets the texture image. */ - Image* getImage() { return _image.get(); } - - /** Gets the const texture image. */ - inline const Image* getImage() const { return _image.get(); } - - inline unsigned int& getModifiedCount(unsigned int contextID) const - { - // get the modified count for the current contextID. - return _modifiedCount[contextID]; - } - - - /** Sets the texture image, ignoring face. */ - virtual void setImage(unsigned int, Image* image) { setImage(image); } - - /** Gets the texture image, ignoring face. */ - virtual Image* getImage(unsigned int) { return _image.get(); } - - /** Gets the const texture image, ignoring face. */ - virtual const Image* getImage(unsigned int) const { return _image.get(); } - - /** Gets the number of images that can be assigned to the Texture. */ - virtual unsigned int getNumImages() const { return 1; } - - - /** Sets the texture width and height. If width or height are zero, - * calculate the respective value from the source image size. */ - inline void setTextureSize(int width, int height) const - { - _textureWidth = width; - _textureHeight = height; - } - - void setTextureWidth(int width) { _textureWidth=width; } - void setTextureHeight(int height) { _textureHeight=height; } - - virtual int getTextureWidth() const { return _textureWidth; } - virtual int getTextureHeight() const { return _textureHeight; } - virtual int getTextureDepth() const { return 1; } - - class OSG_EXPORT SubloadCallback : public Referenced - { - public: - - virtual bool textureObjectValid(const Texture2D& texture, State& state) const - { - return texture.textureObjectValid(state); - } - - virtual TextureObject* generateTextureObject(const Texture2D& texture, State& state) const - { - return osg::Texture::generateTextureObject(&texture, state.getContextID(), GL_TEXTURE_2D); - } - - virtual void load(const Texture2D& texture,State& state) const = 0; - virtual void subload(const Texture2D& texture,State& state) const = 0; - }; - - void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } - - SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } - - const SubloadCallback* getSubloadCallback() const { return _subloadCallback.get(); } - - - /** Helper function. Sets the number of mipmap levels created for this - * texture. Should only be called within an osg::Texture::apply(), or - * during a custom OpenGL texture load. */ - void setNumMipmapLevels(unsigned int num) const { _numMipmapLevels=num; } - - /** Gets the number of mipmap levels created. */ - unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } - - - /** Copies pixels into a 2D texture image, as per glCopyTexImage2D. - * Creates an OpenGL texture object from the current OpenGL background - * framebuffer contents at position \a x, \a y with width \a width and - * height \a height. \a width and \a height must be a power of two. */ - void copyTexImage2D(State& state, int x, int y, int width, int height ); - - /** Copies a two-dimensional texture subimage, as per - * glCopyTexSubImage2D. Updates a portion of an existing OpenGL - * texture object from the current OpenGL background framebuffer - * contents at position \a x, \a y with width \a width and height - * \a height. Loads framebuffer data into the texture using offsets - * \a xoffset and \a yoffset. \a width and \a height must be powers - * of two. */ - void copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, int y, int width, int height ); - - - /** Bind the texture object. If the texture object hasn't already been - * compiled, create the texture mipmap levels. */ - virtual void apply(State& state) const; - - - - protected : - - virtual ~Texture2D(); - - virtual void computeInternalFormat() const; - void allocateMipmap(State& state) const; - - /** Return true of the TextureObject assigned to the context associate with osg::State object is valid.*/ - bool textureObjectValid(State& state) const; - - friend class SubloadCallback; - - ref_ptr _image; - - /** Subloaded images can have different texture and image sizes. */ - mutable GLsizei _textureWidth, _textureHeight; - - /** Number of mipmap levels created. */ - mutable GLsizei _numMipmapLevels; - - ref_ptr _subloadCallback; - - typedef buffered_value ImageModifiedCount; - mutable ImageModifiedCount _modifiedCount; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Texture2DArray b/libs/lib/mac32/include/osg/Texture2DArray deleted file mode 100644 index 5dbcb0605..000000000 --- a/libs/lib/mac32/include/osg/Texture2DArray +++ /dev/null @@ -1,230 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXTURE2DARRAY -#define OSG_TEXTURE2DARRAY 1 - -#include -#include - -namespace osg { - -/** Texture2DArray state class which encapsulates OpenGL 2D array texture functionality. - * Texture arrays were introduced with Shader Model 4.0 hardware. - * - * A 2D texture array does contain textures sharing the same properties (e.g. size, bitdepth,...) - * in a layered structure. See http://www.opengl.org/registry/specs/EXT/texture_array.txt for more info. - */ -class OSG_EXPORT Texture2DArray : public Texture -{ - - public : - - Texture2DArray(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Texture2DArray(const Texture2DArray& cm,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, Texture2DArray, TEXTURE); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& rhs) const; - - virtual GLenum getTextureTarget() const { return GL_TEXTURE_2D_ARRAY_EXT; } - - /** Set the texture image for specified layer. */ - virtual void setImage(unsigned int layer, Image* image); - - /** Get the texture image for specified layer. */ - virtual Image* getImage(unsigned int layer); - - /** Get the const texture image for specified layer. */ - virtual const Image* getImage(unsigned int layer) const; - - /** Get the number of images that are assigned to the Texture. - * The number is equal to the texture depth. To get the maximum possible - * image/layer count, you have to use the extension subclass, since it provides - * graphic context dependent information. - */ - virtual unsigned int getNumImages() const { return getTextureDepth(); } - - /** Check how often was a certain layer in the given context modified */ - inline unsigned int& getModifiedCount(unsigned int layer, unsigned int contextID) const - { - // get the modified count for the current contextID. - return _modifiedCount[layer][contextID]; - } - - /** Set the texture width and height. If width or height are zero then - * the respective size value is calculated from the source image sizes. - * Depth parameter specifies the number of layers to be used. - */ - void setTextureSize(int width, int height, int depth); - - void setTextureWidth(int width) { _textureWidth=width; } - void setTextureHeight(int height) { _textureHeight=height; } - void setTextureDepth(int depth); - - virtual int getTextureWidth() const { return _textureWidth; } - virtual int getTextureHeight() const { return _textureHeight; } - virtual int getTextureDepth() const { return _textureDepth; } - - class OSG_EXPORT SubloadCallback : public Referenced - { - public: - virtual void load(const Texture2DArray& texture,State& state) const = 0; - virtual void subload(const Texture2DArray& texture,State& state) const = 0; - }; - - - void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } - - SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } - - const SubloadCallback* getSubloadCallback() const { return _subloadCallback.get(); } - - - - /** Set the number of mip map levels the the texture has been created with. - * Should only be called within an osg::Texture::apply() and custom OpenGL texture load. - */ - void setNumMipmapLevels(unsigned int num) const { _numMipmapLevels=num; } - - /** Get the number of mip map levels the the texture has been created with. */ - unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } - - /** Copies a two-dimensional texture subimage, as per - * glCopyTexSubImage3D. Updates a portion of an existing OpenGL - * texture object from the current OpenGL background framebuffer - * contents at position \a x, \a y with width \a width and height - * \a height. Loads framebuffer data into the texture using offsets - * \a xoffset and \a yoffset. \a zoffset specifies the layer of the texture - * array to which the result is copied. - */ - void copyTexSubImage2DArray(State& state, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height ); - - /** Bind the texture if already compiled. Otherwise recompile. - */ - virtual void apply(State& state) const; - - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provides convenience wrappers to - * check for the extensions or use the associated functions. - */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setTexture2DArraySupported(bool flag) { _isTexture2DArraySupported=flag; } - bool isTexture2DArraySupported() const { return _isTexture2DArraySupported; } - - void setTexture3DSupported(bool flag) { _isTexture3DSupported=flag; } - bool isTexture3DSupported() const { return _isTexture3DSupported; } - - void setMaxLayerCount(GLint count) { _maxLayerCount = count; } - GLint maxLayerCount() const { return _maxLayerCount; } - - void setMax2DSize(GLint size) { _max2DSize = size; } - GLint max2DSize() const { return _max2DSize; } - - void glTexImage3D( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) const; - - void glTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) const; - - void glCopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) const; - - bool isCompressedTexImage3DSupported() const { return _glCompressedTexImage3D!=0; } - void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) const; - - bool isCompressedTexSubImage3DSupported() const { return _glCompressedTexSubImage3D!=0; } - void glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ) const; - - protected: - - ~Extensions() {} - - bool _isTexture2DArraySupported; - bool _isTexture3DSupported; - - GLint _maxLayerCount; - GLint _max2DSize; - - typedef void (GL_APIENTRY * GLTexImage3DProc) ( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); - typedef void (GL_APIENTRY * GLTexSubImage3DProc) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); - typedef void (GL_APIENTRY * CompressedTexImage3DArbProc) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); - typedef void (GL_APIENTRY * CompressedTexSubImage3DArbProc) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); - typedef void (GL_APIENTRY * GLCopyTexSubImageProc) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ); - - GLTexImage3DProc _glTexImage3D; - GLTexSubImage3DProc _glTexSubImage3D; - CompressedTexImage3DArbProc _glCompressedTexImage3D; - CompressedTexSubImage3DArbProc _glCompressedTexSubImage3D; - GLCopyTexSubImageProc _glCopyTexSubImage3D; - - }; - - /** Function to call to get the extension of a specified context. - * If the Extension object for that context has not yet been created - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object will - * only be created with the graphics context associated with ContextID. - */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** The setExtensions method allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions. - */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected : - - virtual ~Texture2DArray(); - - bool imagesValid() const; - - virtual void computeInternalFormat() const; - void allocateMipmap(State& state) const; - - void applyTexImage2DArray_subload(State& state, Image* image, GLsizei inwidth, GLsizei inheight, GLsizei indepth, GLint inInternalFormat, GLsizei& numMipmapLevels) const; - - /** - * Use std::vector to encapsulate referenced pointers to images of different layers. - * Vectors gives us a random access iterator. The overhead of non-used elements is negligible */ - std::vector > _images; - - // subloaded images can have different texture and image sizes. - mutable GLsizei _textureWidth, _textureHeight, _textureDepth; - - // number of mip map levels the the texture has been created with, - mutable GLsizei _numMipmapLevels; - - ref_ptr _subloadCallback; - - typedef buffered_value ImageModifiedCount; - mutable std::vector _modifiedCount; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Texture2DMultisample b/libs/lib/mac32/include/osg/Texture2DMultisample deleted file mode 100644 index 36a393f6a..000000000 --- a/libs/lib/mac32/include/osg/Texture2DMultisample +++ /dev/null @@ -1,95 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * Texture2DMultisample codes Copyright (C) 2010 Marcin Hajder - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - -#ifndef OSG_TEXTURE2DMS -#define OSG_TEXTURE2DMS 1 - -#include - -namespace osg { - - /** Texture2DMultisample state class which encapsulates OpenGL 2D multisampled texture functionality. - * Multisampled texture were introduced with OpenGL 3.1 and extension GL_ARB_texture_multisample. - * See http://www.opengl.org/registry/specs/ARB/texture_multisample.txt for more info. - */ - -class OSG_EXPORT Texture2DMultisample : public Texture -{ - public : - - Texture2DMultisample(); - - Texture2DMultisample(GLsizei numSamples, GLboolean fixedsamplelocations); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Texture2DMultisample(const Texture2DMultisample& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, Texture2DMultisample,TEXTURE); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& rhs) const; - - virtual GLenum getTextureTarget() const - { - return GL_TEXTURE_2D_MULTISAMPLE; - } - - /** Sets the texture width and height. If width or height are zero, - * calculate the respective value from the source image size. */ - inline void setTextureSize(int width, int height) const - { - _textureWidth = width; - _textureHeight = height; - } - - inline void setNumSamples( int samples ) { _numSamples = samples; } - - // unnecessary for Texture2DMultisample - virtual void setImage(unsigned int /*face*/, Image* /*image*/) {} - virtual Image* getImage(unsigned int /*face*/) { return NULL; } - virtual const Image* getImage(unsigned int /*face*/) const { return NULL; } - virtual unsigned int getNumImages() const {return 0; } - virtual void allocateMipmap(State& /*state*/) const {} - - void setTextureWidth(int width) { _textureWidth=width; } - void setTextureHeight(int height) { _textureHeight=height; } - - virtual int getTextureWidth() const { return _textureWidth; } - virtual int getTextureHeight() const { return _textureHeight; } - virtual int getTextureDepth() const { return 1; } - - /** Bind the texture object. If the texture object hasn't already been - * compiled, create the texture mipmap levels. */ - virtual void apply(State& state) const; - - protected : - - virtual ~Texture2DMultisample(); - - virtual void computeInternalFormat() const; - - /** Subloaded images can have different texture and image sizes. */ - mutable GLsizei _textureWidth, _textureHeight; - - mutable GLsizei _numSamples; - - mutable GLboolean _fixedsamplelocations; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Texture3D b/libs/lib/mac32/include/osg/Texture3D deleted file mode 100644 index c8c0c88f3..000000000 --- a/libs/lib/mac32/include/osg/Texture3D +++ /dev/null @@ -1,230 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXTURE3D -#define OSG_TEXTURE3D 1 - -#include - -#ifndef GL_MAX_3D_TEXTURE_SIZE - #define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#endif - -namespace osg { - -/** Encapsulates OpenGL 2D texture functionality. Doesn't support cube maps, - * so ignore \a face parameters. -*/ -class OSG_EXPORT Texture3D : public Texture -{ - - public : - - Texture3D(); - - Texture3D(Image* image); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Texture3D(const Texture3D& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, Texture3D,TEXTURE); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& rhs) const; - - virtual GLenum getTextureTarget() const { return GL_TEXTURE_3D; } - - /** Sets the texture image. */ - void setImage(Image* image); - - /** Gets the texture image. */ - Image* getImage() { return _image.get(); } - - /** Gets the const texture image. */ - inline const Image* getImage() const { return _image.get(); } - - inline unsigned int& getModifiedCount(unsigned int contextID) const - { - // get the modified count for the current contextID. - return _modifiedCount[contextID]; - } - - /** Sets the texture image, ignoring face. */ - virtual void setImage(unsigned int, Image* image) { setImage(image); } - - /** Gets the texture image, ignoring face. */ - virtual Image* getImage(unsigned int) { return _image.get(); } - - /** Gets the const texture image, ignoring face. */ - virtual const Image* getImage(unsigned int) const { return _image.get(); } - - /** Gets the number of images that can be assigned to the Texture. */ - virtual unsigned int getNumImages() const { return 1; } - - - /** Sets the texture width, height, and depth. If width, height, or - * depth are zero, calculate the respective value from the source - * image size. */ - inline void setTextureSize(int width, int height, int depth) const - { - _textureWidth = width; - _textureHeight = height; - _textureDepth = depth; - } - - /** Gets the texture subload width. */ - inline void getTextureSize(int& width, int& height, int& depth) const - { - width = _textureWidth; - height = _textureHeight; - depth = _textureDepth; - } - - void setTextureWidth(int width) { _textureWidth=width; } - void setTextureHeight(int height) { _textureHeight=height; } - void setTextureDepth(int depth) { _textureDepth=depth; } - - virtual int getTextureWidth() const { return _textureWidth; } - virtual int getTextureHeight() const { return _textureHeight; } - virtual int getTextureDepth() const { return _textureDepth; } - - - class OSG_EXPORT SubloadCallback : public Referenced - { - public: - virtual void load(const Texture3D& texture,State& state) const = 0; - virtual void subload(const Texture3D& texture,State& state) const = 0; - }; - - void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } - - SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } - - const SubloadCallback* getSubloadCallback() const { return _subloadCallback.get(); } - - - /** Helper function. Sets the number of mipmap levels created for this - * texture. Should only be called within an osg::Texture::apply(), or - * during a custom OpenGL texture load. */ - void setNumMipmapLevels(unsigned int num) const { _numMipmapLevels=num; } - - /** Gets the number of mipmap levels created. */ - unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } - - - /** Copies a two-dimensional texture subimage, as per - * glCopyTexSubImage3D. Updates a portion of an existing OpenGL - * texture object from the current OpenGL background framebuffer - * contents at position \a x, \a y with width \a width and height - * \a height. Loads framebuffer data into the texture using offsets - * \a xoffset, \a yoffset, and \a zoffset. \a width and \a height - * must be powers of two. */ - void copyTexSubImage3D(State& state, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); - - - /** Bind the texture object. If the texture object hasn't already been - * compiled, create the texture mipmap levels. */ - virtual void apply(State& state) const; - - - /** Encapsulates queries of extension availability, obtains extension - * function pointers, and provides convenience wrappers for - * calling extension functions. */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setTexture3DSupported(bool flag) { _isTexture3DSupported=flag; } - bool isTexture3DSupported() const { return _isTexture3DSupported; } - - void setTexture3DFast(bool flag) { _isTexture3DFast=flag; } - bool isTexture3DFast() const { return _isTexture3DFast; } - - void setMaxTexture3DSize(GLint maxsize) { _maxTexture3DSize=maxsize; } - GLint maxTexture3DSize() const { return _maxTexture3DSize; } - - bool isCompressedTexImage3DSupported() const { return glCompressedTexImage3D!=0; } - - bool isCompressedTexSubImage3DSupported() const { return glCompressedTexSubImage3D!=0; } - - typedef void (GL_APIENTRY * GLTexImage3DProc) ( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); - typedef void (GL_APIENTRY * GLTexSubImage3DProc) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); - typedef void (GL_APIENTRY * CompressedTexImage3DArbProc) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); - typedef void (GL_APIENTRY * CompressedTexSubImage3DArbProc) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); - typedef void (GL_APIENTRY * GLCopyTexSubImageProc) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ); - - GLTexImage3DProc glTexImage3D; - GLTexSubImage3DProc glTexSubImage3D; - CompressedTexImage3DArbProc glCompressedTexImage3D; - CompressedTexSubImage3DArbProc glCompressedTexSubImage3D; - GLCopyTexSubImageProc glCopyTexSubImage3D; - - protected: - - ~Extensions() {} - - bool _isTexture3DSupported; - bool _isTexture3DFast; - GLint _maxTexture3DSize; - }; - - /** Encapsulates queries of extension availability, obtains extension - * function pointers, and provides convenience wrappers for - * calling extension functions. */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** Overrides Extensions objects across graphics contexts. Typically - * used to ensure the same lowest common denominator of extensions - * on systems with different graphics pipes. */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - protected : - - virtual ~Texture3D(); - - void computeRequiredTextureDimensions(State& state, const osg::Image& image,GLsizei& width, GLsizei& height,GLsizei& depth, GLsizei& numMipmapLevels) const; - - virtual void computeInternalFormat() const; - void allocateMipmap(State& state) const; - - void applyTexImage3D(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight, GLsizei& indepth, GLsizei& numMipmapLevels) const; - - /** It's not ideal that _image is mutable, but it's required since - * Image::ensureDimensionsArePowerOfTwo() can only be called in a - * valid OpenGL context, and therefore within Texture::apply, which - * is const. */ - mutable ref_ptr _image; - - /** Subloaded images can have different texture and image sizes. */ - mutable GLsizei _textureWidth, _textureHeight, _textureDepth; - - /** Number of mip map levels the the texture has been created with, */ - mutable GLsizei _numMipmapLevels; - - ref_ptr _subloadCallback; - - typedef buffered_value ImageModifiedCount; - mutable ImageModifiedCount _modifiedCount; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TextureCubeMap b/libs/lib/mac32/include/osg/TextureCubeMap deleted file mode 100644 index 566b69c70..000000000 --- a/libs/lib/mac32/include/osg/TextureCubeMap +++ /dev/null @@ -1,188 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXTURECUBEMAP -#define OSG_TEXTURECUBEMAP 1 - -#include - - -namespace osg { - -/** TextureCubeMap state class which encapsulates OpenGL texture cubemap functionality. */ -class OSG_EXPORT TextureCubeMap : public Texture -{ - - public : - - TextureCubeMap(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - TextureCubeMap(const TextureCubeMap& cm,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, TextureCubeMap,TEXTURE); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& rhs) const; - - virtual GLenum getTextureTarget() const { return GL_TEXTURE_CUBE_MAP; } - - enum Face { - POSITIVE_X=0, - NEGATIVE_X=1, - POSITIVE_Y=2, - NEGATIVE_Y=3, - POSITIVE_Z=4, - NEGATIVE_Z=5 - }; - - /** Set the texture image for specified face. */ - virtual void setImage(unsigned int face, Image* image); - - /** Get the texture image for specified face. */ - virtual Image* getImage(unsigned int face); - - /** Get the const texture image for specified face. */ - virtual const Image* getImage(unsigned int face) const; - - /** Get the number of images that can be assigned to the Texture. */ - virtual unsigned int getNumImages() const { return 6; } - - inline unsigned int& getModifiedCount(unsigned int face,unsigned int contextID) const - { - // get the modified count for the current contextID. - return _modifiedCount[face][contextID]; - } - - /** Set the texture width and height. If width or height are zero then - * the respective size value is calculated from the source image sizes. - */ - inline void setTextureSize(int width, int height) const - { - _textureWidth = width; - _textureHeight = height; - } - - void setTextureWidth(int width) { _textureWidth=width; } - void setTextureHeight(int height) { _textureHeight=height; } - - virtual int getTextureWidth() const { return _textureWidth; } - virtual int getTextureHeight() const { return _textureHeight; } - virtual int getTextureDepth() const { return 1; } - - class OSG_EXPORT SubloadCallback : public Referenced - { - public: - virtual void load(const TextureCubeMap& texture,State& state) const = 0; - virtual void subload(const TextureCubeMap& texture,State& state) const = 0; - }; - - void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } - - SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } - - const SubloadCallback* getSubloadCallback() const { return _subloadCallback.get(); } - - - /** Set the number of mip map levels the the texture has been created with. - * Should only be called within an osg::Texuture::apply() and custom OpenGL texture load. - */ - void setNumMipmapLevels(unsigned int num) const { _numMipmapLevels=num; } - - /** Get the number of mip map levels the the texture has been created with. */ - unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } - - /** Copies a two-dimensional texture subimage, as per - * glCopyTexSubImage2D. Updates a portion of an existing OpenGL - * texture object from the current OpenGL background framebuffer - * contents at position \a x, \a y with width \a width and height - * \a height. Loads framebuffer data into the texture using offsets - * \a xoffset and \a yoffset. \a width and \a height must be powers - * of two. */ - void copyTexSubImageCubeMap(State& state, int face, int xoffset, int yoffset, int x, int y, int width, int height ); - - - /** On first apply (unless already compiled), create the mipmapped - * texture and bind it. Subsequent apply will simple bind to texture. - */ - virtual void apply(State& state) const; - - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provides convenience wrappers to - * check for the extensions or use the associated functions. - */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setCubeMapSupported(bool flag) { _isCubeMapSupported=flag; } - bool isCubeMapSupported() const { return _isCubeMapSupported; } - - protected: - - ~Extensions() {} - - bool _isCubeMapSupported; - - }; - - /** Function to call to get the extension of a specified context. - * If the Extensions object for that context has not yet been created - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object will - * only be created with the graphics context associated with ContextID. - */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** The setExtensions method allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions. - */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected : - - virtual ~TextureCubeMap(); - - bool imagesValid() const; - - virtual void computeInternalFormat() const; - void allocateMipmap(State& state) const; - - ref_ptr _images[6]; - - // subloaded images can have different texture and image sizes. - mutable GLsizei _textureWidth, _textureHeight; - - // number of mip map levels the the texture has been created with, - mutable GLsizei _numMipmapLevels; - - ref_ptr _subloadCallback; - - typedef buffered_value ImageModifiedCount; - mutable ImageModifiedCount _modifiedCount[6]; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TextureRectangle b/libs/lib/mac32/include/osg/TextureRectangle deleted file mode 100644 index 104b5aef2..000000000 --- a/libs/lib/mac32/include/osg/TextureRectangle +++ /dev/null @@ -1,148 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TEXTURERECTANGLE -#define OSG_TEXTURERECTANGLE 1 - -#include - -#ifndef GL_TEXTURE_RECTANGLE_NV -#define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#endif - -#ifndef GL_TEXTURE_RECTANGLE -#define GL_TEXTURE_RECTANGLE GL_TEXTURE_RECTANGLE_NV -#endif - -namespace osg { - -/** Texture state class which encapsulates OpenGL texture functionality. */ -class OSG_EXPORT TextureRectangle : public Texture -{ - - public : - - TextureRectangle(); - - TextureRectangle(Image* image); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - TextureRectangle(const TextureRectangle& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, TextureRectangle, TEXTURE); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& rhs) const; - - virtual GLenum getTextureTarget() const { return GL_TEXTURE_RECTANGLE; } - - /** Set the texture image. */ - void setImage(Image* image); - - /** Get the texture image. */ - Image* getImage() { return _image.get(); } - - /** Get the const texture image. */ - inline const Image* getImage() const { return _image.get(); } - - inline unsigned int& getModifiedCount(unsigned int contextID) const - { - // get the modified count for the current contextID. - return _modifiedCount[contextID]; - } - - - /** Set the texture image, ignoring face value as there is only one image. */ - virtual void setImage(unsigned int, Image* image) { setImage(image); } - - /** Get the texture image, ignoring face value as there is only one image. */ - virtual Image* getImage(unsigned int) { return _image.get(); } - - /** Get the const texture image, ignoring face value as there is only one image. */ - virtual const Image* getImage(unsigned int) const { return _image.get(); } - - /** Get the number of images that can be assigned to the Texture. */ - virtual unsigned int getNumImages() const { return 1; } - - - /** Set the texture width and height. If width or height are zero then - * the respective size value is calculated from the source image sizes. - */ - inline void setTextureSize(int width, int height) const - { - _textureWidth = width; - _textureHeight = height; - } - - void setTextureWidth(int width) { _textureWidth=width; } - void setTextureHeight(int height) { _textureHeight=height; } - - virtual int getTextureWidth() const { return _textureWidth; } - virtual int getTextureHeight() const { return _textureHeight; } - virtual int getTextureDepth() const { return 1; } - - class SubloadCallback : public Referenced - { - public: - virtual void load(const TextureRectangle&, State&) const = 0; - virtual void subload(const TextureRectangle&, State&) const = 0; - }; - - void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } - SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } - const SubloadCallback* getSubloadCallback() const { return _subloadCallback.get(); } - - /** Copies pixels into a 2D texture image, as per glCopyTexImage2D. - * Creates an OpenGL texture object from the current OpenGL background - * framebuffer contents at position \a x, \a y with width \a width and - * height \a height. \a width and \a height must be a power of two. */ - void copyTexImage2D(State& state, int x, int y, int width, int height ); - - /** Copies a two-dimensional texture subimage, as per - * glCopyTexSubImage2D. Updates a portion of an existing OpenGL - * texture object from the current OpenGL background framebuffer - * contents at position \a x, \a y with width \a width and height - * \a height. Loads framebuffer data into the texture using offsets - * \a xoffset and \a yoffset. \a width and \a height must be powers - * of two. */ - void copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, int y, int width, int height ); - - /** On first apply (unless already compiled), create and bind the - * texture, subsequent apply will simply bind to texture. - */ - virtual void apply(State& state) const; - - protected : - - virtual ~TextureRectangle(); - - virtual void computeInternalFormat() const; - void allocateMipmap(State& state) const; - - void applyTexImage_load(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight) const; - void applyTexImage_subload(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight, GLint& inInternalFormat) const; - - ref_ptr _image; - - // subloaded images can have different texture and image sizes. - mutable GLsizei _textureWidth, _textureHeight; - - ref_ptr _subloadCallback; - - typedef buffered_value ImageModifiedCount; - mutable ImageModifiedCount _modifiedCount; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Timer b/libs/lib/mac32/include/osg/Timer deleted file mode 100644 index 984e07829..000000000 --- a/libs/lib/mac32/include/osg/Timer +++ /dev/null @@ -1,153 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TIMER -#define OSG_TIMER 1 - -#include - -namespace osg { - -#if defined(_MSC_VER) - typedef __int64 Timer_t; -#else - typedef unsigned long long Timer_t; -#endif - -/** Timer class is used for measuring elapsed time or time between two points. */ -class OSG_EXPORT Timer { - - public: - - Timer(); - ~Timer() {} - - static Timer* instance(); - - /** Get the timers tick value.*/ - Timer_t tick() const; - - /** Set the start.*/ - void setStartTick() { _startTick = tick(); } - void setStartTick(Timer_t t) { _startTick = t; } - Timer_t getStartTick() const { return _startTick; } - - - /** Get elapsed time in seconds.*/ - inline double time_s() const { return delta_s(_startTick, tick()); } - - /** Get elapsed time in milliseconds.*/ - inline double time_m() const { return delta_m(_startTick, tick()); } - - /** Get elapsed time in microseconds.*/ - inline double time_u() const { return delta_u(_startTick, tick()); } - - /** Get elapsed time in nanoseconds.*/ - inline double time_n() const { return delta_n(_startTick, tick()); } - - /** Get the time in seconds between timer ticks t1 and t2.*/ - inline double delta_s( Timer_t t1, Timer_t t2 ) const { return (double)(t2 - t1)*_secsPerTick; } - - /** Get the time in milliseconds between timer ticks t1 and t2.*/ - inline double delta_m( Timer_t t1, Timer_t t2 ) const { return delta_s(t1,t2)*1e3; } - - /** Get the time in microseconds between timer ticks t1 and t2.*/ - inline double delta_u( Timer_t t1, Timer_t t2 ) const { return delta_s(t1,t2)*1e6; } - - /** Get the time in nanoseconds between timer ticks t1 and t2.*/ - inline double delta_n( Timer_t t1, Timer_t t2 ) const { return delta_s(t1,t2)*1e9; } - - /** Get the the number of seconds per tick. */ - inline double getSecondsPerTick() const { return _secsPerTick; } - - protected : - - Timer_t _startTick; - double _secsPerTick; -}; - -/** Helper class for timing sections of code. */ -class ElapsedTime -{ - public: - inline ElapsedTime(double* elapsedTime, osg::Timer* timer = 0): - _time(elapsedTime) - { - init(timer); - } - - inline ElapsedTime(osg::Timer* timer = 0): - _time(0) - { - init(timer); - } - - inline ~ElapsedTime() - { - finish(); - } - - inline void reset() - { - _startTick = _timer->tick(); - } - - /** elapsed time in seconds. */ - inline double elapsedTime() const - { - return _timer->delta_s(_startTick, _timer->tick()); - } - - /** elapsed time in milliseconds. */ - inline double elapsedTime_m() const - { - return _timer->delta_m(_startTick, _timer->tick()); - } - - /** elapsed time in microseconds. */ - inline double elapsedTime_u() const - { - return _timer->delta_u(_startTick, _timer->tick()); - } - - /** elapsed time in nanoseconds. */ - inline double elapsedTime_n() const - { - return _timer->delta_n(_startTick, _timer->tick()); - } - - inline void finish() - { - Timer_t endTick = _timer->tick(); - if (_time) *_time += _timer->delta_s(_startTick, endTick); - _startTick = endTick; - } - - protected: - - inline void init(osg::Timer* timer) - { - if (timer) _timer = timer; - else _timer = osg::Timer::instance(); - - _startTick = _timer->tick(); - } - - double* _time; - Timer* _timer; - Timer_t _startTick; - -}; - -} -#endif diff --git a/libs/lib/mac32/include/osg/TransferFunction b/libs/lib/mac32/include/osg/TransferFunction deleted file mode 100644 index e89c519f7..000000000 --- a/libs/lib/mac32/include/osg/TransferFunction +++ /dev/null @@ -1,128 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TRANSFERFUNCTION -#define OSG_TRANSFERFUNCTION 1 - -#include -#include - -#include - -namespace osg { - - -/** TransferFunction is a class that provide a 1D,2D or 3D colour look up table - * that can be used on the GPU as a 1D, 2D or 3D texture. - * Typically uses include mapping heights to colours when contouring terrain, - * or mapping intensities to colours when volume rendering. -*/ -class OSG_EXPORT TransferFunction : public osg::Object -{ - public : - - TransferFunction(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - TransferFunction(const TransferFunction& tf, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg, TransferFunction) - - /** Get the image that is used for passing the transfer function data to the GPU.*/ - osg::Image* getImage() { return _image.get(); } - - /** Get the const image that is used for passing the transfer function data to the GPU.*/ - const osg::Image* getImage() const { return _image.get(); } - - protected: - - virtual ~TransferFunction(); - - osg::ref_ptr _image; -}; - -/** 1D variant of TransferFunction. */ -class OSG_EXPORT TransferFunction1D : public osg::TransferFunction -{ - public: - - TransferFunction1D(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - TransferFunction1D(const TransferFunction1D& tf, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg, TransferFunction1D) - - /** Get the minimum transfer function value.*/ - float getMinimum() const { return _colorMap.empty() ? 0.0f : _colorMap.begin()->first; } - - /** Get the maximum transfer function value.*/ - float getMaximum() const { return _colorMap.empty() ? 0.0f : _colorMap.rbegin()->first; } - - /** allocate the osg::Image with specified dimension. The Image tracks the color map, and is used to represent the - * transfer function when download to GPU.*/ - void allocate(unsigned int numImageCells); - - /** Clear the whole range to just represent a single color.*/ - void clear(const osg::Vec4& color = osg::Vec4(1.0f,1.0f,1.0f,1.0f)); - - /** Get pixel value from the image. */ - osg::Vec4 getPixelValue(unsigned int i) const - { - if (_image.valid() && i(_image->s())) - { - return *reinterpret_cast(_image->data(i)); - } - else - { - return osg::Vec4(1.0f,1.0f,1.0f,1.0f); - } - } - - /** Get the number of image cells that are assigned to the represent the transfer function when download to the GPU.*/ - unsigned int getNumberImageCells() const { return _image.valid() ? _image->s() : 0; } - - /** Set the color for a specified transfer function value. - * updateImage defaults to true, and tells the setColor function to update the associate osg::Image that - * tracks the color map. Pass in false as the updateImage parameter if you are setting up many values - * at once to avoid recomputation of the image data, then once all setColor calls are made explictly call - * updateImage() to bring the osg::Image back into sync with the color map. */ - void setColor(float v, const osg::Vec4& color, bool updateImage=true); - - /** Get the color for a specified transfer function value, interpolating the value if no exact match is found.*/ - osg::Vec4 getColor(float v) const; - - typedef std::map ColorMap; - - /** Get the color map that stores the mapping between the the transfer function value and the colour it maps to.*/ - ColorMap& getColorMap() { return _colorMap; } - - /** Get the const color map that stores the mapping between the the transfer function value and the colour it maps to.*/ - const ColorMap& getColorMap() const { return _colorMap; } - - /** Assign a color map and automatically update the image to make sure they are in sync.*/ - void assign(const ColorMap& vcm); - - /** Manually update the associate osg::Image to represent the colors assigned in the color map.*/ - void updateImage(); - - protected: - - ColorMap _colorMap; - - void assignToImage(float lower_v, const osg::Vec4& lower_c, float upper_v, const osg::Vec4& upper_c); -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Transform b/libs/lib/mac32/include/osg/Transform deleted file mode 100644 index dccb2e45e..000000000 --- a/libs/lib/mac32/include/osg/Transform +++ /dev/null @@ -1,167 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TRANSFORM -#define OSG_TRANSFORM 1 - -#include -#include - -#ifndef GL_RESCALE_NORMAL -#define GL_RESCALE_NORMAL 0x803A -#endif - -#ifndef GL_NORMALIZE -#define GL_NORMALIZE 0x0BA1 -#endif - -namespace osg { - - - -/** Compute the matrix which transforms objects in local coords to world coords, - * by accumulating the Transform local to world matrices along the specified node path. -*/ -extern OSG_EXPORT Matrix computeLocalToWorld(const NodePath& nodePath, bool ignoreCameras = true); - -/** Compute the matrix which transforms objects in world coords to local coords, - * by accumulating the Transform world to local matrices along the specified node path. -*/ -extern OSG_EXPORT Matrix computeWorldToLocal(const NodePath& nodePath, bool ignoreCameras = true); - -/** Compute the matrix which transforms objects in local coords to eye coords, - * by accumulating the Transform local to world matrices along the specified node path - * and multiplying by the supplied initial camera modelview. -*/ -extern OSG_EXPORT Matrix computeLocalToEye(const Matrix& modelview, const NodePath& nodePath, bool ignoreCameras = true); - -/** Compute the matrix which transforms objects in eye coords to local coords, - * by accumulating the Transform world to local matrices along the specified node path - * and multiplying by the inverse of the supplied initial camera modelview. -*/ -extern OSG_EXPORT Matrix computeEyeToLocal(const Matrix& modelview, const NodePath& nodePath, bool ignoreCameras = true); - - -/** A Transform is a group node for which all children are transformed by - * a 4x4 matrix. It is often used for positioning objects within a scene, - * producing trackball functionality or for animation. - * - * Transform itself does not provide set/get functions, only the interface - * for defining what the 4x4 transformation is. Subclasses, such as - * MatrixTransform and PositionAttitudeTransform support the use of an - * osg::Matrix or a osg::Vec3/osg::Quat respectively. - * - * Note: If the transformation matrix scales the subgraph then the normals - * of the underlying geometry will need to be renormalized to be unit - * vectors once more. This can be done transparently through OpenGL's - * use of either GL_NORMALIZE and GL_RESCALE_NORMAL modes. For further - * background reading see the glNormalize documentation in the OpenGL - * Reference Guide (the blue book). To enable it in the OSG, you simply - * need to attach a local osg::StateSet to the osg::Transform, and set - * the appropriate mode to ON via - * stateset->setMode(GL_NORMALIZE, osg::StateAttribute::ON); -*/ -class OSG_EXPORT Transform : public Group -{ - public : - - Transform(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Transform(const Transform&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Node(osg, Transform); - - virtual Transform* asTransform() { return this; } - virtual const Transform* asTransform() const { return this; } - - virtual MatrixTransform* asMatrixTransform() { return 0; } - virtual const MatrixTransform* asMatrixTransform() const { return 0; } - - virtual PositionAttitudeTransform* asPositionAttitudeTransform() { return 0; } - virtual const PositionAttitudeTransform* asPositionAttitudeTransform() const { return 0; } - - enum ReferenceFrame - { - RELATIVE_RF, - ABSOLUTE_RF, - ABSOLUTE_RF_INHERIT_VIEWPOINT - }; - - /** Set the transform's ReferenceFrame, either to be relative to its - * parent reference frame, or relative to an absolute coordinate - * frame. RELATIVE_RF is the default. - * Note: Setting the ReferenceFrame to be ABSOLUTE_RF will - * also set the CullingActive flag on the transform, and hence all - * of its parents, to false, thereby disabling culling of it and - * all its parents. This is necessary to prevent inappropriate - * culling, but may impact cull times if the absolute transform is - * deep in the scene graph. It is therefore recommended to only use - * absolute Transforms at the top of the scene, for such things as - * heads up displays. - * ABSOLUTE_RF_INHERIT_VIEWPOINT is the same as ABSOLUTE_RF except it - * adds the ability to use the parents view points position in world coordinates - * as its local viewpoint in the new coordinates frame. This is useful for - * Render to texture Cameras that wish to use the main views LOD range computation - * (which uses the viewpoint rather than the eye point) rather than use the local - * eye point defined by the this Transforms' absolute view matrix. - */ - void setReferenceFrame(ReferenceFrame rf); - - ReferenceFrame getReferenceFrame() const { return _referenceFrame; } - - virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const - { - if (_referenceFrame==RELATIVE_RF) - { - return false; - } - else // absolute - { - matrix.makeIdentity(); - return true; - } - } - - virtual bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const - { - if (_referenceFrame==RELATIVE_RF) - { - return false; - } - else // absolute - { - matrix.makeIdentity(); - return true; - } - } - - /** Overrides Group's computeBound. - * There is no need to override in subclasses from osg::Transform - * since this computeBound() uses the underlying matrix (calling - * computeMatrix if required). - */ - virtual BoundingSphere computeBound() const; - - protected : - - virtual ~Transform(); - - - ReferenceFrame _referenceFrame; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TriangleFunctor b/libs/lib/mac32/include/osg/TriangleFunctor deleted file mode 100644 index 4b34ececb..000000000 --- a/libs/lib/mac32/include/osg/TriangleFunctor +++ /dev/null @@ -1,397 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TRIANGLEFUNCTOR -#define OSG_TRIANGLEFUNCTOR 1 - -#include -#include - -namespace osg { - - -/** Provides access to the triangles that compose an \c osg::Drawable. If the \c - * Drawable is not composed of triangles, the \c TriangleFunctor will convert - * the primitives to triangles whenever possible. - *

Notice that \c TriangleFunctor is a class template, and that it inherits - * from its template parameter \c T. This template parameter must implement - * T::operator() (const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 - * v3, bool treatVertexDataAsTemporary), which will be called for every - * triangle when the functor is applied to a \c Drawable. Parameters \c v1, \c - * v2, and \c v3 are the triangle vertices. The fourth parameter, \c - * treatVertexDataAsTemporary, indicates whether these vertices are coming from - * a "real" vertex array, or from a temporary vertex array, created by the \c - * TriangleFunctor from some other geometry representation. - * @see \c PrimitiveFunctor for general usage hints. - */ -template -class TriangleFunctor : public PrimitiveFunctor, public T -{ -public: - - TriangleFunctor() - { - _vertexArraySize=0; - _vertexArrayPtr=0; - _modeCache=0; - _treatVertexDataAsTemporary=false; - } - - virtual ~TriangleFunctor() {} - - void setTreatVertexDataAsTemporary(bool treatVertexDataAsTemporary) { _treatVertexDataAsTemporary=treatVertexDataAsTemporary; } - bool getTreatVertexDataAsTemporary() const { return _treatVertexDataAsTemporary; } - - virtual void setVertexArray(unsigned int,const Vec2*) - { - notify(WARN)<<"Triangle Functor does not support Vec2* vertex arrays"<operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); - break; - } - case(GL_TRIANGLE_STRIP): - { - const Vec3* vptr = &_vertexArrayPtr[first]; - for(GLsizei i=2;ioperator()(*(vptr),*(vptr+2),*(vptr+1),_treatVertexDataAsTemporary); - else this->operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUADS): - { - const Vec3* vptr = &_vertexArrayPtr[first]; - for(GLsizei i=3;ioperator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); - this->operator()(*(vptr),*(vptr+2),*(vptr+3),_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUAD_STRIP): - { - const Vec3* vptr = &_vertexArrayPtr[first]; - for(GLsizei i=3;ioperator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); - this->operator()(*(vptr+1),*(vptr+3),*(vptr+2),_treatVertexDataAsTemporary); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): - { - const Vec3* vfirst = &_vertexArrayPtr[first]; - const Vec3* vptr = vfirst+1; - for(GLsizei i=2;ioperator()(*(vfirst),*(vptr),*(vptr+1),_treatVertexDataAsTemporary); - } - break; - } - case(GL_POINTS): - case(GL_LINES): - case(GL_LINE_STRIP): - case(GL_LINE_LOOP): - default: - // can't be converted into to triangles. - break; - } - } - - virtual void drawElements(GLenum mode,GLsizei count,const GLubyte* indices) - { - if (indices==0 || count==0) return; - - typedef const GLubyte* IndexPointer; - - switch(mode) - { - case(GL_TRIANGLES): - { - IndexPointer ilast = &indices[count]; - for(IndexPointer iptr=indices;iptroperator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - break; - } - case(GL_TRIANGLE_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=2;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUADS): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUAD_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - this->operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): - { - IndexPointer iptr = indices; - const Vec3& vfirst = _vertexArrayPtr[*iptr]; - ++iptr; - for(GLsizei i=2;ioperator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_POINTS): - case(GL_LINES): - case(GL_LINE_STRIP): - case(GL_LINE_LOOP): - default: - // can't be converted into to triangles. - break; - } - } - - virtual void drawElements(GLenum mode,GLsizei count,const GLushort* indices) - { - if (indices==0 || count==0) return; - - typedef const GLushort* IndexPointer; - - switch(mode) - { - case(GL_TRIANGLES): - { - IndexPointer ilast = &indices[count]; - for(IndexPointer iptr=indices;iptroperator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_TRIANGLE_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=2;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUADS): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUAD_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - this->operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): - { - IndexPointer iptr = indices; - const Vec3& vfirst = _vertexArrayPtr[*iptr]; - ++iptr; - for(GLsizei i=2;ioperator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_POINTS): - case(GL_LINES): - case(GL_LINE_STRIP): - case(GL_LINE_LOOP): - default: - // can't be converted into to triangles. - break; - } - } - - virtual void drawElements(GLenum mode,GLsizei count,const GLuint* indices) - { - if (indices==0 || count==0) return; - - typedef const GLuint* IndexPointer; - - switch(mode) - { - case(GL_TRIANGLES): - { - IndexPointer ilast = &indices[count]; - for(IndexPointer iptr=indices;iptroperator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - break; - } - case(GL_TRIANGLE_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=2;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUADS): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_QUAD_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - this->operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): - { - IndexPointer iptr = indices; - const Vec3& vfirst = _vertexArrayPtr[*iptr]; - ++iptr; - for(GLsizei i=2;ioperator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - } - break; - } - case(GL_POINTS): - case(GL_LINES): - case(GL_LINE_STRIP): - case(GL_LINE_LOOP): - default: - // can't be converted into to triangles. - break; - } - } - - - - /** Note: - * begin(..),vertex(..) & end() are convenience methods for adapting - * non vertex array primitives to vertex array based primitives. - * This is done to simplify the implementation of primitive functor - * subclasses - users only need override drawArray and drawElements. - */ - virtual void begin(GLenum mode) - { - _modeCache = mode; - _vertexCache.clear(); - } - - virtual void vertex(const Vec2& vert) { _vertexCache.push_back(osg::Vec3(vert[0],vert[1],0.0f)); } - virtual void vertex(const Vec3& vert) { _vertexCache.push_back(vert); } - virtual void vertex(const Vec4& vert) { _vertexCache.push_back(osg::Vec3(vert[0],vert[1],vert[2])/vert[3]); } - virtual void vertex(float x,float y) { _vertexCache.push_back(osg::Vec3(x,y,0.0f)); } - virtual void vertex(float x,float y,float z) { _vertexCache.push_back(osg::Vec3(x,y,z)); } - virtual void vertex(float x,float y,float z,float w) { _vertexCache.push_back(osg::Vec3(x,y,z)/w); } - virtual void end() - { - if (!_vertexCache.empty()) - { - setVertexArray(_vertexCache.size(),&_vertexCache.front()); - _treatVertexDataAsTemporary = true; - drawArrays(_modeCache,0,_vertexCache.size()); - } - } - -protected: - - - unsigned int _vertexArraySize; - const Vec3* _vertexArrayPtr; - - GLenum _modeCache; - std::vector _vertexCache; - bool _treatVertexDataAsTemporary; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/TriangleIndexFunctor b/libs/lib/mac32/include/osg/TriangleIndexFunctor deleted file mode 100644 index be3a5a9a2..000000000 --- a/libs/lib/mac32/include/osg/TriangleIndexFunctor +++ /dev/null @@ -1,344 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_TRIANGLEINDEXFUNCTOR -#define OSG_TRIANGLEINDEXFUNCTOR 1 - -#include -#include - -namespace osg { - -template -class TriangleIndexFunctor : public PrimitiveIndexFunctor, public T -{ -public: - - - virtual void setVertexArray(unsigned int,const Vec2*) - { - } - - virtual void setVertexArray(unsigned int ,const Vec3* ) - { - } - - virtual void setVertexArray(unsigned int,const Vec4* ) - { - } - - virtual void setVertexArray(unsigned int,const Vec2d*) - { - } - - virtual void setVertexArray(unsigned int ,const Vec3d* ) - { - } - - virtual void setVertexArray(unsigned int,const Vec4d* ) - { - } - - virtual void begin(GLenum mode) - { - _modeCache = mode; - _indexCache.clear(); - } - - virtual void vertex(unsigned int vert) - { - _indexCache.push_back(vert); - } - - virtual void end() - { - if (!_indexCache.empty()) - { - drawElements(_modeCache,_indexCache.size(),&_indexCache.front()); - } - } - - virtual void drawArrays(GLenum mode,GLint first,GLsizei count) - { - switch(mode) - { - case(GL_TRIANGLES): - { - unsigned int pos=first; - for(GLsizei i=2;ioperator()(pos,pos+1,pos+2); - } - break; - } - case(GL_TRIANGLE_STRIP): - { - unsigned int pos=first; - for(GLsizei i=2;ioperator()(pos,pos+2,pos+1); - else this->operator()(pos,pos+1,pos+2); - } - break; - } - case(GL_QUADS): - { - unsigned int pos=first; - for(GLsizei i=3;ioperator()(pos,pos+1,pos+2); - this->operator()(pos,pos+2,pos+3); - } - break; - } - case(GL_QUAD_STRIP): - { - unsigned int pos=first; - for(GLsizei i=3;ioperator()(pos,pos+1,pos+2); - this->operator()(pos+1,pos+3,pos+2); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): - { - unsigned int pos=first+1; - for(GLsizei i=2;ioperator()(first,pos,pos+1); - } - break; - } - case(GL_POINTS): - case(GL_LINES): - case(GL_LINE_STRIP): - case(GL_LINE_LOOP): - default: - // can't be converted into to triangles. - break; - } - } - - virtual void drawElements(GLenum mode,GLsizei count,const GLubyte* indices) - { - if (indices==0 || count==0) return; - - typedef GLubyte Index; - typedef const Index* IndexPointer; - - switch(mode) - { - case(GL_TRIANGLES): - { - IndexPointer ilast = &indices[count]; - for(IndexPointer iptr=indices;iptroperator()(*iptr,*(iptr+1),*(iptr+2)); - break; - } - case(GL_TRIANGLE_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=2;ioperator()(*(iptr),*(iptr+2),*(iptr+1)); - else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); - } - break; - } - case(GL_QUADS): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(*(iptr),*(iptr+1),*(iptr+2)); - this->operator()(*(iptr),*(iptr+2),*(iptr+3)); - } - break; - } - case(GL_QUAD_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(*(iptr),*(iptr+1),*(iptr+2)); - this->operator()(*(iptr+1),*(iptr+3),*(iptr+2)); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): - { - IndexPointer iptr = indices; - Index first = *iptr; - ++iptr; - for(GLsizei i=2;ioperator()(first,*(iptr),*(iptr+1)); - } - break; - } - case(GL_POINTS): - case(GL_LINES): - case(GL_LINE_STRIP): - case(GL_LINE_LOOP): - default: - // can't be converted into to triangles. - break; - } - } - - virtual void drawElements(GLenum mode,GLsizei count,const GLushort* indices) - { - if (indices==0 || count==0) return; - - typedef GLushort Index; - typedef const Index* IndexPointer; - - switch(mode) - { - case(GL_TRIANGLES): - { - IndexPointer ilast = &indices[count]; - for(IndexPointer iptr=indices;iptroperator()(*iptr,*(iptr+1),*(iptr+2)); - break; - } - case(GL_TRIANGLE_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=2;ioperator()(*(iptr),*(iptr+2),*(iptr+1)); - else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); - } - break; - } - case(GL_QUADS): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(*(iptr),*(iptr+1),*(iptr+2)); - this->operator()(*(iptr),*(iptr+2),*(iptr+3)); - } - break; - } - case(GL_QUAD_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(*(iptr),*(iptr+1),*(iptr+2)); - this->operator()(*(iptr+1),*(iptr+3),*(iptr+2)); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): - { - IndexPointer iptr = indices; - Index first = *iptr; - ++iptr; - for(GLsizei i=2;ioperator()(first,*(iptr),*(iptr+1)); - } - break; - } - case(GL_POINTS): - case(GL_LINES): - case(GL_LINE_STRIP): - case(GL_LINE_LOOP): - default: - // can't be converted into to triangles. - break; - } - } - - virtual void drawElements(GLenum mode,GLsizei count,const GLuint* indices) - { - if (indices==0 || count==0) return; - - typedef GLuint Index; - typedef const Index* IndexPointer; - - switch(mode) - { - case(GL_TRIANGLES): - { - IndexPointer ilast = &indices[count]; - for(IndexPointer iptr=indices;iptroperator()(*iptr,*(iptr+1),*(iptr+2)); - break; - } - case(GL_TRIANGLE_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=2;ioperator()(*(iptr),*(iptr+2),*(iptr+1)); - else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); - } - break; - } - case(GL_QUADS): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(*(iptr),*(iptr+1),*(iptr+2)); - this->operator()(*(iptr),*(iptr+2),*(iptr+3)); - } - break; - } - case(GL_QUAD_STRIP): - { - IndexPointer iptr = indices; - for(GLsizei i=3;ioperator()(*(iptr),*(iptr+1),*(iptr+2)); - this->operator()(*(iptr+1),*(iptr+3),*(iptr+2)); - } - break; - } - case(GL_POLYGON): // treat polygons as GL_TRIANGLE_FAN - case(GL_TRIANGLE_FAN): - { - IndexPointer iptr = indices; - Index first = *iptr; - ++iptr; - for(GLsizei i=2;ioperator()(first,*(iptr),*(iptr+1)); - } - break; - } - case(GL_POINTS): - case(GL_LINES): - case(GL_LINE_STRIP): - case(GL_LINE_LOOP): - default: - // can't be converted into to triangles. - break; - } - } - - GLenum _modeCache; - std::vector _indexCache; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Uniform b/libs/lib/mac32/include/osg/Uniform deleted file mode 100644 index 1eaa0311e..000000000 --- a/libs/lib/mac32/include/osg/Uniform +++ /dev/null @@ -1,518 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * Copyright (C) 2003-2005 3Dlabs Inc. Ltd. - * Copyright (C) 2008 Zebra Imaging - * - * This application is open source and may be redistributed and/or modified - * freely and without restriction, both in commercial and non commercial - * applications, as long as this copyright notice is maintained. - * - * This application is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/* file: include/osg/Uniform - * author: Mike Weiblen 2008-01-02 -*/ - -#ifndef OSG_UNIFORM -#define OSG_UNIFORM 1 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#ifndef GL_SAMPLER_1D - #define GL_SAMPLER_1D 0x8B5D - #define GL_SAMPLER_2D 0x8B5E - #define GL_SAMPLER_3D 0x8B5F - #define GL_SAMPLER_1D_SHADOW 0x8B61 - #define GL_SAMPLER_2D_SHADOW 0x8B62 -#endif - - -namespace osg { - -// forward declare -class GL2Extensions; -class NodeVisitor; - -/////////////////////////////////////////////////////////////////////////// -// C++ classes to represent the GLSL-specific types. - -class OSG_EXPORT Matrix2 -{ - public: - Matrix2() { makeIdentity(); } - Matrix2( const Matrix2& mat ) { set(mat.ptr()); } - Matrix2( float a00, float a01, - float a10, float a11 ) - { - set( a00, a01, a10, a11 ); - } - ~Matrix2() {} - float& operator()(int row, int col) { return _mat[row][col]; } - float operator()(int row, int col) const { return _mat[row][col]; } - - Matrix2& operator = (const Matrix2& rhs) - { - if( &rhs == this ) return *this; - set(rhs.ptr()); - return *this; - } - - void set(const Matrix2& rhs) { set(rhs.ptr()); } - - void set(float const * const ptr) - { - float* local_ptr = (float*)_mat; - for(int i=0;i<4;++i) local_ptr[i]=ptr[i]; - } - - void set(float a00, float a01, - float a10, float a11) - { - _mat[0][0]=a00; _mat[0][1]=a01; - _mat[1][0]=a10; _mat[1][1]=a11; - } - - float* ptr() { return (float*)_mat; } - const float* ptr() const { return (const float*)_mat; } - - float& operator [] (int i) {return ptr()[i];} - float operator [] (int i) const {return ptr()[i];} - - void makeIdentity() { set( 1, 0, 0, 1 ); } - - protected: - float _mat[2][2]; -}; - - -class OSG_EXPORT Matrix3 -{ - public: - Matrix3() { makeIdentity(); } - Matrix3( const Matrix3& mat ) { set(mat.ptr()); } - Matrix3( float a00, float a01, float a02, - float a10, float a11, float a12, - float a20, float a21, float a22 ) - { - set( a00, a01, a02, a10, a11, a12, a20, a21, a22 ); - } - ~Matrix3() {} - float& operator()(int row, int col) { return _mat[row][col]; } - float operator()(int row, int col) const { return _mat[row][col]; } - - Matrix3& operator = (const Matrix3& rhs) - { - if( &rhs == this ) return *this; - set(rhs.ptr()); - return *this; - } - - void set(const Matrix3& rhs) { set(rhs.ptr()); } - - void set(float const * const ptr) - { - float* local_ptr = (float*)_mat; - for(int i=0;i<9;++i) local_ptr[i]=ptr[i]; - } - - void set(float a00, float a01, float a02, - float a10, float a11, float a12, - float a20, float a21, float a22 ) - { - _mat[0][0]=a00; _mat[0][1]=a01; _mat[0][2]=a02; - _mat[1][0]=a10; _mat[1][1]=a11; _mat[1][2]=a12; - _mat[2][0]=a20; _mat[2][1]=a21; _mat[2][2]=a22; - } - - float* ptr() { return (float*)_mat; } - const float* ptr() const { return (const float*)_mat; } - - float& operator [] (int i) {return ptr()[i];} - float operator [] (int i) const {return ptr()[i];} - - void makeIdentity() { set( 1, 0, 0, 0, 1, 0, 0, 0, 1 ); } - - protected: - float _mat[3][3]; -}; - -// TODO add new GL 2.1 non-square matrix types -// class OSG_EXPORT Matrix2x3 -// class OSG_EXPORT Matrix3x2 -// class OSG_EXPORT Matrix2x4 -// class OSG_EXPORT Matrix4x2 -// class OSG_EXPORT Matrix3x4 -// class OSG_EXPORT Matrix4x3 - - -/////////////////////////////////////////////////////////////////////////// - -/** Uniform encapsulates glUniform values */ -class OSG_EXPORT Uniform : public Object -{ - public: - enum Type { - FLOAT = GL_FLOAT, - FLOAT_VEC2 = GL_FLOAT_VEC2, - FLOAT_VEC3 = GL_FLOAT_VEC3, - FLOAT_VEC4 = GL_FLOAT_VEC4, - INT = GL_INT, - INT_VEC2 = GL_INT_VEC2, - INT_VEC3 = GL_INT_VEC3, - INT_VEC4 = GL_INT_VEC4, - BOOL = GL_BOOL, - BOOL_VEC2 = GL_BOOL_VEC2, - BOOL_VEC3 = GL_BOOL_VEC3, - BOOL_VEC4 = GL_BOOL_VEC4, - FLOAT_MAT2 = GL_FLOAT_MAT2, - FLOAT_MAT3 = GL_FLOAT_MAT3, - FLOAT_MAT4 = GL_FLOAT_MAT4, - SAMPLER_1D = GL_SAMPLER_1D, - SAMPLER_2D = GL_SAMPLER_2D, - SAMPLER_3D = GL_SAMPLER_3D, - SAMPLER_CUBE = GL_SAMPLER_CUBE, - SAMPLER_1D_SHADOW = GL_SAMPLER_1D_SHADOW, - SAMPLER_2D_SHADOW = GL_SAMPLER_2D_SHADOW, - - SAMPLER_1D_ARRAY = GL_SAMPLER_1D_ARRAY_EXT, - SAMPLER_2D_ARRAY = GL_SAMPLER_2D_ARRAY_EXT, - SAMPLER_1D_ARRAY_SHADOW = GL_SAMPLER_1D_ARRAY_SHADOW_EXT, - SAMPLER_2D_ARRAY_SHADOW = GL_SAMPLER_2D_ARRAY_SHADOW_EXT, - -// TODO the following must be integrated fully here and Uniform.cpp - FLOAT_MAT2x3 = GL_FLOAT_MAT2x3, - FLOAT_MAT2x4 = GL_FLOAT_MAT2x4, - FLOAT_MAT3x2 = GL_FLOAT_MAT3x2, - FLOAT_MAT3x4 = GL_FLOAT_MAT3x4, - FLOAT_MAT4x2 = GL_FLOAT_MAT4x2, - FLOAT_MAT4x3 = GL_FLOAT_MAT4x3, - SAMPLER_BUFFER = GL_SAMPLER_BUFFER_EXT, - SAMPLER_CUBE_SHADOW = GL_SAMPLER_CUBE_SHADOW_EXT, - UNSIGNED_INT = GL_UNSIGNED_INT, - UNSIGNED_INT_VEC2 = GL_UNSIGNED_INT_VEC2_EXT, - UNSIGNED_INT_VEC3 = GL_UNSIGNED_INT_VEC3_EXT, - UNSIGNED_INT_VEC4 = GL_UNSIGNED_INT_VEC4_EXT, - INT_SAMPLER_1D = GL_INT_SAMPLER_1D_EXT, - INT_SAMPLER_2D = GL_INT_SAMPLER_2D_EXT, - INT_SAMPLER_3D = GL_INT_SAMPLER_3D_EXT, - INT_SAMPLER_CUBE = GL_INT_SAMPLER_CUBE_EXT, - INT_SAMPLER_2D_RECT = GL_INT_SAMPLER_2D_RECT_EXT, - INT_SAMPLER_1D_ARRAY = GL_INT_SAMPLER_1D_ARRAY_EXT, - INT_SAMPLER_2D_ARRAY = GL_INT_SAMPLER_2D_ARRAY_EXT, - INT_SAMPLER_BUFFER = GL_INT_SAMPLER_BUFFER_EXT, - UNSIGNED_INT_SAMPLER_1D = GL_UNSIGNED_INT_SAMPLER_1D_EXT, - UNSIGNED_INT_SAMPLER_2D = GL_UNSIGNED_INT_SAMPLER_2D_EXT, - UNSIGNED_INT_SAMPLER_3D = GL_UNSIGNED_INT_SAMPLER_3D_EXT, - UNSIGNED_INT_SAMPLER_CUBE = GL_UNSIGNED_INT_SAMPLER_CUBE_EXT, - UNSIGNED_INT_SAMPLER_2D_RECT = GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT, - UNSIGNED_INT_SAMPLER_1D_ARRAY = GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT, - UNSIGNED_INT_SAMPLER_2D_ARRAY = GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT, - UNSIGNED_INT_SAMPLER_BUFFER = GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT, - - UNDEFINED = 0x0 - }; - - public: - - Uniform(); - Uniform( Type type, const std::string& name, int numElements=1 ); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Uniform(const Uniform& rhs, const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg, Uniform); - - - /** Set the type of glUniform, ensuring it is only set once.*/ - bool setType( Type t ); - - /** Get the type of glUniform as enum. */ - Type getType() const { return _type; } - - /** Set the name of the glUniform, ensuring it is only set once.*/ - virtual void setName( const std::string& name ); - - /** Set the length of a uniform, ensuring it is only set once (1==scalar)*/ - void setNumElements( unsigned int numElements ); - - /** Get the number of GLSL elements of the osg::Uniform (1==scalar) */ - unsigned int getNumElements() const { return _numElements; } - - /** Get the number of elements required for the internal data array. - * Returns 0 if the osg::Uniform is not properly configured. */ - unsigned int getInternalArrayNumElements() const; - - /** Return the name of a Type enum as string. */ - static const char* getTypename( Type t ); - - /** Return the the number of components for a GLSL type. */ - static int getTypeNumComponents( Type t ); - - /** Return the Type enum of a Uniform typename string */ - static Uniform::Type getTypeId( const std::string& tname ); - - /** Return the GL API type corresponding to a GLSL type */ - static Type getGlApiType( Type t ); - - /** Return the internal data array type corresponding to a GLSL type */ - static GLenum getInternalArrayType( Type t ); - - /** Return the number that the name maps to uniquely */ - static unsigned int getNameID(const std::string& name); - - /** convenient scalar (non-array) constructors w/ assignment */ - explicit Uniform( const char* name, float f ); - explicit Uniform( const char* name, int i ); - explicit Uniform( const char* name, unsigned int i ); - explicit Uniform( const char* name, bool b ); - Uniform( const char* name, const osg::Vec2& v2 ); - Uniform( const char* name, const osg::Vec3& v3 ); - Uniform( const char* name, const osg::Vec4& v4 ); - Uniform( const char* name, const osg::Matrix2& m2 ); - Uniform( const char* name, const osg::Matrix3& m3 ); - Uniform( const char* name, const osg::Matrixf& m4 ); - Uniform( const char* name, const osg::Matrixd& m4 ); - Uniform( const char* name, int i0, int i1 ); - Uniform( const char* name, int i0, int i1, int i2 ); - Uniform( const char* name, int i0, int i1, int i2, int i3 ); - Uniform( const char* name, unsigned int i0, unsigned int i1 ); - Uniform( const char* name, unsigned int i0, unsigned int i1, unsigned int i2 ); - Uniform( const char* name, unsigned int i0, unsigned int i1, unsigned int i2, unsigned int i3 ); - Uniform( const char* name, bool b0, bool b1 ); - Uniform( const char* name, bool b0, bool b1, bool b2 ); - Uniform( const char* name, bool b0, bool b1, bool b2, bool b3 ); - // TODO must add new types - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const Uniform& rhs) const; - virtual int compareData(const Uniform& rhs) const; - - bool operator < (const Uniform& rhs) const { return compare(rhs)<0; } - bool operator == (const Uniform& rhs) const { return compare(rhs)==0; } - bool operator != (const Uniform& rhs) const { return compare(rhs)!=0; } - - void copyData( const Uniform& rhs ); - - - /** A vector of osg::StateSet pointers which is used to store the parent(s) of this Uniform, the parents could be osg::Node or osg::Drawable.*/ - typedef std::vector ParentList; - - /** Get the parent list of this Uniform. */ - inline const ParentList& getParents() const { return _parents; } - - /** Get the a copy of parent list of node. A copy is returned to - * prevent modification of the parent list.*/ - inline ParentList getParents() { return _parents; } - - inline StateSet* getParent(unsigned int i) { return _parents[i]; } - /** - * Get a single const parent of this Uniform. - * @param i index of the parent to get. - * @return the parent i. - */ - inline const StateSet* getParent(unsigned int i) const { return _parents[i]; } - - /** - * Get the number of parents of this Uniform. - * @return the number of parents of this Uniform. - */ - inline unsigned int getNumParents() const { return _parents.size(); } - - - /** convenient scalar (non-array) value assignment */ - bool set( float f ); - bool set( int i ); - bool set( unsigned int i ); - bool set( bool b ); - bool set( const osg::Vec2& v2 ); - bool set( const osg::Vec3& v3 ); - bool set( const osg::Vec4& v4 ); - bool set( const osg::Matrix2& m2 ); - bool set( const osg::Matrix3& m3 ); - bool set( const osg::Matrixf& m4 ); - bool set( const osg::Matrixd& m4 ); - bool set( int i0, int i1 ); - bool set( int i0, int i1, int i2 ); - bool set( int i0, int i1, int i2, int i3 ); - bool set( unsigned int i0, unsigned int i1 ); - bool set( unsigned int i0, unsigned int i1, unsigned int i2 ); - bool set( unsigned int i0, unsigned int i1, unsigned int i2, unsigned int i3 ); - bool set( bool b0, bool b1 ); - bool set( bool b0, bool b1, bool b2 ); - bool set( bool b0, bool b1, bool b2, bool b3 ); - - /** convenient scalar (non-array) value query */ - bool get( float& f ) const; - bool get( int& i ) const; - bool get( unsigned int& i ) const; - bool get( bool& b ) const; - bool get( osg::Vec2& v2 ) const; - bool get( osg::Vec3& v3 ) const; - bool get( osg::Vec4& v4 ) const; - bool get( osg::Matrix2& m2 ) const; - bool get( osg::Matrix3& m3 ) const; - bool get( osg::Matrixf& m4 ) const; - bool get( osg::Matrixd& m4 ) const; - bool get( int& i0, int& i1 ) const; - bool get( int& i0, int& i1, int& i2 ) const; - bool get( int& i0, int& i1, int& i2, int& i3 ) const; - bool get( unsigned int& i0, unsigned int& i1 ) const; - bool get( unsigned int& i0, unsigned int& i1, unsigned int& i2 ) const; - bool get( unsigned int& i0, unsigned int& i1, unsigned int& i2, unsigned int& i3 ) const; - bool get( bool& b0, bool& b1 ) const; - bool get( bool& b0, bool& b1, bool& b2 ) const; - bool get( bool& b0, bool& b1, bool& b2, bool& b3 ) const; - - /** value assignment for array uniforms */ - bool setElement( unsigned int index, float f ); - bool setElement( unsigned int index, int i ); - bool setElement( unsigned int index, unsigned int i ); - bool setElement( unsigned int index, bool b ); - bool setElement( unsigned int index, const osg::Vec2& v2 ); - bool setElement( unsigned int index, const osg::Vec3& v3 ); - bool setElement( unsigned int index, const osg::Vec4& v4 ); - bool setElement( unsigned int index, const osg::Matrix2& m2 ); - bool setElement( unsigned int index, const osg::Matrix3& m3 ); - bool setElement( unsigned int index, const osg::Matrixf& m4 ); - bool setElement( unsigned int index, const osg::Matrixd& m4 ); - bool setElement( unsigned int index, int i0, int i1 ); - bool setElement( unsigned int index, int i0, int i1, int i2 ); - bool setElement( unsigned int index, int i0, int i1, int i2, int i3 ); - bool setElement( unsigned int index, unsigned int i0, unsigned int i1 ); - bool setElement( unsigned int index, unsigned int i0, unsigned int i1, unsigned int i2 ); - bool setElement( unsigned int index, unsigned int i0, unsigned int i1, unsigned int i2, unsigned int i3 ); - bool setElement( unsigned int index, bool b0, bool b1 ); - bool setElement( unsigned int index, bool b0, bool b1, bool b2 ); - bool setElement( unsigned int index, bool b0, bool b1, bool b2, bool b3 ); - - /** value query for array uniforms */ - bool getElement( unsigned int index, float& f ) const; - bool getElement( unsigned int index, int& i ) const; - bool getElement( unsigned int index, unsigned int& i ) const; - bool getElement( unsigned int index, bool& b ) const; - bool getElement( unsigned int index, osg::Vec2& v2 ) const; - bool getElement( unsigned int index, osg::Vec3& v3 ) const; - bool getElement( unsigned int index, osg::Vec4& v4 ) const; - bool getElement( unsigned int index, osg::Matrix2& m2 ) const; - bool getElement( unsigned int index, osg::Matrix3& m3 ) const; - bool getElement( unsigned int index, osg::Matrixf& m4 ) const; - bool getElement( unsigned int index, osg::Matrixd& m4 ) const; - bool getElement( unsigned int index, int& i0, int& i1 ) const; - bool getElement( unsigned int index, int& i0, int& i1, int& i2 ) const; - bool getElement( unsigned int index, int& i0, int& i1, int& i2, int& i3 ) const; - bool getElement( unsigned int index, unsigned int& i0, unsigned int& i1 ) const; - bool getElement( unsigned int index, unsigned int& i0, unsigned int& i1, unsigned int& i2 ) const; - bool getElement( unsigned int index, unsigned int& i0, unsigned int& i1, unsigned int& i2, unsigned int& i3 ) const; - bool getElement( unsigned int index, bool& b0, bool& b1 ) const; - bool getElement( unsigned int index, bool& b0, bool& b1, bool& b2 ) const; - bool getElement( unsigned int index, bool& b0, bool& b1, bool& b2, bool& b3 ) const; - - - struct Callback : public virtual osg::Object - { - Callback() {} - - Callback(const Callback&,const CopyOp&) {} - - META_Object(osg,Callback); - - /** do customized update code.*/ - virtual void operator () (Uniform*, NodeVisitor*) {} - }; - - /** Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.*/ - void setUpdateCallback(Callback* uc); - - /** Get the non const UpdateCallback.*/ - Callback* getUpdateCallback() { return _updateCallback.get(); } - - /** Get the const UpdateCallback.*/ - const Callback* getUpdateCallback() const { return _updateCallback.get(); } - - - /** Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.*/ - void setEventCallback(Callback* ec); - - /** Get the non const EventCallback.*/ - Callback* getEventCallback() { return _eventCallback.get(); } - - /** Get the const EventCallback.*/ - const Callback* getEventCallback() const { return _eventCallback.get(); } - - /** Increment the modified count on the Uniform so Programs watching it know it update themselves. - * NOTE: automatically called during osg::Uniform::set*(); - * you must call if modifying the internal data array directly. */ - inline void dirty() { ++_modifiedCount; } - - /** Set the internal data array for a osg::Uniform */ - bool setArray( FloatArray* array ); - bool setArray( IntArray* array ); - bool setArray( UIntArray* array ); - - /** Get the internal data array for a float osg::Uniform. */ - FloatArray* getFloatArray() { return _floatArray.get(); } - const FloatArray* getFloatArray() const { return _floatArray.get(); } - - /** Get the internal data array for an int osg::Uniform. */ - IntArray* getIntArray() { return _intArray.get(); } - const IntArray* getIntArray() const { return _intArray.get(); } - - /** Get the internal data array for an unsigned int osg::Uniform. */ - UIntArray* getUIntArray() { return _uintArray.get(); } - const UIntArray* getUIntArray() const { return _uintArray.get(); } - - inline void setModifiedCount(unsigned int mc) { _modifiedCount = mc; } - inline unsigned int getModifiedCount() const { return _modifiedCount; } - - /** Get the number that the Uniform's name maps to uniquely */ - unsigned int getNameID() const; - - void apply(const GL2Extensions* ext, GLint location) const; - - - protected: - - virtual ~Uniform(); - Uniform& operator=(const Uniform&) { return *this; } - - bool isCompatibleType( Type t ) const; - bool isScalar() const { return _numElements==1; } - void allocateDataArray(); - - void addParent(osg::StateSet* object); - void removeParent(osg::StateSet* object); - - ParentList _parents; - friend class osg::StateSet; - - Type _type; - unsigned int _numElements; - unsigned int _nameID; - - - // The internal data for osg::Uniforms are stored as an array of - // getInternalArrayType() of length getInternalArrayNumElements(). - ref_ptr _floatArray; - ref_ptr _intArray; - ref_ptr _uintArray; - - ref_ptr _updateCallback; - ref_ptr _eventCallback; - - unsigned int _modifiedCount; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/UserDataContainer b/libs/lib/mac32/include/osg/UserDataContainer deleted file mode 100644 index 992b7eef0..000000000 --- a/libs/lib/mac32/include/osg/UserDataContainer +++ /dev/null @@ -1,192 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_USERDATACONTAINER -#define OSG_USERDATACONTAINER 1 - -#include - -#include -#include - -namespace osg { - -/** Internal structure for storing all user data.*/ -class OSG_EXPORT UserDataContainer : public osg::Object -{ - public: - UserDataContainer(); - UserDataContainer(const UserDataContainer& udc, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0; } - - /** return the name of the object's library. Must be defined - by derived classes. The OpenSceneGraph convention is that the - namespace of a library is the same as the library name.*/ - virtual const char* libraryName() const { return "osg"; } - - /** return the name of the object's class type. Must be defined - by derived classes.*/ - virtual const char* className() const { return "UserDataContainer"; } - - /** - * Set user data, data must be subclassed from Referenced to allow - * automatic memory handling. If your own data isn't directly - * subclassed from Referenced then create an adapter object - * which points to your own object and handles the memory addressing. - */ - virtual void setUserData(Referenced* obj) = 0; - - /** Get user data.*/ - virtual Referenced* getUserData() = 0; - - /** Get const user data.*/ - virtual const Referenced* getUserData() const = 0; - - /** Add user data object. Returns the index position of object added. */ - virtual unsigned int addUserObject(Object* obj) = 0; - - /** Add element to list of user data objects.*/ - virtual void setUserObject(unsigned int i, Object* obj) = 0; - - /** Remove element from the list of user data objects.*/ - virtual void removeUserObject(unsigned int i) = 0; - - - /** Get user data object as specified index position. */ - virtual Object* getUserObject(unsigned int i) = 0; - - /** Get const user data object as specified index position. */ - virtual const Object* getUserObject(unsigned int i) const = 0; - - /** Get number of user objects assigned to this object.*/ - virtual unsigned int getNumUserObjects() const = 0; - - /** Get the index position of specified user data object.*/ - virtual unsigned int getUserObjectIndex(const osg::Object* obj, unsigned int startPos=0) const = 0; - - /** Get the index position of first user data object that matches specified name.*/ - virtual unsigned int getUserObjectIndex(const std::string& name, unsigned int startPos=0) const = 0; - - - /** Get first user data object with specified name. */ - virtual Object* getUserObject(const std::string& name, unsigned int startPos=0); - - /** Get first const user data object with specified name. */ - virtual const Object* getUserObject(const std::string& name, unsigned int startPos=0) const; - - - typedef std::vector DescriptionList; - - /** Set the list of string descriptions.*/ - virtual void setDescriptions(const DescriptionList& descriptions) = 0; - - /** Get the description list.*/ - virtual DescriptionList& getDescriptions() = 0; - - /** Get the const description list.*/ - virtual const DescriptionList& getDescriptions() const = 0; - - /** Get number of description strings.*/ - virtual unsigned int getNumDescriptions() const = 0; - - /** Add a description string.*/ - virtual void addDescription(const std::string& desc) = 0; - - protected: - virtual ~UserDataContainer() {} -}; - -/** Internal structure for storing all user data.*/ -class OSG_EXPORT DefaultUserDataContainer : public osg::UserDataContainer -{ - public: - DefaultUserDataContainer(); - DefaultUserDataContainer(const DefaultUserDataContainer& udc, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osg, DefaultUserDataContainer) - - - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** - * Set user data, data must be subclassed from Referenced to allow - * automatic memory handling. If your own data isn't directly - * subclassed from Referenced then create an adapter object - * which points to your own object and handles the memory addressing. - */ - virtual void setUserData(Referenced* obj); - - /** Get user data.*/ - virtual Referenced* getUserData(); - - /** Get const user data.*/ - virtual const Referenced* getUserData() const; - - /** Add user data object. Returns the index position of object added. */ - virtual unsigned int addUserObject(Object* obj); - - /** Add element to list of user data objects.*/ - virtual void setUserObject(unsigned int i, Object* obj); - - /** Remove element from the list of user data objects.*/ - virtual void removeUserObject(unsigned int i); - - - /** Get user data object as specified index position. */ - virtual Object* getUserObject(unsigned int i); - - /** Get const user data object as specified index position. */ - virtual const Object* getUserObject(unsigned int i) const; - - /** Get number of user objects assigned to this object.*/ - virtual unsigned int getNumUserObjects() const; - - /** Get the index position of specified user data object.*/ - virtual unsigned int getUserObjectIndex(const osg::Object* obj, unsigned int startPos=0) const; - - /** Get the index position of first user data object that matches specified name.*/ - virtual unsigned int getUserObjectIndex(const std::string& name, unsigned int startPos=0) const; - - - - - /** Set the list of string descriptions.*/ - virtual void setDescriptions(const DescriptionList& descriptions); - - /** Get the description list.*/ - virtual DescriptionList& getDescriptions(); - - /** Get the const description list.*/ - virtual const DescriptionList& getDescriptions() const; - - /** Get number of description strings.*/ - virtual unsigned int getNumDescriptions() const; - - /** Add a description string.*/ - virtual void addDescription(const std::string& desc); - -protected: - - virtual ~DefaultUserDataContainer() {} - - typedef std::vector< osg::ref_ptr > ObjectList; - - ref_ptr _userData; - DescriptionList _descriptionList; - ObjectList _objectList; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ValueObject b/libs/lib/mac32/include/osg/ValueObject deleted file mode 100644 index 4af699756..000000000 --- a/libs/lib/mac32/include/osg/ValueObject +++ /dev/null @@ -1,207 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 2011 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VALUEOBJECT -#define OSG_VALUEOBJECT 1 - -#include -#include - -namespace osg { - -// foward declare core OSG math classes -class Vec2f; -class Vec3f; -class Vec4f; -class Vec2d; -class Vec3d; -class Vec4d; -class Quat; -class Plane; -class Matrixf; -class Matrixd; - -class ValueObject : public Object -{ - public: - - ValueObject() : Object(true) {} - ValueObject(const std::string& name) : Object(true) { setName(name); } - ValueObject(const ValueObject& rhs, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY): Object(rhs,copyop) {} - - META_Object(osg, ValueObject) - - class GetValueVisitor - { - public: - virtual void apply(bool value) {} - virtual void apply(char value) {} - virtual void apply(unsigned char value) {} - virtual void apply(short value) {} - virtual void apply(unsigned short value) {} - virtual void apply(int value) {} - virtual void apply(unsigned int value) {} - virtual void apply(float value) {} - virtual void apply(double value) {} - virtual void apply(const std::string& value) {} - virtual void apply(const osg::Vec2f& value) {} - virtual void apply(const osg::Vec3f& value) {} - virtual void apply(const osg::Vec4f& value) {} - virtual void apply(const osg::Vec2d& value) {} - virtual void apply(const osg::Vec3d& value) {} - virtual void apply(const osg::Vec4d& value) {} - virtual void apply(const osg::Quat& value) {} - virtual void apply(const osg::Plane& value) {} - virtual void apply(const osg::Matrixf& value) {} - virtual void apply(const osg::Matrixd& value) {} - }; - - class SetValueVisitor - { - public: - virtual void apply(bool& value) {} - virtual void apply(char& value) {} - virtual void apply(unsigned char& value) {} - virtual void apply(short& value) {} - virtual void apply(unsigned short& value) {} - virtual void apply(int& value) {} - virtual void apply(unsigned int& value) {} - virtual void apply(float& value) {} - virtual void apply(double& value) {} - virtual void apply(std::string& value) {} - virtual void apply(osg::Vec2f& value) {} - virtual void apply(osg::Vec3f& value) {} - virtual void apply(osg::Vec4f& value) {} - virtual void apply(osg::Vec2d& value) {} - virtual void apply(osg::Vec3d& value) {} - virtual void apply(osg::Vec4d& value) {} - virtual void apply(osg::Quat& value) {} - virtual void apply(osg::Plane& value) {} - virtual void apply(osg::Matrixf& value) {} - virtual void apply(osg::Matrixd& value) {} - }; - - virtual bool get(GetValueVisitor& gvv) const { return false; } - virtual bool set(SetValueVisitor& gvv) { return false; } -}; - -template< typename T > -struct ValueObjectClassNameTrait -{ - static const char* className() { return "TemplateValueObject"; } -}; - - -template< typename T > -class TemplateValueObject : public ValueObject -{ - public: - - TemplateValueObject(): - ValueObject(), - _value() {} - - TemplateValueObject(const std::string& name, const T& value) : - ValueObject(name), - _value(value) {} - - TemplateValueObject(const TemplateValueObject& rhs, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY) : - ValueObject(rhs,copyop), - _value(rhs._value) {} - - virtual Object* cloneType() const { return new TemplateValueObject(); } - virtual Object* clone(const CopyOp& copyop) const { return new TemplateValueObject(*this, copyop); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osg"; } - virtual const char* className() const { return ValueObjectClassNameTrait::className(); } - - void setValue(const T& value) { _value = value; } - const T& getValue() const { return _value; } - - virtual bool get(GetValueVisitor& gvv) const { gvv.apply(_value); return true; } - virtual bool set(SetValueVisitor& svv) { svv.apply(_value); return true; } - -protected: - - static const char* s_TemplateValueObject_className; - - T _value; -}; - -#define META_ValueObject(TYPE,NAME) \ - template<> struct ValueObjectClassNameTrait { static const char* className() { return #NAME; } }; \ - typedef TemplateValueObject NAME; - -META_ValueObject(std::string, StringValueObject) -META_ValueObject(bool, BoolValueObject) -META_ValueObject(char, CharValueObject) -META_ValueObject(unsigned char, UCharValueObject) -META_ValueObject(short, ShortValueObject) -META_ValueObject(unsigned short, UShortValueObject) -META_ValueObject(int, IntValueObject) -META_ValueObject(unsigned int, UIntValueObject) -META_ValueObject(float, FloatValueObject) -META_ValueObject(double, DoubleValueObject) -META_ValueObject(Vec2f, Vec2fValueObject) -META_ValueObject(Vec3f, Vec3fValueObject) -META_ValueObject(Vec4f, Vec4fValueObject) -META_ValueObject(Vec2d, Vec2dValueObject) -META_ValueObject(Vec3d, Vec3dValueObject) -META_ValueObject(Vec4d, Vec4dValueObject) -META_ValueObject(Quat, QuatValueObject) -META_ValueObject(Plane, PlaneValueObject) -META_ValueObject(Matrixf, MatrixfValueObject) -META_ValueObject(Matrixd, MatrixdValueObject) - -/** provide implementation of osg::Object::getUserValue(..) template*/ -template -bool osg::Object::getUserValue(const std::string& name, T& value) const -{ - typedef TemplateValueObject UserValueObject; - - const osg::UserDataContainer* udc = dynamic_cast(this); - if (!udc) udc = _userDataContainer; - - const UserValueObject* uvo = udc ? dynamic_cast(udc->getUserObject(name)) : 0; - if (uvo) - { - value = uvo->getValue(); - return true; - } - else - { - return false; - } -} - -/** provide implementation of osg::Object::setUserValue(..) template.*/ -template -void osg::Object::setUserValue(const std::string& name, const T& value) -{ - typedef TemplateValueObject UserValueObject; - - osg::UserDataContainer* udc = dynamic_cast(this); - if (!udc) - { - getOrCreateUserDataContainer(); - udc = _userDataContainer; - } - - unsigned int i = udc->getUserObjectIndex(name); - if (igetNumUserObjects()) udc->setUserObject(i, new UserValueObject(name,value)); - else udc->addUserObject(new UserValueObject(name,value)); -} - -} -#endif - diff --git a/libs/lib/mac32/include/osg/Vec2 b/libs/lib/mac32/include/osg/Vec2 deleted file mode 100644 index 27d2619b4..000000000 --- a/libs/lib/mac32/include/osg/Vec2 +++ /dev/null @@ -1,25 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC2 -#define OSG_VEC2 1 - -#include - -namespace osg { - - typedef Vec2f Vec2; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Vec2b b/libs/lib/mac32/include/osg/Vec2b deleted file mode 100644 index cbeaec157..000000000 --- a/libs/lib/mac32/include/osg/Vec2b +++ /dev/null @@ -1,155 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC2B -#define OSG_VEC2B 1 - -namespace osg { - -/** General purpose float triple. - * Uses include representation of color coordinates. - * No support yet added for float * Vec2b - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec2b * float is okay -*/ -class Vec2b -{ - public: - - // Methods are defined here so that they are implicitly inlined - - /** Data type of vector components.*/ - typedef signed char value_type; - - /** Number of vector components. */ - enum { num_components = 2 }; - - /** Vec member variable. */ - value_type _v[2]; - - /** Constructor that sets all components of the vector to zero */ - Vec2b() { _v[0]=0; _v[1]=0; } - - Vec2b(value_type r, value_type g) - { - _v[0]=r; _v[1]=g; - } - - inline bool operator == (const Vec2b& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1]; } - - inline bool operator != (const Vec2b& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1]; } - - inline bool operator < (const Vec2b& v) const - { - if (_v[0]v._v[0]) return false; - else return (_v[1] - -namespace osg { - -/** General purpose double pair, uses include representation of - * texture coordinates. - * No support yet added for double * Vec2d - is it necessary? - * Need to define a non-member non-friend operator* etc. - * BTW: Vec2d * double is okay -*/ - -class Vec2d -{ - public: - - /** Data type of vector components.*/ - typedef double value_type; - - /** Number of vector components. */ - enum { num_components = 2 }; - - value_type _v[2]; - - /** Constructor that sets all components of the vector to zero */ - Vec2d() {_v[0]=0.0; _v[1]=0.0;} - - Vec2d(value_type x,value_type y) { _v[0]=x; _v[1]=y; } - - inline Vec2d(const Vec2f& vec) { _v[0]=vec._v[0]; _v[1]=vec._v[1]; } - - inline operator Vec2f() const { return Vec2f(static_cast(_v[0]),static_cast(_v[1]));} - - - inline bool operator == (const Vec2d& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1]; } - - inline bool operator != (const Vec2d& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1]; } - - inline bool operator < (const Vec2d& v) const - { - if (_v[0]v._v[0]) return false; - else return (_v[1]0.0) - { - value_type inv = 1.0/norm; - _v[0] *= inv; - _v[1] *= inv; - } - return( norm ); - } - -}; // end of class Vec2d - - -/** multiply by vector components. */ -inline Vec2d componentMultiply(const Vec2d& lhs, const Vec2d& rhs) -{ - return Vec2d(lhs[0]*rhs[0], lhs[1]*rhs[1]); -} - -/** divide rhs components by rhs vector components. */ -inline Vec2d componentDivide(const Vec2d& lhs, const Vec2d& rhs) -{ - return Vec2d(lhs[0]/rhs[0], lhs[1]/rhs[1]); -} - -} // end of namespace osg -#endif diff --git a/libs/lib/mac32/include/osg/Vec2f b/libs/lib/mac32/include/osg/Vec2f deleted file mode 100644 index 618a814d8..000000000 --- a/libs/lib/mac32/include/osg/Vec2f +++ /dev/null @@ -1,190 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC2F -#define OSG_VEC2F 1 - -#include - -namespace osg { - -/** General purpose float pair. Uses include representation of - * texture coordinates. - * No support yet added for float * Vec2f - is it necessary? - * Need to define a non-member non-friend operator* etc. - * BTW: Vec2f * float is okay -*/ - -class Vec2f -{ - public: - - /** Data type of vector components.*/ - typedef float value_type; - - /** Number of vector components. */ - enum { num_components = 2 }; - - /** Vec member variable. */ - value_type _v[2]; - - - /** Constructor that sets all components of the vector to zero */ - Vec2f() {_v[0]=0.0; _v[1]=0.0;} - Vec2f(value_type x,value_type y) { _v[0]=x; _v[1]=y; } - - - inline bool operator == (const Vec2f& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1]; } - - inline bool operator != (const Vec2f& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1]; } - - inline bool operator < (const Vec2f& v) const - { - if (_v[0]v._v[0]) return false; - else return (_v[1]0.0) - { - value_type inv = 1.0f/norm; - _v[0] *= inv; - _v[1] *= inv; - } - return( norm ); - } - -}; // end of class Vec2f - -/** multiply by vector components. */ -inline Vec2f componentMultiply(const Vec2f& lhs, const Vec2f& rhs) -{ - return Vec2f(lhs[0]*rhs[0], lhs[1]*rhs[1]); -} - -/** divide rhs components by rhs vector components. */ -inline Vec2f componentDivide(const Vec2f& lhs, const Vec2f& rhs) -{ - return Vec2f(lhs[0]/rhs[0], lhs[1]/rhs[1]); -} - -} // end of namespace osg -#endif - diff --git a/libs/lib/mac32/include/osg/Vec2s b/libs/lib/mac32/include/osg/Vec2s deleted file mode 100644 index 662b02c40..000000000 --- a/libs/lib/mac32/include/osg/Vec2s +++ /dev/null @@ -1,149 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC2S -#define OSG_VEC2S 1 - -namespace osg { - -class Vec2s -{ - public: - - /** Data type of vector components.*/ - typedef short value_type; - - /** Number of vector components. */ - enum { num_components = 2 }; - - value_type _v[2]; - - /** Constructor that sets all components of the vector to zero */ - Vec2s() { _v[0]=0; _v[1]=0; } - - Vec2s(value_type x, value_type y) { _v[0] = x; _v[1] = y; } - - inline bool operator == (const Vec2s& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1]; } - inline bool operator != (const Vec2s& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1]; } - inline bool operator < (const Vec2s& v) const - { - if (_v[0]v._v[0]) return false; - else return (_v[1] - -namespace osg { - - typedef Vec3f Vec3; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Vec3b b/libs/lib/mac32/include/osg/Vec3b deleted file mode 100644 index 53d8522c8..000000000 --- a/libs/lib/mac32/include/osg/Vec3b +++ /dev/null @@ -1,160 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC3B -#define OSG_VEC3B 1 - -namespace osg { - -/** General purpose float triple. - * Uses include representation of color coordinates. - * No support yet added for float * Vec3b - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec3b * float is okay -*/ -class Vec3b -{ - public: - - /** Data type of vector components.*/ - typedef signed char value_type; - - /** Number of vector components. */ - enum { num_components = 3 }; - - value_type _v[3]; - - /** Constructor that sets all components of the vector to zero */ - Vec3b() { _v[0]=0; _v[1]=0; _v[2]=0; } - - Vec3b(value_type r, value_type g, value_type b) { _v[0]=r; _v[1]=g; _v[2]=b; } - - inline bool operator == (const Vec3b& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2]; } - - inline bool operator != (const Vec3b& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2]; } - - inline bool operator < (const Vec3b& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else return (_v[2] -#include - -namespace osg { - -/** General purpose double triple for use as vertices, vectors and normals. - * Provides general math operations from addition through to cross products. - * No support yet added for double * Vec3d - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec3d * double is okay -*/ - -class Vec3d -{ - public: - - /** Data type of vector components.*/ - typedef double value_type; - - /** Number of vector components. */ - enum { num_components = 3 }; - - value_type _v[3]; - - /** Constructor that sets all components of the vector to zero */ - Vec3d() { _v[0]=0.0; _v[1]=0.0; _v[2]=0.0;} - - inline Vec3d(const Vec3f& vec) { _v[0]=vec._v[0]; _v[1]=vec._v[1]; _v[2]=vec._v[2];} - - inline operator Vec3f() const { return Vec3f(static_cast(_v[0]),static_cast(_v[1]),static_cast(_v[2]));} - - Vec3d(value_type x,value_type y,value_type z) { _v[0]=x; _v[1]=y; _v[2]=z; } - Vec3d(const Vec2d& v2,value_type zz) - { - _v[0] = v2[0]; - _v[1] = v2[1]; - _v[2] = zz; - } - - inline bool operator == (const Vec3d& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2]; } - - inline bool operator != (const Vec3d& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2]; } - - inline bool operator < (const Vec3d& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else return (_v[2]0.0) - { - value_type inv = 1.0/norm; - _v[0] *= inv; - _v[1] *= inv; - _v[2] *= inv; - } - return( norm ); - } - -}; // end of class Vec3d - -/** multiply by vector components. */ -inline Vec3d componentMultiply(const Vec3d& lhs, const Vec3d& rhs) -{ - return Vec3d(lhs[0]*rhs[0], lhs[1]*rhs[1], lhs[2]*rhs[2]); -} - -/** divide rhs components by rhs vector components. */ -inline Vec3d componentDivide(const Vec3d& lhs, const Vec3d& rhs) -{ - return Vec3d(lhs[0]/rhs[0], lhs[1]/rhs[1], lhs[2]/rhs[2]); -} - -} // end of namespace osg - -#endif diff --git a/libs/lib/mac32/include/osg/Vec3f b/libs/lib/mac32/include/osg/Vec3f deleted file mode 100644 index 6c3abf3aa..000000000 --- a/libs/lib/mac32/include/osg/Vec3f +++ /dev/null @@ -1,224 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC3F -#define OSG_VEC3F 1 - -#include -#include - -namespace osg { - -/** General purpose float triple for use as vertices, vectors and normals. - * Provides general math operations from addition through to cross products. - * No support yet added for float * Vec3f - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec3f * float is okay -*/ -class Vec3f -{ - public: - - /** Data type of vector components.*/ - typedef float value_type; - - /** Number of vector components. */ - enum { num_components = 3 }; - - value_type _v[3]; - - /** Constructor that sets all components of the vector to zero */ - Vec3f() { _v[0]=0.0f; _v[1]=0.0f; _v[2]=0.0f;} - Vec3f(value_type x,value_type y,value_type z) { _v[0]=x; _v[1]=y; _v[2]=z; } - Vec3f(const Vec2f& v2,value_type zz) - { - _v[0] = v2[0]; - _v[1] = v2[1]; - _v[2] = zz; - } - - - inline bool operator == (const Vec3f& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2]; } - - inline bool operator != (const Vec3f& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2]; } - - inline bool operator < (const Vec3f& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else return (_v[2]0.0) - { - value_type inv = 1.0f/norm; - _v[0] *= inv; - _v[1] *= inv; - _v[2] *= inv; - } - return( norm ); - } - -}; // end of class Vec3f - -/** multiply by vector components. */ -inline Vec3f componentMultiply(const Vec3f& lhs, const Vec3f& rhs) -{ - return Vec3f(lhs[0]*rhs[0], lhs[1]*rhs[1], lhs[2]*rhs[2]); -} - -/** divide rhs components by rhs vector components. */ -inline Vec3f componentDivide(const Vec3f& lhs, const Vec3f& rhs) -{ - return Vec3f(lhs[0]/rhs[0], lhs[1]/rhs[1], lhs[2]/rhs[2]); -} - -const Vec3f X_AXIS(1.0,0.0,0.0); -const Vec3f Y_AXIS(0.0,1.0,0.0); -const Vec3f Z_AXIS(0.0,0.0,1.0); - -} // end of namespace osg - -#endif - diff --git a/libs/lib/mac32/include/osg/Vec3s b/libs/lib/mac32/include/osg/Vec3s deleted file mode 100644 index a7bc03008..000000000 --- a/libs/lib/mac32/include/osg/Vec3s +++ /dev/null @@ -1,171 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC3S -#define OSG_VEC3S 1 - -namespace osg { - -class Vec3s -{ - public: - - /** Data type of vector components.*/ - typedef short value_type; - - /** Number of vector components. */ - enum { num_components = 3 }; - - value_type _v[3]; - - /** Constructor that sets all components of the vector to zero */ - Vec3s() { _v[0]=0; _v[1]=0; _v[2]=0; } - - Vec3s(value_type r, value_type g, value_type b) { _v[0]=r; _v[1]=g; _v[2]=b; } - - inline bool operator == (const Vec3s& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2]; } - inline bool operator != (const Vec3s& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2]; } - inline bool operator < (const Vec3s& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else return (_v[2] - -namespace osg { - - typedef Vec4f Vec4; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Vec4b b/libs/lib/mac32/include/osg/Vec4b deleted file mode 100644 index 4a0dee6a1..000000000 --- a/libs/lib/mac32/include/osg/Vec4b +++ /dev/null @@ -1,170 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC4B -#define OSG_VEC4B 1 - -namespace osg { - -/** General purpose float triple. - * Uses include representation of color coordinates. - * No support yet added for float * Vec4b - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec4b * float is okay -*/ -class Vec4b -{ - public: - - /** Data type of vector components.*/ - typedef signed char value_type; - - /** Number of vector components. */ - enum { num_components = 4 }; - - value_type _v[4]; - - /** Constructor that sets all components of the vector to zero */ - Vec4b() { _v[0]=0; _v[1]=0; _v[2]=0; _v[3]=0; } - - Vec4b(value_type x, value_type y, value_type z, value_type w) - { - _v[0]=x; - _v[1]=y; - _v[2]=z; - _v[3]=w; - } - - inline bool operator == (const Vec4b& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2] && _v[3]==v._v[3]; } - - inline bool operator != (const Vec4b& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2] || _v[3]!=v._v[3]; } - - inline bool operator < (const Vec4b& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else if (_v[2]v._v[2]) return false; - else return (_v[3] -#include - -namespace osg { - -/** General purpose double quad. Uses include representation - * of color coordinates. - * No support yet added for double * Vec4d - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec4d * double is okay -*/ -class Vec4d -{ - public: - - /** Data type of vector components.*/ - typedef double value_type; - - /** Number of vector components. */ - enum { num_components = 4 }; - - value_type _v[4]; - - /** Constructor that sets all components of the vector to zero */ - Vec4d() { _v[0]=0.0; _v[1]=0.0; _v[2]=0.0; _v[3]=0.0; } - - Vec4d(value_type x, value_type y, value_type z, value_type w) - { - _v[0]=x; - _v[1]=y; - _v[2]=z; - _v[3]=w; - } - - Vec4d(const Vec3d& v3,value_type w) - { - _v[0]=v3[0]; - _v[1]=v3[1]; - _v[2]=v3[2]; - _v[3]=w; - } - - inline Vec4d(const Vec4f& vec) { _v[0]=vec._v[0]; _v[1]=vec._v[1]; _v[2]=vec._v[2]; _v[3]=vec._v[3];} - - inline operator Vec4f() const { return Vec4f(static_cast(_v[0]),static_cast(_v[1]),static_cast(_v[2]),static_cast(_v[3]));} - - - inline bool operator == (const Vec4d& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2] && _v[3]==v._v[3]; } - - inline bool operator != (const Vec4d& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2] || _v[3]!=v._v[3]; } - - inline bool operator < (const Vec4d& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else if (_v[2]v._v[2]) return false; - else return (_v[3]0.0f) - { - value_type inv = 1.0/norm; - _v[0] *= inv; - _v[1] *= inv; - _v[2] *= inv; - _v[3] *= inv; - } - return( norm ); - } - -}; // end of class Vec4d - - - -/** Compute the dot product of a (Vec3,1.0) and a Vec4d. */ -inline Vec4d::value_type operator * (const Vec3d& lhs,const Vec4d& rhs) -{ - return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+rhs[3]; -} - -/** Compute the dot product of a (Vec3,1.0) and a Vec4d. */ -inline Vec4d::value_type operator * (const Vec3f& lhs,const Vec4d& rhs) -{ - return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+rhs[3]; -} - -/** Compute the dot product of a (Vec3,1.0) and a Vec4d. */ -inline Vec4d::value_type operator * (const Vec3d& lhs,const Vec4f& rhs) -{ - return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+rhs[3]; -} - - -/** Compute the dot product of a Vec4d and a (Vec3,1.0). */ -inline Vec4d::value_type operator * (const Vec4d& lhs,const Vec3d& rhs) -{ - return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+lhs[3]; -} - -/** Compute the dot product of a Vec4d and a (Vec3,1.0). */ -inline Vec4d::value_type operator * (const Vec4d& lhs,const Vec3f& rhs) -{ - return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+lhs[3]; -} - -/** Compute the dot product of a Vec4d and a (Vec3,1.0). */ -inline Vec4d::value_type operator * (const Vec4f& lhs,const Vec3d& rhs) -{ - return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+lhs[3]; -} - -/** multiply by vector components. */ -inline Vec4d componentMultiply(const Vec4d& lhs, const Vec4d& rhs) -{ - return Vec4d(lhs[0]*rhs[0], lhs[1]*rhs[1], lhs[2]*rhs[2], lhs[3]*rhs[3]); -} - -/** divide rhs components by rhs vector components. */ -inline Vec4d componentDivide(const Vec4d& lhs, const Vec4d& rhs) -{ - return Vec4d(lhs[0]/rhs[0], lhs[1]/rhs[1], lhs[2]/rhs[2], lhs[3]/rhs[3]); -} - -} // end of namespace osg - -#endif diff --git a/libs/lib/mac32/include/osg/Vec4f b/libs/lib/mac32/include/osg/Vec4f deleted file mode 100644 index 507e3695b..000000000 --- a/libs/lib/mac32/include/osg/Vec4f +++ /dev/null @@ -1,269 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC4F -#define OSG_VEC4F 1 - -#include - -namespace osg { - -/** General purpose float quad. Uses include representation - * of color coordinates. - * No support yet added for float * Vec4f - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec4f * float is okay -*/ -class Vec4f -{ - public: - - /** Data type of vector components.*/ - typedef float value_type; - - /** Number of vector components. */ - enum { num_components = 4 }; - - /** Vec member variable. */ - value_type _v[4]; - - // Methods are defined here so that they are implicitly inlined - - /** Constructor that sets all components of the vector to zero */ - Vec4f() { _v[0]=0.0f; _v[1]=0.0f; _v[2]=0.0f; _v[3]=0.0f;} - - Vec4f(value_type x, value_type y, value_type z, value_type w) - { - _v[0]=x; - _v[1]=y; - _v[2]=z; - _v[3]=w; - } - - Vec4f(const Vec3f& v3,value_type w) - { - _v[0]=v3[0]; - _v[1]=v3[1]; - _v[2]=v3[2]; - _v[3]=w; - } - - inline bool operator == (const Vec4f& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2] && _v[3]==v._v[3]; } - - inline bool operator != (const Vec4f& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2] || _v[3]!=v._v[3]; } - - inline bool operator < (const Vec4f& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else if (_v[2]v._v[2]) return false; - else return (_v[3]0.0f) - { - value_type inv = 1.0f/norm; - _v[0] *= inv; - _v[1] *= inv; - _v[2] *= inv; - _v[3] *= inv; - } - return( norm ); - } - -}; // end of class Vec4f - -/** Compute the dot product of a (Vec3,1.0) and a Vec4f. */ -inline Vec4f::value_type operator * (const Vec3f& lhs,const Vec4f& rhs) -{ - return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+rhs[3]; -} - -/** Compute the dot product of a Vec4f and a (Vec3,1.0). */ -inline Vec4f::value_type operator * (const Vec4f& lhs,const Vec3f& rhs) -{ - return lhs[0]*rhs[0]+lhs[1]*rhs[1]+lhs[2]*rhs[2]+lhs[3]; -} - -/** multiply by vector components. */ -inline Vec4f componentMultiply(const Vec4f& lhs, const Vec4f& rhs) -{ - return Vec4f(lhs[0]*rhs[0], lhs[1]*rhs[1], lhs[2]*rhs[2], lhs[3]*rhs[3]); -} - -/** divide rhs components by rhs vector components. */ -inline Vec4f componentDivide(const Vec4f& lhs, const Vec4f& rhs) -{ - return Vec4f(lhs[0]/rhs[0], lhs[1]/rhs[1], lhs[2]/rhs[2], lhs[3]/rhs[3]); -} - -} // end of namespace osg - -#endif - diff --git a/libs/lib/mac32/include/osg/Vec4s b/libs/lib/mac32/include/osg/Vec4s deleted file mode 100644 index 85cf984cb..000000000 --- a/libs/lib/mac32/include/osg/Vec4s +++ /dev/null @@ -1,193 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VEC4S -#define OSG_VEC4S 1 - -namespace osg { - -/** General purpose float quad. Uses include representation - * of color coordinates. - * No support yet added for float * Vec4f - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec4f * float is okay -*/ -class Vec4s -{ - public: - - /** Data type of vector components.*/ - typedef short value_type; - - /** Number of vector components. */ - enum { num_components = 4 }; - - /** Vec member variable. */ - value_type _v[4]; - - /** Constructor that sets all components of the vector to zero */ - Vec4s() { _v[0]=0; _v[1]=0; _v[2]=0; _v[3]=0; } - - Vec4s(value_type x, value_type y, value_type z, value_type w) - { - _v[0]=x; - _v[1]=y; - _v[2]=z; - _v[3]=w; - } - - inline bool operator == (const Vec4s& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2] && _v[3]==v._v[3]; } - inline bool operator != (const Vec4s& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2] || _v[3]!=v._v[3]; } - inline bool operator < (const Vec4s& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else if (_v[2]v._v[2]) return false; - else return (_v[3] - -namespace osg { - -/** General purpose float quad. - * Uses include representation of color coordinates. - * No support yet added for float * Vec4ub - is it necessary? - * Need to define a non-member non-friend operator* etc. - * Vec4ub * float is okay -*/ -class Vec4ub -{ - public: - - /** Data type of vector components.*/ - typedef unsigned char value_type; - - /** Number of vector components. */ - enum { num_components = 4 }; - - /** Vec member variable. */ - value_type _v[4]; - - /** Constructor that sets all components of the vector to zero */ - Vec4ub() { _v[0]=0; _v[1]=0; _v[2]=0; _v[3]=0; } - - Vec4ub(value_type x, value_type y, value_type z, value_type w) - { - _v[0]=x; - _v[1]=y; - _v[2]=z; - _v[3]=w; - } - - inline bool operator == (const Vec4ub& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2] && _v[3]==v._v[3]; } - - inline bool operator != (const Vec4ub& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2] || _v[3]!=v._v[3]; } - - inline bool operator < (const Vec4ub& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1]v._v[1]) return false; - else if (_v[2]v._v[2]) return false; - else return (_v[3] - -extern "C" { - -#define OPENSCENEGRAPH_MAJOR_VERSION 3 -#define OPENSCENEGRAPH_MINOR_VERSION 0 -#define OPENSCENEGRAPH_PATCH_VERSION 1 -#define OPENSCENEGRAPH_SOVERSION 80 - -/* Convenience macro that can be used to decide whether a feature is present or not i.e. - * #if OSG_MIN_VERSION_REQUIRED(2,9,5) - * your code here - * #endif - */ -#define OSG_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH)))) -#define OSG_VERSION_LESS_THAN(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSIONMAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>PATCH)))) -#define OSG_VERSION_GREATER_OR_EQUAL(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH)))) - - -/** - * osgGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph (OSG) library - # - AC_CHECK_LIB(osg, osgGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -extern OSG_EXPORT const char* osgGetVersion(); - -/** The osgGetSOVersion() method returns the OpenSceneGraph shared object version number. */ -extern OSG_EXPORT const char* osgGetSOVersion(); - -/** The osgGetLibraryName() method returns the library name in human-friendly form. */ -extern OSG_EXPORT const char* osgGetLibraryName(); - -// old defines for backwards compatibility. -#define OSG_VERSION_MAJOR OPENSCENEGRAPH_MAJOR_VERSION -#define OSG_VERSION_MINOR OPENSCENEGRAPH_MINOR_VERSION -#define OSG_VERSION_PATCH OPENSCENEGRAPH_PATCH_VERSION - -#define OSG_VERSION_RELEASE OSG_VERSION_PATCH -#define OSG_VERSION_REVISION 0 - - -} - -#endif diff --git a/libs/lib/mac32/include/osg/VertexProgram b/libs/lib/mac32/include/osg/VertexProgram deleted file mode 100644 index 8a3cf5c3a..000000000 --- a/libs/lib/mac32/include/osg/VertexProgram +++ /dev/null @@ -1,320 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VERTEXPROGRAM -#define OSG_VERTEXPROGRAM 1 - -#include -#include -#include -#include - -#include -#include - -// if not defined by gl.h use the definition found in: -// http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_program.txt -#ifndef GL_ARB_vertex_program -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 -#define GL_COLOR_SUM_ARB 0x8458 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A -#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 -#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 -#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 -#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF -#endif - - -namespace osg { - - - -/** VertexProgram - encapsulates the OpenGL ARB vertex program state. */ -class OSG_EXPORT VertexProgram : public StateAttribute -{ - public: - - VertexProgram(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - VertexProgram(const VertexProgram& vp,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_StateAttribute(osg, VertexProgram, VERTEXPROGRAM); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const osg::StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(VertexProgram,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_vertexProgram) - - return 0; // passed all the above comparison macros, must be equal. - } - - virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const - { - usage.usesMode(GL_VERTEX_PROGRAM_ARB); - return true; - } - - // data access methods. - - /** Get the handle to the vertex program ID for the current context. */ - inline GLuint& getVertexProgramID(unsigned int contextID) const - { - return _vertexProgramIDList[contextID]; - } - - - /** Set the vertex program using a C style string. */ - inline void setVertexProgram( const char* program ) - { - _vertexProgram = program; - dirtyVertexProgramObject(); - } - - /** Set the vertex program using C++ style string. */ - inline void setVertexProgram( const std::string& program ) - { - _vertexProgram = program; - dirtyVertexProgramObject(); - } - - /** Get the vertex program. */ - inline const std::string& getVertexProgram() const { return _vertexProgram; } - - /** Set Program Parameters */ - inline void setProgramLocalParameter(const GLuint index, const Vec4& p) - { - _programLocalParameters[index] = p; - } - - typedef std::map LocalParamList; - - /** Set list of Program Parameters */ - inline void setLocalParameters(const LocalParamList& lpl) { _programLocalParameters = lpl; } - - /** Get list of Program Parameters */ - inline LocalParamList& getLocalParameters() { return _programLocalParameters; } - - /** Get const list of Program Parameters */ - inline const LocalParamList& getLocalParameters() const { return _programLocalParameters; } - - /** Matrix */ - inline void setMatrix(const GLenum mode, const Matrix& matrix) - { - _matrixList[mode] = matrix; - } - - typedef std::map MatrixList; - - /** Set list of Matrices */ - inline void setMatrices(const MatrixList& matrices) { _matrixList = matrices; } - - /** Get list of Matrices */ - inline MatrixList& getMatrices() { return _matrixList; } - - /** Get list of Matrices */ - inline const MatrixList& getMatrices() const { return _matrixList; } - - /** Force a recompile on next apply() of associated OpenGL vertex program objects. */ - void dirtyVertexProgramObject(); - - /** Use deleteVertexProgramObject instead of glDeletePrograms to allow - * OpenGL Vertex Program objects to cached until they can be deleted - * by the OpenGL context in which they were created, specified - * by contextID. - */ - static void deleteVertexProgramObject(unsigned int contextID,GLuint handle); - - /** Flush all the cached vertex programs which need to be deleted - * in the OpenGL context related to contextID. - */ - static void flushDeletedVertexProgramObjects(unsigned int contextID,double currentTime, double& availableTime); - - /** discard all the cached vertex programs which need to be deleted - * in the OpenGL context related to contextID. - * Note, unlike flush no OpenGL calls are made, instead the handles are all removed. - * this call is useful for when an OpenGL context has been destroyed. - */ - static void discardDeletedVertexProgramObjects(unsigned int contextID); - - virtual void apply(State& state) const; - - virtual void compileGLObjects(State& state) const { apply(state); } - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** Release any OpenGL objects in specified graphics context if State - * object is passed, otherwise release OpenGL objects for all graphics contexts if - * State object pointer is NULL. - */ - virtual void releaseGLObjects(State* state=0) const; - - /** Extensions class which encapsulates the querying of extensions and - * associated function pointers, and provide convenience wrappers to - * check for the extensions or use the associated functions. - */ - class OSG_EXPORT Extensions : public osg::Referenced - { - public: - Extensions(unsigned int contextID); - - Extensions(const Extensions& rhs); - - void lowestCommonDenominator(const Extensions& rhs); - - void setupGLExtensions(unsigned int contextID); - - void setVertexProgramSupported(bool flag) { _isVertexProgramSupported=flag; } - bool isVertexProgramSupported() const { return _isVertexProgramSupported; } - - void glBindProgram(GLenum target, GLuint id) const; - void glGenPrograms(GLsizei n, GLuint *programs) const; - void glDeletePrograms(GLsizei n, GLuint *programs) const; - void glProgramString(GLenum target, GLenum format, GLsizei len, const void *string) const; - void glProgramLocalParameter4fv(GLenum target, GLuint index, const GLfloat *params) const; - - protected: - - ~Extensions() {} - - bool _isVertexProgramSupported; - - typedef void (GL_APIENTRY * BindProgramProc) (GLenum target, GLuint id); - typedef void (GL_APIENTRY * GenProgramsProc) (GLsizei n, GLuint *programs); - typedef void (GL_APIENTRY * DeleteProgramsProc) (GLsizei n, GLuint *programs); - typedef void (GL_APIENTRY * ProgramStringProc) (GLenum target, GLenum format, GLsizei len, const void *string); - typedef void (GL_APIENTRY * ProgramLocalParameter4fvProc) (GLenum target, GLuint index, const GLfloat *params); - - BindProgramProc _glBindProgram; - GenProgramsProc _glGenPrograms; - DeleteProgramsProc _glDeletePrograms; - ProgramStringProc _glProgramString; - ProgramLocalParameter4fvProc _glProgramLocalParameter4fv; - - }; - - /** Function to call to get the extension of a specified context. - * If the Extension object for that context has not yet been created - * and the 'createIfNotInitalized' flag been set to false then returns NULL. - * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object - * will only be created with the graphics context associated with ContextID. - */ - static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); - - /** The setExtensions method allows users to override the extensions across graphics contexts. - * Typically used when you have different extensions supported across graphics pipes - * but need to ensure that they all use the same low common denominator extensions. - */ - static void setExtensions(unsigned int contextID,Extensions* extensions); - - - protected: - - - virtual ~VertexProgram(); - - typedef buffered_value VertexProgramIDList; - mutable VertexProgramIDList _vertexProgramIDList; - - std::string _vertexProgram; - - LocalParamList _programLocalParameters; - - MatrixList _matrixList; -}; - - - -} - -#endif - diff --git a/libs/lib/mac32/include/osg/View b/libs/lib/mac32/include/osg/View deleted file mode 100644 index 2636d2262..000000000 --- a/libs/lib/mac32/include/osg/View +++ /dev/null @@ -1,185 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VIEW -#define OSG_VIEW 1 - -#include -#include -#include - -#include - -namespace osg { - -/** View - maintains a master camera view and a list of slave cameras that are relative to this master camera. - * Note, if no slave cameras are attached to the view then the master camera does both the control and implementation of the rendering of the scene, - * but if slave cameras are present then the master controls the view onto the scene, while the slaves implement the rendering of the scene. -*/ -class OSG_EXPORT View : public virtual osg::Object -{ - public : - - View(); - - View(const osg::View& view, const osg::CopyOp& copyop=CopyOp::SHALLOW_COPY); - - META_Object(osg,View); - - /** Take all the settings, Camera and Slaves from the passed in view, leaving it empty. */ - virtual void take(View& rhs); - - - /** Set the Stats object used for collect various frame related timing and scene graph stats.*/ - void setStats(osg::Stats* stats) { _stats = stats; } - - /** Get the Viewers Stats object.*/ - osg::Stats* getStats() { return _stats.get(); } - - /** Get the Viewers Stats object.*/ - const osg::Stats* getStats() const { return _stats.get(); } - - - /** Options for controlling the global lighting used for the view.*/ - enum LightingMode - { - NO_LIGHT, - HEADLIGHT, - SKY_LIGHT - }; - - /** Set the global lighting to use for this view. - * Defaults to headlight. */ - void setLightingMode(LightingMode lightingMode); - - /** Get the global lighting used for this view.*/ - LightingMode getLightingMode() const { return _lightingMode; } - - /** Get the global light.*/ - void setLight(osg::Light* light) { _light = light; } - - /** Get the global lighting if assigned.*/ - osg::Light* getLight() { return _light.get(); } - - /** Get the const global lighting if assigned.*/ - const osg::Light* getLight() const { return _light.get(); } - - /** Set the master camera of the view. */ - void setCamera(osg::Camera* camera); - - /** Get the master camera of the view. */ - osg::Camera* getCamera() { return _camera.get(); } - - /** Get the const master camera of the view. */ - const osg::Camera* getCamera() const { return _camera.get(); } - - /** Set the frame stamp of the view. */ - void setFrameStamp(osg::FrameStamp* fs) { _frameStamp = fs; } - - /** Get the frame stamp of the view. */ - osg::FrameStamp* getFrameStamp() { return _frameStamp.get(); } - - /** Get the frame stamp of the view. */ - const osg::FrameStamp* getFrameStamp() const { return _frameStamp.get(); } - - - /** Slave allows one to up a camera that follows the master with a local offset to the project and view matrices.*/ - struct OSG_EXPORT Slave - { - Slave(bool useMastersSceneData=true): - _useMastersSceneData(useMastersSceneData) {} - - Slave(osg::Camera* camera, const osg::Matrixd& projectionOffset, const osg::Matrixd& viewOffset, bool useMastersSceneData=true): - _camera(camera), - _projectionOffset(projectionOffset), - _viewOffset(viewOffset), - _useMastersSceneData(useMastersSceneData) {} - - Slave(const Slave& rhs) : - _camera(rhs._camera), - _projectionOffset(rhs._projectionOffset), - _viewOffset(rhs._viewOffset), - _useMastersSceneData(rhs._useMastersSceneData), - _updateSlaveCallback(rhs._updateSlaveCallback) {} - - virtual ~Slave() {} - - Slave& operator = (const Slave& rhs) - { - _camera = rhs._camera; - _projectionOffset = rhs._projectionOffset; - _viewOffset = rhs._viewOffset; - _useMastersSceneData = rhs._useMastersSceneData; - _updateSlaveCallback = rhs._updateSlaveCallback; - return *this; - } - - struct UpdateSlaveCallback : public virtual Referenced - { - virtual void updateSlave(osg::View& view, osg::View::Slave& slave) = 0; - }; - - void updateSlave(View& view) - { - if (_updateSlaveCallback.valid()) _updateSlaveCallback->updateSlave(view, *this); - else updateSlaveImplementation(view); - } - - virtual void updateSlaveImplementation(View& view); - - osg::ref_ptr _camera; - osg::Matrixd _projectionOffset; - osg::Matrixd _viewOffset; - bool _useMastersSceneData; - osg::ref_ptr _updateSlaveCallback; - }; - - bool addSlave(osg::Camera* camera, bool useMastersSceneData=true) { return addSlave(camera, osg::Matrix::identity(), osg::Matrix::identity(), useMastersSceneData); } - - bool addSlave(osg::Camera* camera, const osg::Matrix& projectionOffset, const osg::Matrix& viewOffset, bool useMastersSceneData=true); - - bool removeSlave(unsigned int pos); - - unsigned int getNumSlaves() const { return static_cast(_slaves.size()); } - - Slave& getSlave(unsigned int pos) { return _slaves[pos]; } - const Slave& getSlave(unsigned int pos) const { return _slaves[pos]; } - - unsigned int findSlaveIndexForCamera(osg::Camera* camera) const; - - Slave * findSlaveForCamera(osg::Camera* camera); - - void updateSlaves(); - - protected : - - virtual ~View(); - - virtual osg::GraphicsOperation* createRenderer(osg::Camera*) { return 0; } - - osg::ref_ptr _stats; - - LightingMode _lightingMode; - osg::ref_ptr _light; - - osg::ref_ptr _camera; - - typedef std::vector Slaves; - Slaves _slaves; - - osg::ref_ptr _frameStamp; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/Viewport b/libs/lib/mac32/include/osg/Viewport deleted file mode 100644 index cfa2c1c3f..000000000 --- a/libs/lib/mac32/include/osg/Viewport +++ /dev/null @@ -1,137 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_VIEWPORT -#define OSG_VIEWPORT 1 - -#include -#include - -namespace osg { - -/** Encapsulate OpenGL glViewport. */ -class OSG_EXPORT Viewport : public StateAttribute -{ - public : - -#if 0 - typedef int value_type; -#else - typedef double value_type; -#endif - Viewport(); - - Viewport(value_type x,value_type y,value_type width,value_type height): - _x(x), - _y(y), - _width(width), - _height(height) {} - - - /** Copy constructor using CopyOp to manage deep vs shallow copy. */ - Viewport(const Viewport& vp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): - StateAttribute(vp,copyop), - _x(vp._x), - _y(vp._y), - _width(vp._width), - _height(vp._height) {} - - META_StateAttribute(osg, Viewport,VIEWPORT); - - /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ - virtual int compare(const StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Viewport,sa) - - // compare each parameter in turn against the rhs. - COMPARE_StateAttribute_Parameter(_x) - COMPARE_StateAttribute_Parameter(_y) - COMPARE_StateAttribute_Parameter(_width) - COMPARE_StateAttribute_Parameter(_height) - - return 0; // passed all the above comparison macros, must be equal. - } - - inline void setViewport(value_type x,value_type y,value_type width,value_type height) - { - _x = x; - _y = y; - _width = width; - _height = height; - } - -#if 0 - void getViewport(int& x,int& y,int& width,int& height) const - { - x = _x; - y = _y; - width = _width; - height = _height; - } - - void getViewport(double& x,double& y,double& width,double& height) const - { - x = _x; - y = _y; - width = _width; - height = _height; - } -#endif - inline value_type& x() { return _x; } - inline value_type x() const { return _x; } - - inline value_type& y() { return _y; } - inline value_type y() const { return _y; } - - inline value_type& width() { return _width; } - inline value_type width() const { return _width; } - - inline value_type& height() { return _height; } - inline value_type height() const { return _height; } - - inline bool valid() const { return _width>0 && _height>0; } - - /** Return the aspectRatio of the viewport, which is equal to width/height. - * If height is zero, the potential division by zero is avoided by simply returning 1.0f. - */ - inline double aspectRatio() const { if (_height!=0) return (double)_width/(double)_height; else return 1.0; } - - /** Compute the Window Matrix which takes projected coords into Window coordinates. - * To convert local coordinates into window coordinates use v_window = v_local * MVPW matrix, - * where the MVPW matrix is ModelViewMatrix * ProjectionMatrix * WindowMatrix, the latter supplied by - * Viewport::computeWindowMatrix(), the ModelView and Projection Matrix can either be sourced from the - * current osg::State object, via osgUtil::SceneView or CullVisitor. - */ - inline const osg::Matrix computeWindowMatrix() const - { - return osg::Matrix::translate(1.0,1.0,1.0)*osg::Matrix::scale(0.5*width(),0.5*height(),0.5f)*osg::Matrix::translate(x(),y(),0.0f); - } - - virtual void apply(State& state) const; - - protected: - - virtual ~Viewport(); - - value_type _x; - value_type _y; - value_type _width; - value_type _height; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/buffered_value b/libs/lib/mac32/include/osg/buffered_value deleted file mode 100644 index d2714685d..000000000 --- a/libs/lib/mac32/include/osg/buffered_value +++ /dev/null @@ -1,132 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_BUFFERED_VALUE -#define OSG_BUFFERED_VALUE 1 - -#include -#include - -namespace osg { - -/** Implements a simple buffered value for values that need to be buffered on - * a per graphics context basis. -*/ -template -class buffered_value -{ - public: - - inline buffered_value(): - _array(DisplaySettings::instance()->getMaxNumberOfGraphicsContexts(),0) - {} - - inline buffered_value(unsigned int size): - _array(size,0) - {} - - buffered_value& operator = (const buffered_value& rhs) - { - _array = rhs._array; - return *this; - } - - inline void setAllElementsTo(const T& t) { std::fill(_array.begin(),_array.end(),t); } - - inline void clear() { _array.clear(); } - - inline bool empty() const { return _array.empty(); } - - inline unsigned int size() const { return _array.size(); } - - inline void resize(unsigned int newSize) { _array.resize(newSize,0); } - - inline T& operator[] (unsigned int pos) - { - // automatically resize array. - if (_array.size()<=pos) - _array.resize(pos+1,0); - - return _array[pos]; - } - - inline T operator[] (unsigned int pos) const - { - // automatically resize array. - if (_array.size()<=pos) - _array.resize(pos+1,0); - - return _array[pos]; - } - - protected: - - mutable std::vector _array; -}; - -template -class buffered_object -{ - public: - - inline buffered_object(): - _array(DisplaySettings::instance()->getMaxNumberOfGraphicsContexts()) - {} - - inline buffered_object(unsigned int size): - _array(size) - {} - - buffered_object& operator = (const buffered_object& rhs) - { - _array = rhs._array; - return *this; - } - - inline void setAllElementsTo(const T& t) { std::fill(_array.begin(),_array.end(),t); } - - inline void clear() { _array.clear(); } - - inline bool empty() const { return _array.empty(); } - - inline unsigned int size() const { return _array.size(); } - - inline void resize(unsigned int newSize) { _array.resize(newSize); } - - inline T& operator[] (unsigned int pos) - { - // automatically resize array. - if (_array.size()<=pos) - _array.resize(pos+1); - - return _array[pos]; - } - - inline const T& operator[] (unsigned int pos) const - { - // automatically resize array. - if (_array.size()<=pos) - _array.resize(pos+1); - - return _array[pos]; - } - - - protected: - - mutable std::vector _array; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/fast_back_stack b/libs/lib/mac32/include/osg/fast_back_stack deleted file mode 100644 index 757dde75b..000000000 --- a/libs/lib/mac32/include/osg/fast_back_stack +++ /dev/null @@ -1,97 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_FAST_BACK_STACK -#define OSG_FAST_BACK_STACK 1 - -#include - -namespace osg { - -/** Simple stack implementation that keeps the back() cached locally for fast access - * rather than at the back of the vector which is the traditional stack implementation. - * A conventional std::vector<> stores the rest of the stack. Although fast_back_stack - * contains a stl container it only implements the back push_back(),pop_back() - * and back() methods so is not as general purpose as stl stack implementation. - * The focus of the fast_back_stack is purely to maximize the speed at which the - * back can be accessed.*/ - -template -class fast_back_stack -{ - public: - - inline fast_back_stack():_value(),_stack(),_size(0) {} - - inline fast_back_stack(const fast_back_stack& fbs):_value(fbs._value),_stack(fbs._stack),_size(fbs._size) {} - - inline fast_back_stack(const T& value):_value(value),_stack(),_size(1) {} - - fast_back_stack& operator = (const fast_back_stack& fbs) - { - _value = fbs._value; - _stack = fbs._stack; - _size = fbs._size; - return *this; - } - - inline void clear() { _stack.clear(); _size = 0; } - - inline bool empty() const { return _size==0; } - - inline unsigned int size() const { return _size; } - - inline T& back() { return _value; } - - inline const T& back() const { return _value; } - - inline void push_back() - { - if (_size>0) - { - _stack.push_back(_value); - } - ++_size; - } - - inline void push_back(const T& value) - { - if (_size>0) - { - _stack.push_back(_value); - } - _value = value; - ++_size; - } - - inline void pop_back() - { - if (_size>0) - { - if (!_stack.empty()) - { - _value = _stack.back(); - _stack.pop_back(); - } - --_size; - } // else error condition. - } - - T _value; - std::vector _stack; - unsigned int _size; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/io_utils b/libs/lib/mac32/include/osg/io_utils deleted file mode 100644 index be28e79ed..000000000 --- a/libs/lib/mac32/include/osg/io_utils +++ /dev/null @@ -1,338 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_IO_UTILS -#define OSG_IO_UTILS 1 - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace osg { - - -////////////////////////////////////////////////////////////////////////// -// Vec2f streaming operators -inline std::ostream& operator << (std::ostream& output, const Vec2f& vec) -{ - output << vec._v[0] << " " << vec._v[1]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec2f& vec) -{ - input >> vec._v[0] >> std::ws >> vec._v[1]; - return input; -} - -////////////////////////////////////////////////////////////////////////// -// Vec2d steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec2d& vec) -{ - output << vec._v[0] << " " << vec._v[1]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec2d& vec) -{ - input >> vec._v[0] >> std::ws >> vec._v[1]; - return input; -} - -////////////////////////////////////////////////////////////////////////// -// Vec3f steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec3f& vec) -{ - output << vec._v[0] << " " - << vec._v[1] << " " - << vec._v[2]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec3f& vec) -{ - input >> vec._v[0] >> std::ws >> vec._v[1] >> std::ws >> vec._v[2]; - return input; -} - - -////////////////////////////////////////////////////////////////////////// -// Vec3d steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec3d& vec) -{ - output << vec._v[0] << " " - << vec._v[1] << " " - << vec._v[2]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec3d& vec) -{ - input >> vec._v[0] >> std::ws >> vec._v[1] >> std::ws >> vec._v[2]; - return input; -} - - -////////////////////////////////////////////////////////////////////////// -// Vec3f steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec4f& vec) -{ - output << vec._v[0] << " " - << vec._v[1] << " " - << vec._v[2] << " " - << vec._v[3]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec4f& vec) -{ - input >> vec._v[0] >> std::ws - >> vec._v[1] >> std::ws - >> vec._v[2] >> std::ws - >> vec._v[3]; - return input; -} - - - -////////////////////////////////////////////////////////////////////////// -// Vec4d steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec4d& vec) -{ - output << vec._v[0] << " " - << vec._v[1] << " " - << vec._v[2] << " " - << vec._v[3]; - return output; // to enable cascading -} -inline std::istream& operator >> (std::istream& input, Vec4d& vec) -{ - input >> vec._v[0] >> std::ws - >> vec._v[1] >> std::ws - >> vec._v[2] >> std::ws - >> vec._v[3]; - return input; -} - - -////////////////////////////////////////////////////////////////////////// -// Vec2b steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec2b& vec) -{ - output << (int)vec._v[0] << " " - << (int)vec._v[1]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec2b& vec) -{ - input >> vec._v[0] >> std::ws >> vec._v[1]; - return input; -} - -////////////////////////////////////////////////////////////////////////// -// Vec3b steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec3b& vec) -{ - output << (int)vec._v[0] << " " - << (int)vec._v[1] << " " - << (int)vec._v[2]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec3b& vec) -{ - input >> vec._v[0] >> std::ws >> vec._v[1] >> std::ws >> vec._v[2]; - return input; -} - -////////////////////////////////////////////////////////////////////////// -// Vec4b steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec4b& vec) -{ - output << (int)vec._v[0] << " " - << (int)vec._v[1] << " " - << (int)vec._v[2] << " " - << (int)vec._v[3]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec4b& vec) -{ - input >> vec._v[0] >> std::ws - >> vec._v[1] >> std::ws - >> vec._v[2] >> std::ws - >> vec._v[3]; - return input; -} - - -////////////////////////////////////////////////////////////////////////// -// Vec2s steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec2s& vec) -{ - output << (int)vec._v[0] << " " - << (int)vec._v[1]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec2s& vec) -{ - input >> vec._v[0] >> std::ws >> vec._v[1]; - return input; -} - -////////////////////////////////////////////////////////////////////////// -// Vec3s steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec3s& vec) -{ - output << (int)vec._v[0] << " " - << (int)vec._v[1] << " " - << (int)vec._v[2]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec3s& vec) -{ - input >> vec._v[0] >> std::ws >> vec._v[1] >> std::ws >> vec._v[2]; - return input; -} - -////////////////////////////////////////////////////////////////////////// -// Vec4s steaming operators. -inline std::ostream& operator << (std::ostream& output, const Vec4s& vec) -{ - output << (int)vec._v[0] << " " - << (int)vec._v[1] << " " - << (int)vec._v[2] << " " - << (int)vec._v[3]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Vec4s& vec) -{ - input >> vec._v[0] >> std::ws - >> vec._v[1] >> std::ws - >> vec._v[2] >> std::ws - >> vec._v[3]; - return input; -} - - -////////////////////////////////////////////////////////////////////////// -// Matrixf steaming operators. -inline std::ostream& operator<< (std::ostream& os, const Matrixf& m ) -{ - os << "{"<> (std::istream& input, Vec4ub& vec) -{ - input >> vec._v[0] >> std::ws - >> vec._v[1] >> std::ws - >> vec._v[2] >> std::ws - >> vec._v[3]; - return input; -} - - -////////////////////////////////////////////////////////////////////////// -// Quat steaming operators. -inline std::ostream& operator << (std::ostream& output, const Quat& vec) -{ - output << vec._v[0] << " " - << vec._v[1] << " " - << vec._v[2] << " " - << vec._v[3]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Quat& vec) -{ - input >> vec._v[0] >> std::ws - >> vec._v[1] >> std::ws - >> vec._v[2] >> std::ws - >> vec._v[3]; - return input; -} - - - -////////////////////////////////////////////////////////////////////////// -// Plane steaming operators. -inline std::ostream& operator << (std::ostream& output, const Plane& pl) -{ - output << pl[0] << " " - << pl[1] << " " - << pl[2] << " " - << pl[3]; - return output; // to enable cascading -} - -inline std::istream& operator >> (std::istream& input, Plane& vec) -{ - input >> vec[0] >> std::ws - >> vec[1] >> std::ws - >> vec[2] >> std::ws - >> vec[3]; - return input; -} - -} // end of namespace osg -#endif diff --git a/libs/lib/mac32/include/osg/observer_ptr b/libs/lib/mac32/include/osg/observer_ptr deleted file mode 100644 index 49614d7c6..000000000 --- a/libs/lib/mac32/include/osg/observer_ptr +++ /dev/null @@ -1,159 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_OBSERVER_PTR -#define OSG_OBSERVER_PTR - -#include -#include -#include - -#include -#include - -namespace osg { - -/** Smart pointer for observed objects, that automatically set pointers to them to null when they are deleted. - * To use the observer_ptr<> robustly in multi-threaded applications it is recommend to access the pointer via - * the lock() method that passes back a ref_ptr<> that safely takes a reference to the object to prevent deletion - * during usage of the object. In certain conditions it may be safe to use the pointer directly without using lock(), - * which will confer a perfomance advantage, the conditions are: - * 1) The data structure is only accessed/deleted in single threaded/serial way. - * 2) The data strucutre is guarenteed by high level management of data strucutures and threads which avoid - * possible situations where the observer_ptr<>'s object may be deleted by one thread whilst being accessed - * by another. - * If you are in any doubt about whether it is safe to access the object safe then use the - * ref_ptr<> observer_ptr<>.lock() combination. */ -template -class observer_ptr -{ -public: - typedef T element_type; - observer_ptr() : _reference(0), _ptr(0) {} - - /** - * Create a observer_ptr from a ref_ptr. - */ - observer_ptr(const ref_ptr& rp) - { - _reference = rp.valid() ? rp->getOrCreateObserverSet() : 0; - _ptr = (_reference.valid() && _reference->getObserverdObject()!=0) ? rp.get() : 0; - } - - /** - * Create a observer_ptr from a raw pointer. For compatibility; - * the result might not be lockable. - */ - observer_ptr(T* rp) - { - _reference = rp ? rp->getOrCreateObserverSet() : 0; - _ptr = (_reference.valid() && _reference->getObserverdObject()!=0) ? rp : 0; - } - - observer_ptr(const observer_ptr& wp) : - _reference(wp._reference), - _ptr(wp._ptr) - { - } - - ~observer_ptr() - { - } - - observer_ptr& operator = (const observer_ptr& wp) - { - if (&wp==this) return *this; - - _reference = wp._reference; - _ptr = wp._ptr; - return *this; - } - - observer_ptr& operator = (const ref_ptr& rp) - { - _reference = rp.valid() ? rp->getOrCreateObserverSet() : 0; - _ptr = (_reference.valid() && _reference->getObserverdObject()!=0) ? rp.get() : 0; - return *this; - } - - observer_ptr& operator = (T* rp) - { - _reference = rp ? rp->getOrCreateObserverSet() : 0; - _ptr = (_reference.valid() && _reference->getObserverdObject()!=0) ? rp : 0; - return *this; - } - - /** - * Assign the observer_ptr to a ref_ptr. The ref_ptr will be valid if the - * referenced object hasn't been deleted and has a ref count > 0. - */ - bool lock(ref_ptr& rptr) const - { - if (!_reference) - { - rptr = 0; - return false; - } - - Referenced* obj = _reference->addRefLock(); - if (!obj) - { - rptr = 0; - return false; - } - - rptr = _ptr; - obj->unref_nodelete(); - return rptr.valid(); - } - - /** Comparison operators. These continue to work even after the - * observed object has been deleted. - */ - bool operator == (const observer_ptr& wp) const { return _reference == wp._reference; } - bool operator != (const observer_ptr& wp) const { return _reference != wp._reference; } - bool operator < (const observer_ptr& wp) const { return _reference < wp._reference; } - bool operator > (const observer_ptr& wp) const { return _reference > wp._reference; } - - // Non-strict interface, for compatibility - // comparison operator for const T*. - inline bool operator == (const T* ptr) const { return _ptr == ptr; } - inline bool operator != (const T* ptr) const { return _ptr != ptr; } - inline bool operator < (const T* ptr) const { return _ptr < ptr; } - inline bool operator > (const T* ptr) const { return _ptr > ptr; } - - // Convenience methods for operating on object, however, access is not automatically threadsafe. - // To make thread safe, one should either ensure at a high level - // that the object will not be deleted while operating on it, or - // by using the observer_ptr<>::lock() to get a ref_ptr<> that - // ensures the objects stay alive throughout all access to it. - - // Throw an error if _reference is null? - inline T& operator*() const { return *_ptr; } - inline T* operator->() const { return _ptr; } - - // get the raw C pointer - inline T* get() const { return (_reference.valid() && _reference->getObserverdObject()!=0) ? _ptr : 0; } - - inline bool operator!() const { return get() == 0; } - inline bool valid() const { return get() != 0; } - -protected: - - osg::ref_ptr _reference; - T* _ptr; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osg/ref_ptr b/libs/lib/mac32/include/osg/ref_ptr deleted file mode 100644 index 948d2f0bb..000000000 --- a/libs/lib/mac32/include/osg/ref_ptr +++ /dev/null @@ -1,138 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_REF_PTR -#define OSG_REF_PTR 1 - -#include - -namespace osg { - -template class observer_ptr; - -/** Smart pointer for handling referenced counted objects.*/ -template -class ref_ptr -{ - public: - typedef T element_type; - - ref_ptr() : _ptr(0) {} - ref_ptr(T* ptr) : _ptr(ptr) { if (_ptr) _ptr->ref(); } - ref_ptr(const ref_ptr& rp) : _ptr(rp._ptr) { if (_ptr) _ptr->ref(); } - template ref_ptr(const ref_ptr& rp) : _ptr(rp._ptr) { if (_ptr) _ptr->ref(); } - ref_ptr(observer_ptr& optr) : _ptr(0) { optr.lock(*this); } - ~ref_ptr() { if (_ptr) _ptr->unref(); _ptr = 0; } - - ref_ptr& operator = (const ref_ptr& rp) - { - assign(rp); - return *this; - } - - template ref_ptr& operator = (const ref_ptr& rp) - { - assign(rp); - return *this; - } - - inline ref_ptr& operator = (T* ptr) - { - if (_ptr==ptr) return *this; - T* tmp_ptr = _ptr; - _ptr = ptr; - if (_ptr) _ptr->ref(); - // unref second to prevent any deletion of any object which might - // be referenced by the other object. i.e rp is child of the - // original _ptr. - if (tmp_ptr) tmp_ptr->unref(); - return *this; - } - -#ifdef OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION - // implicit output conversion - operator T*() const { return _ptr; } -#else - // comparison operators for ref_ptr. - bool operator == (const ref_ptr& rp) const { return (_ptr==rp._ptr); } - bool operator == (const T* ptr) const { return (_ptr==ptr); } - friend bool operator == (const T* ptr, const ref_ptr& rp) { return (ptr==rp._ptr); } - - bool operator != (const ref_ptr& rp) const { return (_ptr!=rp._ptr); } - bool operator != (const T* ptr) const { return (_ptr!=ptr); } - friend bool operator != (const T* ptr, const ref_ptr& rp) { return (ptr!=rp._ptr); } - - bool operator < (const ref_ptr& rp) const { return (_ptr() const { return _ptr; } - T* get() const { return _ptr; } - - bool operator!() const { return _ptr==0; } // not required - bool valid() const { return _ptr!=0; } - - T* release() { T* tmp=_ptr; if (_ptr) _ptr->unref_nodelete(); _ptr=0; return tmp; } - - void swap(ref_ptr& rp) { T* tmp=_ptr; _ptr=rp._ptr; rp._ptr=tmp; } - - private: - - template void assign(const ref_ptr& rp) - { - if (_ptr==rp._ptr) return; - T* tmp_ptr = _ptr; - _ptr = rp._ptr; - if (_ptr) _ptr->ref(); - // unref second to prevent any deletion of any object which might - // be referenced by the other object. i.e rp is child of the - // original _ptr. - if (tmp_ptr) tmp_ptr->unref(); - } - - template friend class ref_ptr; - - T* _ptr; -}; - - -template inline -void swap(ref_ptr& rp1, ref_ptr& rp2) { rp1.swap(rp2); } - -template inline -T* get_pointer(const ref_ptr& rp) { return rp.get(); } - -template inline -ref_ptr static_pointer_cast(const ref_ptr& rp) { return static_cast(rp.get()); } - -template inline -ref_ptr dynamic_pointer_cast(const ref_ptr& rp) { return dynamic_cast(rp.get()); } - -template inline -ref_ptr const_pointer_cast(const ref_ptr& rp) { return const_cast(rp.get()); } - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Action b/libs/lib/mac32/include/osgAnimation/Action deleted file mode 100644 index 9cdaacbc6..000000000 --- a/libs/lib/mac32/include/osgAnimation/Action +++ /dev/null @@ -1,147 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_ACTION_H -#define OSGANIMATION_ACTION_H - -#include -#include -#include -#include -#include - -#define META_Action(library,name) \ - virtual osg::Object* cloneType() const { return new name (); } \ - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ - virtual const char* className() const { return #name; } \ - virtual const char* libraryName() const { return #library; } \ - virtual void accept(osgAnimation::ActionVisitor& nv) { nv.apply(*this); } \ - - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT Action : public osg::Object - { - public: - - class Callback : public osg::Object - { - public: - Callback(){} - Callback(const Callback& nc,const osg::CopyOp&) : - _nestedCallback(nc._nestedCallback) {} - - META_Object(osgAnimation,Callback); - - virtual void operator()(Action* action, osgAnimation::ActionVisitor* nv) {} - - Callback* getNestedCallback() { return _nestedCallback.get(); } - void addNestedCallback(Callback* callback) - { - if (callback) { - if (_nestedCallback.valid()) - _nestedCallback->addNestedCallback(callback); - else - _nestedCallback = callback; - } - } - - void removeCallback(Callback* cb) - { - if (!cb) - return; - - if (_nestedCallback.get() == cb) - _nestedCallback = _nestedCallback->getNestedCallback(); - else if (_nestedCallback.valid()) - _nestedCallback->removeCallback(cb); - } - - protected: - osg::ref_ptr _nestedCallback; - }; - - - typedef std::map > FrameCallback; - - META_Action(osgAnimation, Action); - - Action(); - Action(const Action&,const osg::CopyOp&); - - void setCallback(double when, Callback* callback) - { - setCallback(static_cast(floor(when*_fps)), callback); - } - - void setCallback(unsigned int frame, Callback* callback) - { - if (_framesCallback[frame].valid()) - _framesCallback[frame]->addNestedCallback(callback); - else - _framesCallback[frame] = callback; - } - Callback* getCallback(unsigned int frame) - { - if (_framesCallback.find(frame) == _framesCallback.end()) - return 0; - return _framesCallback[frame].get(); - } - - void removeCallback(Callback*); - - Callback* getFrameCallback(unsigned int frame); - Callback* getFrameCallback(double time); - unsigned int getFramesPerSecond() const { return _fps; } - - void setNumFrames(unsigned int numFrames) { _numberFrame = numFrames;} - void setDuration(double duration) { _numberFrame = static_cast(floor(duration * _fps)); } - unsigned int getNumFrames() const { return _numberFrame;} - double getDuration() const { return _numberFrame * 1.0 / _fps; } - - // 0 means infini else it's the number of loop - virtual void setLoop(unsigned int nb) { _loop = nb; } - virtual unsigned int getLoop() const { return _loop;} - - // get the number of loop, the frame relative to loop. - // return true if in range, and false if out of range. - bool evaluateFrame(unsigned int frame, unsigned int& resultframe, unsigned int& nbloop ); - virtual void traverse(ActionVisitor& visitor) {} - //virtual void evaluate(unsigned int frame); - - protected: - FrameCallback _framesCallback; - - double _speed; - unsigned int _fps; - unsigned int _numberFrame; - unsigned int _loop; - - enum Status - { - Play, - Stop - }; - - Status _state; - }; - - - - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/ActionAnimation b/libs/lib/mac32/include/osgAnimation/ActionAnimation deleted file mode 100644 index ed4d8982e..000000000 --- a/libs/lib/mac32/include/osgAnimation/ActionAnimation +++ /dev/null @@ -1,41 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_ACTION_ANIMATION_H -#define OSGANIMATION_ACTION_ANIMATION_H - -#include -#include - - -namespace osgAnimation { - - - class OSGANIMATION_EXPORT ActionAnimation : public Action - { - public: - META_Action(osgAnimation, ActionAnimation); - ActionAnimation(); - ActionAnimation(const ActionAnimation& a, const osg::CopyOp& c); - ActionAnimation(Animation* animation); - void updateAnimation(unsigned int frame, int priority); - Animation* getAnimation() { return _animation.get(); } - - protected: - osg::ref_ptr _animation; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/ActionBlendIn b/libs/lib/mac32/include/osgAnimation/ActionBlendIn deleted file mode 100644 index 5789a2c51..000000000 --- a/libs/lib/mac32/include/osgAnimation/ActionBlendIn +++ /dev/null @@ -1,44 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_ACTION_BLENDIN_H -#define OSGANIMATION_ACTION_BLENDIN_H - -#include -#include - - -namespace osgAnimation { - - - /// blend in from 0 to weight in duration - class OSGANIMATION_EXPORT ActionBlendIn : public Action - { - public: - META_Action(osgAnimation, ActionBlendIn); - ActionBlendIn(); - ActionBlendIn(const ActionBlendIn& a, const osg::CopyOp& c); - ActionBlendIn(Animation* animation, double duration, double weight); - double getWeight() const { return _weight;} - Animation* getAnimation() { return _animation.get(); } - void computeWeight(unsigned int frame); - - protected: - double _weight; - osg::ref_ptr _animation; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/ActionBlendOut b/libs/lib/mac32/include/osgAnimation/ActionBlendOut deleted file mode 100644 index cc391739e..000000000 --- a/libs/lib/mac32/include/osgAnimation/ActionBlendOut +++ /dev/null @@ -1,45 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_ACTION_BLENDOUT_H -#define OSGANIMATION_ACTION_BLENDOUT_H - -#include -#include - - -namespace osgAnimation { - - - /// blend out from weight to 0 in duration - class OSGANIMATION_EXPORT ActionBlendOut : public Action - { - public: - META_Action(osgAnimation, ActionBlendOut); - ActionBlendOut(); - ActionBlendOut(const ActionBlendOut& a, const osg::CopyOp& c); - ActionBlendOut(Animation* animation, double duration); - Animation* getAnimation() { return _animation.get(); } - double getWeight() const { return _weight;} - void computeWeight(unsigned int frame); - - protected: - double _weight; - osg::ref_ptr _animation; - - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/ActionCallback b/libs/lib/mac32/include/osgAnimation/ActionCallback deleted file mode 100644 index 0f589d5a9..000000000 --- a/libs/lib/mac32/include/osgAnimation/ActionCallback +++ /dev/null @@ -1,41 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_ACTION_CALLBACK_H -#define OSGANIMATION_ACTION_CALLBACK_H - -#include -#include - -namespace osgAnimation -{ - - /** Callback used to run new action on the timeline.*/ - class OSGANIMATION_EXPORT RunAction : public Action::Callback - { - public: - RunAction(Action* a, int priority = 0) : _action(a), _priority(priority) {} - virtual void operator()(Action* action, ActionVisitor* visitor); - - Action* getAction() const { return _action.get(); } - int getPriority() const { return _priority; } - protected: - osg::ref_ptr _action; - int _priority; - - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/ActionStripAnimation b/libs/lib/mac32/include/osgAnimation/ActionStripAnimation deleted file mode 100644 index 7ede4ae08..000000000 --- a/libs/lib/mac32/include/osgAnimation/ActionStripAnimation +++ /dev/null @@ -1,57 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_ACTION_STRIPANIMATION_H -#define OSGANIMATION_ACTION_STRIPANIMATION_H - -#include -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - // encapsulate animation with blend in blend out for classic usage - class OSGANIMATION_EXPORT ActionStripAnimation : public Action - { - public: - META_Action(osgAnimation, ActionStripAnimation); - ActionStripAnimation() {} - ActionStripAnimation(const ActionStripAnimation& a, const osg::CopyOp& c); - ActionStripAnimation(Animation* animation, double blendInDuration = 0.0, double blendOutDuration = 0.0, double blendInWeightTarget = 1.0 ); - ActionAnimation* getAnimation(); - ActionBlendIn* getBlendIn(); - ActionBlendOut* getBlendOut(); - const ActionAnimation* getAnimation() const; - const ActionBlendIn* getBlendIn() const; - const ActionBlendOut* getBlendOut() const; - unsigned int getBlendOutStartFrame() const; - - unsigned int getLoop() const; - void setLoop(unsigned int loop); - void traverse(ActionVisitor& visitor); - - protected: - typedef std::pair > FrameBlendOut; - osg::ref_ptr _blendIn; - FrameBlendOut _blendOut; - osg::ref_ptr _animation; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/ActionVisitor b/libs/lib/mac32/include/osgAnimation/ActionVisitor deleted file mode 100644 index cc1f542f5..000000000 --- a/libs/lib/mac32/include/osgAnimation/ActionVisitor +++ /dev/null @@ -1,117 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_ACTIONVISITOR_H -#define OSGANIMATION_ACTIONVISITOR_H - -#include -#include -#include -#include - -namespace osgAnimation -{ - - class Timeline; - class Action; - class ActionBlendIn; - class ActionBlendOut; - class ActionAnimation; - class ActionStripAnimation; - -#define META_ActionVisitor(library,name) \ - virtual const char* libraryName() const { return #library; }\ - virtual const char* className() const { return #name; } - - - class OSGANIMATION_EXPORT ActionVisitor : public osg::Referenced - { - public: - META_ActionVisitor(osgAnimation, ActionVisitor); - ActionVisitor(); - void traverse(Action& visitor); - - void pushFrameActionOnStack(const FrameAction& fa); - void popFrameAction(); - - void pushTimelineOnStack(Timeline* tm); - void popTimeline(); - - Timeline* getCurrentTimeline(); - void setCurrentLayer(int layer) { _currentLayer = layer;} - int getCurrentLayer() const { return _currentLayer; } - - const std::vector& getStackedFrameAction() const { return _stackFrameAction; } - - virtual void apply(Action& action); - virtual void apply(Timeline& tm); - virtual void apply(ActionBlendIn& action); - virtual void apply(ActionBlendOut& action); - virtual void apply(ActionAnimation& action); - virtual void apply(ActionStripAnimation& action); - - protected: - std::vector _stackFrameAction; - std::vector _stackTimeline; - int _currentLayer; - }; - - - class OSGANIMATION_EXPORT UpdateActionVisitor : public osgAnimation::ActionVisitor - { - protected: - unsigned int _frame; - unsigned int _currentAnimationPriority; - public: - META_ActionVisitor(osgAnimation, UpdateActionVisitor); - UpdateActionVisitor(); - void setFrame(unsigned int frame) { _frame = frame;} - - bool isActive(Action& action) const; - unsigned int getLocalFrame() const; - - void apply(Timeline& action); - void apply(Action& action); - void apply(ActionBlendIn& action); - void apply(ActionBlendOut& action); - void apply(ActionAnimation& action); - void apply(ActionStripAnimation& action); - - }; - - - class OSGANIMATION_EXPORT ClearActionVisitor : public osgAnimation::ActionVisitor - { - public: - enum ClearType { - BEFORE_FRAME, - AFTER_FRAME - }; - - META_ActionVisitor(osgAnimation, ClearActionVisitor); - ClearActionVisitor(ClearType type = BEFORE_FRAME); - void setFrame(unsigned int frame) { _frame = frame;} - - void apply(Timeline& action); - void apply(Action& action); - - protected: - unsigned int _frame; - std::vector > _remove; - ClearType _clearType; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Animation b/libs/lib/mac32/include/osgAnimation/Animation deleted file mode 100644 index 655245e00..000000000 --- a/libs/lib/mac32/include/osgAnimation/Animation +++ /dev/null @@ -1,104 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_ANIMATION -#define OSGANIMATION_ANIMATION 1 - -#include -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT Animation : public osg::Object - { - public: - META_Object(osgAnimation, Animation) - - Animation() : _duration(0), _weight(0), _startTime(0), _playmode(LOOP) {} - Animation(const osgAnimation::Animation&, const osg::CopyOp&); - - enum PlayMode - { - ONCE, - STAY, - LOOP, - PPONG - }; - - // addChannel insert the channel and call the computeDuration function - void addChannel (Channel* pChannel); - - /** Those accessors let you add and remove channels - * if you modify something that can change the duration - * you are supposed to call computeDuration or setDuration - */ - ChannelList& getChannels(); - const ChannelList& getChannels() const; - - /** Change the duration of animation - * then evaluate the animation in the range 0-duration - * it stretch the animation in time. - * see computeDuration too - */ - void setDuration(double duration); - - - /** Compute duration from channel and keyframes - * if the duration is not specified you should - * call this method before using it - */ - void computeDuration(); - - double getDuration() const; - - - void setWeight (float weight); - float getWeight() const; - - bool update (double time, int priority = 0); - void resetTargets(); - - void setPlayMode (PlayMode mode) { _playmode = mode; } - PlayMode getPlayMode() const { return _playmode; } - - void setStartTime(double time) { _startTime = time;} - double getStartTime() const { return _startTime;} - - protected: - - double computeDurationFromChannels() const; - - ~Animation() {} - - double _duration; - double _originalDuration; - float _weight; - double _startTime; - PlayMode _playmode; - ChannelList _channels; - - }; - - typedef std::vector > AnimationList; - typedef std::map > AnimationMap; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/AnimationManagerBase b/libs/lib/mac32/include/osgAnimation/AnimationManagerBase deleted file mode 100644 index e043fecce..000000000 --- a/libs/lib/mac32/include/osgAnimation/AnimationManagerBase +++ /dev/null @@ -1,70 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_ANIMATION_MANAGER_BASE -#define OSGANIMATION_ANIMATION_MANAGER_BASE 1 - -#include -#include -#include -#include -#include - - - -namespace osgAnimation -{ - class OSGANIMATION_EXPORT AnimationManagerBase : public osg::NodeCallback - { - public: - typedef std::set > TargetSet; - - AnimationManagerBase(); - AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY); - virtual ~AnimationManagerBase(); - virtual void buildTargetReference(); - virtual void registerAnimation (Animation*); - virtual void unregisterAnimation (Animation*); - virtual void link(osg::Node* subgraph); - virtual void update(double t) = 0; - virtual bool needToLink() const; - const AnimationList& getAnimationList() const { return _animations;} - - /** Callback method called by the NodeVisitor when visiting a node.*/ - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); - - /** Reset the value of targets - this Operation must be done each frame */ - void clearTargets(); - - - LinkVisitor* getOrCreateLinkVisitor(); - void setLinkVisitor(LinkVisitor*); - - /// set a flag to define the behaviour - void setAutomaticLink(bool); - bool getAutomaticLink() const; - bool isAutomaticLink() const { return getAutomaticLink(); } - void dirty(); - - protected: - - osg::ref_ptr _linker; - AnimationList _animations; - TargetSet _targets; - bool _needToLink; - bool _automaticLink; - }; -} -#endif diff --git a/libs/lib/mac32/include/osgAnimation/AnimationUpdateCallback b/libs/lib/mac32/include/osgAnimation/AnimationUpdateCallback deleted file mode 100644 index 9cb526773..000000000 --- a/libs/lib/mac32/include/osgAnimation/AnimationUpdateCallback +++ /dev/null @@ -1,72 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_ANIMATION_UPDATE_CALLBACK -#define OSGANIMATION_ANIMATION_UPDATE_CALLBACK 1 - -#include -#include -#include -#include - -namespace osgAnimation -{ - - class AnimationUpdateCallbackBase : public virtual osg::Object - { - public: - virtual bool link(Channel* channel) = 0; - virtual int link(Animation* animation) = 0; - }; - - - template - class AnimationUpdateCallback : public AnimationUpdateCallbackBase, public T - { - public: - AnimationUpdateCallback() {} - AnimationUpdateCallback(const std::string& name) { T::setName(name);} - AnimationUpdateCallback(const AnimationUpdateCallback& apc,const osg::CopyOp& copyop): T(apc, copyop) {} - - META_Object(osgAnimation, AnimationUpdateCallback); - - const std::string& getName() const { return T::getName(); } - bool link(Channel* channel) { return 0; } - int link(Animation* animation) - { - if (T::getName().empty()) - { - osg::notify(osg::WARN) << "An update callback has no name, it means it could link only with \"\" named Target, often an error, discard" << std::endl; - return 0; - } - int nbLinks = 0; - for (ChannelList::iterator it = animation->getChannels().begin(); - it != animation->getChannels().end(); - ++it) - { - std::string targetName = (*it)->getTargetName(); - if (targetName == T::getName()) - { - AnimationUpdateCallbackBase* a = this; - a->link((*it).get()); - nbLinks++; - } - } - return nbLinks; - } - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/BasicAnimationManager b/libs/lib/mac32/include/osgAnimation/BasicAnimationManager deleted file mode 100644 index 633e89d4a..000000000 --- a/libs/lib/mac32/include/osgAnimation/BasicAnimationManager +++ /dev/null @@ -1,53 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_BASIC_ANIMATION_MANAGER_H -#define OSGANIMATION_BASIC_ANIMATION_MANAGER_H - -#include -#include -#include -#include - -namespace osgAnimation -{ - class OSGANIMATION_EXPORT BasicAnimationManager : public AnimationManagerBase - { - public: - - META_Object(osgAnimation, BasicAnimationManager); - - BasicAnimationManager(); - BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - virtual ~BasicAnimationManager(); - - void update (double time); - - void playAnimation (Animation* pAnimation, int priority = 0, float weight = 1.0); - bool stopAnimation (Animation* pAnimation); - - bool findAnimation (Animation* pAnimation); - bool isPlaying (Animation* pAnimation); - bool isPlaying (const std::string& animationName); - - void stopAll(); - - protected: - typedef std::map AnimationLayers; - AnimationLayers _animationsPlaying; - double _lastUpdate; - }; - -} -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Bone b/libs/lib/mac32/include/osgAnimation/Bone deleted file mode 100644 index 43e01d78c..000000000 --- a/libs/lib/mac32/include/osgAnimation/Bone +++ /dev/null @@ -1,61 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * Authors: - * Cedric Pinson - * Michael Platings - */ - -#ifndef OSGANIMATION_BONE -#define OSGANIMATION_BONE 1 - -#include -#include - -namespace osgAnimation -{ - - // A bone can't have more than one parent Bone, so sharing a part of Bone's hierarchy - // makes no sense. You can share the entire hierarchy but not only a part of it. - class OSGANIMATION_EXPORT Bone : public osg::MatrixTransform - { - public: - typedef osg::Matrix MatrixType; - - META_Node(osgAnimation, Bone); - Bone(const Bone& b, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY); - Bone(const std::string& name = ""); - - void setDefaultUpdateCallback(const std::string& name = ""); - - Bone* getBoneParent(); - const Bone* getBoneParent() const; - - const osg::Matrix& getMatrixInBoneSpace() const { return getMatrix();} - const osg::Matrix& getMatrixInSkeletonSpace() const { return _boneInSkeletonSpace; } - const osg::Matrix& getInvBindMatrixInSkeletonSpace() const { return _invBindInSkeletonSpace;} - void setMatrixInSkeletonSpace(const osg::Matrix& matrix) { _boneInSkeletonSpace = matrix; } - void setInvBindMatrixInSkeletonSpace(const osg::Matrix& matrix) { _invBindInSkeletonSpace = matrix; } - - protected: - - // bind data - osg::Matrix _invBindInSkeletonSpace; - - // bone updated - osg::Matrix _boneInSkeletonSpace; - }; - - typedef std::map > BoneMap; -} -#endif diff --git a/libs/lib/mac32/include/osgAnimation/BoneMapVisitor b/libs/lib/mac32/include/osgAnimation/BoneMapVisitor deleted file mode 100644 index d41538493..000000000 --- a/libs/lib/mac32/include/osgAnimation/BoneMapVisitor +++ /dev/null @@ -1,42 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * Authors: - * Cedric Pinson - */ - -#ifndef OSGANIMATION_BONEMAP_VISITOR -#define OSGANIMATION_BONEMAP_VISITOR 1 - -#include -#include -#include - -namespace osgAnimation -{ - class OSGANIMATION_EXPORT BoneMapVisitor : public osg::NodeVisitor - { - public: - META_NodeVisitor("osgAnimation","BoneMapVisitor") - BoneMapVisitor(); - - void apply(osg::Node&); - void apply(osg::Transform& node); - const BoneMap& getBoneMap() const; - - protected: - BoneMap _map; - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Channel b/libs/lib/mac32/include/osgAnimation/Channel deleted file mode 100644 index a3139bf0c..000000000 --- a/libs/lib/mac32/include/osgAnimation/Channel +++ /dev/null @@ -1,185 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * Authors: - * Cedric Pinson - * Michael Platings - */ - -#ifndef OSGANIMATION_CHANNEL -#define OSGANIMATION_CHANNEL 1 - -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT Channel : public osg::Referenced - { - public: - - Channel(); - Channel(const Channel& channel); - virtual ~Channel(); - virtual Channel* clone() const = 0; - - virtual void update(double time, float weight, int priority) = 0; - virtual void reset() = 0; - virtual Target* getTarget() = 0; - virtual bool setTarget(Target*) = 0; - - const std::string& getName() const; - void setName(const std::string& name); - - virtual double getStartTime() const = 0; - virtual double getEndTime() const = 0; - - const std::string& getTargetName() const; - void setTargetName(const std::string& name); - - virtual Sampler* getSampler() = 0; - virtual const Sampler* getSampler() const = 0; - - // create a keyframe container from current target value - // with one key only, can be used for debug or to create - // easily a default channel from an existing one - virtual bool createKeyframeContainerFromTargetValue() = 0; - - protected: - - std::string _targetName; - std::string _name; - }; - - - template - class TemplateChannel : public Channel - { - public: - - typedef typename SamplerType::UsingType UsingType; - typedef TemplateTarget TargetType; - typedef TemplateKeyframeContainer KeyframeContainerType; - Channel* clone() const { return new TemplateChannel(*this); } - - TemplateChannel (const TemplateChannel& channel) : - Channel(channel) - { - if (channel.getTargetTyped()) - _target = new TargetType(*channel.getTargetTyped()); - - if (channel.getSamplerTyped()) - _sampler = new SamplerType(*channel.getSamplerTyped()); - } - - TemplateChannel (SamplerType* s = 0,TargetType* target = 0) - { - if (target) - _target = target; - else - _target = new TargetType; - _sampler = s; - } - - virtual bool createKeyframeContainerFromTargetValue() - { - if (!_target.valid()) // no target it does not make sense to do it - { - return false; - } - - // create a key from current target value - typename KeyframeContainerType::KeyType key(0, _target->getValue()); - // recreate the keyframe container - getOrCreateSampler()->setKeyframeContainer(0); - getOrCreateSampler()->getOrCreateKeyframeContainer(); - // add the key - _sampler->getKeyframeContainerTyped()->push_back(key); - return true; - } - - virtual ~TemplateChannel() {} - virtual void update(double time, float weight, int priority) - { - // skip if weight == 0 - if (weight < 1e-4) - return; - typename SamplerType::UsingType value; - _sampler->getValueAt(time, value); - _target->update(weight, value, priority); - } - virtual void reset() { _target->reset(); } - virtual Target* getTarget() { return _target.get();} - virtual bool setTarget(Target* target) - { - _target = dynamic_cast(target); - return _target.get() == target; - } - - SamplerType* getOrCreateSampler() - { - if (!_sampler.valid()) - _sampler = new SamplerType; - return _sampler.get(); - } - - Sampler* getSampler() { return _sampler.get(); } - const Sampler* getSampler() const { return _sampler.get(); } - - SamplerType* getSamplerTyped() { return _sampler.get();} - const SamplerType* getSamplerTyped() const { return _sampler.get();} - void setSampler(SamplerType* sampler) { _sampler = sampler; } - - TargetType* getTargetTyped() { return _target.get(); } - const TargetType* getTargetTyped() const { return _target.get(); } - void setTarget(TargetType* target) { _target = target; } - - virtual double getStartTime() const { return _sampler->getStartTime(); } - virtual double getEndTime() const { return _sampler->getEndTime(); } - - protected: - osg::ref_ptr _target; - osg::ref_ptr _sampler; - }; - - - typedef std::vector > ChannelList; - - typedef TemplateChannel DoubleStepChannel; - typedef TemplateChannel FloatStepChannel; - typedef TemplateChannel Vec2StepChannel; - typedef TemplateChannel Vec3StepChannel; - typedef TemplateChannel Vec4StepChannel; - typedef TemplateChannel QuatStepChannel; - - typedef TemplateChannel DoubleLinearChannel; - typedef TemplateChannel FloatLinearChannel; - typedef TemplateChannel Vec2LinearChannel; - typedef TemplateChannel Vec3LinearChannel; - typedef TemplateChannel Vec4LinearChannel; - typedef TemplateChannel QuatSphericalLinearChannel; - typedef TemplateChannel MatrixLinearChannel; - - typedef TemplateChannel FloatCubicBezierChannel; - typedef TemplateChannel DoubleCubicBezierChannel; - typedef TemplateChannel Vec2CubicBezierChannel; - typedef TemplateChannel Vec3CubicBezierChannel; - typedef TemplateChannel Vec4CubicBezierChannel; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/CubicBezier b/libs/lib/mac32/include/osgAnimation/CubicBezier deleted file mode 100644 index 2bb514d7f..000000000 --- a/libs/lib/mac32/include/osgAnimation/CubicBezier +++ /dev/null @@ -1,79 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_CUBIC_BEZIER -#define OSGANIMATION_CUBIC_BEZIER 1 - -#include -#include -#include - -namespace osgAnimation -{ - - template - class TemplateCubicBezier - { - public: - TemplateCubicBezier() {} - - TemplateCubicBezier(const T& p, const T& i, const T& o) : _position(p), _controlPointIn(i), _controlPointOut(o) - { - } - - // Constructor with value only - TemplateCubicBezier(const T& p) : _position(p), _controlPointIn(p), _controlPointOut(p) - { - } - - const T& getPosition() const { return _position;} - const T& getControlPointIn() const { return _controlPointIn;} - const T& getControlPointOut() const { return _controlPointOut;} - - T& getPosition() { return _position;} - T& getControlPointIn() { return _controlPointIn;} - T& getControlPointOut() { return _controlPointOut;} - - void setPosition(const T& v) {_position = v;} - void setControlPointIn(const T& v) {_controlPointIn = v;} - void setControlPointOut(const T& v) {_controlPointOut = v;} - - // steaming operators. - friend std::ostream& operator << (std::ostream& output, const TemplateCubicBezier& tcb) - { - output << tcb._position << " " - << tcb._controlPointIn << " " - << tcb._controlPointOut; - return output; // to enable cascading - } - - friend std::istream& operator >> (std::istream& input, TemplateCubicBezier& tcb) - { - input >> tcb._position >> tcb._controlPointIn >> tcb._controlPointOut; - return input; - } - - protected: - T _position, _controlPointIn, _controlPointOut; - }; - - typedef TemplateCubicBezier FloatCubicBezier; - typedef TemplateCubicBezier DoubleCubicBezier; - typedef TemplateCubicBezier Vec2CubicBezier; - typedef TemplateCubicBezier Vec3CubicBezier; - typedef TemplateCubicBezier Vec4CubicBezier; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/EaseMotion b/libs/lib/mac32/include/osgAnimation/EaseMotion deleted file mode 100644 index 3c55851e6..000000000 --- a/libs/lib/mac32/include/osgAnimation/EaseMotion +++ /dev/null @@ -1,530 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_EASE_MOTION -#define OSGANIMATION_EASE_MOTION 1 - -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - struct OutBounceFunction - { - inline static void getValueAt(float t, float& result) - { - if ((t) < (1/2.75)) - { - result = 7.5625 * t * t; - } - else if (t < (2/2.75)) - { - t = t - (1.5/2.75); - result = 7.5625* t * t + .75; - } - else if (t < (2.5/2.75)) - { - t = t - (2.25/2.75); - result = 7.5625 * t * t + .9375; - } - else - { - t = t - (2.625/2.75); - result = 7.5625* t * t + .984375; - } - } - }; - - struct InBounceFunction - { - inline static void getValueAt(float t, float& result) - { - OutBounceFunction::getValueAt(1-t, result); - result = 1 - result; - } - }; - - struct InOutBounceFunction - { - inline static void getValueAt(float t, float& result) - { - if (t < 0.5) - { - InBounceFunction::getValueAt(t * 2, result); - result *= 0.5; - } - else - { - OutBounceFunction::getValueAt(t * 2 - 1 , result); - result = result * 0.5 + 0.5; - } - } - }; - - /// Linear function - struct LinearFunction - { - inline static void getValueAt(float t, float& result) { result = t;} - }; - - /// Quad function - struct OutQuadFunction - { - inline static void getValueAt(float t, float& result) { result = - (t * (t -2.0));} - }; - - struct InQuadFunction - { - inline static void getValueAt(float t, float& result) { result = t*t;} - }; - - struct InOutQuadFunction - { - inline static void getValueAt(float t, float& result) - { - t *= 2.0; - if (t < 1.0) - result = 0.5 * t * t; - else - { - t -= 1.0; - result = - 0.5 * (t * ( t - 2) - 1); - } - } - }; - - /// Cubic function - struct OutCubicFunction - { - inline static void getValueAt(float t, float& result) { t = t-1.0; result = t*t*t + 1;} - }; - - struct InCubicFunction - { - inline static void getValueAt(float t, float& result) { result = t*t*t;} - }; - - struct InOutCubicFunction - { - inline static void getValueAt(float t, float& result) - { - t *= 2.0f; - if (t < 1.0f) - result = 0.5f * t * t * t; - else { - t -= 2.0f; - result = 0.5 * (t * t * t + 2.0f); - } - } - }; - - /// Quart function - struct InQuartFunction - { - inline static void getValueAt(float t, float& result) { result = t*t*t*t*t;} - }; - - struct OutQuartFunction - { - inline static void getValueAt(float t, float& result) { t = t - 1; result = - (t*t*t*t -1); } - }; - - struct InOutQuartFunction - { - inline static void getValueAt(float t, float& result) - { - t = t * 2.0; - if ( t < 1) - result = 0.5*t*t*t*t; - else - { - t -= 2.0; - result = -0.5 * (t*t*t*t -2); - } - } - }; - - /// Elastic function - struct OutElasticFunction - { - inline static void getValueAt(float t, float& result) - { - result = pow(2.0f, -10.0f * t) * sinf((t - 0.3f / 4.0f) * (2.0f * osg::PI) / 0.3f) + 1.0f; - } - }; - - struct InElasticFunction - { - inline static void getValueAt(float t, float& result) - { - OutElasticFunction::getValueAt(1.0f - t, result); - result = 1.0f - result; - } - }; - - struct InOutElasticFunction - { - inline static void getValueAt(float t, float& result) - { - t *= 2.0f; - if (t < 1.0f) - { - t -= 1.0f; - result = -0.5 * (1.0f * pow(2.0f, 10.0f * t) * sinf((t - 0.45f / 4.0f) * (2.0f * osg::PI) / 0.45f)); - } - else - { - t -= 1.0f; - result = pow(2.0f, -10.0f * t) * sinf((t - 0.45f / 4.0f) * (2.0f * osg::PI) / 0.45f) * 0.5f + 1.0f; - } - } - }; - - // Sine function - struct OutSineFunction - { - inline static void getValueAt(float t, float& result) - { - result = sinf(t * (osg::PI / 2.0f)); - } - }; - - struct InSineFunction - { - inline static void getValueAt(float t, float& result) - { - result = -cosf(t * (osg::PI / 2.0f)) + 1.0f; - } - }; - - struct InOutSineFunction - { - inline static void getValueAt(float t, float& result) - { - result = -0.5f * (cosf((osg::PI * t)) - 1.0f); - } - }; - - // Back function - struct OutBackFunction - { - inline static void getValueAt(float t, float& result) - { - t -= 1.0f; - result = t * t * ((1.70158 + 1.0f) * t + 1.70158) + 1.0f; - } - }; - - struct InBackFunction - { - inline static void getValueAt(float t, float& result) - { - result = t * t * ((1.70158 + 1.0f) * t - 1.70158); - } - }; - - struct InOutBackFunction - { - inline static void getValueAt(float t, float& result) - { - float s = 1.70158 * 1.525f; - t *= 2.0f; - if (t < 1.0f) - { - result = 0.5f * (t * t * ((s + 1.0f) * t - s)); - } - else - { - float p = t -= 2.0f; - result = 0.5f * ((p) * t * ((s + 1.0f) * t + s) + 2.0f); - } - } - }; - - // Circ function - struct OutCircFunction - { - inline static void getValueAt(float t, float& result) - { - t -= 1.0f; - result = sqrt(1.0f - t * t); - } - }; - - struct InCircFunction - { - inline static void getValueAt(float t, float& result) - { - result = -(sqrt(1.0f - (t * t)) - 1.0f); - } - }; - - struct InOutCircFunction - { - inline static void getValueAt(float t, float& result) - { - t *= 2.0f; - if (t < 1.0f) - { - result = -0.5f * (sqrt(1.0f - t * t) - 1.0f); - } - else - { - t -= 2.0f; - result = 0.5f * (sqrt(1 - t * t) + 1.0f); - } - } - }; - - // Expo function - struct OutExpoFunction - { - inline static void getValueAt(float t, float& result) - { - if(t == 1.0f) - { - result = 0.0f; - } - else - { - result = -powf(2.0f, -10.0f * t) + 1.0f; - } - } - }; - - struct InExpoFunction - { - inline static void getValueAt(float t, float& result) - { - if(t == 0.0f) - { - result = 0.0f; - } - else - { - result = powf(2.0f, 10.0f * (t - 1.0f)); - } - } - }; - - struct InOutExpoFunction - { - inline static void getValueAt(float t, float& result) - { - if(t == 0.0f || t == 1.0f) - { - result = 0.0f; - } - else - { - t *= 2.0f; - if(t < 1.0f) - { - result = 0.5f * powf(2.0f, 10.0f * (t - 1.0f)); - } - else - { - result = 0.5f * (-powf(2.0f, -10.0f * (t - 1.0f)) + 2.0f); - } - } - } - }; - - class Motion : public osg::Referenced - { - public: - typedef float value_type; - enum TimeBehaviour - { - CLAMP, - LOOP - }; - Motion(float startValue = 0, float duration = 1, float changeValue = 1, TimeBehaviour tb = CLAMP) : _time(0), _startValue(startValue), _changeValue(changeValue), _duration(duration), _behaviour(tb) {} - virtual ~Motion() {} - void reset() { setTime(0);} - float getTime() const { return _time; } - float evaluateTime(float time) const - { - switch (_behaviour) - { - case CLAMP: - if (time > _duration) - time = _duration; - else if (time < 0.0) - time = 0.0; - break; - case LOOP: - if (time <= 0) - time = 0; - else - time = fmodf(time, _duration); - break; - } - return time; - } - - void update(float dt) - { - _time = evaluateTime(_time + dt); - } - - void setTime(float time) { _time = evaluateTime(time);} - void getValue(value_type& result) const { getValueAt(_time, result); } - value_type getValue() const - { - value_type result; - getValueAt(_time, result); - return result; - } - - void getValueAt(float time, value_type& result) const - { - getValueInNormalizedRange(evaluateTime(time)/_duration, result); - result = result * _changeValue + _startValue; - } - value_type getValueAt(float time) const - { - value_type result; - getValueAt(evaluateTime(time), result); - return result; - } - - virtual void getValueInNormalizedRange(float t, value_type& result) const = 0; - - float getDuration() const { return _duration;} - protected: - float _time; - float _startValue; - float _changeValue; - float _duration; - TimeBehaviour _behaviour; - }; - - - - template - struct MathMotionTemplate : public Motion - { - MathMotionTemplate(float startValue = 0, float duration = 1, float changeValue = 1, TimeBehaviour tb = CLAMP) : Motion(startValue, duration, changeValue, tb) {} - virtual void getValueInNormalizedRange(float t, value_type& result) const { T::getValueAt(t, result); } - }; - - template - struct SamplerMotionTemplate : public Motion - { - T _sampler; - SamplerMotionTemplate(float startValue = 0, float duration = 1, float changeValue = 1, TimeBehaviour tb = CLAMP) : Motion(startValue, duration, changeValue, tb) {} - T& getSampler() { return _sampler;} - const T& getSampler() const { return _sampler;} - virtual void getValueInNormalizedRange(float t, value_type& result) const - { - if (!_sampler.getKeyframeContainer()) - { - result = 0; - return; - } - float size = _sampler.getEndTime() - _sampler.getStartTime(); - t = t * size + _sampler.getStartTime(); - _sampler.getValueAt(t, result); - } - }; - - struct CompositeMotion : public Motion - { - typedef std::vector > MotionList; - MotionList _motions; - - MotionList& getMotionList() { return _motions; } - const MotionList& getMotionList() const { return _motions; } - CompositeMotion(float startValue = 0, float duration = 1, float changeValue = 1, TimeBehaviour tb = CLAMP) : Motion(startValue, duration, changeValue, tb) {} - - virtual void getValueInNormalizedRange(float t, value_type& result) const - { - if (_motions.empty()) - { - result = 0; - osg::notify(osg::WARN) << "CompositeMotion::getValueInNormalizedRange no Motion in the CompositeMotion, add motion to have result" << std::endl; - return; - } - for (MotionList::const_iterator it = _motions.begin(); it != _motions.end(); ++it) - { - const Motion* motion = static_cast(it->get()); - float durationInRange = motion->getDuration() / getDuration(); - if (t < durationInRange) - { - float tInRange = t/durationInRange * motion->getDuration(); - motion->getValueAt( tInRange, result); - return; - } else - t = t - durationInRange; - } - osg::notify(osg::WARN) << "CompositeMotion::getValueInNormalizedRange did find the value in range, something wrong" << std::endl; - result = 0; - } - }; - - - // linear - typedef MathMotionTemplate LinearMotion; - - // quad - typedef MathMotionTemplate OutQuadMotion; - typedef MathMotionTemplate InQuadMotion; - typedef MathMotionTemplate InOutQuadMotion; - - // cubic - typedef MathMotionTemplate OutCubicMotion; - typedef MathMotionTemplate InCubicMotion; - typedef MathMotionTemplate InOutCubicMotion; - - // quart - typedef MathMotionTemplate OutQuartMotion; - typedef MathMotionTemplate InQuartMotion; - typedef MathMotionTemplate InOutQuartMotion; - - // bounce - typedef MathMotionTemplate OutBounceMotion; - typedef MathMotionTemplate InBounceMotion; - typedef MathMotionTemplate InOutBounceMotion; - - // elastic - typedef MathMotionTemplate OutElasticMotion; - typedef MathMotionTemplate InElasticMotion; - typedef MathMotionTemplate InOutElasticMotion; - - // sine - typedef MathMotionTemplate OutSineMotion; - typedef MathMotionTemplate InSineMotion; - typedef MathMotionTemplate InOutSineMotion; - - // back - typedef MathMotionTemplate OutBackMotion; - typedef MathMotionTemplate InBackMotion; - typedef MathMotionTemplate InOutBackMotion; - - // circ - typedef MathMotionTemplate OutCircMotion; - typedef MathMotionTemplate InCircMotion; - typedef MathMotionTemplate InOutCircMotion; - - // expo - typedef MathMotionTemplate OutExpoMotion; - typedef MathMotionTemplate InExpoMotion; - typedef MathMotionTemplate InOutExpoMotion; -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Export b/libs/lib/mac32/include/osgAnimation/Export deleted file mode 100644 index 2fe9620b0..000000000 --- a/libs/lib/mac32/include/osgAnimation/Export +++ /dev/null @@ -1,67 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -// The following symbol has a underscore suffix for compatibility. -#ifndef OSGANIMATION_EXPORT_ -#define OSGANIMATION_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4267 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGANIMATION_EXPORT - # elif defined( OSGANIMATION_LIBRARY ) - # define OSGANIMATION_EXPORT __declspec(dllexport) - # else - # define OSGANIMATION_EXPORT __declspec(dllimport) - #endif -#else - #define OSGANIMATION_EXPORT -#endif - -// set up define for whether member templates are supported by VisualStudio compilers. -#ifdef _MSC_VER -# if (_MSC_VER >= 1300) -# define __STL_MEMBER_TEMPLATES -# endif -#endif -/* Define NULL pointer value */ - -#ifndef NULL - #ifdef __cplusplus - #define NULL 0 - #else - #define NULL ((void *)0) - #endif -#endif - -/** - -\namespace osgAnimation - -The osgAnimation library provides general purpose utility classes for animation. - -*/ - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/FrameAction b/libs/lib/mac32/include/osgAnimation/FrameAction deleted file mode 100644 index ae3595354..000000000 --- a/libs/lib/mac32/include/osgAnimation/FrameAction +++ /dev/null @@ -1,26 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_FRAMEACTION_H -#define OSGANIMATION_FRAMEACTION_H - -#include -#include - -namespace osgAnimation -{ - class Action; - typedef std::pair > FrameAction; -} -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Interpolator b/libs/lib/mac32/include/osgAnimation/Interpolator deleted file mode 100644 index b06575a50..000000000 --- a/libs/lib/mac32/include/osgAnimation/Interpolator +++ /dev/null @@ -1,240 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * Authors: - * Cedric Pinson - * Michael Platings - */ - -#ifndef OSGANIMATION_INTERPOLATOR -#define OSGANIMATION_INTERPOLATOR 1 - -#include -#include - -namespace osgAnimation -{ - - template - class TemplateInterpolatorBase - { - public: - typedef KEY KeyframeType; - typedef TYPE UsingType; - - public: - mutable int _lastKeyAccess; - - TemplateInterpolatorBase() : _lastKeyAccess(-1) {} - - void reset() { _lastKeyAccess = -1; } - int getKeyIndexFromTime(const TemplateKeyframeContainer& keys, double time) const - { - // todo use a cache - int key_size = keys.size(); - if (!key_size) { - osg::notify(osg::WARN) << "TemplateInterpolatorBase::getKeyIndexFromTime the container is empty, impossible to get key index from time" << std::endl;; - return -1; - } - const TemplateKeyframe* keysVector = &keys.front(); - for (int i = 0; i < key_size-1; i++) - { - double time0 = keysVector[i].getTime(); - double time1 = keysVector[i+1].getTime(); - - if ( time >= time0 && time < time1 ) - { - _lastKeyAccess = i; - return i; - } - } - osg::notify(osg::WARN) << time << " first key " << keysVector[0].getTime() << " last key " << keysVector[key_size-1].getTime() << std::endl; - return -1; - } - }; - - - template - class TemplateStepInterpolator : public TemplateInterpolatorBase - { - public: - - TemplateStepInterpolator() {} - void getValue(const TemplateKeyframeContainer& keyframes, double time, TYPE& result) const - { - - if (time >= keyframes.back().getTime()) - { - result = keyframes.back().getValue(); - return; - } - else if (time <= keyframes.front().getTime()) - { - result = keyframes.front().getValue(); - return; - } - - int i = this->getKeyIndexFromTime(keyframes,time); - result = keyframes[i].getValue(); - } - }; - - - template - class TemplateLinearInterpolator : public TemplateInterpolatorBase - { - public: - - TemplateLinearInterpolator() {} - void getValue(const TemplateKeyframeContainer& keyframes, double time, TYPE& result) const - { - - if (time >= keyframes.back().getTime()) - { - result = keyframes.back().getValue(); - return; - } - else if (time <= keyframes.front().getTime()) - { - result = keyframes.front().getValue(); - return; - } - - int i = this->getKeyIndexFromTime(keyframes,time); - float blend = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime()); - const TYPE& v1 = keyframes[i].getValue(); - const TYPE& v2 = keyframes[i+1].getValue(); - result = v1*(1-blend) + v2*blend; - } - }; - - - template - class TemplateSphericalLinearInterpolator : public TemplateInterpolatorBase - { - public: - TemplateSphericalLinearInterpolator() {} - void getValue(const TemplateKeyframeContainer& keyframes, double time, TYPE& result) const - { - if (time >= keyframes.back().getTime()) - { - result = keyframes.back().getValue(); - return; - } - else if (time <= keyframes.front().getTime()) - { - result = keyframes.front().getValue(); - return; - } - - int i = this->getKeyIndexFromTime(keyframes,time); - float blend = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime()); - const TYPE& q1 = keyframes[i].getValue(); - const TYPE& q2 = keyframes[i+1].getValue(); - result.slerp(blend,q1,q2); - } - }; - - - template - class TemplateLinearPackedInterpolator : public TemplateInterpolatorBase - { - public: - - TemplateLinearPackedInterpolator() {} - void getValue(const TemplateKeyframeContainer& keyframes, double time, TYPE& result) const - { - if (time >= keyframes.back().getTime()) - { - keyframes.back().getValue().uncompress(keyframes.mScale, keyframes.mMin, result); - return; - } - else if (time <= keyframes.front().getTime()) - { - keyframes.front().getValue().uncompress(keyframes.mScale, keyframes.mMin, result); - return; - } - - int i = this->getKeyIndexFromTime(keyframes,time); - float blend = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime()); - TYPE v1,v2; - keyframes[i].getValue().uncompress(keyframes.mScale, keyframes.mMin, v1); - keyframes[i+1].getValue().uncompress(keyframes.mScale, keyframes.mMin, v2); - result = v1*(1-blend) + v2*blend; - } - }; - - - // http://en.wikipedia.org/wiki/B%C3%A9zier_curve - template - class TemplateCubicBezierInterpolator : public TemplateInterpolatorBase - { - public: - - TemplateCubicBezierInterpolator() {} - void getValue(const TemplateKeyframeContainer& keyframes, double time, TYPE& result) const - { - - if (time >= keyframes.back().getTime()) - { - result = keyframes.back().getValue().getPosition(); - return; - } - else if (time <= keyframes.front().getTime()) - { - result = keyframes.front().getValue().getPosition(); - return; - } - - int i = this->getKeyIndexFromTime(keyframes,time); - - float t = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime()); - float one_minus_t = 1.0-t; - float one_minus_t2 = one_minus_t * one_minus_t; - float one_minus_t3 = one_minus_t2 * one_minus_t; - float t2 = t * t; - - TYPE v0 = keyframes[i].getValue().getPosition() * one_minus_t3; - TYPE v1 = keyframes[i].getValue().getControlPointIn() * (3.0 * t * one_minus_t2); - TYPE v2 = keyframes[i].getValue().getControlPointOut() * (3.0 * t2 * one_minus_t); - TYPE v3 = keyframes[i+1].getValue().getPosition() * (t2 * t); - - result = v0 + v1 + v2 + v3; - } - }; - - typedef TemplateStepInterpolator DoubleStepInterpolator; - typedef TemplateStepInterpolator FloatStepInterpolator; - typedef TemplateStepInterpolator Vec2StepInterpolator; - typedef TemplateStepInterpolator Vec3StepInterpolator; - typedef TemplateStepInterpolator Vec3PackedStepInterpolator; - typedef TemplateStepInterpolator Vec4StepInterpolator; - typedef TemplateStepInterpolator QuatStepInterpolator; - - typedef TemplateLinearInterpolator DoubleLinearInterpolator; - typedef TemplateLinearInterpolator FloatLinearInterpolator; - typedef TemplateLinearInterpolator Vec2LinearInterpolator; - typedef TemplateLinearInterpolator Vec3LinearInterpolator; - typedef TemplateLinearInterpolator Vec3PackedLinearInterpolator; - typedef TemplateLinearInterpolator Vec4LinearInterpolator; - typedef TemplateSphericalLinearInterpolator QuatSphericalLinearInterpolator; - typedef TemplateLinearInterpolator MatrixLinearInterpolator; - - typedef TemplateCubicBezierInterpolator FloatCubicBezierInterpolator; - typedef TemplateCubicBezierInterpolator DoubleCubicBezierInterpolator; - typedef TemplateCubicBezierInterpolator Vec2CubicBezierInterpolator; - typedef TemplateCubicBezierInterpolator Vec3CubicBezierInterpolator; - typedef TemplateCubicBezierInterpolator Vec4CubicBezierInterpolator; - -} -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Keyframe b/libs/lib/mac32/include/osgAnimation/Keyframe deleted file mode 100644 index 7c10640cb..000000000 --- a/libs/lib/mac32/include/osgAnimation/Keyframe +++ /dev/null @@ -1,141 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_KEYFRAME_H -#define OSGANIMATION_KEYFRAME_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - class Keyframe - { - public: - double getTime() const { return _time; } - void setTime(double time) { _time = time; } - - protected: - double _time; - - }; - - template - class TemplateKeyframe : public Keyframe - { - protected: - T _value; - public: - TemplateKeyframe () {} - ~TemplateKeyframe () {} - - TemplateKeyframe (double time, const T& value) - { - _time = time; - _value = value; - } - - void setValue(const T& value) { _value = value;} - const T& getValue() const { return _value;} - }; - - - class KeyframeContainer : public osg::Referenced - { - public: - KeyframeContainer() {} - virtual unsigned int size() const = 0; - protected: - ~KeyframeContainer() {} - std::string _name; - }; - - - template - class TemplateKeyframeContainer : public std::vector >, public KeyframeContainer - { - public: - // const char* getKeyframeType() { return #T ;} - TemplateKeyframeContainer() {} - typedef TemplateKeyframe KeyType; - - virtual unsigned int size() const { return (unsigned int)std::vector >::size(); } - - }; - - template <> - class TemplateKeyframeContainer : public std::vector >, public KeyframeContainer - { - public: - typedef TemplateKeyframe KeyType; - - TemplateKeyframeContainer() {} - const char* getKeyframeType() { return "Vec3Packed" ;} - void init(const osg::Vec3f& min, const osg::Vec3f& scale) { _min = min; _scale = scale; } - - osg::Vec3f _min; - osg::Vec3f _scale; - }; - - - typedef TemplateKeyframe FloatKeyframe; - typedef TemplateKeyframeContainer FloatKeyframeContainer; - - typedef TemplateKeyframe DoubleKeyframe; - typedef TemplateKeyframeContainer DoubleKeyframeContainer; - - typedef TemplateKeyframe Vec2Keyframe; - typedef TemplateKeyframeContainer Vec2KeyframeContainer; - - typedef TemplateKeyframe Vec3Keyframe; - typedef TemplateKeyframeContainer Vec3KeyframeContainer; - - typedef TemplateKeyframe Vec4Keyframe; - typedef TemplateKeyframeContainer Vec4KeyframeContainer; - - typedef TemplateKeyframe QuatKeyframe; - typedef TemplateKeyframeContainer QuatKeyframeContainer; - - typedef TemplateKeyframe MatrixKeyframe; - typedef TemplateKeyframeContainer MatrixKeyframeContainer; - - typedef TemplateKeyframe Vec3PackedKeyframe; - typedef TemplateKeyframeContainer Vec3PackedKeyframeContainer; - - typedef TemplateKeyframe FloatCubicBezierKeyframe; - typedef TemplateKeyframeContainer FloatCubicBezierKeyframeContainer; - - typedef TemplateKeyframe DoubleCubicBezierKeyframe; - typedef TemplateKeyframeContainer DoubleCubicBezierKeyframeContainer; - - typedef TemplateKeyframe Vec2CubicBezierKeyframe; - typedef TemplateKeyframeContainer Vec2CubicBezierKeyframeContainer; - - typedef TemplateKeyframe Vec3CubicBezierKeyframe; - typedef TemplateKeyframeContainer Vec3CubicBezierKeyframeContainer; - - typedef TemplateKeyframe Vec4CubicBezierKeyframe; - typedef TemplateKeyframeContainer Vec4CubicBezierKeyframeContainer; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/LinkVisitor b/libs/lib/mac32/include/osgAnimation/LinkVisitor deleted file mode 100644 index de61a229f..000000000 --- a/libs/lib/mac32/include/osgAnimation/LinkVisitor +++ /dev/null @@ -1,56 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_NODE_VISITOR_H -#define OSGANIMATION_NODE_VISITOR_H - -#include -#include -#include - -namespace osgAnimation -{ - class AnimationUpdateCallbackBase; - - /** This class is instancied by the AnimationManagerBase, it will link animation target to updatecallback that have the same name - */ - class OSGANIMATION_EXPORT LinkVisitor : public osg::NodeVisitor - { - public: - LinkVisitor(); - - META_NodeVisitor("osgAnimation","LinkVisitor"); - - void apply(osg::Node& node); - void apply(osg::Geode& node); - - AnimationList& getAnimationList(); - void reset(); - unsigned int getNbLinkedTarget() const { return _nbLinkedTarget; } - - protected: - - void handle_stateset(osg::StateSet* stateset); - void link(osgAnimation::AnimationUpdateCallbackBase* cb); - - // animation list to link - AnimationList _animations; - - // number of success link done - unsigned int _nbLinkedTarget; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/MorphGeometry b/libs/lib/mac32/include/osgAnimation/MorphGeometry deleted file mode 100644 index 2e350abca..000000000 --- a/libs/lib/mac32/include/osgAnimation/MorphGeometry +++ /dev/null @@ -1,154 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_MORPHGEOMETRY_H -#define OSGANIMATION_MORPHGEOMETRY_H - -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT MorphGeometry : public osg::Geometry - { - - public: - - enum Method { - NORMALIZED, - RELATIVE - }; - - class MorphTarget - { - protected: - osg::ref_ptr _geom; - float _weight; - public: - MorphTarget(osg::Geometry* geom, float w = 1.0) : _geom(geom), _weight(w) {} - void setWeight(float weight) { _weight = weight; } - const float getWeight() const { return _weight; } - osg::Geometry* getGeometry() { return _geom.get(); } - const osg::Geometry* getGeometry() const { return _geom.get(); } - void setGeometry(osg::Geometry* geom) { _geom = geom; } - }; - - typedef std::vector MorphTargetList; - - struct UpdateVertex : public osg::Drawable::UpdateCallback - { - virtual void update(osg::NodeVisitor*, osg::Drawable* drw) - { - MorphGeometry* geom = dynamic_cast(drw); - if (!geom) - return; - - geom->transformSoftwareMethod(); - } - }; - - MorphGeometry(); - MorphGeometry(const osg::Geometry& b); - MorphGeometry(const MorphGeometry& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual osg::Object* cloneType() const { return new MorphGeometry(); } - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new MorphGeometry(*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osgAnimation"; } - virtual const char* className() const { return "MorphGeometry"; } - - virtual void transformSoftwareMethod(); - - /** Set the morphing method. */ - void setMethod(Method method) { _method = method; } - /** Get the morphing method. */ - inline Method getMethod() const { return _method; } - - /** Set flag for morphing normals. */ - void setMorphNormals(bool morphNormals) { _morphNormals = morphNormals; } - /** Get the flag for morphing normals. */ - inline bool getMorphNormals() const { return _morphNormals; } - - /** Add a \c MorphTarget to the \c MorphGeometry. - * If \c MorphTarget is not \c NULL and is not contained in the \c MorphGeometry - * then increment its reference count, add it to the MorphTargets list and - * dirty the bounding sphere to force it to be recomputed on the next - * call to \c getBound(). - * @param morphTarget The \c MorphTarget to be added to the \c MorphGeometry. - * @param weight The weight to be added to the \c MorphGeometry. - * @return \c true for success; \c false otherwise. - */ - virtual void addMorphTarget( osg::Geometry *morphTarget, float weight = 1.0 ) { _morphTargets.push_back(MorphTarget(morphTarget, weight)); _dirty = true; } - - void setWeight(unsigned int index, float morphWeight) - { - if (index < _morphTargets.size()) - { - _morphTargets[index].setWeight(morphWeight); - dirty(); - } - } - - /** Set the MorphGeometry dirty.*/ - void dirty() { _dirty = true; } - - /** Get the list of MorphTargets.*/ - const MorphTargetList& getMorphTargetList() const { return _morphTargets; } - - /** Get the list of MorphTargets. Warning if you modify this array you will have to call dirty() */ - MorphTargetList& getMorphTargetList() { return _morphTargets; } - - /** Return the \c MorphTarget at position \c i.*/ - inline const MorphTarget& getMorphTarget( unsigned int i ) const { return _morphTargets[i]; } - - /** Return the \c MorphTarget at position \c i.*/ - inline MorphTarget& getMorphTarget( unsigned int i ) { return _morphTargets[i]; } - - protected: - /// Do we need to recalculate the morphed geometry? - bool _dirty; - - Method _method; - MorphTargetList _morphTargets; - - std::vector _positionSource; - std::vector _normalSource; - - /// Do we also morph between normals? - bool _morphNormals; - }; - - class OSGANIMATION_EXPORT UpdateMorph : public AnimationUpdateCallback - { - protected: - std::map > _weightTargets; - - public: - - META_Object(osgAnimation, UpdateMorph); - - UpdateMorph(const std::string& name = ""); - UpdateMorph(const UpdateMorph& apc,const osg::CopyOp& copyop); - - /** Callback method called by the NodeVisitor when visiting a node.*/ - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); - bool needLink() const; - bool link(osgAnimation::Channel* channel); - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/RigGeometry b/libs/lib/mac32/include/osgAnimation/RigGeometry deleted file mode 100644 index ac0deea8a..000000000 --- a/libs/lib/mac32/include/osgAnimation/RigGeometry +++ /dev/null @@ -1,136 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_RIGGEOMETRY_H -#define OSGANIMATION_RIGGEOMETRY_H - -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT RigGeometry : public osg::Geometry - { - public: - - RigGeometry(); -// RigGeometry(const osg::Geometry& b); - RigGeometry(const RigGeometry& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgAnimation, RigGeometry); - - void setInfluenceMap(VertexInfluenceMap* vertexInfluenceMap) { _vertexInfluenceMap = vertexInfluenceMap; } - const VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get();} - VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get();} - - const Skeleton* getSkeleton() const; - Skeleton* getSkeleton(); - // will be used by the update callback to init correctly the rig mesh - void setSkeleton(Skeleton*); - - void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state;} - bool getNeedToComputeMatrix() const { return _needToComputeMatrix;} - - - // this build the internal database about vertex influence and bones - void buildVertexInfluenceSet(); - const VertexInfluenceSet& getVertexInfluenceSet() const; - - void computeMatrixFromRootSkeleton(); - - - // set implementation of rig method - void setRigTransformImplementation(RigTransform*); - RigTransform* getRigTransformImplementation(); - - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; - void update(); - - const osg::Matrix& getMatrixFromSkeletonToGeometry() const; - const osg::Matrix& getInvMatrixFromSkeletonToGeometry() const; - - osg::Geometry* getSourceGeometry(); - const osg::Geometry* getSourceGeometry() const; - void setSourceGeometry(osg::Geometry* geometry); - - void copyFrom(osg::Geometry& from); - - protected: - - osg::ref_ptr _geometry; - osg::ref_ptr _rigTransformImplementation; - - VertexInfluenceSet _vertexInfluenceSet; - osg::ref_ptr _vertexInfluenceMap; - - osg::Matrix _matrixFromSkeletonToGeometry; - osg::Matrix _invMatrixFromSkeletonToGeometry; - osg::observer_ptr _root; - bool _needToComputeMatrix; - - struct FindNearestParentSkeleton : public osg::NodeVisitor - { - osg::ref_ptr _root; - FindNearestParentSkeleton() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_PARENTS) {} - void apply(osg::Transform& node) - { - if (_root.valid()) - return; - _root = dynamic_cast(&node); - traverse(node); - } - }; - - - struct UpdateVertex : public osg::Drawable::UpdateCallback - { - virtual void update(osg::NodeVisitor*, osg::Drawable* drw) - { - RigGeometry* geom = dynamic_cast(drw); - if (!geom) - return; - if (!geom->getSkeleton() && !geom->getParents().empty()) - { - FindNearestParentSkeleton finder; - if (geom->getParents().size() > 1) - osg::notify(osg::WARN) << "A RigGeometry should not have multi parent ( " << geom->getName() << " )" << std::endl; - geom->getParents()[0]->accept(finder); - - if (!finder._root.valid()) - { - osg::notify(osg::WARN) << "A RigGeometry did not find a parent skeleton for RigGeomtry ( " << geom->getName() << " )" << std::endl; - return; - } - geom->buildVertexInfluenceSet(); - geom->setSkeleton(finder._root.get()); - } - - if (!geom->getSkeleton()) - return; - - if (geom->getNeedToComputeMatrix()) - geom->computeMatrixFromRootSkeleton(); - - geom->update(); - } - }; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/RigTransform b/libs/lib/mac32/include/osgAnimation/RigTransform deleted file mode 100644 index 25edc1da6..000000000 --- a/libs/lib/mac32/include/osgAnimation/RigTransform +++ /dev/null @@ -1,36 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_RIGTRANSFORM -#define OSGANIMATION_RIGTRANSFORM 1 - -#include - -namespace osgAnimation -{ - - class RigGeometry; - - class RigTransform : public osg::Referenced - { - public: - RigTransform() {} - virtual ~RigTransform() {} - virtual void operator()(RigGeometry&) {} - - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/RigTransformHardware b/libs/lib/mac32/include/osgAnimation/RigTransformHardware deleted file mode 100644 index 53a0c8c92..000000000 --- a/libs/lib/mac32/include/osgAnimation/RigTransformHardware +++ /dev/null @@ -1,85 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_RIG_TRANSFORM_HARDWARE -#define OSGANIMATION_RIG_TRANSFORM_HARDWARE 1 - -#include -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - class RigGeometry; - - /// This class manage format for hardware skinning - class OSGANIMATION_EXPORT RigTransformHardware : public RigTransform - { - public: - typedef osg::Matrix MatrixType; - typedef osgAnimation::Bone BoneType; - typedef std::vector > BoneWeightAttribList; - typedef std::vector > BonePalette; - - typedef std::vector MatrixPalette; - struct IndexWeightEntry - { - int _boneIndex; - float _boneWeight; - IndexWeightEntry() { _boneIndex = 0; _boneWeight = 0;} - IndexWeightEntry(int index, float weight) { _boneIndex = index; _boneWeight = weight;} - int getIndex() const { return _boneIndex; } - float getWeight() const { return _boneWeight; } - }; - typedef std::vector > VertexIndexWeightList; - - RigTransformHardware(); - - osg::Vec4Array* getVertexAttrib(int index); - int getNumVertexAttrib(); - - osg::Uniform* getMatrixPaletteUniform(); - void computeMatrixPaletteUniform(const osg::Matrix& transformFromSkeletonToGeometry, const osg::Matrix& invTransformFromSkeletonToGeometry); - - int getNumBonesPerVertex() const; - int getNumVertexes() const; - - bool createPalette(int nbVertexes, BoneMap boneMap, const VertexInfluenceSet::VertexIndexToBoneWeightMap& vertexIndexToBoneWeightMap); - - virtual void operator()(RigGeometry&); - void setShader(osg::Shader*); - - protected: - - bool init(RigGeometry&); - - BoneWeightAttribList createVertexAttribList(); - osg::Uniform* createVertexUniform(); - - int _bonesPerVertex; - int _nbVertexes; - VertexIndexWeightList _vertexIndexMatrixWeightList; - BonePalette _bonePalette; - BoneWeightAttribList _boneWeightAttribArrays; - osg::ref_ptr _uniformMatrixPalette; - osg::ref_ptr _shader; - - bool _needInit; - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/RigTransformSoftware b/libs/lib/mac32/include/osgAnimation/RigTransformSoftware deleted file mode 100644 index 16c06c619..000000000 --- a/libs/lib/mac32/include/osgAnimation/RigTransformSoftware +++ /dev/null @@ -1,172 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_RIGTRANSFORM_SOFTWARE -#define OSGANIMATION_RIGTRANSFORM_SOFTWARE 1 - -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - class RigGeometry; - - /// This class manage format for hardware skinning - class OSGANIMATION_EXPORT RigTransformSoftware : public RigTransform - { - public: - - RigTransformSoftware(); - virtual void operator()(RigGeometry&); - - - class BoneWeight - { - public: - BoneWeight(Bone* bone, float weight) : _bone(bone), _weight(weight) {} - const Bone* getBone() const { return _bone.get(); } - float getWeight() const { return _weight; } - void setWeight(float w) { _weight = w; } - protected: - osg::observer_ptr _bone; - float _weight; - }; - - typedef std::vector BoneWeightList; - typedef std::vector VertexList; - - class UniqBoneSetVertexSet - { - public: - BoneWeightList& getBones() { return _bones; } - VertexList& getVertexes() { return _vertexes; } - - void resetMatrix() - { - _result.set(0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 1); - } - void accummulateMatrix(const osg::Matrix& invBindMatrix, const osg::Matrix& matrix, osg::Matrix::value_type weight) - { - osg::Matrix m = invBindMatrix * matrix; - osg::Matrix::value_type* ptr = m.ptr(); - osg::Matrix::value_type* ptrresult = _result.ptr(); - ptrresult[0] += ptr[0] * weight; - ptrresult[1] += ptr[1] * weight; - ptrresult[2] += ptr[2] * weight; - - ptrresult[4] += ptr[4] * weight; - ptrresult[5] += ptr[5] * weight; - ptrresult[6] += ptr[6] * weight; - - ptrresult[8] += ptr[8] * weight; - ptrresult[9] += ptr[9] * weight; - ptrresult[10] += ptr[10] * weight; - - ptrresult[12] += ptr[12] * weight; - ptrresult[13] += ptr[13] * weight; - ptrresult[14] += ptr[14] * weight; - } - void computeMatrixForVertexSet() - { - if (_bones.empty()) - { - osg::notify(osg::WARN) << this << " RigTransformSoftware::UniqBoneSetVertexSet no bones found" << std::endl; - _result = osg::Matrix::identity(); - return; - } - resetMatrix(); - - int size = _bones.size(); - for (int i = 0; i < size; i++) - { - const Bone* bone = _bones[i].getBone(); - if (!bone) - { - osg::notify(osg::WARN) << this << " RigTransformSoftware::computeMatrixForVertexSet Warning a bone is null, skip it" << std::endl; - continue; - } - const osg::Matrix& invBindMatrix = bone->getInvBindMatrixInSkeletonSpace(); - const osg::Matrix& matrix = bone->getMatrixInSkeletonSpace(); - osg::Matrix::value_type w = _bones[i].getWeight(); - accummulateMatrix(invBindMatrix, matrix, w); - } - } - const osg::Matrix& getMatrix() const { return _result;} - protected: - BoneWeightList _bones; - VertexList _vertexes; - osg::Matrix _result; - }; - - - - template void compute(const osg::Matrix& transform, const osg::Matrix& invTransform, const V* src, V* dst) - { - // the result of matrix mult should be cached to be used for vertexes transform and normal transform and maybe other computation - int size = _boneSetVertexSet.size(); - for (int i = 0; i < size; i++) - { - UniqBoneSetVertexSet& uniq = _boneSetVertexSet[i]; - uniq.computeMatrixForVertexSet(); - osg::Matrix matrix = transform * uniq.getMatrix() * invTransform; - - const VertexList& vertexes = uniq.getVertexes(); - int vertexSize = vertexes.size(); - for (int j = 0; j < vertexSize; j++) - { - int idx = vertexes[j]; - dst[idx] = src[idx] * matrix; - } - } - } - - - template void computeNormal(const osg::Matrix& transform, const osg::Matrix& invTransform, const V* src, V* dst) - { - int size = _boneSetVertexSet.size(); - for (int i = 0; i < size; i++) - { - UniqBoneSetVertexSet& uniq = _boneSetVertexSet[i]; - uniq.computeMatrixForVertexSet(); - osg::Matrix matrix = transform * uniq.getMatrix() * invTransform; - - const VertexList& vertexes = uniq.getVertexes(); - int vertexSize = vertexes.size(); - for (int j = 0; j < vertexSize; j++) - { - int idx = vertexes[j]; - dst[idx] = osg::Matrix::transform3x3(src[idx],matrix); - } - } - } - - protected: - - bool init(RigGeometry&); - void initVertexSetFromBones(const BoneMap& map, const VertexInfluenceSet::UniqVertexSetToBoneSetList& influence); - std::vector _boneSetVertexSet; - - bool _needInit; - - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Sampler b/libs/lib/mac32/include/osgAnimation/Sampler deleted file mode 100644 index e1600f703..000000000 --- a/libs/lib/mac32/include/osgAnimation/Sampler +++ /dev/null @@ -1,138 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * Authors: - * Cedric Pinson - * Michael Platings - */ - -#ifndef OSGANIMATION_SAMPLER -#define OSGANIMATION_SAMPLER 1 - -#include -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - class Sampler : public osg::Referenced - { - public: - virtual KeyframeContainer* getKeyframeContainer() = 0; - virtual const KeyframeContainer* getKeyframeContainer() const = 0; - protected: - }; - - // Sampler generic - template - class TemplateSampler : public Sampler - { - public: - typedef typename F::KeyframeType KeyframeType; - typedef TemplateKeyframeContainer KeyframeContainerType; - typedef typename F::UsingType UsingType; - typedef F FunctorType; - - TemplateSampler() {} - ~TemplateSampler() {} - - void getValueAt(double time, UsingType& result) const { _functor.getValue(*_keyframes, time, result);} - void setKeyframeContainer(KeyframeContainerType* kf) { _keyframes = kf;} - - virtual KeyframeContainer* getKeyframeContainer() { return _keyframes.get(); } - virtual const KeyframeContainer* getKeyframeContainer() const { return _keyframes.get();} - - KeyframeContainerType* getKeyframeContainerTyped() { return _keyframes.get();} - const KeyframeContainerType* getKeyframeContainerTyped() const { return _keyframes.get();} - KeyframeContainerType* getOrCreateKeyframeContainer() - { - if (_keyframes != 0) - return _keyframes.get(); - _keyframes = new KeyframeContainerType; - return _keyframes.get(); - } - - double getStartTime() const - { - if (!_keyframes) - return 0.0; - return _keyframes->front().getTime(); - } - - double getEndTime() const - { - if (!_keyframes) - return 0.0; - return _keyframes->back().getTime(); - } - - protected: - - FunctorType _functor; - osg::ref_ptr _keyframes; - }; - - - template - class TemplateCompositeSampler : public osg::Referenced - { - VALUESAMPLERTYPE& _value; - TIMESAMPLERTYPE& _time; - - public: - typedef typename VALUESAMPLERTYPE::FunctorType::UsingType UsingType; - typedef typename VALUESAMPLERTYPE::FunctorType::KeyframeType KeyframeType; - - TemplateCompositeSampler(VALUESAMPLERTYPE& value, TIMESAMPLERTYPE& time) : _value(value), _time(time) - { - } - - void getValueAt(double time, typename VALUESAMPLERTYPE::FunctorType::UsingType& result) - { - double newtime; - _time.getValueAt(time, newtime); - _value.getValueAt(newtime, result); - } - float getStartTime() const {return _time.getStartTime(); } - float getEndTime() const {return _time.getEndTime();} - }; - - - typedef TemplateSampler DoubleStepSampler; - typedef TemplateSampler FloatStepSampler; - typedef TemplateSampler Vec2StepSampler; - typedef TemplateSampler Vec3StepSampler; - typedef TemplateSampler Vec4StepSampler; - typedef TemplateSampler QuatStepSampler; - - typedef TemplateSampler DoubleLinearSampler; - typedef TemplateSampler FloatLinearSampler; - typedef TemplateSampler Vec2LinearSampler; - typedef TemplateSampler Vec3LinearSampler; - typedef TemplateSampler Vec4LinearSampler; - typedef TemplateSampler QuatSphericalLinearSampler; - typedef TemplateSampler MatrixLinearSampler; - - typedef TemplateSampler FloatCubicBezierSampler; - typedef TemplateSampler DoubleCubicBezierSampler; - typedef TemplateSampler Vec2CubicBezierSampler; - typedef TemplateSampler Vec3CubicBezierSampler; - typedef TemplateSampler Vec4CubicBezierSampler; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Skeleton b/libs/lib/mac32/include/osgAnimation/Skeleton deleted file mode 100644 index cc1aa4af2..000000000 --- a/libs/lib/mac32/include/osgAnimation/Skeleton +++ /dev/null @@ -1,49 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_SKELETON -#define OSGANIMATION_SKELETON 1 - -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT Skeleton : public osg::MatrixTransform - { - public: - META_Node(osgAnimation, Skeleton); - - class OSGANIMATION_EXPORT UpdateSkeleton : public osg::NodeCallback - { - public: - META_Object(osgAnimation, UpdateSkeleton); - UpdateSkeleton(); - UpdateSkeleton(const UpdateSkeleton&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); - bool needToValidate() const; - protected: - bool _needValidate; - }; - - Skeleton(); - Skeleton(const Skeleton&, const osg::CopyOp&); - void setDefaultUpdateCallback(); - - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/StackedMatrixElement b/libs/lib/mac32/include/osgAnimation/StackedMatrixElement deleted file mode 100644 index 1a33c7ccb..000000000 --- a/libs/lib/mac32/include/osgAnimation/StackedMatrixElement +++ /dev/null @@ -1,54 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - - -#ifndef OSGANIMATION_STACKED_MATRIX_ELEMENT -#define OSGANIMATION_STACKED_MATRIX_ELEMENT 1 - -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT StackedMatrixElement : public StackedTransformElement - { - public: - META_Object(osgAnimation, StackedMatrixElement); - - StackedMatrixElement(); - StackedMatrixElement(const StackedMatrixElement&, const osg::CopyOp&); - StackedMatrixElement(const std::string& name, const osg::Matrix& matrix); - StackedMatrixElement(const osg::Matrix& matrix); - - void applyToMatrix(osg::Matrix& matrix) const { matrix = _matrix * matrix; } - osg::Matrix getAsMatrix() const { return _matrix; } - const osg::Matrix& getMatrix() const { return _matrix;} - void setMatrix(const osg::Matrix& matrix) { _matrix = matrix;} - bool isIdentity() const { return _matrix.isIdentity(); } - void update(); - virtual Target* getOrCreateTarget(); - virtual Target* getTarget() {return _target.get();} - virtual const Target* getTarget() const {return _target.get();} - - protected: - osg::Matrix _matrix; - osg::ref_ptr _target; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/StackedQuaternionElement b/libs/lib/mac32/include/osgAnimation/StackedQuaternionElement deleted file mode 100644 index 1384950c1..000000000 --- a/libs/lib/mac32/include/osgAnimation/StackedQuaternionElement +++ /dev/null @@ -1,54 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - - -#ifndef OSGANIMATION_STACKED_QUATERNION_ELEMENT -#define OSGANIMATION_STACKED_QUATERNION_ELEMENT 1 - -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT StackedQuaternionElement : public StackedTransformElement - { - public: - META_Object(osgAnimation, StackedQuaternionElement); - - StackedQuaternionElement(); - StackedQuaternionElement(const StackedQuaternionElement&, const osg::CopyOp&); - StackedQuaternionElement(const std::string&, const osg::Quat& q = osg::Quat(0,0,0,1)); - StackedQuaternionElement(const osg::Quat&); - - void applyToMatrix(osg::Matrix& matrix) const; - osg::Matrix getAsMatrix() const; - bool isIdentity() const; - void update(); - - const osg::Quat& getQuaternion() const; - void setQuaternion(const osg::Quat&); - virtual Target* getOrCreateTarget(); - virtual Target* getTarget(); - virtual const Target* getTarget() const; - - protected: - osg::Quat _quaternion; - osg::ref_ptr _target; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/StackedRotateAxisElement b/libs/lib/mac32/include/osgAnimation/StackedRotateAxisElement deleted file mode 100644 index 7b5d47912..000000000 --- a/libs/lib/mac32/include/osgAnimation/StackedRotateAxisElement +++ /dev/null @@ -1,59 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_STACKED_ROTATE_AXIS_ELEMENT -#define OSGANIMATION_STACKED_ROTATE_AXIS_ELEMENT 1 - -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT StackedRotateAxisElement : public StackedTransformElement - { - public: - META_Object(osgAnimation, StackedRotateAxisElement); - - StackedRotateAxisElement(); - StackedRotateAxisElement(const StackedRotateAxisElement&, const osg::CopyOp&); - StackedRotateAxisElement(const std::string& name, const osg::Vec3& axis, double angle); - StackedRotateAxisElement(const osg::Vec3& axis, double angle); - - void applyToMatrix(osg::Matrix& matrix) const; - osg::Matrix getAsMatrix() const; - bool isIdentity() const { return (_angle == 0); } - void update(); - - const osg::Vec3& getAxis() const; - double getAngle() const; - void setAxis(const osg::Vec3&); - void setAngle(double); - - virtual Target* getOrCreateTarget(); - virtual Target* getTarget() {return _target.get();} - virtual const Target* getTarget() const {return _target.get();} - - protected: - osg::Vec3 _axis; - double _angle; - osg::ref_ptr _target; - }; - -} - -#endif - diff --git a/libs/lib/mac32/include/osgAnimation/StackedScaleElement b/libs/lib/mac32/include/osgAnimation/StackedScaleElement deleted file mode 100644 index a36cc5be3..000000000 --- a/libs/lib/mac32/include/osgAnimation/StackedScaleElement +++ /dev/null @@ -1,56 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_STACKED_SCALE_ELEMENT -#define OSGANIMATION_STACKED_SCALE_ELEMENT 1 - -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT StackedScaleElement : public StackedTransformElement - { - public: - META_Object(osgAnimation, StackedScaleElement) - - StackedScaleElement(); - StackedScaleElement(const StackedScaleElement&, const osg::CopyOp&); - StackedScaleElement(const std::string& name, const osg::Vec3& scale = osg::Vec3(1,1,1)); - StackedScaleElement(const osg::Vec3& scale); - - void applyToMatrix(osg::Matrix& matrix) const; - osg::Matrix getAsMatrix() const; - bool isIdentity() const; - void update(); - const osg::Vec3& getScale() const; - void setScale(const osg::Vec3& scale); - - virtual Target* getOrCreateTarget(); - virtual Target* getTarget(); - virtual const Target* getTarget() const; - - protected: - osg::Vec3 _scale; - osg::ref_ptr _target; - }; - - -} - -#endif - diff --git a/libs/lib/mac32/include/osgAnimation/StackedTransform b/libs/lib/mac32/include/osgAnimation/StackedTransform deleted file mode 100644 index 59c1eed4f..000000000 --- a/libs/lib/mac32/include/osgAnimation/StackedTransform +++ /dev/null @@ -1,42 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_STACKED_TRANSFORM -#define OSGANIMATION_STACKED_TRANSFORM 1 - -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT StackedTransform : public osg::MixinVector > - { - public: - StackedTransform(); - StackedTransform(const StackedTransform&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - void update(); - const osg::Matrix& getMatrix() const; - - protected: - osg::Matrix _matrix; - }; - - - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/StackedTransformElement b/libs/lib/mac32/include/osgAnimation/StackedTransformElement deleted file mode 100644 index 3a6628ff1..000000000 --- a/libs/lib/mac32/include/osgAnimation/StackedTransformElement +++ /dev/null @@ -1,42 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - - -#ifndef OSGANIMATION_STACKED_TRANSFORM_ELEMENT -#define OSGANIMATION_STACKED_TRANSFORM_ELEMENT 1 - -#include -#include -#include - -namespace osgAnimation -{ - class Target; - class OSGANIMATION_EXPORT StackedTransformElement : public osg::Object - { - public: - StackedTransformElement() {} - StackedTransformElement(const StackedTransformElement& rhs, const osg::CopyOp& c) : osg::Object(rhs, c) {} - virtual void applyToMatrix(osg::Matrix& matrix) const = 0; - virtual osg::Matrix getAsMatrix() const = 0; - virtual bool isIdentity() const = 0; - virtual void update() = 0; - virtual Target* getOrCreateTarget() {return 0;} - virtual Target* getTarget() {return 0;} - virtual const Target* getTarget() const {return 0;} - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/StackedTranslateElement b/libs/lib/mac32/include/osgAnimation/StackedTranslateElement deleted file mode 100644 index 9728d0bee..000000000 --- a/libs/lib/mac32/include/osgAnimation/StackedTranslateElement +++ /dev/null @@ -1,54 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - - -#ifndef OSGANIMATION_STACKED_TRANSLATE_ELEMENT -#define OSGANIMATION_STACKED_TRANSLATE_ELEMENT 1 - -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT StackedTranslateElement : public StackedTransformElement - { - public: - META_Object(osgAnimation, StackedTranslateElement); - - StackedTranslateElement(); - StackedTranslateElement(const StackedTranslateElement&, const osg::CopyOp&); - StackedTranslateElement(const std::string&, const osg::Vec3& translate = osg::Vec3(0,0,0)); - StackedTranslateElement(const osg::Vec3& translate); - - void applyToMatrix(osg::Matrix& matrix) const; - osg::Matrix getAsMatrix() const; - bool isIdentity() const; - void update(); - - const osg::Vec3& getTranslate() const; - void setTranslate(const osg::Vec3& ); - virtual Target* getOrCreateTarget(); - virtual Target* getTarget(); - virtual const Target* getTarget() const; - - protected: - osg::Vec3 _translate; - osg::ref_ptr _target; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/StatsHandler b/libs/lib/mac32/include/osgAnimation/StatsHandler deleted file mode 100644 index 1fc26b03b..000000000 --- a/libs/lib/mac32/include/osgAnimation/StatsHandler +++ /dev/null @@ -1,113 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_STATSHANDLER_H -#define OSGANIMATION_STATSHANDLER_H - -#include -#include -#include -#include -#include - -namespace osgAnimation -{ -#if 0 - struct StatAction - { - - std::string _name; - osg::ref_ptr _group; - osg::ref_ptr _label; - osg::ref_ptr _graph; - osg::ref_ptr _textLabel; - - void init(osg::Stats* stats, const std::string& name, const osg::Vec3& pos, float width, float heigh, const osg::Vec4& color); - void setPosition(const osg::Vec3& pos); - void setAlpha(float v); - }; - -#endif - -/** Event handler for adding on screen stats reporting to Viewers.*/ - class OSGANIMATION_EXPORT StatsHandler : public osgGA::GUIEventHandler - { - public: - - StatsHandler(); - - enum StatsType - { - NO_STATS = 0, - FRAME_RATE = 1, - LAST = 2 - }; - - void setKeyEventTogglesOnScreenStats(int key) { _keyEventTogglesOnScreenStats = key; } - int getKeyEventTogglesOnScreenStats() const { return _keyEventTogglesOnScreenStats; } - - void setKeyEventPrintsOutStats(int key) { _keyEventPrintsOutStats = key; } - int getKeyEventPrintsOutStats() const { return _keyEventPrintsOutStats; } - - double getBlockMultiplier() const { return _blockMultiplier; } - - void reset(); - - osg::Camera* getCamera() { return _camera.get(); } - const osg::Camera* getCamera() const { return _camera.get(); } - - virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa); - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; - - protected: - - void setUpHUDCamera(osgViewer::ViewerBase* viewer); - - osg::Geometry* createBackgroundRectangle(const osg::Vec3& pos, const float width, const float height, osg::Vec4& color); - - osg::Geometry* createGeometry(const osg::Vec3& pos, float height, const osg::Vec4& colour, unsigned int numBlocks); - - osg::Geometry* createFrameMarkers(const osg::Vec3& pos, float height, const osg::Vec4& colour, unsigned int numBlocks); - - osg::Geometry* createTick(const osg::Vec3& pos, float height, const osg::Vec4& colour, unsigned int numTicks); - - osg::Node* createCameraTimeStats(const std::string& font, osg::Vec3& pos, float startBlocks, bool acquireGPUStats, float characterSize, osg::Stats* viewerStats, osg::Camera* camera); - - void setUpScene(osgViewer::Viewer* viewer); - - int _keyEventTogglesOnScreenStats; - int _keyEventPrintsOutStats; - - int _statsType; - - bool _initialized; - osg::ref_ptr _camera; - - osg::ref_ptr _switch; - osg::ref_ptr _group; - - unsigned int _frameRateChildNum; - unsigned int _numBlocks; - double _blockMultiplier; - - float _statsWidth; - float _statsHeight; - -// std::map _actions; - }; - -} -#endif diff --git a/libs/lib/mac32/include/osgAnimation/StatsVisitor b/libs/lib/mac32/include/osgAnimation/StatsVisitor deleted file mode 100644 index 8b3656265..000000000 --- a/libs/lib/mac32/include/osgAnimation/StatsVisitor +++ /dev/null @@ -1,53 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_STATSVISITOR_H -#define OSGANIMATION_STATSVISITOR_H - -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT StatsActionVisitor : public osgAnimation::UpdateActionVisitor - { - protected: - osg::ref_ptr _stats; - std::vector _channels; - - public: - META_ActionVisitor(osgAnimation, StatsActionVisitor); - - StatsActionVisitor(); - StatsActionVisitor(osg::Stats* stats, unsigned int frame); - void reset(); - const std::vector& getChannels() const { return _channels; } - osg::Stats* getStats() { return _stats.get(); } - void setStats(osg::Stats* stats) { _stats = stats; } - void setFrame(unsigned int frame) { _frame = frame; } - void apply(Timeline& action); - void apply(Action& action); - void apply(ActionBlendIn& action); - void apply(ActionBlendOut& action); - void apply(ActionAnimation& action); - void apply(ActionStripAnimation& action); - - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Target b/libs/lib/mac32/include/osgAnimation/Target deleted file mode 100644 index 4303150bb..000000000 --- a/libs/lib/mac32/include/osgAnimation/Target +++ /dev/null @@ -1,134 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - - -#ifndef OSGANIMATION_TARGET -#define OSGANIMATION_TARGET 1 - -#include -#include -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - class Channel; - - class OSGANIMATION_EXPORT Target : public osg::Referenced - { - public: - - Target(); - virtual ~Target() {} - void reset() { _weight = 0; _priorityWeight = 0; } - int getCount() const { return referenceCount(); } - float getWeight() const { return _weight; } - protected: - float _weight; - float _priorityWeight; - int _lastPriority; - }; - - - template - class TemplateTarget : public Target - { - public: - - TemplateTarget() : _target() {} - TemplateTarget(const T& v) { setValue(v); } - TemplateTarget(const TemplateTarget& v) { setValue(v.getValue()); } - - inline void lerp(float t, const T& a, const T& b); - - /** - * The priority is used to detect a change of priority - * It's important to update animation target in priority - * order. eg: - * all animation with priority 1 - * all animation with priority 0 - * all animation with priority -1 - * ... - */ - void update(float weight, const T& val, int priority) - { - if (_weight || _priorityWeight) - { - if (_lastPriority != priority) - { - // change in priority - // add to weight with the same previous priority cumulated weight - _weight += _priorityWeight * (1.0 - _weight); - _priorityWeight = 0; - _lastPriority = priority; - } - - _priorityWeight += weight; - float t = (1.0 - _weight) * weight / _priorityWeight; - lerp(t, _target, val); - } - else - { - _priorityWeight = weight; - _lastPriority = priority; - _target = val; - } - } - const T& getValue() const { return _target; } - - void setValue(const T& value) { _target = value; } - - protected: - - T _target; - }; - - template - inline void TemplateTarget::lerp(float t, const T& a, const T& b) - { - _target = a * (1.0f - t) + b * t; - } - - template <> - inline void TemplateTarget::lerp(float t, const osg::Quat& a, const osg::Quat& b) - { - if (a.asVec4() * b.asVec4() < 0.0) - { - _target = a * (1.0f - t) + b * -t; - } - else - { - _target = a * (1.0f - t) + b * t; - } - - osg::Quat::value_type len2 = _target.length2(); - if ( len2 != 1.0 && len2 != 0.0) - _target *= 1.0/sqrt(len2); - } - - typedef TemplateTarget MatrixTarget; - typedef TemplateTarget QuatTarget; - typedef TemplateTarget Vec3Target; - typedef TemplateTarget Vec4Target; - typedef TemplateTarget Vec2Target; - typedef TemplateTarget FloatTarget; - typedef TemplateTarget DoubleTarget; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Timeline b/libs/lib/mac32/include/osgAnimation/Timeline deleted file mode 100644 index e578f2430..000000000 --- a/libs/lib/mac32/include/osgAnimation/Timeline +++ /dev/null @@ -1,122 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_TIMELINE -#define OSGANIMATION_TIMELINE 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - class OSGANIMATION_EXPORT Timeline : public Action - { - public: - - Timeline(); - Timeline(const Timeline& nc,const osg::CopyOp& op = osg::CopyOp::SHALLOW_COPY); - - META_Action(osgAnimation, Timeline); - - enum TimelineStatus - { - Play, - Stop - }; - - TimelineStatus getStatus() const { return _state; } - - typedef std::vector ActionList; - typedef std::map ActionLayers; - - const ActionList& getActionLayer(int i) { return _actions[i];} - unsigned int getCurrentFrame() const { return _currentFrame;} - double getCurrentTime() const { return _currentFrame * 1.0 / _fps;} - - void play() { _state = Play; } - void gotoFrame(unsigned int frame) { _currentFrame = frame; } - void stop() { _state = Stop; } - bool getEvaluating() const { return _evaluating;} - - bool isActive(Action* activeAction); - - void removeAction(Action* action); - virtual void addActionAt(unsigned int frame, Action* action, int priority = 0); - virtual void addActionAt(double t, Action* action, int priority = 0); - void addActionNow(Action* action, int priority = 0); - - void clearActions(); - - virtual void update(double simulationTime); - void setLastFrameEvaluated(unsigned int frame) { _previousFrameEvaluated = frame; } - - void setEvaluating(bool state) { _evaluating = state;} - void traverse(ActionVisitor& visitor); - - void setStats(osg::Stats* stats); - osg::Stats* getStats(); - void collectStats(bool state); - osgAnimation::StatsActionVisitor* getStatsVisitor(); - - const ActionLayers& getActionLayers() const { return _actions; } - - void processPendingOperation(); - void setAnimationManager(AnimationManagerBase*); - protected: - osg::observer_ptr _animationManager; - ActionLayers _actions; - double _lastUpdate; - double _speed; - unsigned int _currentFrame; - unsigned int _previousFrameEvaluated; - bool _initFirstFrame; - TimelineStatus _state; - - bool _collectStats; - osg::ref_ptr _stats; - osg::ref_ptr _statsVisitor; - - // to manage pending operation - bool _evaluating; - - struct Command - { - Command():_priority(0) {} - Command(int priority, const FrameAction& action) : _priority(priority), _action(action) {} - int _priority; - FrameAction _action; - }; - - typedef std::vector CommandList; - CommandList _addActionOperations; - ActionList _removeActionOperations; - - void internalRemoveAction(Action* action); - void internalAddAction(int priority, const FrameAction& ftl); - - }; - - - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/TimelineAnimationManager b/libs/lib/mac32/include/osgAnimation/TimelineAnimationManager deleted file mode 100644 index 68574ec5e..000000000 --- a/libs/lib/mac32/include/osgAnimation/TimelineAnimationManager +++ /dev/null @@ -1,44 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_TIMELINE_ANIMATION_MANAGER -#define OSGANIMATION_TIMELINE_ANIMATION_MANAGER 1 - -#include -#include -#include - - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT TimelineAnimationManager : public AnimationManagerBase - { - protected: - osg::ref_ptr _timeline; - - public: - META_Object(osgAnimation, TimelineAnimationManager); - TimelineAnimationManager(); - TimelineAnimationManager(const AnimationManagerBase& manager); - TimelineAnimationManager(const TimelineAnimationManager& nc,const osg::CopyOp&); - - Timeline* getTimeline() { return _timeline.get(); } - const Timeline* getTimeline() const { return _timeline.get(); } - void update(double time); - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/UpdateBone b/libs/lib/mac32/include/osgAnimation/UpdateBone deleted file mode 100644 index 916b2b912..000000000 --- a/libs/lib/mac32/include/osgAnimation/UpdateBone +++ /dev/null @@ -1,36 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_UPDATE_BONE -#define OSGANIMATION_UPDATE_BONE 1 - -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT UpdateBone : public UpdateMatrixTransform - { - public: - META_Object(osgAnimation, UpdateBone); - - UpdateBone(const std::string& name = ""); - UpdateBone(const UpdateBone&,const osg::CopyOp&); - void operator()(osg::Node* node, osg::NodeVisitor* nv); - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/UpdateMaterial b/libs/lib/mac32/include/osgAnimation/UpdateMaterial deleted file mode 100644 index 8d9fe6a53..000000000 --- a/libs/lib/mac32/include/osgAnimation/UpdateMaterial +++ /dev/null @@ -1,46 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -#ifndef OSGANIMATION_UPDATE_MATERIAL -#define OSGANIMATION_UPDATE_MATERIAL 1 - -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT UpdateMaterial : public AnimationUpdateCallback - { - protected: - osg::ref_ptr _diffuse; - - public: - - META_Object(osgAnimation, UpdateMaterial); - - UpdateMaterial(const std::string& name = ""); - UpdateMaterial(const UpdateMaterial& apc,const osg::CopyOp& copyop); - - /** Callback method called by the NodeVisitor when visiting a node.*/ - virtual void operator () (osg::StateAttribute*, osg::NodeVisitor*); - void update(osg::Material& material); - bool link(Channel* channel); - Vec4Target* getDiffuse(); - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/UpdateMatrixTransform b/libs/lib/mac32/include/osgAnimation/UpdateMatrixTransform deleted file mode 100644 index 94be6b689..000000000 --- a/libs/lib/mac32/include/osgAnimation/UpdateMatrixTransform +++ /dev/null @@ -1,48 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2009 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - - -#ifndef OSGANIMATION_UPDATE_MATRIX_TRANSFORM -#define OSGANIMATION_UPDATE_MATRIX_TRANSFORM 1 - -#include -#include -#include -#include - -namespace osgAnimation -{ - - class OSGANIMATION_EXPORT UpdateMatrixTransform : public AnimationUpdateCallback - { - public: - META_Object(osgAnimation, UpdateMatrixTransform); - - UpdateMatrixTransform(const std::string& name = ""); - UpdateMatrixTransform(const UpdateMatrixTransform& apc,const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - // Callback method called by the NodeVisitor when visiting a node. - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); - virtual bool link(osgAnimation::Channel* channel); - - StackedTransform& getStackedTransforms() { return _transforms;} - const StackedTransform& getStackedTransforms() const { return _transforms;} - - protected: - StackedTransform _transforms; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/Vec3Packed b/libs/lib/mac32/include/osgAnimation/Vec3Packed deleted file mode 100644 index 0fae8e6e5..000000000 --- a/libs/lib/mac32/include/osgAnimation/Vec3Packed +++ /dev/null @@ -1,119 +0,0 @@ -/* -*-c++-*- -*/ -//****************************************************************************// -// loader.cpp // -// Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger // -//****************************************************************************// -// This library is free software; you can redistribute it and/or modify it // -// under the terms of the GNU Lesser General Public License as published by // -// the Free Software Foundation; either version 2.1 of the License, or (at // -// your option) any later version. // -//****************************************************************************// - -/*****************************************************************************/ -/* Loads a core compressed keyframe instance. - * - * This function loads a core compressed keyframe instance from a data source. - * - * @param dataSrc The data source to load the core compressed keyframe instance from. - * - * @return One of the following values: - * \li a pointer to the core keyframe - * \li \b 0 if an error happened - * Authors - * Igor Kravchenko - * Cedric Pinson - *****************************************************************************/ - - -#ifndef OSGANIMATION_PACKED_H -#define OSGANIMATION_PACKED_H - -#include -#include -#include -#include - -namespace osgAnimation -{ - - - struct Vec3Packed - { - typedef unsigned int uint32_t; - uint32_t m32bits; - Vec3Packed(uint32_t val): m32bits(val) {} - Vec3Packed(): m32bits(0) {} - - void uncompress(const osg::Vec3& scale, const osg::Vec3& min, osg::Vec3& result) const - { - uint32_t pt[3]; - pt[0] = m32bits & 0x7ff; - pt[1] = (m32bits >> 11) & 0x7ff; - pt[2] = m32bits >> 22; - result[0] = scale[0] * pt[0] + min[0]; - result[1] = scale[1] * pt[1] + min[1]; - result[2] = scale[2] * pt[2] + min[2]; - } - - void compress(const osg::Vec3f& src, const osg::Vec3f& min, const osg::Vec3f& scaleInv) - { - uint32_t srci[3]; - srci[0] = osg::minimum(static_cast(((src[0] - min[0] )*scaleInv[0])), uint32_t(2047)); - srci[1] = osg::minimum(static_cast(((src[1] - min[1] )*scaleInv[1])), uint32_t(2047)); - srci[2] = osg::minimum(static_cast(((src[2] - min[2] )*scaleInv[2])), uint32_t(1023)); - m32bits = srci[0] + (srci[1] << 11) + (srci[2] << 22); - } - }; - - struct Vec3ArrayPacked - { - std::vector mVecCompressed; - osg::Vec3 mMin; - osg::Vec3 mScale; - osg::Vec3 mScaleInv; - - void analyze(const std::vector& src) - { - //analyze the keys - mMin.set(FLT_MAX, FLT_MAX, FLT_MAX); - osg::Vec3 maxp(-FLT_MAX, -FLT_MAX, -FLT_MAX); - int nb = (int)src.size(); - for(int i = 0; i < nb; i++) - { - const osg::Vec3 &pos = src[i]; - for(int j = 0; j < 3; j++) - { - maxp[j] = osg::maximum(pos[j],maxp[j]); - mMin[j] = osg::minimum(pos[j],mMin[j]); - } - } - - osg::Vec3 diff = maxp - mMin; - mScaleInv.set(0,0,0); - if (diff[0] != 0) - mScaleInv[0] = 2047.0/diff[0]; - - if (diff[1] != 0) - mScaleInv[1] = 2047.0/diff[1]; - - if (diff[2] != 0) - mScaleInv[2] = 1023.0/diff[2]; - - mScale[0] = diff[0] / 2047; - mScale[1] = diff[1] / 2047; - mScale[2] = diff[2] / 1023; - } - - void compress(const std::vector& src) - { - mVecCompressed.resize(src.size()); - // save all core keyframes - for(int i = 0; i < (int)src.size(); i++) - mVecCompressed[i].compress(src[i], mMin, mScaleInv); - } - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgAnimation/VertexInfluence b/libs/lib/mac32/include/osgAnimation/VertexInfluence deleted file mode 100644 index 813cddb44..000000000 --- a/libs/lib/mac32/include/osgAnimation/VertexInfluence +++ /dev/null @@ -1,103 +0,0 @@ -/* -*-c++-*- - * Copyright (C) 2008 Cedric Pinson - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGANIMATION_VERTEX_INFLUENCE -#define OSGANIMATION_VERTEX_INFLUENCE 1 - -#include -#include -#include -#include -#include - -namespace osgAnimation -{ - - // first is vertex index, and second the weight, the - typedef std::pair VertexIndexWeight; - typedef std::vector VertexList; - class OSGANIMATION_EXPORT VertexInfluence : public VertexList - { - public: - const std::string& getName() const { return _name;} - void setName(const std::string& name) { _name = name;} - - protected: - // the name is the bone to link to - std::string _name; - }; - - class VertexInfluenceMap : public std::map , public osg::Object - { - public: - META_Object(osgAnimation, VertexInfluenceMap); - - VertexInfluenceMap() {} - VertexInfluenceMap(const osgAnimation::VertexInfluenceMap&, const osg::CopyOp&) {} - }; - - - // this class manage VertexInfluence database by mesh - // reference bones per vertex ... - class OSGANIMATION_EXPORT VertexInfluenceSet - { - public: - typedef std::vector BoneToVertexList; - - class BoneWeight - { - public: - BoneWeight(const std::string& name, float weight) : _boneName(name), _weight(weight) {} - const std::string& getBoneName() const { return _boneName; } - float getWeight() const { return _weight; } - void setWeight(float weight) { _weight = weight; } - bool operator==(const BoneWeight& b) const { return (_boneName == b.getBoneName() && _weight == b.getWeight()); } - protected: - std::string _boneName; - float _weight; - }; - - typedef std::vector BoneWeightList; - typedef std::map VertexIndexToBoneWeightMap; - - class UniqVertexSetToBoneSet - { - public: - void setBones(BoneWeightList& bones) { _bones = bones;} - const BoneWeightList& getBones() const { return _bones;} - std::vector& getVertexes() { return _vertexes;} - const std::vector& getVertexes() const { return _vertexes;} - protected: - std::vector _vertexes; - BoneWeightList _bones; // here we could limit matrix operation by caching (weight * matrix) - }; - - typedef std::vector UniqVertexSetToBoneSetList; - - const UniqVertexSetToBoneSetList& getUniqVertexSetToBoneSetList() const { return _uniqVertexSetToBoneSet;} - void addVertexInfluence(const VertexInfluence& v); - void buildVertex2BoneList(); - void buildUniqVertexSetToBoneSetList(); - void clear(); - - const VertexIndexToBoneWeightMap& getVertexToBoneList() const; - protected: - BoneToVertexList _bone2Vertexes; - VertexIndexToBoneWeightMap _vertex2Bones; - UniqVertexSetToBoneSetList _uniqVertexSetToBoneSet; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/Archive b/libs/lib/mac32/include/osgDB/Archive deleted file mode 100644 index b2a1da43e..000000000 --- a/libs/lib/mac32/include/osgDB/Archive +++ /dev/null @@ -1,86 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_ARCHIVE -#define OSGDB_ARCHIVE 1 - -#include -#include -#include - -#include -#include - -namespace osgDB { - - -/** Base class for implementing database Archives. See src/osgPlugins/osga for an example of a concrete implementation. */ -class OSGDB_EXPORT Archive : public ReaderWriter -{ - public: - Archive(); - virtual ~Archive(); - - virtual const char* libraryName() const { return "osgDB"; } - - virtual const char* className() const { return "Archive"; } - - virtual bool acceptsExtension(const std::string& /*extension*/) const { return true; } - - /** close the archive.*/ - virtual void close() = 0; - - /** Get the file name which represents the archived file.*/ - virtual std::string getArchiveFileName() const = 0; - - /** Get the file name which represents the master file recorded in the Archive.*/ - virtual std::string getMasterFileName() const = 0; - - /** return true if file exists in archive.*/ - virtual bool fileExists(const std::string& filename) const = 0; - - /** return type of file. */ - virtual FileType getFileType(const std::string& filename) const = 0; - - typedef osgDB::DirectoryContents FileNameList; - - /** Get the full list of file names available in the archive.*/ - virtual bool getFileNames(FileNameList& fileNames) const = 0; - - /** return the contents of a directory. - * returns an empty array on any error.*/ - virtual DirectoryContents getDirectoryContents(const std::string& dirName) const; - - - virtual ReadResult readObject(const std::string& /*fileName*/,const Options* =NULL) const = 0; - virtual ReadResult readImage(const std::string& /*fileName*/,const Options* =NULL) const = 0; - virtual ReadResult readHeightField(const std::string& /*fileName*/,const Options* =NULL) const = 0; - virtual ReadResult readNode(const std::string& /*fileName*/,const Options* =NULL) const = 0; - virtual ReadResult readShader(const std::string& /*fileName*/,const Options* =NULL) const = 0; - - virtual WriteResult writeObject(const osg::Object& /*obj*/,const std::string& /*fileName*/,const Options* =NULL) const = 0; - virtual WriteResult writeImage(const osg::Image& /*image*/,const std::string& /*fileName*/,const Options* =NULL) const = 0; - virtual WriteResult writeHeightField(const osg::HeightField& /*heightField*/,const std::string& /*fileName*/,const Options* =NULL) const = 0; - virtual WriteResult writeNode(const osg::Node& /*node*/,const std::string& /*fileName*/,const Options* =NULL) const = 0; - virtual WriteResult writeShader(const osg::Shader& /*shader*/,const std::string& /*fileName*/,const Options* =NULL) const = 0; - -}; - -/** Open an archive for reading or writing.*/ -OSGDB_EXPORT Archive* openArchive(const std::string& filename, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint=4096); - -/** Open an archive for reading or writing.*/ -OSGDB_EXPORT Archive* openArchive(const std::string& filename, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint,Options* options); -} - -#endif // OSGDB_ARCHIVE diff --git a/libs/lib/mac32/include/osgDB/AuthenticationMap b/libs/lib/mac32/include/osgDB/AuthenticationMap deleted file mode 100644 index 4392cfbeb..000000000 --- a/libs/lib/mac32/include/osgDB/AuthenticationMap +++ /dev/null @@ -1,79 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_AUTHENTICATIONMAP -#define OSGDB_AUTHENTICATIONMAP 1 - -#include -#include - -#include - -#include -#include - -namespace osgDB { - -class Archive; - -class AuthenticationDetails : public osg::Referenced -{ -public: - - /** Http authentication techniques, see libcurl docs for details on names and associated functionality.*/ - enum HttpAuthentication - { - BASIC = 1<<0, - DIGEST = 1<<1, - NTLM = 1<<2, - GSSNegotiate = 1<<2, - ANY = ~0, - ANYSAFE = ~BASIC - }; - - AuthenticationDetails(const std::string& u, const std::string& p, HttpAuthentication auth=BASIC): - username(u), - password(p), - httpAuthentication(auth) {} - - std::string username; - std::string password; - HttpAuthentication httpAuthentication; - -protected: - virtual ~AuthenticationDetails() {} -}; - -class OSGDB_EXPORT AuthenticationMap : public osg::Referenced -{ - public: - - AuthenticationMap() {} - - - virtual void addAuthenticationDetails(const std::string& path, AuthenticationDetails* details); - - virtual const AuthenticationDetails* getAuthenticationDetails(const std::string& path) const; - - protected: - - virtual ~AuthenticationMap() {} - - typedef std::map > AuthenticationDetailsMap; - AuthenticationDetailsMap _authenticationMap; - -}; - -} - -#endif // OSGDB_AUTHENTICATIONMAP diff --git a/libs/lib/mac32/include/osgDB/Callbacks b/libs/lib/mac32/include/osgDB/Callbacks deleted file mode 100644 index 62d5983b8..000000000 --- a/libs/lib/mac32/include/osgDB/Callbacks +++ /dev/null @@ -1,110 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_CALLBACKS -#define OSGDB_CALLBACKS 1 - -#include -#include -#include - -#include -#include -#include - -namespace osgDB { - -/** list of directories to search through which searching for files. */ -typedef std::deque FilePathList; - -enum CaseSensitivity -{ - CASE_SENSITIVE, - CASE_INSENSITIVE -}; - -// forward decare -class Options; - -class OSGDB_EXPORT FindFileCallback : public virtual osg::Referenced -{ - public: - - virtual std::string findDataFile(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity); - - virtual std::string findLibraryFile(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity); - - protected: - virtual ~FindFileCallback() {} -}; - - -class OSGDB_EXPORT ReadFileCallback : public virtual osg::Referenced -{ - public: - - virtual ReaderWriter::ReadResult openArchive(const std::string& filename,ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const Options* useObjectCache); - - virtual ReaderWriter::ReadResult readObject(const std::string& filename, const Options* options); - - virtual ReaderWriter::ReadResult readImage(const std::string& filename, const Options* options); - - virtual ReaderWriter::ReadResult readHeightField(const std::string& filename, const Options* options); - - virtual ReaderWriter::ReadResult readNode(const std::string& filename, const Options* options); - - virtual ReaderWriter::ReadResult readShader(const std::string& filename, const Options* options); - - protected: - virtual ~ReadFileCallback() {} -}; - -class OSGDB_EXPORT WriteFileCallback : public virtual osg::Referenced -{ - public: - - virtual ReaderWriter::WriteResult writeObject(const osg::Object& obj, const std::string& fileName,const Options* options); - - virtual ReaderWriter::WriteResult writeImage(const osg::Image& obj, const std::string& fileName,const Options* options); - - virtual ReaderWriter::WriteResult writeHeightField(const osg::HeightField& obj, const std::string& fileName,const Options* options); - - virtual ReaderWriter::WriteResult writeNode(const osg::Node& obj, const std::string& fileName,const Options* options); - - virtual ReaderWriter::WriteResult writeShader(const osg::Shader& obj, const std::string& fileName,const Options* options); - - protected: - virtual ~WriteFileCallback() {} -}; - -class OSGDB_EXPORT FileLocationCallback : public virtual osg::Referenced -{ - public: - - enum Location - { - LOCAL_FILE, - REMOTE_FILE - }; - - virtual Location fileLocation(const std::string& filename, const Options* options) = 0; - - virtual bool useFileCache() const = 0; - - protected: - virtual ~FileLocationCallback() {} -}; - -} - -#endif // OSGDB_OPTIONS diff --git a/libs/lib/mac32/include/osgDB/ConvertUTF b/libs/lib/mac32/include/osgDB/ConvertUTF deleted file mode 100644 index 7c3bb9c78..000000000 --- a/libs/lib/mac32/include/osgDB/ConvertUTF +++ /dev/null @@ -1,52 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_CONVERTUTF -#define OSGDB_CONVERTUTF 1 - -#include -#include - -#include - -#if defined(__CYGWIN__) || defined(ANDROID) -namespace std -{ -typedef basic_string wstring; -} -#endif - -namespace osgDB -{ - -extern OSGDB_EXPORT std::string convertUTF16toUTF8(const wchar_t* source, unsigned sourceLength); -extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const char* source, unsigned sourceLength); - -extern OSGDB_EXPORT std::string convertUTF16toUTF8(const std::wstring& s); -extern OSGDB_EXPORT std::string convertUTF16toUTF8(const wchar_t* s); - -extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const std::string& s); -extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const char* s); - -extern OSGDB_EXPORT std::string convertStringFromCurrentCodePageToUTF8(const char* source, unsigned sourceLength); -extern OSGDB_EXPORT std::string convertStringFromUTF8toCurrentCodePage(const char* source, unsigned sourceLength); - -extern OSGDB_EXPORT std::string convertStringFromCurrentCodePageToUTF8(const std::string& s); -extern OSGDB_EXPORT std::string convertStringFromCurrentCodePageToUTF8(const char* s); - -extern OSGDB_EXPORT std::string convertStringFromUTF8toCurrentCodePage(const std::string& s); -extern OSGDB_EXPORT std::string convertStringFromUTF8toCurrentCodePage(const char* s); - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/DataTypes b/libs/lib/mac32/include/osgDB/DataTypes deleted file mode 100644 index 8014c244e..000000000 --- a/libs/lib/mac32/include/osgDB/DataTypes +++ /dev/null @@ -1,135 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGDB_DATATYPES -#define OSGDB_DATATYPES - -#include - -namespace osgDB -{ - -// OSG Header (MD5, 16Bit) -#define OSG_HEADER_LOW 0x6C910EA1 -#define OSG_HEADER_HIGH 0x1AFB4545 - -// Reader/writer plugin version -const unsigned int PLUGIN_VERSION = 2; - -const int BOOL_SIZE = 1; -const int CHAR_SIZE = 1; -const int SHORT_SIZE = 2; -const int INT_SIZE = 4; -const int LONG_SIZE = 4; -const int FLOAT_SIZE = 4; -const int DOUBLE_SIZE = 8; -const int GLENUM_SIZE = 4; - -const int ID_BYTE_ARRAY = 0; -const int ID_UBYTE_ARRAY = 1; -const int ID_SHORT_ARRAY = 2; -const int ID_USHORT_ARRAY = 3; -const int ID_INT_ARRAY = 4; -const int ID_UINT_ARRAY = 5; -const int ID_FLOAT_ARRAY = 6; -const int ID_DOUBLE_ARRAY = 7; -const int ID_VEC2B_ARRAY = 8; -const int ID_VEC3B_ARRAY = 9; -const int ID_VEC4B_ARRAY = 10; -const int ID_VEC4UB_ARRAY = 11; -const int ID_VEC2S_ARRAY = 12; -const int ID_VEC3S_ARRAY = 13; -const int ID_VEC4S_ARRAY = 14; -const int ID_VEC2_ARRAY = 15; -const int ID_VEC3_ARRAY = 16; -const int ID_VEC4_ARRAY = 17; -const int ID_VEC2D_ARRAY = 18; -const int ID_VEC3D_ARRAY = 19; -const int ID_VEC4D_ARRAY = 20; - -const int ID_DRAWARRAYS = 50; -const int ID_DRAWARRAY_LENGTH = 51; -const int ID_DRAWELEMENTS_UBYTE = 52; -const int ID_DRAWELEMENTS_USHORT = 53; -const int ID_DRAWELEMENTS_UINT = 54; - -// Used by BEGIN_BRACKET and END_BRACKET -const int INDENT_VALUE = 2; - -// Used by the writeImage/readImage parameter -const int IMAGE_INLINE_DATA = 0; -const int IMAGE_INLINE_FILE = 1; -const int IMAGE_EXTERNAL = 2; -const int IMAGE_WRITE_OUT = 3; - -struct ObjectGLenum -{ - ObjectGLenum( GLenum value=0 ) : _value(value) {} - ObjectGLenum( const ObjectGLenum& copy ) : _value(copy._value) {} - void set( GLenum e ) { _value = e; } - GLenum get() const { return _value; } - GLenum _value; -}; -#define GLENUM(value) osgDB::ObjectGLenum(value) -#define DEF_GLENUM(var) osgDB::ObjectGLenum var; - -class ObjectProperty -{ -public: - ObjectProperty( const char* name, int value=0, bool useMap=false ) - : _name(name), _value(value), _mapProperty(useMap) {} - - ObjectProperty( const ObjectProperty& copy ) - : _name(copy._name), _value(copy._value), _mapProperty(copy._mapProperty) {} - - ObjectProperty& proto( const char* name ) - { _name = name; return *this; } - - void set( int v ) { _value = v; } - int get() const { return _value; } - - std::string _name; - int _value; - bool _mapProperty; - -protected: - ObjectProperty():_value(0),_mapProperty(false) {} -}; -static ObjectProperty defaultProp(""); - -#define PROPERTY(name) defaultProp.proto(name) -#define MAPPEE(pairName, value) osgDB::ObjectProperty(#pairName, value, true) -#define DEF_PROPERTY(name, var) osgDB::ObjectProperty var(name); -#define DEF_MAPPEE(pairName, var) osgDB::ObjectProperty var(#pairName, 0, true); - -class ObjectMark -{ -public: - ObjectMark( const char* name, int delta=0 ) - : _name(name), _indentDelta(delta) {} - - ObjectMark( const ObjectMark& copy ) - : _name(copy._name), _indentDelta(copy._indentDelta) {} - - std::string _name; - int _indentDelta; - -protected: - ObjectMark():_indentDelta(0) {} -}; -static ObjectMark BEGIN_BRACKET("{", +INDENT_VALUE); -static ObjectMark END_BRACKET ("}", -INDENT_VALUE); - -} -#endif diff --git a/libs/lib/mac32/include/osgDB/DatabasePager b/libs/lib/mac32/include/osgDB/DatabasePager deleted file mode 100644 index faf874395..000000000 --- a/libs/lib/mac32/include/osgDB/DatabasePager +++ /dev/null @@ -1,476 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_DATABASEPAGER -#define OSGDB_DATABASEPAGER 1 - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include - - -#include -#include -#include -#include - -namespace osgDB { - - - -/** Database paging class which manages the loading of files in a background thread, - * and synchronizing of loaded models with the main scene graph.*/ -class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandler -{ - public : - - typedef OpenThreads::Thread::ThreadPriority ThreadPriority; - - DatabasePager(); - - DatabasePager(const DatabasePager& rhs); - - virtual const char* className() const { return "DatabasePager"; } - - /** Create a shallow copy on the DatabasePager.*/ - virtual DatabasePager* clone() const { return new DatabasePager(*this); } - - /** get the prototype singleton used by DatabasePager::create().*/ - static osg::ref_ptr& prototype(); - - /** create a DatabasePager by cloning DatabasePager::prototype().*/ - static DatabasePager* create(); - - - - /** Add a request to load a node file to end the the database request list.*/ - virtual void requestNodeFile(const std::string& fileName, osg::NodePath& nodePath, - float priority, const osg::FrameStamp* framestamp, - osg::ref_ptr& databaseRequest, - const osg::Referenced* options); - - /** Set the priority of the database pager thread(s).*/ - int setSchedulePriority(OpenThreads::Thread::ThreadPriority priority); - - /** Cancel the database pager thread(s).*/ - virtual int cancel(); - - virtual bool isRunning() const; - - /** Clear all internally cached structures.*/ - virtual void clear(); - - class OSGDB_EXPORT DatabaseThread : public osg::Referenced, public OpenThreads::Thread - { - public: - - enum Mode - { - HANDLE_ALL_REQUESTS, - HANDLE_NON_HTTP, - HANDLE_ONLY_HTTP - }; - - DatabaseThread(DatabasePager* pager, Mode mode, const std::string& name); - - DatabaseThread(const DatabaseThread& dt, DatabasePager* pager); - - void setName(const std::string& name) { _name = name; } - const std::string& getName() const { return _name; } - - void setDone(bool done) { _done.exchange(done?1:0); } - bool getDone() const { return _done!=0; } - - void setActive(bool active) { _active = active; } - bool getActive() const { return _active; } - - virtual int cancel(); - - virtual void run(); - - protected: - - virtual ~DatabaseThread(); - - OpenThreads::Atomic _done; - volatile bool _active; - DatabasePager* _pager; - Mode _mode; - std::string _name; - - }; - - void setUpThreads(unsigned int totalNumThreads=2, unsigned int numHttpThreads=1); - - unsigned int addDatabaseThread(DatabaseThread::Mode mode, const std::string& name); - - DatabaseThread* getDatabaseThread(unsigned int i) { return _databaseThreads[i].get(); } - - const DatabaseThread* getDatabaseThread(unsigned int i) const { return _databaseThreads[i].get(); } - - unsigned int getNumDatabaseThreads() const { return _databaseThreads.size(); } - - /** Set whether the database pager thread should be paused or not.*/ - void setDatabasePagerThreadPause(bool pause); - - /** Get whether the database pager thread should is paused or not.*/ - bool getDatabasePagerThreadPause() const { return _databasePagerThreadPaused; } - - /** Set whether new database request calls are accepted or ignored.*/ - void setAcceptNewDatabaseRequests(bool acceptNewRequests) { _acceptNewRequests = acceptNewRequests; } - - /** Get whether new database request calls are accepted or ignored.*/ - bool getAcceptNewDatabaseRequests() const { return _acceptNewRequests; } - - /** Get the number of frames that are currently active.*/ - int getNumFramesActive() const { return _numFramesActive; } - - /** Signal the database thread that the update, cull and draw has begun for a new frame. - * Note, this is called by the application so that the database pager can go to sleep while the CPU is busy on the main rendering threads. */ - virtual void signalBeginFrame(const osg::FrameStamp* framestamp); - - /** Signal the database thread that the update, cull and draw dispatch has completed. - * Note, this is called by the application so that the database pager can go to wake back up now the main rendering threads are iddle waiting for the next frame.*/ - virtual void signalEndFrame(); - - - /** Find all PagedLOD nodes in a subgraph and register them with - * the DatabasePager so it can keep track of expired nodes. - * note, should be only be called from the update thread. */ - virtual void registerPagedLODs(osg::Node* subgraph, unsigned int frameNumber = 0); - - /** Set the incremental compile operation. - * Used to manage the OpenGL object compilation and merging of subgraphs in a way that avoids overloading - * the rendering of frame with too many new objects in one frame. */ - void setIncrementalCompileOperation(osgUtil::IncrementalCompileOperation* ico); - - /** Get the incremental compile operation. */ - osgUtil::IncrementalCompileOperation* getIncrementalCompileOperation() { return _incrementalCompileOperation.get(); } - - - /** Set whether the database pager should pre compile OpenGL objects before allowing - * them to be merged into the scene graph. - * Pre compilation helps reduce the chances of frame drops, but also slows the - * speed at which tiles are merged as they have to be compiled first.*/ - void setDoPreCompile(bool flag) { _doPreCompile = flag; } - - /** Get whether the database pager should pre compile OpenGL objects before allowing - * them to be merged into the scene graph.*/ - bool getDoPreCompile() const { return _doPreCompile; } - - - - /** Set the target maximum number of PagedLOD to maintain in memory. - * Note, if more than the target number are required for rendering of a frame then these active PagedLOD are excempt from being expiried. - * But once the number of active drops back below the target the inactive PagedLOD will be trimmed back to the target number.*/ - void setTargetMaximumNumberOfPageLOD(unsigned int target) { _targetMaximumNumberOfPageLOD = target; } - - /** Get the target maximum number of PagedLOD to maintain in memory.*/ - unsigned int getTargetMaximumNumberOfPageLOD() const { return _targetMaximumNumberOfPageLOD; } - - - /** Set whether the removed subgraphs should be deleted in the database thread or not.*/ - void setDeleteRemovedSubgraphsInDatabaseThread(bool flag) { _deleteRemovedSubgraphsInDatabaseThread = flag; } - - /** Get whether the removed subgraphs should be deleted in the database thread or not.*/ - bool getDeleteRemovedSubgraphsInDatabaseThread() const { return _deleteRemovedSubgraphsInDatabaseThread; } - - enum DrawablePolicy - { - DO_NOT_MODIFY_DRAWABLE_SETTINGS, - USE_DISPLAY_LISTS, - USE_VERTEX_BUFFER_OBJECTS, - USE_VERTEX_ARRAYS - }; - - /** Set how loaded drawables should be handled w.r.t their display list/vertex buffer object/vertex array settings.*/ - void setDrawablePolicy(DrawablePolicy policy) { _drawablePolicy = policy; } - - /** Get how loaded drawables should be handled w.r.t their display list/vertex buffer object/vertex array settings.*/ - DrawablePolicy getDrawablePolicy() const { return _drawablePolicy; } - - - /** Set whether newly loaded textures should have a PixelBufferObject assigned to them to aid download to the GPU.*/ - void setApplyPBOToImages(bool assignPBOToImages) { _assignPBOToImages = assignPBOToImages; } - - /** Get whether newly loaded textures should have a PixelBufferObject assigned to them..*/ - bool getApplyPBOToImages() const { return _assignPBOToImages; } - - - /** Set whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/ - void setUnrefImageDataAfterApplyPolicy(bool changeAutoUnRef, bool valueAutoUnRef) { _changeAutoUnRef = changeAutoUnRef; _valueAutoUnRef = valueAutoUnRef; } - - /** Get whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/ - void getUnrefImageDataAfterApplyPolicy(bool& changeAutoUnRef, bool& valueAutoUnRef) const { changeAutoUnRef = _changeAutoUnRef; valueAutoUnRef = _valueAutoUnRef; } - - - /** Set whether newly loaded textures should have their MaxAnisotopy set to a specified value.*/ - void setMaxAnisotropyPolicy(bool changeAnisotropy, float valueAnisotropy) { _changeAnisotropy = changeAnisotropy; _valueAnisotropy = valueAnisotropy; } - - /** Set whether newly loaded textures should have their MaxAnisotopy set to a specified value.*/ - void getMaxAnisotropyPolicy(bool& changeAnisotropy, float& valueAnisotropy) const { changeAnisotropy = _changeAnisotropy; valueAnisotropy = _valueAnisotropy; } - - - /** Return true if there are pending updates to the scene graph that require a call to updateSceneGraph(double). */ - bool requiresUpdateSceneGraph() const; - - /** Merge the changes to the scene graph by calling calling removeExpiredSubgraphs then addLoadedDataToSceneGraph. - * Note, must only be called from single thread update phase. */ - virtual void updateSceneGraph(const osg::FrameStamp& frameStamp); - - /** Report how many items are in the _fileRequestList queue */ - unsigned int getFileRequestListSize() const { return _fileRequestQueue->size() + _httpRequestQueue->size(); } - - /** Report how many items are in the _dataToCompileList queue */ - unsigned int getDataToCompileListSize() const { return _dataToCompileList->size(); } - - /** Report how many items are in the _dataToMergeList queue */ - unsigned int getDataToMergeListSize() const { return _dataToMergeList->size(); } - - /** Report whether any requests are in the pager.*/ - bool getRequestsInProgress() const; - - /** Get the minimum time between the first request for a tile to be loaded and the time of its merge into the main scene graph.*/ - double getMinimumTimeToMergeTile() const { return _minimumTimeToMergeTile; } - - /** Get the maximum time between the first request for a tile to be loaded and the time of its merge into the main scene graph.*/ - double getMaximumTimeToMergeTile() const { return _maximumTimeToMergeTile; } - - /** Get the average time between the first request for a tile to be loaded and the time of its merge into the main scene graph.*/ - double getAverageTimeToMergeTiles() const { return (_numTilesMerges > 0) ? _totalTimeToMergeTiles/static_cast(_numTilesMerges) : 0; } - - /** Reset the Stats variables.*/ - void resetStats(); - - typedef std::set< osg::ref_ptr > StateSetList; - typedef std::vector< osg::ref_ptr > DrawableList; - - class ExpirePagedLODsVisitor; - - typedef std::list< osg::ref_ptr > ObjectList; - - struct PagedLODList : public osg::Referenced - { - virtual PagedLODList* clone() = 0; - virtual void clear() = 0; - virtual unsigned int size() = 0; - virtual void removeExpiredChildren(int numberChildrenToRemove, double expiryTime, unsigned int expiryFrame, ObjectList& childrenRemoved, bool visitActive) = 0; - virtual void removeNodes(osg::NodeList& nodesToRemove) = 0; - virtual void insertPagedLOD(const osg::observer_ptr& plod) = 0; - virtual bool containsPagedLOD(const osg::observer_ptr& plod) const = 0; - }; - - - protected: - - virtual ~DatabasePager(); - - friend class DatabaseThread; - friend struct DatabaseRequest; - - struct RequestQueue; - - struct OSGDB_EXPORT DatabaseRequest : public osg::Referenced - { - DatabaseRequest(): - osg::Referenced(true), - _valid(false), - _frameNumberFirstRequest(0), - _timestampFirstRequest(0.0), - _priorityFirstRequest(0.f), - _frameNumberLastRequest(0), - _timestampLastRequest(0.0), - _priorityLastRequest(0.0f), - _numOfRequests(0), - _groupExpired(false) - {} - - void invalidate(); - - bool valid() const { return _valid; } - - bool _valid; - std::string _fileName; - unsigned int _frameNumberFirstRequest; - double _timestampFirstRequest; - float _priorityFirstRequest; - unsigned int _frameNumberLastRequest; - double _timestampLastRequest; - float _priorityLastRequest; - unsigned int _numOfRequests; - - osg::observer_ptr _terrain; - osg::observer_ptr _group; - - osg::ref_ptr _loadedModel; - osg::ref_ptr _loadOptions; - - osg::observer_ptr _compileSet; - bool _groupExpired; // flag used only in update thread - - bool isRequestCurrent (int frameNumber) const - { - return _valid && (frameNumber - _frameNumberLastRequest <= 1); - } - }; - - - struct OSGDB_EXPORT RequestQueue : public osg::Referenced - { - public: - - RequestQueue(DatabasePager* pager); - - void add(DatabaseRequest* databaseRequest); - void remove(DatabaseRequest* databaseRequest); - - void addNoLock(DatabaseRequest* databaseRequest); - - void takeFirst(osg::ref_ptr& databaseRequest); - - /// prune all the old requests and then return true if requestList left empty - bool pruneOldRequestsAndCheckIfEmpty(); - - virtual void updateBlock() {} - - void invalidate(DatabaseRequest* dr); - - bool empty(); - - unsigned int size(); - - void clear(); - - - typedef std::list< osg::ref_ptr > RequestList; - void swap(RequestList& requestList); - - DatabasePager* _pager; - RequestList _requestList; - OpenThreads::Mutex _requestMutex; - unsigned int _frameNumberLastPruned; - - protected: - virtual ~RequestQueue(); - }; - - - typedef std::vector< osg::ref_ptr > DatabaseThreadList; - - struct OSGDB_EXPORT ReadQueue : public RequestQueue - { - ReadQueue(DatabasePager* pager, const std::string& name); - - void block() { _block->block(); } - - void release() { _block->release(); } - - virtual void updateBlock(); - - - osg::ref_ptr _block; - - std::string _name; - - OpenThreads::Mutex _childrenToDeleteListMutex; - ObjectList _childrenToDeleteList; - }; - - // forward declare inner helper classes - class FindCompileableGLObjectsVisitor; - friend class FindCompileableGLObjectsVisitor; - - struct DatabasePagerCompileCompletedCallback; - friend struct DatabasePagerCompileCompletedCallback; - - class FindPagedLODsVisitor; - friend class FindPagedLODsVisitor; - - struct SortFileRequestFunctor; - friend struct SortFileRequestFunctor; - - - OpenThreads::Mutex _run_mutex; - OpenThreads::Mutex _dr_mutex; - bool _startThreadCalled; - - void compileCompleted(DatabaseRequest* databaseRequest); - - /** Iterate through the active PagedLOD nodes children removing - * children which havn't been visited since specified expiryTime. - * note, should be only be called from the update thread. */ - virtual void removeExpiredSubgraphs(const osg::FrameStamp &frameStamp); - - /** Add the loaded data to the scene graph.*/ - void addLoadedDataToSceneGraph(const osg::FrameStamp &frameStamp); - - - bool _done; - bool _acceptNewRequests; - bool _databasePagerThreadPaused; - - DatabaseThreadList _databaseThreads; - - int _numFramesActive; - mutable OpenThreads::Mutex _numFramesActiveMutex; - OpenThreads::Atomic _frameNumber; - - osg::ref_ptr _fileRequestQueue; - osg::ref_ptr _httpRequestQueue; - osg::ref_ptr _dataToCompileList; - osg::ref_ptr _dataToMergeList; - - DrawablePolicy _drawablePolicy; - - bool _assignPBOToImages; - bool _changeAutoUnRef; - bool _valueAutoUnRef; - bool _changeAnisotropy; - float _valueAnisotropy; - - bool _deleteRemovedSubgraphsInDatabaseThread; - - - osg::ref_ptr _activePagedLODList; - - unsigned int _targetMaximumNumberOfPageLOD; - - bool _doPreCompile; - osg::ref_ptr _incrementalCompileOperation; - - - double _minimumTimeToMergeTile; - double _maximumTimeToMergeTile; - double _totalTimeToMergeTiles; - unsigned int _numTilesMerges; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/DatabaseRevisions b/libs/lib/mac32/include/osgDB/DatabaseRevisions deleted file mode 100644 index 6127ae884..000000000 --- a/libs/lib/mac32/include/osgDB/DatabaseRevisions +++ /dev/null @@ -1,133 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_DATABASEREVISIONS -#define OSGDB_DATABASEREVISIONS 1 - -#include - -#include - -#include - -namespace osgDB { - -class OSGDB_EXPORT FileList : public osg::Object -{ - public: - - FileList(); - FileList(const FileList& fileList, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgDB, FileList) - - typedef std::set FileNames; - FileNames& getFileNames() { return _files; } - const FileNames& getFileNames() const { return _files; } - - bool empty() const { return _files.empty(); } - - bool containsFile(const std::string& filename) const { return _files.count(filename)!=0; } - - void addFile(const std::string& filename) { _files.insert(filename); } - - bool removeFile(const std::string& filename); - - void append(FileList* fileList); - - protected: - - virtual ~FileList(); - - FileNames _files; -}; - - -class OSGDB_EXPORT DatabaseRevision : public osg::Object -{ - public: - - DatabaseRevision(); - DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgDB, DatabaseRevision) - - void setDatabasePath(const std::string& path) { _databasePath = path; } - const std::string& getDatabasePath() const { return _databasePath; } - - typedef std::set FileNames; - - void setFilesAdded(FileList* fileList) { _filesAdded = fileList; } - FileList* getFilesAdded() { return _filesAdded.get(); } - const FileList* getFilesAdded() const { return _filesAdded.get(); } - - void setFilesRemoved(FileList* fileList) { _filesRemoved = fileList; } - FileList* getFilesRemoved() { return _filesRemoved.get(); } - const FileList* getFilesRemoved() const { return _filesRemoved.get(); } - - void setFilesModified(FileList* fileList) { _filesModified = fileList; } - FileList* getFilesModified() { return _filesModified.get(); } - const FileList* getFilesModified() const { return _filesModified.get(); } - - bool isFileBlackListed(const std::string& filename) const; - - bool removeFile(const std::string& filename); - - protected: - - virtual ~DatabaseRevision(); - - std::string _databasePath; - - osg::ref_ptr _filesAdded; - osg::ref_ptr _filesRemoved; - osg::ref_ptr _filesModified; -}; - -class OSGDB_EXPORT DatabaseRevisions : public osg::Object -{ - public: - - DatabaseRevisions(); - DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgDB, DatabaseRevisions) - - typedef std::vector< osg::ref_ptr > DatabaseRevisionList; - - void setDatabasePath(const std::string& path) { _databasePath = path; } - const std::string& getDatabasePath() const { return _databasePath; } - - void addRevision(DatabaseRevision* revision); - void removeRevision(DatabaseRevision* revision); - - DatabaseRevision* getDatabaseRevision(unsigned int i) { return i<_revisionList.size() ? _revisionList[i].get() : 0; } - - DatabaseRevisionList& getDatabaseRevisionList() { return _revisionList; } - const DatabaseRevisionList& getDatabaseRevisionList() const { return _revisionList; } - - bool isFileBlackListed(const std::string& filename) const; - - bool removeFile(const std::string& filename); - - protected: - - virtual ~DatabaseRevisions(); - - std::string _databasePath; - DatabaseRevisionList _revisionList; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/DotOsgWrapper b/libs/lib/mac32/include/osgDB/DotOsgWrapper deleted file mode 100644 index cf1bccf32..000000000 --- a/libs/lib/mac32/include/osgDB/DotOsgWrapper +++ /dev/null @@ -1,171 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_DOTOSGWRAPPER -#define OSGDB_DOTOSGWRAPPER 1 - -#include -#include - -#include -#include - -#include -#include - -namespace osgDB { - - -/** deprecated. */ -class OSGDB_EXPORT DotOsgWrapper : public osg::Referenced -{ - public: - - typedef std::vector Associates; - typedef bool (*ReadFunc)(osg::Object&,osgDB::Input&); - typedef bool (*WriteFunc)(const osg::Object&,osgDB::Output&); - - enum ReadWriteMode - { - READ_AND_WRITE, - READ_ONLY - }; - - DotOsgWrapper(osg::Object* proto, - const std::string& name, - const std::string& associates, - ReadFunc readFunc, - WriteFunc writeFunc, - ReadWriteMode readWriteMode=READ_AND_WRITE); - - - inline const osg::Object* getPrototype() const { return _prototype.get(); } - inline const std::string& getName() const { return _name; } - inline const Associates& getAssociates() const { return _associates; } - inline ReadFunc getReadFunc() const { return _readFunc; } - inline WriteFunc getWriteFunc() const { return _writeFunc; } - inline ReadWriteMode getReadWriteMode() const { return _readWriteMode; } - - protected: - - /// protected to prevent inappropriate creation of wrappers. - DotOsgWrapper() {} - - /// protected to prevent inappropriate creation of wrappers. - DotOsgWrapper(DotOsgWrapper&):osg::Referenced() {} - - /// protected to prevent wrapper being created on stack. - virtual ~DotOsgWrapper() {} - - osg::ref_ptr _prototype; - - std::string _name; - Associates _associates; - - ReadFunc _readFunc; - WriteFunc _writeFunc; - - ReadWriteMode _readWriteMode; -}; - - -/** deprecated. */ -class OSGDB_EXPORT DeprecatedDotOsgWrapperManager : public osg::Referenced -{ - public: - - DeprecatedDotOsgWrapperManager() {} - - void addDotOsgWrapper(DotOsgWrapper* wrapper); - void removeDotOsgWrapper(DotOsgWrapper* wrapper); - - osg::Object* readObjectOfType(const osg::Object& compObj,Input& fr); - osg::Object* readObjectOfType(const basic_type_wrapper &btw, Input& fr); - - osg::Object* readObject(Input& fr); - osg::Image* readImage(Input& fr); - osg::Drawable* readDrawable(Input& fr); - osg::Uniform* readUniform(Input& fr); - osg::StateAttribute* readStateAttribute(Input& fr); - osg::Node* readNode(Input& fr); - osg::Shader* readShader(Input& fr); - - bool writeObject(const osg::Object& obj,Output& fw); - - typedef std::list FileNames; - bool getLibraryFileNamesToTry(const std::string& name, FileNames& fileNames); - - private: - - virtual ~DeprecatedDotOsgWrapperManager() {} - - typedef std::map< std::string, osg::ref_ptr > DotOsgWrapperMap; - - osg::Object* readObject(DotOsgWrapperMap& dowMap,Input& fr); - void eraseWrapper(DotOsgWrapperMap& wrappermap,DotOsgWrapper* wrapper); - - DotOsgWrapperMap _objectWrapperMap; - DotOsgWrapperMap _imageWrapperMap; - DotOsgWrapperMap _drawableWrapperMap; - DotOsgWrapperMap _stateAttrWrapperMap; - DotOsgWrapperMap _uniformWrapperMap; - DotOsgWrapperMap _nodeWrapperMap; - DotOsgWrapperMap _shaderWrapperMap; - - DotOsgWrapperMap _classNameWrapperMap; - -}; - - -/** deprecated. */ -class OSGDB_EXPORT RegisterDotOsgWrapperProxy -{ - public: - - RegisterDotOsgWrapperProxy(osg::Object* proto, - const std::string& name, - const std::string& associates, - DotOsgWrapper::ReadFunc readFunc, - DotOsgWrapper::WriteFunc writeFunc, - DotOsgWrapper::ReadWriteMode readWriteMode=DotOsgWrapper::READ_AND_WRITE); - - ~RegisterDotOsgWrapperProxy(); - - protected: - osg::ref_ptr _wrapper; -}; - -/** deprecated. */ -template -class TemplateRegisterDotOsgWrapperProxy : public RegisterDotOsgWrapperProxy, public T -{ - public: - - TemplateRegisterDotOsgWrapperProxy(osg::Object* proto, - const std::string& name, - const std::string& associates, - DotOsgWrapper::ReadFunc readFunc, - DotOsgWrapper::WriteFunc writeFunc, - DotOsgWrapper::ReadWriteMode readWriteMode=DotOsgWrapper::READ_AND_WRITE): - RegisterDotOsgWrapperProxy(proto, name, associates, readFunc, writeFunc, readWriteMode) {} - -}; - - -#define REGISTER_DOTOSGWRAPPER(classname) \ - extern "C" void dotosgwrapper_##classname(void) {} \ - static osgDB::RegisterDotOsgWrapperProxy dotosgwrapper_proxy_##classname - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/DynamicLibrary b/libs/lib/mac32/include/osgDB/DynamicLibrary deleted file mode 100644 index 9ea73b8f6..000000000 --- a/libs/lib/mac32/include/osgDB/DynamicLibrary +++ /dev/null @@ -1,79 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_DYNAMICLIBRARY -#define OSGDB_DYNAMICLIBRARY 1 - -#include -#include - -#include - - -namespace osgDB { - -/** DynamicLibrary - encapsulates the loading and unloading of dynamic libraries, - typically used for loading ReaderWriter plug-ins. -*/ -class OSGDB_EXPORT DynamicLibrary : public osg::Referenced -{ - public: - - typedef void* HANDLE; - typedef void* PROC_ADDRESS; - - /** returns a pointer to a DynamicLibrary object on successfully - * opening of library returns NULL on failure. - */ - static DynamicLibrary* loadLibrary(const std::string& libraryName); - - /** return name of library stripped of path.*/ - const std::string& getName() const { return _name; } - - /** return name of library including full path to it.*/ - const std::string& getFullName() const { return _fullName; } - - /** return handle to .dso/.dll dynamic library itself.*/ - HANDLE getHandle() const { return _handle; } - - /** return address of function located in library.*/ - PROC_ADDRESS getProcAddress(const std::string& procName); - - protected: - - /** get handle to library file */ - static HANDLE getLibraryHandle( const std::string& libraryName); - - /** disallow default constructor.*/ - DynamicLibrary():osg::Referenced() {} - /** disallow copy constructor.*/ - DynamicLibrary(const DynamicLibrary&):osg::Referenced() {} - /** disallow copy operator.*/ - DynamicLibrary& operator = (const DynamicLibrary&) { return *this; } - - /** Disallow public construction so that users have to go - * through loadLibrary() above which returns NULL on - * failure, a valid DynamicLibrary object on success. - */ - DynamicLibrary(const std::string& name,HANDLE handle); - ~DynamicLibrary(); - - HANDLE _handle; - std::string _name; - std::string _fullName; - -}; - -} - -#endif // __DYNAMIC_LIBRARY_H diff --git a/libs/lib/mac32/include/osgDB/Export b/libs/lib/mac32/include/osgDB/Export deleted file mode 100644 index 23b4d0b0f..000000000 --- a/libs/lib/mac32/include/osgDB/Export +++ /dev/null @@ -1,51 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_EXPORT_ -#define OSGDB_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4267 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGDB_EXPORT - # elif defined( OSGDB_LIBRARY ) - # define OSGDB_EXPORT __declspec(dllexport) - # else - # define OSGDB_EXPORT __declspec(dllimport) - # endif -#else - # define OSGDB_EXPORT -#endif - -/** - -\namespace osgDB - -The osgDB library provides support for reading and writing scene graphs, providing a plugin framework and file utility classes. -The plugin framework in centered around the osgDB::Registry, and allows plugins which provide specific file format support to be dynamically loaded on demand. -*/ - -#endif - diff --git a/libs/lib/mac32/include/osgDB/ExternalFileWriter b/libs/lib/mac32/include/osgDB/ExternalFileWriter deleted file mode 100644 index 6cd0b314f..000000000 --- a/libs/lib/mac32/include/osgDB/ExternalFileWriter +++ /dev/null @@ -1,106 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_PLUGIN_IMAGE_WRITER -#define OSGDB_PLUGIN_IMAGE_WRITER 1 - -#include -#include -#include - -namespace osg -{ - class Object; -} - -namespace osgDB -{ - - class Options; - - /// Helper allowing 'intelligent' writing of external files (images, shaders, etc.), regarding to a main file (a scene), especially in plugins. - /// Goals are: - /// - Enable writing out objects only once (even if referenced multiple times) - /// - Handle duplicates (avoid writing two different objects at the same place, renaming files as needed) - /// - Handle directory creation when paths don't just exist - /// - Generate writing paths which may keep original directory structure (depending on user wishes). Ex: - /// Reading: model.osg and images/img1.jpg - /// Writing with 'keepRelativePaths': /somePath/newmodel.osg and /somePath/images/img1.jpg - /// Writing without 'keepRelativePaths': /somePath/newmodel.osg and /somePath/img1.jpg - ///\author Sukender - ///\todo Handling of naming constraints (such as "8.3" names in 3DS) - class OSGDB_EXPORT ExternalFileWriter - { - public: - /// Builds the helper class with all options. - ///\param srcDirectory Directory of the initial main file (if any), used as a base when relativising objects names. Not used if keepRelativePaths==false. - ///\param destDirectory Directory where to write the main file. - ///\param keepRelativePaths If true, then relative paths of source objects are kept if possible (ex: If an image is initially "imageDir/image.jpg" relatively to the source dir, then we'd like to get "destDir/imageDir/image.jpg"). If false, then only the simple file name is used to write the object file. - ///\param allowUpDirs When relativising objects paths, sets the maximum number of directories the objects can be written "up" the destination directory. Not used if keepRelativePaths==false. Examples: If an image is initially "../image.jpg" relatively to the source dir *AND* if we allow one dir level up, then we'd like to get "destDirParent/destDir/../image.jpg" (= "destDirParent/image.jpg"). If we *DO NOT* allow one dir level up, then we'd like to get "destDir/image.jpg". - ExternalFileWriter(const std::string & srcDirectory, const std::string & destDirectory, bool keepRelativePaths, unsigned int allowUpDirs=0); - - /// Short constructor used when not relativising objects paths, or when having no initial model file (which is pretty the same here). - ExternalFileWriter(const std::string & destDirectory); - - /// Writes the current object if not already done. - ///\param obj Object to write, using corresponding osgDB::write method. - ///\param options Writing options to pass to corresponding osgDB::write method. - ///\param [out] out_absolutePath Pointer to a string to be filled with absolute writing path, or NULL. - ///\param [out] out_relativePath Pointer to a string to be filled with write path relative to the destination directory if possible (absolute path if not), or NULL. - ///\return true on success, false otherwise. - bool write(const osg::Object & obj, const osgDB::Options * options, std::string * out_absolutePath=NULL, std::string * out_relativePath=NULL); - - struct ObjectData - { - ObjectData() : written(false) {} - ObjectData(const std::string & absolutePath, const std::string & relativePath, bool written) : absolutePath(absolutePath), relativePath(relativePath), written(written) {} - std::string absolutePath; - std::string relativePath; - bool written; ///< Says if write succeded or not. - }; - - /// Set of written objects, with their absolute writing path. - /// Objects being passed to the write() method but which have failed to be effectively written are also included. - typedef std::map ObjectsSet; - - /// Returns the written objects. - const ObjectsSet & getObjects() const { return _objects; } - - protected: - // Dev note: - // A multi-indexed structure would be more efficient for ObjectsSet (such as boost::multi_index, indexed on object pointer (unique), and hashed indexed on absolute path (unique)). - // In order to get a correct search time, SearchMap "replaces" the multi-index structure for hashed indexes on absolute paths. - typedef std::multimap SearchMap; - typedef unsigned int ObjectIndex; ///< Integer type used for indices of unnamed objects - ObjectsSet _objects; - SearchMap _searchMap; ///< Map used to search by absolute file path. - ObjectIndex _lastGeneratedObjectIndex; - const std::string _srcDirectory; - const std::string _destDirectory; - bool _keepRelativePaths; - const unsigned int _allowUpDirs; - - /// Generates a unique name for an object to be written on disk. - /// Side effect: updates _lastGeneratedObjectIndex to the index associated withe the returned name. - void generateObjectName(std::string & out_relativePath, std::string & out_absolutePath, int type); - - bool absoluteObjectPathExists(const std::string & path); - - private: - // Prevent copy - ExternalFileWriter & operator=(const ExternalFileWriter &); - ExternalFileWriter(const ExternalFileWriter &); - }; -} - -#endif // OSGDB_PLUGIN_IMAGE_WRITER diff --git a/libs/lib/mac32/include/osgDB/FileCache b/libs/lib/mac32/include/osgDB/FileCache deleted file mode 100644 index a99b5f6c7..000000000 --- a/libs/lib/mac32/include/osgDB/FileCache +++ /dev/null @@ -1,77 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_FILECACHE -#define OSGDB_FILECACHE 1 - -#include - -#include -#include - -#include - -namespace osgDB { - -class OSGDB_EXPORT FileCache : public osg::Referenced -{ - public: - - FileCache(const std::string& path); - - const std::string& getFileCachePath() const { return _fileCachePath; } - - virtual bool isFileAppropriateForFileCache(const std::string& originalFileName) const; - - virtual std::string createCacheFileName(const std::string& originalFileName) const; - - virtual bool existsInCache(const std::string& originalFileName) const; - - virtual ReaderWriter::ReadResult readImage(const std::string& originalFileName, const osgDB::Options* options) const; - virtual ReaderWriter::WriteResult writeImage(const osg::Image& image, const std::string& originalFileName, const osgDB::Options* options) const; - - virtual ReaderWriter::ReadResult readObject(const std::string& originalFileName, const osgDB::Options* options) const; - virtual ReaderWriter::WriteResult writeObject(const osg::Object& object, const std::string& originalFileName, const osgDB::Options* options) const; - - virtual ReaderWriter::ReadResult readHeightField(const std::string& originalFileName, const osgDB::Options* options) const; - virtual ReaderWriter::WriteResult writeHeightField(const osg::HeightField& hf, const std::string& originalFileName, const osgDB::Options* options) const; - - virtual ReaderWriter::ReadResult readNode(const std::string& originalFileName, const osgDB::Options* options, bool buildKdTreeIfRequired=true) const; - virtual ReaderWriter::WriteResult writeNode(const osg::Node& node, const std::string& originalFileName, const osgDB::Options* options) const; - - virtual ReaderWriter::ReadResult readShader(const std::string& originalFileName, const osgDB::Options* options) const; - virtual ReaderWriter::WriteResult writeShader(const osg::Shader& shader, const std::string& originalFileName, const osgDB::Options* options) const; - - bool loadDatabaseRevisionsForFile(const std::string& originanlFileName); - - typedef std::list< osg::ref_ptr > DatabaseRevisionsList; - DatabaseRevisionsList& getDatabaseRevisionsList() { return _databaseRevisionsList; } - - bool isCachedFileBlackListed(const std::string& originalFileName) const; - - protected: - - virtual ~FileCache(); - - std::string _fileCachePath; - - DatabaseRevisionsList _databaseRevisionsList; - - FileList* readFileList(const std::string& originalFileName) const; - bool removeFileFromBlackListed(const std::string& originalFileName) const; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/FileNameUtils b/libs/lib/mac32/include/osgDB/FileNameUtils deleted file mode 100644 index 6f30620fc..000000000 --- a/libs/lib/mac32/include/osgDB/FileNameUtils +++ /dev/null @@ -1,86 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_FILENAMEUTILS -#define OSGDB_FILENAMEUTILS 1 - -#include - -#include -#include - -namespace osgDB { - -/** Gets the parent path from full name (Ex: /a/b/c.Ext => /a/b). */ -extern OSGDB_EXPORT std::string getFilePath(const std::string& filename); -/** Gets the extension without dot (Ex: /a/b/c.Ext => Ext). */ -extern OSGDB_EXPORT std::string getFileExtension(const std::string& filename); -/** Gets the extension including dot (Ex: /a/b/c.Ext => .Ext). */ -extern OSGDB_EXPORT std::string getFileExtensionIncludingDot(const std::string& filename); -/** Gets the lowercase extension without dot (Ex: /a/b/c.Ext => ext). */ -extern OSGDB_EXPORT std::string getLowerCaseFileExtension(const std::string& filename); -/** Gets file name with extension (Ex: /a/b/c.Ext => c.Ext). */ -extern OSGDB_EXPORT std::string getSimpleFileName(const std::string& fileName); -/** Gets file path without last extension (Ex: /a/b/c.Ext => /a/b/c ; file.ext1.ext2 => file.ext1). */ -extern OSGDB_EXPORT std::string getNameLessExtension(const std::string& fileName); -/** Gets file path without \b all extensions (Ex: /a/b/c.Ext => /a/b/c ; file.ext1.ext2 => file). */ -extern OSGDB_EXPORT std::string getNameLessAllExtensions(const std::string& fileName); -/** Gets file name without last extension (Ex: /a/b/c.Ext => c ; file.ext1.ext2 => file.ext1). */ -extern OSGDB_EXPORT std::string getStrippedName(const std::string& fileName); -/** If 'to' is in a subdirectory of 'from' then this function returns the subpath, otherwise it just returns the file name. - * The function does \b not automagically resolve paths as the system does, so be careful to give canonical paths. - * However, the function interprets slashes ('/') ans backslashes ('\') as they were equal. - */ -extern OSGDB_EXPORT std::string getPathRelative(const std::string& from, const std::string& to); -/** Gets root part of a path ("/" or "C:"), or an empty string if none found. */ -extern OSGDB_EXPORT std::string getPathRoot(const std::string& path); -/** Tests if path is absolute, as !getPathRoot(path).empty(). */ -extern OSGDB_EXPORT bool isAbsolutePath(const std::string& path); - - -/** Converts forward slashes (/) to back slashes (\). */ -extern OSGDB_EXPORT std::string convertFileNameToWindowsStyle(const std::string& fileName); -/** Converts back slashes (\) to forward slashes (/). */ -extern OSGDB_EXPORT std::string convertFileNameToUnixStyle(const std::string& fileName); -extern OSGDB_EXPORT std::string convertToLowerCase(const std::string& fileName); - -const char UNIX_PATH_SEPARATOR = '/'; -const char WINDOWS_PATH_SEPARATOR = '\\'; - -/** Get the path separator for the current platform. */ -extern OSGDB_EXPORT char getNativePathSeparator(); -/** Check if the path contains only the current platform's path separators. */ -extern OSGDB_EXPORT bool isFileNameNativeStyle(const std::string& fileName); -/** Convert the path to contain only the current platform's path separators. */ -extern OSGDB_EXPORT std::string convertFileNameToNativeStyle(const std::string& fileName); - -extern OSGDB_EXPORT bool equalCaseInsensitive(const std::string& lhs,const std::string& rhs); -extern OSGDB_EXPORT bool equalCaseInsensitive(const std::string& lhs,const char* rhs); - -extern OSGDB_EXPORT bool containsServerAddress(const std::string& filename); -extern OSGDB_EXPORT std::string getServerProtocol(const std::string& filename); -extern OSGDB_EXPORT std::string getServerAddress(const std::string& filename); -extern OSGDB_EXPORT std::string getServerFileName(const std::string& filename); - -/** Concatenates two paths */ -extern OSGDB_EXPORT std::string concatPaths(const std::string& left, const std::string& right); - -/** Removes .. and . dirs in a path */ -extern OSGDB_EXPORT std::string getRealPath(const std::string& path); - -/** Splits a path into elements between separators (including Windows' root, if any). */ -extern OSGDB_EXPORT void getPathElements(const std::string& path, std::vector & out_elements); - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/FileUtils b/libs/lib/mac32/include/osgDB/FileUtils deleted file mode 100644 index df90edbbd..000000000 --- a/libs/lib/mac32/include/osgDB/FileUtils +++ /dev/null @@ -1,137 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_FILEUTILS -#define OSGDB_FILEUTILS 1 - -#include - -#include -#include -#include -#include - -namespace osgDB { - -/** Overload of the standard fopen function. If OSG_USE_UTF8_FILENAME is defined, - * filename will be expanded from UTF8 to UTF16 and _wfopen will be called. */ -extern OSGDB_EXPORT FILE* fopen(const char* filename, const char* mode); - -/** Make a new directory. Returns true if directory exists or was created. */ -extern OSGDB_EXPORT bool makeDirectory( const std::string &directoryPath ); - -/** Make a new directory for a given file. */ -extern OSGDB_EXPORT bool makeDirectoryForFile( const std::string &filePath ); - -/** Get current working directory. */ -extern OSGDB_EXPORT std::string getCurrentWorkingDirectory( void ); - -/** Set current working directory. */ -extern OSGDB_EXPORT bool setCurrentWorkingDirectory( const std::string &newCurrentWorkingDirectory ); - - -/** return true if a file exists. */ -extern OSGDB_EXPORT bool fileExists(const std::string& filename); - -enum FileType -{ - FILE_NOT_FOUND, - REGULAR_FILE, - DIRECTORY -}; - -/** return type of file. */ -extern OSGDB_EXPORT FileType fileType(const std::string& filename); - -/** find specified file in specified file path.*/ -extern OSGDB_EXPORT std::string findFileInPath(const std::string& filename, const FilePathList& filePath,CaseSensitivity caseSensitivity=CASE_SENSITIVE); - -/** return the directory/filename of a file if its is contained within specified directory. - * return "" if directory does not contain file. If caseInsensitive is set to true then - * a case insensitive comparison is used to compare fileName to directory contents. - * This is useful when unix programs attempt read case insensitive windows filenames. - */ -extern OSGDB_EXPORT std::string findFileInDirectory(const std::string& fileName,const std::string& dirName,CaseSensitivity caseSensitivity=CASE_SENSITIVE); - -/** simple list of names to represent a directory's contents. */ -typedef std::vector DirectoryContents; - -/** Return the contents of a directory. - * Return value will contain filenames only, not absolute paths. - * Returns an empty array on any error.*/ -extern OSGDB_EXPORT DirectoryContents getDirectoryContents(const std::string& dirName); - -/** Return the list of filenames that match the given filename with wildcards. - * Will only expand '*', and will not expand wildcards in directory, only in - * filename part of the given filename. - * Return value will contain path+filename so that if ever the above - * limitation (expanding wildcards in directory) is fixed, client code will - * still work unchanged. */ -extern OSGDB_EXPORT DirectoryContents expandWildcardsInFilename(const std::string& filename); - -namespace FileOpResult { - enum Value - { - OK, /**< Operation done. */ - SOURCE_EQUALS_DESTINATION, /**< Operation is useless (source == destination). */ - BAD_ARGUMENT, - SOURCE_MISSING, /**< Source file doesn't exist. */ - SOURCE_NOT_OPENED, /**< Error opening source file. */ - DESTINATION_NOT_OPENED, /**< Error opening destination file. */ - READ_ERROR, - WRITE_ERROR - }; -} - -/** Copy a file to another location, overwriting if necessary. - * You must provide full path for both source and destination. - * \return true on success, or if source and destination are the same. - * \todo Replace the implementation with filesystem functions from TR2 when available. -*/ -extern OSGDB_EXPORT FileOpResult::Value copyFile(const std::string & source, const std::string & destination); - - - -inline void setDataFilePathList(const FilePathList& filepath) { osgDB::Registry::instance()->setDataFilePathList(filepath); } - -inline void setDataFilePathList(const std::string& paths) { osgDB::Registry::instance()->setDataFilePathList(paths); } - -inline FilePathList& getDataFilePathList() { return osgDB::Registry::instance()->getDataFilePathList(); } - -/** Search for specified file in file system, checking the DataFilePathList for possible paths, - * returning the full path of the first valid file found, return an empty string if no string is found. - */ -extern OSGDB_EXPORT std::string findDataFile(const std::string& filename,CaseSensitivity caseSensitivity=CASE_SENSITIVE); - -/** Search for specified file in file system, checking first the database path set in the Options structure, then the DataFilePathList for possible paths, - * returning the full path of the first valid file found, return an empty string if no string is found. - */ -extern OSGDB_EXPORT std::string findDataFile(const std::string& filename,const Options* options, CaseSensitivity caseSensitivity=CASE_SENSITIVE); - -inline void setLibraryFilePathList(const FilePathList& filepaths) { osgDB::Registry::instance()->setLibraryFilePathList(filepaths); } - -inline void setLibraryFilePathList(const std::string& paths) { osgDB::Registry::instance()->setLibraryFilePathList(paths); } - -inline FilePathList& getLibraryFilePathList() { return osgDB::Registry::instance()->getLibraryFilePathList(); } - -extern OSGDB_EXPORT std::string findLibraryFile(const std::string& filename,CaseSensitivity caseSensitivity=CASE_SENSITIVE); - -/** convert a string containing a list of paths delimited either with ';' (Windows) or ':' (All other platforms) into FilePath representation.*/ -extern OSGDB_EXPORT void convertStringPathIntoFilePathList(const std::string& paths,FilePathList& filepath); - -extern OSGDB_EXPORT void appendPlatformSpecificLibraryFilePaths(FilePathList& filepath); -extern OSGDB_EXPORT void appendPlatformSpecificResourceFilePaths(FilePathList& filepath); - -} // namespace osgDB - -#endif diff --git a/libs/lib/mac32/include/osgDB/ImageOptions b/libs/lib/mac32/include/osgDB/ImageOptions deleted file mode 100644 index 9bebec3a3..000000000 --- a/libs/lib/mac32/include/osgDB/ImageOptions +++ /dev/null @@ -1,149 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_IMAGEOPTIONS -#define OSGDB_IMAGEOPTIONS 1 - -#include - -namespace osgDB { - -class OSGDB_EXPORT ImageOptions : public osgDB::Options -{ - public: - - ImageOptions(); - - ImageOptions(const std::string& str); - - ImageOptions(const ImageOptions& options,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - osgDB::Options(options,copyop), - _sourceImageSamplingMode(options._sourceImageSamplingMode), - _sourceImageWindowMode(options._sourceImageWindowMode), - _sourceRatioWindow(options._sourceRatioWindow), - _sourcePixelWindow(options._sourcePixelWindow), - _destinationImage(options._destinationImage), - _destinationImageWindowMode(options._destinationImageWindowMode), - _destinationRatioWindow(options._destinationRatioWindow), - _destinationPixelWindow(options._destinationPixelWindow), - _destinationDataType(options._destinationDataType), - _destinationPixelFormat(options._destinationPixelFormat) {} - - - META_Object(osgDB,ImageOptions); - - /** RatioWindow stores the window (as ratios of 0.0 to 1.0) from the overall imagery from which to extract the osg::Image*/ - struct RatioWindow - { - RatioWindow(): - windowX(0.0), - windowY(0.0), - windowWidth(1.0), - windowHeight(1.0) {} - - void set(double x, double y, double w, double h) - { - windowX = x; - windowY = y; - windowWidth = w; - windowHeight = h; - } - - double windowX; - double windowY; - double windowWidth; - double windowHeight; - }; - - /** PixelWindow stores the window (in exact pixels) from the overall imagery from which to extract the osg::Image*/ - struct PixelWindow - { - PixelWindow(): - windowX(0), - windowY(0), - windowWidth(0), - windowHeight(0) {} - - void set(unsigned int x, unsigned int y, unsigned int w, unsigned int h) - { - windowX = x; - windowY = y; - windowWidth = w; - windowHeight = h; - } - - unsigned int windowX; - unsigned int windowY; - unsigned int windowWidth; - unsigned int windowHeight; - }; - - enum ImageWindowMode - { - ALL_IMAGE, - RATIO_WINDOW, - PIXEL_WINDOW - }; - - enum ImageSamplingMode - { - NEAREST, - LINEAR, - CUBIC - }; - - /** Used as UserData attached to generated osg::Image's*/ - struct TexCoordRange : public osg::Referenced - { - TexCoordRange(): - _x(0.0), - _y(0.0), - _w(1.0), - _h(1.0) {} - - void set(double x,double y, double w, double h) - { - _x = x; - _y = y; - _w = w; - _h = h; - } - - double _x,_y,_w,_h; - }; - - - // source - ImageSamplingMode _sourceImageSamplingMode; - ImageWindowMode _sourceImageWindowMode; - RatioWindow _sourceRatioWindow; - PixelWindow _sourcePixelWindow; - - // destination - osg::ref_ptr _destinationImage; - - ImageWindowMode _destinationImageWindowMode; - RatioWindow _destinationRatioWindow; - PixelWindow _destinationPixelWindow; - - GLenum _destinationDataType; - GLenum _destinationPixelFormat; - - void init(); - -}; - - -} - -#endif // OSGDB_IMAGEOPTIONS diff --git a/libs/lib/mac32/include/osgDB/ImagePager b/libs/lib/mac32/include/osgDB/ImagePager deleted file mode 100644 index 102ea70cc..000000000 --- a/libs/lib/mac32/include/osgDB/ImagePager +++ /dev/null @@ -1,175 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_IMAGEPAGER -#define OSGDB_IMAGEPAGER 1 - -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace osgDB -{ - -class OSGDB_EXPORT ImagePager : public osg::NodeVisitor::ImageRequestHandler -{ - public: - - ImagePager(); - - class OSGDB_EXPORT ImageThread : public osg::Referenced, public OpenThreads::Thread - { - public: - - enum Mode - { - HANDLE_ALL_REQUESTS, - HANDLE_NON_HTTP, - HANDLE_ONLY_HTTP - }; - - ImageThread(ImagePager* pager, Mode mode, const std::string& name); - - ImageThread(const ImageThread& dt, ImagePager* pager); - - void setDone(bool done) { _done = done; } - bool getDone() const { return _done; } - - virtual int cancel(); - - virtual void run(); - - protected: - - virtual ~ImageThread(); - - bool _done; - Mode _mode; - ImagePager* _pager; - std::string _name; - }; - - - ImageThread* getImageThread(unsigned int i) { return _imageThreads[i].get(); } - - const ImageThread* getImageThread(unsigned int i) const { return _imageThreads[i].get(); } - - unsigned int getNumImageThreads() const { return _imageThreads.size(); } - - - void setPreLoadTime(double preLoadTime) { _preLoadTime=preLoadTime; } - virtual double getPreLoadTime() const { return _preLoadTime; } - - virtual osg::Image* readImageFile(const std::string& fileName); - - virtual void requestImageFile(const std::string& fileName,osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* framestamp); - - - /** Return true if there are pending updates to the scene graph that require a call to updateSceneGraph(double). */ - virtual bool requiresUpdateSceneGraph() const; - - /** Merge the changes to the scene graph. */ - virtual void updateSceneGraph(const osg::FrameStamp &frameStamp); - - int cancel(); - - protected: - - virtual ~ImagePager(); - // forward declare - struct RequestQueue; - - struct SortFileRequestFunctor; - friend struct SortFileRequestFunctor; - - struct ImageRequest : public osg::Referenced - { - ImageRequest(): - osg::Referenced(true), - _timeToMergeBy(0.0), - _attachmentIndex(-1) {} - - double _timeToMergeBy; - std::string _fileName; - osg::ref_ptr _loadOptions; - osg::observer_ptr _attachmentPoint; - int _attachmentIndex; - osg::ref_ptr _loadedImage; - RequestQueue* _requestQueue; - - }; - - struct RequestQueue : public osg::Referenced - { - typedef std::vector< osg::ref_ptr > RequestList; - - void sort(); - - RequestList _requestList; - OpenThreads::Mutex _requestMutex; - }; - - - struct ReadQueue : public RequestQueue - { - ReadQueue(ImagePager* pager, const std::string& name); - - void block() { _block->block(); } - - void release() { _block->release(); } - - void updateBlock() - { - _block->set((!_requestList.empty() || !_pager->_databasePagerThreadPaused)); - } - - void clear(); - - void add(ImageRequest* imageRequest); - - void takeFirst(osg::ref_ptr& databaseRequest); - - osg::ref_ptr _block; - - ImagePager* _pager; - std::string _name; - }; - - OpenThreads::Mutex _run_mutex; - bool _startThreadCalled; - - bool _done; - bool _databasePagerThreadPaused; - - osg::ref_ptr _readQueue; - - typedef std::vector< osg::ref_ptr > ImageThreads; - ImageThreads _imageThreads; - - osg::ref_ptr _completedQueue; - - double _preLoadTime; -}; - - -} - -#endif - diff --git a/libs/lib/mac32/include/osgDB/ImageProcessor b/libs/lib/mac32/include/osgDB/ImageProcessor deleted file mode 100644 index 2536b030b..000000000 --- a/libs/lib/mac32/include/osgDB/ImageProcessor +++ /dev/null @@ -1,54 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_IMAGEPROCESSOR -#define OSGDB_IMAGEPROCESSOR 1 - -#include - -namespace osgDB { - -class ImageProcessor : public osg::Object -{ - public: - - ImageProcessor(): - osg::Object(true) {} - - ImageProcessor(const ImageProcessor& rw,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - osg::Object(rw,copyop) {} - - virtual ~ImageProcessor() {} - - META_Object(osgDB,ImageProcessor); - - enum CompressionMethod - { - USE_CPU, /// Use CPU for compression even when GPU compression is available - USE_GPU /// Use GPU for compression when available (i.e CUDA), otherwise fallback to CPU - }; - - enum CompressionQuality - { - FASTEST, - NORMAL, - PRODUCTION, - HIGHEST - }; - - virtual void compress(osg::Image& /*image*/, osg::Texture::InternalFormatMode /*compressedFormat*/, bool /*generateMipMap*/, bool /*resizeToPowerOfTwo*/, CompressionMethod /*method*/, CompressionQuality /*quality*/) {} - virtual void generateMipMap(osg::Image& /*image*/, bool /*resizeToPowerOfTwo*/, CompressionMethod /*method*/) {} -}; - -} -#endif diff --git a/libs/lib/mac32/include/osgDB/Input b/libs/lib/mac32/include/osgDB/Input deleted file mode 100644 index 2337c15e3..000000000 --- a/libs/lib/mac32/include/osgDB/Input +++ /dev/null @@ -1,306 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_INPUT -#define OSGDB_INPUT 1 - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -namespace osgDB { - -struct basic_type_wrapper; - -/** deprecated. */ -class OSGDB_EXPORT Field -{ - public: - - enum { - MIN_CACHE_SIZE = 256 - }; - - Field(); - Field(const Field& field); - virtual ~Field(); - - virtual Field& operator = (const Field& ic); - - void reset(); - void addChar(char c); - int getNoCharacters() const { return _fieldCacheSize; } - - void setWithinQuotes(bool withinQuotes=true); - bool getWithinQuotes(); - - void setNoNestedBrackets(int no); - int getNoNestedBrackets(); - - enum FieldType - { - OPEN_BRACKET, - CLOSE_BRACKET, - STRING, - WORD, - REAL, - INTEGER, - BLANK, - UNINITIALISED - }; - - FieldType getFieldType() const; - - bool isValid() const; - - bool isOpenBracket() const; - bool isCloseBracket() const; - - bool isWord() const; - bool matchWord(const char* str) const; - bool matchWord(const char* str,int noCharacters) const; - - bool isString() const; - bool matchString(const char* str) const; - bool matchString(const char* str,int noCharacters) const; - bool isQuotedString() const; - - const char* getStr() const; - char* takeStr(); - - bool isInt() const; - bool matchInt(int i) const; - bool getInt(int& i) const; - - bool isUInt() const; - bool matchUInt(unsigned int i) const; - bool getUInt(unsigned int& i) const; - - bool isFloat() const; - bool matchFloat(float f) const; - bool getFloat(float& f) const; - bool getFloat(double& f) const; - - static FieldType calculateFieldType(const char* str,bool withinQuotes=false); - - protected: - - void _init(); - void _free(); - void _copy(const Field& ic); - - int _fieldCacheCapacity; - int _fieldCacheSize; - char* _fieldCache; - - mutable FieldType _fieldType; - - bool _withinQuotes; - - int _noNestedBrackets; - -}; - -/** deprecated. */ -class OSGDB_EXPORT FieldReader -{ - public: - - FieldReader(); - FieldReader(const FieldReader& ic); - virtual ~FieldReader(); - - virtual FieldReader& operator = (const FieldReader& ic); - - void attach(std::istream* input); - void detach(); - - virtual bool eof() const; - - bool readField(Field& fieldPtr); - void ignoreField(); - - /** no of unmatched `{' encountered so far in file*/ - int getNoNestedBrackets() const; - - private: - - bool _readField(Field* fieldPtr); - - void _init(); - void _free(); - void _copy(const FieldReader& ic); - - std::istream* _fin; - bool _eof; - - bool findStartOfNextField(); - - int _noNestedBrackets; - - bool _delimiterEatLookUp[256]; - bool _delimiterKeepLookUp[256]; - -}; - -/** deprecated. */ -class OSGDB_EXPORT FieldReaderIterator -{ - public: - - enum { - MINIMUM_FIELD_READER_QUEUE_SIZE = 10 - }; - - FieldReaderIterator(); - FieldReaderIterator(const FieldReaderIterator& ic); - virtual ~FieldReaderIterator(); - - FieldReaderIterator& operator = (const FieldReaderIterator& ic); - - void attach(std::istream* input); - void detach(); - - virtual bool eof() const; - - FieldReader& getFieldReader() { return _reader; } - - void insert(int pos,Field* field); - void insert(int pos,const char* str); - - Field& operator [] (int pos); - Field& field (int pos); - - FieldReaderIterator& operator ++ (); - FieldReaderIterator& operator += (int no); - - /** increments the iterator of the next simple field or - * whole block if the current field[0] is an open bracket */ - void advanceOverCurrentFieldOrBlock(); - void advanceToEndOfCurrentBlock(); - void advanceToEndOfBlock(int noNestBrackets); - - bool matchSequence(const char* str); - - bool readSequence(const char* keyword,std::string& value); - bool readSequence(const char* keyword,unsigned int& value); - bool readSequence(const char* keyword,int& value); - bool readSequence(const char* keyword,float& value); - bool readSequence(const char* keyword,osg::Vec2f& value); - bool readSequence(const char* keyword,osg::Vec3f& value); - bool readSequence(const char* keyword,osg::Vec4f& value); - bool readSequence(const char* keyword,osg::Vec2d& value); - bool readSequence(const char* keyword,osg::Vec3d& value); - bool readSequence(const char* keyword,osg::Vec4d& value); - - bool readSequence(std::string& value); - bool readSequence(unsigned int& value); - bool readSequence(int& value); - bool readSequence(float& value); - bool readSequence(osg::Vec2f& value); - bool readSequence(osg::Vec3f& value); - bool readSequence(osg::Vec4f& value); - bool readSequence(osg::Vec2d& value); - bool readSequence(osg::Vec3d& value); - bool readSequence(osg::Vec4d& value); - - private: - - void _init(); - void _free(); - void _copy(const FieldReaderIterator& ic); - - FieldReader _reader; - - Field _blank; - - Field* _previousField; - - Field** _fieldQueue; - int _fieldQueueSize; - int _fieldQueueCapacity; - -}; - -/** deprecated. */ -class OSGDB_EXPORT Input : public FieldReaderIterator -{ - public: - - Input(); - virtual ~Input(); - - void setOptions(const Options* options) { _options = options; } - const Options* getOptions() const { return _options.get(); } - - virtual osg::Object* readObjectOfType(const osg::Object& compObj); - virtual osg::Object* readObjectOfType(const basic_type_wrapper &btw); - - virtual osg::Object* readObject(); - virtual osg::Image* readImage(); - virtual osg::Drawable* readDrawable(); - virtual osg::StateAttribute* readStateAttribute(); - virtual osg::Uniform* readUniform(); - virtual osg::Node* readNode(); - virtual osg::Shader* readShader(); - - virtual osg::Object* readObject(const std::string& fileName); - virtual osg::Image* readImage(const std::string& fileName); - virtual osg::Node* readNode(const std::string& fileName); - virtual osg::Shader* readShader(const std::string& fileName); - - virtual osg::Object* getObjectForUniqueID(const std::string& uniqueID); - virtual void registerUniqueIDForObject(const std::string& uniqueID,osg::Object* obj); - - typedef osg::ArgumentParser::Parameter Parameter; - - bool read(Parameter value1); - bool read(Parameter value1, Parameter value2); - bool read(Parameter value1, Parameter value2, Parameter value3); - bool read(Parameter value1, Parameter value2, Parameter value3, Parameter value4); - bool read(Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5); - bool read(Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6); - bool read(Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6, Parameter value7); - bool read(Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6, Parameter value7, Parameter value8); - - bool read(const char* str); - bool read(const char* str, Parameter value1); - bool read(const char* str, Parameter value1, Parameter value2); - bool read(const char* str, Parameter value1, Parameter value2, Parameter value3); - bool read(const char* str, Parameter value1, Parameter value2, Parameter value3, Parameter value4); - bool read(const char* str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5); - bool read(const char* str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6); - bool read(const char* str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6, Parameter value7); - bool read(const char* str, Parameter value1, Parameter value2, Parameter value3, Parameter value4, Parameter value5, Parameter value6, Parameter value7, Parameter value8); - - private: - - typedef std::map< std::string, osg::ref_ptr > UniqueIDToObjectMapping; - UniqueIDToObjectMapping _uniqueIDToObjectMap; - - osg::ref_ptr _options; - -}; - -} - -#endif // __SG_INPUT_H diff --git a/libs/lib/mac32/include/osgDB/InputStream b/libs/lib/mac32/include/osgDB/InputStream deleted file mode 100644 index af431f46c..000000000 --- a/libs/lib/mac32/include/osgDB/InputStream +++ /dev/null @@ -1,196 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGDB_INPUTSTREAM -#define OSGDB_INPUTSTREAM - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace osgDB -{ - -class InputException : public osg::Referenced -{ -public: - InputException( const std::vector& fields, const std::string& err ) : _error(err) - { - for ( unsigned int i=0; i > ArrayMap; - typedef std::map< unsigned int, osg::ref_ptr > IdentifierMap; - - enum ReadType - { - READ_UNKNOWN = 0, - READ_SCENE, - READ_IMAGE, - READ_OBJECT - }; - - InputStream( const osgDB::Options* options ); - virtual ~InputStream(); - - bool isBinary() const { return _in->isBinary(); } - int getFileVersion() const { return _fileVersion; } - const osgDB::Options* getOptions() const { return _options.get(); } - - // Serialization related functions - InputStream& operator>>( bool& b ) { _in->readBool(b); checkStream(); return *this; } - InputStream& operator>>( char& c ) { _in->readChar(c); checkStream(); return *this; } - InputStream& operator>>( signed char& c ) { _in->readSChar(c); checkStream(); return *this; } - InputStream& operator>>( unsigned char& c ) { _in->readUChar(c); checkStream(); return *this; } - InputStream& operator>>( short& s ) { _in->readShort(s); checkStream(); return *this; } - InputStream& operator>>( unsigned short& s ) { _in->readUShort(s); checkStream(); return *this; } - InputStream& operator>>( int& i ) { _in->readInt(i); checkStream(); return *this; } - InputStream& operator>>( unsigned int& i ) { _in->readUInt(i); checkStream(); return *this; } - InputStream& operator>>( long& l ) { _in->readLong(l); checkStream(); return *this; } - InputStream& operator>>( unsigned long& l ) { _in->readULong(l); checkStream(); return *this; } - InputStream& operator>>( float& f ) { _in->readFloat(f); checkStream(); return *this; } - InputStream& operator>>( double& d ) { _in->readDouble(d); checkStream(); return *this; } - InputStream& operator>>( std::string& s ) { _in->readString(s); checkStream(); return *this; } - InputStream& operator>>( std::istream& (*fn)(std::istream&) ) { _in->readStream(fn); checkStream(); return *this; } - InputStream& operator>>( std::ios_base& (*fn)(std::ios_base&) ) { _in->readBase(fn); checkStream(); return *this; } - - InputStream& operator>>( ObjectGLenum& value ) { _in->readGLenum(value); checkStream(); return *this; } - InputStream& operator>>( ObjectProperty& prop ) { _in->readProperty(prop); checkStream(); return *this; } - InputStream& operator>>( ObjectMark& mark ) { _in->readMark(mark); checkStream(); return *this; } - - InputStream& operator>>( osg::Vec2b& v ); - InputStream& operator>>( osg::Vec3b& v ); - InputStream& operator>>( osg::Vec4b& v ); - InputStream& operator>>( osg::Vec4ub& v ); - InputStream& operator>>( osg::Vec2s& v ); - InputStream& operator>>( osg::Vec3s& v ); - InputStream& operator>>( osg::Vec4s& v ); - InputStream& operator>>( osg::Vec2f& v ); - InputStream& operator>>( osg::Vec3f& v ); - InputStream& operator>>( osg::Vec4f& v ); - InputStream& operator>>( osg::Vec2d& v ); - InputStream& operator>>( osg::Vec3d& v ); - InputStream& operator>>( osg::Vec4d& v ); - InputStream& operator>>( osg::Quat& q ); - InputStream& operator>>( osg::Plane& p ); - InputStream& operator>>( osg::Matrixf& mat ); - InputStream& operator>>( osg::Matrixd& mat ); - - InputStream& operator>>( osg::Array*& a ) { a = readArray(); return *this; } - InputStream& operator>>( osg::Image*& img ) { img = readImage(); return *this; } - InputStream& operator>>( osg::PrimitiveSet*& p ) { p = readPrimitiveSet(); return *this; } - InputStream& operator>>( osg::Object*& obj ) { obj = readObject(); return *this; } - - InputStream& operator>>( osg::ref_ptr& ptr ) { ptr = readArray(); return *this; } - InputStream& operator>>( osg::ref_ptr& ptr ) { ptr = readImage(); return *this; } - InputStream& operator>>( osg::ref_ptr& ptr ) { ptr = readPrimitiveSet(); return *this; } - - template InputStream& operator>>( osg::ref_ptr& ptr ) - { ptr = static_cast(readObject()); return *this; } - - // Convenient methods for reading - bool matchString( const std::string& str ) { return _in->matchString(str); } - void advanceToCurrentEndBracket() { _in->advanceToCurrentEndBracket(); } - void readWrappedString( std::string& str ) { _in->readWrappedString(str); checkStream(); } - void readCharArray( char* s, unsigned int size ) { _in->readCharArray(s, size); } - - // readSize() use unsigned int for all sizes. - unsigned int readSize() { unsigned int size; *this>>size; return size; } - - // Global reading functions - osg::Array* readArray(); - osg::PrimitiveSet* readPrimitiveSet(); - osg::Image* readImage(bool readFromExternal=true); - osg::Object* readObject( osg::Object* existingObj=0 ); - osg::Object* readObjectFields( const std::string& className, osg::Object* existingObj=0); - - /// set an input iterator, used directly when not using InputStream with a traditional file releated stream. - void setInputIterator( InputIterator* ii ) { _in = ii; } - - /// start reading from InputStream treating it as a traditional file releated stream, handles headers and versioning - ReadType start( InputIterator* ); - - void decompress(); - - // Schema handlers - void readSchema( std::istream& fin ); - void resetSchema(); - - // Exception handlers - inline void throwException( const std::string& msg ); - const InputException* getException() const { return _exception.get(); } - -protected: - inline void checkStream(); - void setWrapperSchema( const std::string& name, const std::string& properties ); - - template - void readArrayImplementation( T* a, int read_size, bool useByteSwap=false ); - - ArrayMap _arrayMap; - IdentifierMap _identifierMap; - - int _fileVersion; - int _byteSwap; - bool _useSchemaData; - bool _forceReadingImage; - std::vector _fields; - osg::ref_ptr _in; - osg::ref_ptr _exception; - osg::ref_ptr _options; - - // store here to avoid a new and a leak in InputStream::decompress - std::stringstream* _dataDecompress; -}; - -void InputStream::throwException( const std::string& msg ) -{ - _exception = new InputException(_fields, msg); -} - -void InputStream::checkStream() -{ - _in->checkStream(); - if ( _in->isFailed() ) - throwException( "InputStream: Failed to read from stream." ); -} - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/ObjectWrapper b/libs/lib/mac32/include/osgDB/ObjectWrapper deleted file mode 100644 index 1403a8d93..000000000 --- a/libs/lib/mac32/include/osgDB/ObjectWrapper +++ /dev/null @@ -1,181 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGDB_OBJECTWRAPPER -#define OSGDB_OBJECTWRAPPER - -#include - -namespace osgDB -{ - -typedef std::vector StringList; -extern OSGDB_EXPORT void split( const std::string& src, StringList& list, char separator=' ' ); - -class OSGDB_EXPORT BaseCompressor : public osg::Referenced -{ -public: - BaseCompressor() {} - void setName( const std::string& name ) { _name = name; } - const std::string& getName() const { return _name; } - - virtual bool compress( std::ostream&, const std::string& ) = 0; - virtual bool decompress( std::istream&, std::string& ) = 0; - -protected: - std::string _name; -}; - -struct FinishedObjectReadCallback : public osg::Referenced -{ - virtual void objectRead(osgDB::InputStream& is, osg::Object& obj) = 0; -}; - -class OSGDB_EXPORT ObjectWrapper : public osg::Referenced -{ -public: - typedef std::vector< osg::ref_ptr > SerializerList; - typedef std::vector< osg::ref_ptr > FinishedObjectReadCallbackList; - - ObjectWrapper( osg::Object* proto, const std::string& name, - const std::string& associates ); - void setUpdatedVersion( int ver ) { _version = ver; } - - const osg::Object* getProto() const { return _proto.get(); } - const std::string& getName() const { return _name; } - const StringList& getAssociates() const { return _associates; } - - void addSerializer( BaseSerializer* s, BaseSerializer::Type t=BaseSerializer::RW_UNDEFINED ); - void markSerializerAsRemoved( const std::string& name ); - BaseSerializer* getSerializer( const std::string& name ); - void addFinishedObjectReadCallback ( FinishedObjectReadCallback* forc) { _finishedObjectReadCallbacks.push_back(forc); } - - bool read( InputStream&, osg::Object& ); - bool write( OutputStream&, const osg::Object& ); - - bool readSchema( const StringList& properties, const std::vector& types ); - void writeSchema( StringList& properties, std::vector& types ); - void resetSchema() - { if ( _backupSerializers.size()>0 ) _serializers = _backupSerializers; } - -protected: - ObjectWrapper() : _version(0) {} - virtual ~ObjectWrapper() {} - - osg::ref_ptr _proto; - std::string _name; - StringList _associates; - SerializerList _serializers; - SerializerList _backupSerializers; - std::vector _typeList; - FinishedObjectReadCallbackList _finishedObjectReadCallbacks; - int _version; // Last updated version of the wrapper -}; - -class Registry; - -class OSGDB_EXPORT ObjectWrapperManager : public osg::Referenced -{ -public: - - // Wrapper handlers - void addWrapper( ObjectWrapper* wrapper ); - void removeWrapper( ObjectWrapper* wrapper ); - ObjectWrapper* findWrapper( const std::string& name ); - - typedef std::map< std::string, osg::ref_ptr > WrapperMap; - WrapperMap& getWrapperMap() { return _wrappers; } - const WrapperMap& getWrapperMap() const { return _wrappers; } - - // Compressor handlers - void addCompressor( BaseCompressor* compressor ); - void removeCompressor( BaseCompressor* compressor ); - BaseCompressor* findCompressor( const std::string& name ); - - typedef std::map< std::string, osg::ref_ptr > CompressorMap; - CompressorMap& getCompressorMap() { return _compressors; } - const CompressorMap& getCompressorMap() const { return _compressors; } - - typedef std::map IntLookupMap; - IntLookup::Value getValue( const std::string& group, const std::string& str ) { return findLookup(group).getValue(str.c_str()); } - const std::string& getString( const std::string& group, IntLookup::Value value ) { return findLookup(group).getString(value); } - -protected: - - friend class osgDB::Registry; - - ObjectWrapperManager(); - virtual ~ObjectWrapperManager(); - - WrapperMap _wrappers; - CompressorMap _compressors; - - IntLookup& findLookup( const std::string& group ) - { - IntLookupMap::iterator itr = _globalMap.find(group); - if ( itr!=_globalMap.end() ) return itr->second; - else return _globalMap["GL"]; - } - - IntLookupMap _globalMap; -}; - - -class OSGDB_EXPORT RegisterWrapperProxy -{ -public: - typedef void (*AddPropFunc)( ObjectWrapper* ); - - RegisterWrapperProxy( osg::Object* proto, const std::string& name, - const std::string& associates, AddPropFunc func ); - - virtual ~RegisterWrapperProxy(); - -protected: - osg::ref_ptr _wrapper; -}; - -#define REGISTER_OBJECT_WRAPPER(NAME, PROTO, CLASS, ASSOCIATES) \ - extern "C" void wrapper_serializer_##NAME(void) {} \ - extern void wrapper_propfunc_##NAME(osgDB::ObjectWrapper*); \ - static osgDB::RegisterWrapperProxy wrapper_proxy_##NAME( \ - PROTO, #CLASS, ASSOCIATES, &wrapper_propfunc_##NAME); \ - typedef CLASS MyClass; \ - void wrapper_propfunc_##NAME(osgDB::ObjectWrapper* wrapper) - -#define REGISTER_OBJECT_WRAPPER2(NAME, PROTO, CLASS, CLASSNAME, ASSOCIATES) \ - extern "C" void wrapper_serializer_##NAME(void) {} \ - extern void wrapper_propfunc_##NAME(osgDB::ObjectWrapper*); \ - static osgDB::RegisterWrapperProxy wrapper_proxy_##NAME( \ - PROTO, CLASSNAME, ASSOCIATES, &wrapper_propfunc_##NAME); \ - typedef CLASS MyClass; \ - void wrapper_propfunc_##NAME(osgDB::ObjectWrapper* wrapper) - -class OSGDB_EXPORT RegisterCompressorProxy -{ -public: - RegisterCompressorProxy( const std::string& name, BaseCompressor* compressor ); - ~RegisterCompressorProxy(); - -protected: - osg::ref_ptr _compressor; -}; - -#define REGISTER_COMPRESSOR(NAME, CLASS) \ - extern "C" void wrapper_compressor_##CLASS(void) {} \ - static osgDB::RegisterCompressorProxy compressor_proxy_##CLASS(NAME, new CLASS); - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/Options b/libs/lib/mac32/include/osgDB/Options deleted file mode 100644 index a216cf8c4..000000000 --- a/libs/lib/mac32/include/osgDB/Options +++ /dev/null @@ -1,273 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_OPTIONS -#define OSGDB_OPTIONS 1 - -#include -#include - -#include -#include -#include - -namespace osgDB { - - -/** Options base class used for passing options into plugins to control their operation.*/ -class OSGDB_EXPORT Options : public osg::Object -{ - public: - - /// bit mask for setting up which object types get cached by readObject/Image/HeightField/Node(filename) calls - enum CacheHintOptions - { /// do not cache objects of any type - CACHE_NONE = 0, - - /// cache nodes loaded via readNode(filename) - CACHE_NODES = 1<<0, - - /// cache images loaded via readImage(filename) - CACHE_IMAGES = 1<<1, - - /// cache heightfield loaded via readHeightField(filename) - CACHE_HEIGHTFIELDS = 1<<2, - - /// cache heightfield loaded via readHeightField(filename) - CACHE_ARCHIVES = 1<<3, - - /// cache objects loaded via readObject(filename) - CACHE_OBJECTS = 1<<4, - - /// cache shaders loaded via readShader(filename) - CACHE_SHADERS = 1<<5, - - /// cache on all read*(filename) calls - CACHE_ALL = CACHE_NODES | - CACHE_IMAGES | - CACHE_HEIGHTFIELDS | - CACHE_ARCHIVES | - CACHE_OBJECTS | - CACHE_SHADERS - }; - - /// Bit mask for which geometry attributes should be imported with double precision where source data is held in double precision - /// This is useful for data that will be pre-processed before rendering. - /// In general the geometry should be converted to floating point before rendering to ensure good performance. - enum PrecisionHint - { - FLOAT_PRECISION_ALL = 0, - - DOUBLE_PRECISION_VERTEX = 1<<0, - DOUBLE_PRECISION_NORMAL = 1<<1, - DOUBLE_PRECISION_COLOR = 1<<2, - DOUBLE_PRECISION_SECONDARY_COLOR = 1<<3, - DOUBLE_PRECISION_FOG_COORD = 1<<4, - DOUBLE_PRECISION_TEX_COORD = 1<<5, - DOUBLE_PRECISION_VERTEX_ATTRIB = 1<<6, - - DOUBLE_PRECISION_ALL = DOUBLE_PRECISION_VERTEX | - DOUBLE_PRECISION_NORMAL | - DOUBLE_PRECISION_COLOR | - DOUBLE_PRECISION_SECONDARY_COLOR | - DOUBLE_PRECISION_FOG_COORD | - DOUBLE_PRECISION_TEX_COORD | - DOUBLE_PRECISION_VERTEX_ATTRIB - }; - - /// range of options of whether to build kdtrees automatically on loading - enum BuildKdTreesHint - { - NO_PREFERENCE, - DO_NOT_BUILD_KDTREES, - BUILD_KDTREES - }; - - - Options(): - osg::Object(true), - _objectCacheHint(CACHE_ARCHIVES), - _precisionHint(FLOAT_PRECISION_ALL), - _buildKdTreesHint(NO_PREFERENCE) {} - - Options(const std::string& str): - osg::Object(true), - _str(str), - _objectCacheHint(CACHE_ARCHIVES), - _precisionHint(FLOAT_PRECISION_ALL), - _buildKdTreesHint(NO_PREFERENCE) - { - parsePluginStringData(str); - } - - Options(const Options& options,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgDB,Options); - - Options* cloneOptions(const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) const { return static_cast(clone(copyop)); } - - /** Set the general Options string.*/ - void setOptionString(const std::string& str) { _str = str; parsePluginStringData(str); } - - /** Get the general Options string.*/ - const std::string& getOptionString() const { return _str; } - - /** Set the database path to use a hint of where to look when loading models.*/ - void setDatabasePath(const std::string& str) { _databasePaths.clear(); _databasePaths.push_back(str); } - - /** Get the database path which is used a hint of where to look when loading models.*/ - FilePathList& getDatabasePathList() { return _databasePaths; } - - /** Get the const database path which is used a hint of where to look when loading models.*/ - const FilePathList& getDatabasePathList() const { return _databasePaths; } - - - /** Set whether the Registry::ObjectCache should be used by default.*/ - void setObjectCacheHint(CacheHintOptions useObjectCache) { _objectCacheHint = useObjectCache; } - - /** Get whether the Registry::ObjectCache should be used by default.*/ - CacheHintOptions getObjectCacheHint() const { return _objectCacheHint; } - - /** Set which geometry attributes plugins should import at double precision. */ - void setPrecisionHint(PrecisionHint hint) { _precisionHint = hint; } - - /** Get which geometry attributes plugins should import at double precision. */ - PrecisionHint getPrecisionHint() const { return _precisionHint; } - - /** Set whether the KdTrees should be built for geometry in the loader model. */ - void setBuildKdTreesHint(BuildKdTreesHint hint) { _buildKdTreesHint = hint; } - - /** Get whether the KdTrees should be built for geometry in the loader model. */ - BuildKdTreesHint getBuildKdTreesHint() const { return _buildKdTreesHint; } - - - /** Set the password map to be used by plugins when access files from secure locations.*/ - void setAuthenticationMap(AuthenticationMap* authenticationMap) { _authenticationMap = authenticationMap; } - - /** Get the password map to be used by plugins when access files from secure locations.*/ - const AuthenticationMap* getAuthenticationMap() const { return _authenticationMap.get(); } - - - /** Sets a plugindata value PluginData with a string */ - void setPluginData(const std::string& s, void* v) const { _pluginData[s] = v; } - - /** Get a value from the PluginData */ - void* getPluginData(const std::string& s) { return _pluginData[s]; } - - /** Get a value from the PluginData */ - const void* getPluginData(const std::string& s) const - { - PluginDataMap::const_iterator itr = _pluginData.find(s); - return (itr == _pluginData.end()) ? 0 : itr->second; - } - - /** Remove a value from the PluginData */ - void removePluginData(const std::string& s) const { _pluginData.erase(s); } - - /** Get number of PluginData values */ - unsigned int getNumPluginData() const { return _pluginData.size(); } - - - /** Sets a plugindata value PluginData with a string */ - void setPluginStringData(const std::string& s, const std::string& v) const { _pluginStringData[s] = v; } - - /** Get a string from the PluginStrData */ - std::string& getPluginStringData(const std::string& s) { return _pluginStringData[s]; } - - /** Get a value from the PluginData */ - const std::string getPluginStringData(const std::string& s) const - { - PluginStringDataMap::const_iterator itr = _pluginStringData.find(s); - return (itr == _pluginStringData.end()) ? std::string("") : itr->second; - } - - /** Remove a value from the PluginData */ - void removePluginStringData(const std::string& s) const { _pluginStringData.erase(s); } - - /** Get number of PluginStrData values */ - unsigned int getNumPluginStringData() const { return _pluginStringData.size(); } - - /** Parse string into plugin string data. This will be automatically done in Options(const std::string&) */ - void parsePluginStringData(const std::string& str, char separator1=' ', char separator2='='); - - - /** Set the find callback to use in place of the default findFile calls.*/ - void setFindFileCallback( FindFileCallback* cb) { _findFileCallback = cb; } - - /** Get the const findFile callback.*/ - FindFileCallback* getFindFileCallback() const { return _findFileCallback.get(); } - - - /** Set the read callback to use in place of the default readFile calls.*/ - void setReadFileCallback( ReadFileCallback* cb) { _readFileCallback = cb; } - - /** Get the const readFile callback.*/ - ReadFileCallback* getReadFileCallback() const { return _readFileCallback.get(); } - - - /** Set the callback to use in place of the default writeFile calls.*/ - void setWriteFileCallback( WriteFileCallback* cb) { _writeFileCallback = cb; } - - /** Get the const writeFile callback.*/ - WriteFileCallback* getWriteFileCallback() const { return _writeFileCallback.get(); } - - - /** Set the callback to use inform the DatabasePager whether a file is located on local or remote file system.*/ - void setFileLocationCallback( FileLocationCallback* cb) { _fileLocationCallback = cb; } - - /** Get the callback to use inform the DatabasePager whether a file is located on local or remote file system.*/ - FileLocationCallback* getFileLocationCallback() const { return _fileLocationCallback.get(); } - - /** Set the FileCache that is used to manage local storage of files downloaded from the internet.*/ - void setFileCache(FileCache* fileCache) { _fileCache = fileCache; } - - /** Get the FileCache that is used to manage local storage of files downloaded from the internet.*/ - FileCache* getFileCache() const { return _fileCache.get(); } - - - /** Set the terrain observer_ptr, use to decorate any osgTerrain subgraphs.*/ - void setTerrain(osg::observer_ptr& terrain) { _terrain = terrain; } - - /** Get the terrain observer_ptr, use to decorate any osgTerrain subgraphs.*/ - const osg::observer_ptr& getTerrain() const { return _terrain; } - - - protected: - - virtual ~Options() {} - - std::string _str; - FilePathList _databasePaths; - CacheHintOptions _objectCacheHint; - PrecisionHint _precisionHint; - BuildKdTreesHint _buildKdTreesHint; - osg::ref_ptr _authenticationMap; - - typedef std::map PluginDataMap; - mutable PluginDataMap _pluginData; - typedef std::map PluginStringDataMap; - mutable PluginStringDataMap _pluginStringData; - - osg::ref_ptr _findFileCallback; - osg::ref_ptr _readFileCallback; - osg::ref_ptr _writeFileCallback; - osg::ref_ptr _fileLocationCallback; - - osg::ref_ptr _fileCache; - - osg::observer_ptr _terrain; -}; - -} - -#endif // OSGDB_OPTIONS diff --git a/libs/lib/mac32/include/osgDB/Output b/libs/lib/mac32/include/osgDB/Output deleted file mode 100644 index a0b9e10e5..000000000 --- a/libs/lib/mac32/include/osgDB/Output +++ /dev/null @@ -1,141 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_OUTPUT -#define OSGDB_OUTPUT 1 - -#include - -#include -#include - -#include -#include - -namespace osgDB { - -/** deprecated. */ -class OSGDB_EXPORT Output : public osgDB::ofstream -{ - public: - - Output(); - Output(const char* name); - - virtual ~Output(); - - - void setOptions(const Options* options); - const Options* getOptions() const { return _options.get(); } - - void setWriteOutDefaultValues(bool flag) { _writeOutDefaultValues = flag; } - bool getWriteOutDefaultValues() const { return _writeOutDefaultValues; } - - void open(const char *name); - - // comment out temporarily to avoid compilation problems, RO Jan 2002. - // void open(const char *name,int mode); - - Output& indent(); - - /** wrap a string with "" quotes and use \" for any internal quotes.*/ - std::string wrapString(const char* str); - - /** wrap a string with "" quotes and use \" for any internal quotes.*/ - std::string wrapString(const std::string& str); - - inline void setIndentStep(int step) { _indentStep = step; } - inline int getIndentStep() const { return _indentStep; } - - inline void setIndent(int indent) { _indent = indent; } - inline int getIndent() const { return _indent; } - - inline void setNumIndicesPerLine(int num) { _numIndicesPerLine = num; } - inline int getNumIndicesPerLine() const { return _numIndicesPerLine; } - - void moveIn(); - void moveOut(); - - virtual bool writeObject(const osg::Object& obj); - virtual void writeBeginObject(const std::string& name); - virtual void writeEndObject(); - virtual void writeUseID(const std::string& id); - virtual void writeUniqueID(const std::string& id); - - bool getUniqueIDForObject(const osg::Object* obj,std::string& uniqueID); - bool createUniqueIDForObject(const osg::Object* obj,std::string& uniqueID); - bool registerUniqueIDForObject(const osg::Object* obj,std::string& uniqueID); - - enum PathNameHint - { - AS_IS, - FULL_PATH, - RELATIVE_PATH, - FILENAME_ONLY - }; - - inline void setPathNameHint(const PathNameHint pnh) { _pathNameHint = pnh; } - inline PathNameHint getPathNameHint() const { return _pathNameHint; } - - virtual std::string getFileNameForOutput(const std::string& filename) const; - const std::string& getFileName() const { return _filename; } - - // Set and get if export texture files during write - void setOutputTextureFiles(bool flag) { _outputTextureFiles = flag; } - bool getOutputTextureFiles() const { return _outputTextureFiles; } - - // support code for OutputTextureFiles - virtual std::string getTextureFileNameForOutput(); - - void setOutputShaderFiles(bool flag) { _outputShaderFiles = flag; } - bool getOutputShaderFiles() const { return _outputShaderFiles; } - - virtual std::string getShaderFileNameForOutput(); - - void setExternalFileWritten(const std::string& filename, bool hasBeenWritten=true); - bool getExternalFileWritten(const std::string& filename) const; - - protected: - - - virtual void init(); - - osg::ref_ptr _options; - - int _indent; - int _indentStep; - - int _numIndicesPerLine; - - typedef std::map UniqueIDToLabelMapping; - UniqueIDToLabelMapping _objectToUniqueIDMap; - - std::string _filename; - - PathNameHint _pathNameHint; - - bool _outputTextureFiles; - unsigned int _textureFileNameNumber; - - bool _outputShaderFiles; - unsigned int _shaderFileNameNumber; - - bool _writeOutDefaultValues; - - typedef std::map ExternalFileWrittenMap; - ExternalFileWrittenMap _externalFileWritten; -}; - -} - -#endif // __SG_OUTPUT_H diff --git a/libs/lib/mac32/include/osgDB/OutputStream b/libs/lib/mac32/include/osgDB/OutputStream deleted file mode 100644 index 21baa0fb0..000000000 --- a/libs/lib/mac32/include/osgDB/OutputStream +++ /dev/null @@ -1,196 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGDB_OUTPUTSTREAM -#define OSGDB_OUTPUTSTREAM - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace osgDB -{ - -class OutputException : public osg::Referenced -{ -public: - OutputException( const std::vector& fields, const std::string& err ) : _error(err) - { - for ( unsigned int i=0; i ArrayMap; - typedef std::map ObjectMap; - - enum WriteType - { - WRITE_UNKNOWN = 0, - WRITE_SCENE, - WRITE_IMAGE, - WRITE_OBJECT - }; - - enum WriteImageHint - { - WRITE_USE_IMAGE_HINT = 0, /*!< Use image hint, write inline data or use external */ - WRITE_USE_EXTERNAL, /*!< Use external file on disk and write only the filename */ - WRITE_INLINE_DATA, /*!< Write Image::data() to stream */ - WRITE_INLINE_FILE, /*!< Write the image file itself to stream */ - WRITE_EXTERNAL_FILE /*!< Write Image::data() to disk and use it as external file */ - }; - - OutputStream( const osgDB::Options* options ); - virtual ~OutputStream(); - - bool isBinary() const { return _out->isBinary(); } - const std::string& getSchemaName() const { return _schemaName; } - const osgDB::Options* getOptions() const { return _options.get(); } - - void setWriteImageHint( WriteImageHint hint ) { _writeImageHint = hint; } - WriteImageHint getWriteImageHint() const { return _writeImageHint; } - - // Serialization related functions - OutputStream& operator<<( bool b ) { _out->writeBool(b); return *this; } - OutputStream& operator<<( char c ) { _out->writeChar(c); return *this; } - OutputStream& operator<<( unsigned char c ) { _out->writeUChar(c); return *this; } - OutputStream& operator<<( short s ) { _out->writeShort(s); return *this; } - OutputStream& operator<<( unsigned short s ) { _out->writeUShort(s); return *this; } - OutputStream& operator<<( int i ) { _out->writeInt(i); return *this; } - OutputStream& operator<<( unsigned int i ) { _out->writeUInt(i); return *this; } - OutputStream& operator<<( long l ) { _out->writeLong(l); return *this; } - OutputStream& operator<<( unsigned long l ) { _out->writeULong(l); return *this; } - OutputStream& operator<<( float f ) { _out->writeFloat(f); return *this; } - OutputStream& operator<<( double d ) { _out->writeDouble(d); return *this; } - OutputStream& operator<<( const std::string& s ) { _out->writeString(s); return *this; } - OutputStream& operator<<( const char* s ) { _out->writeString(s); return *this; } - OutputStream& operator<<( std::ostream& (*fn)(std::ostream&) ) { _out->writeStream(fn); return *this; } - OutputStream& operator<<( std::ios_base& (*fn)(std::ios_base&) ) { _out->writeBase(fn); return *this; } - - OutputStream& operator<<( const ObjectGLenum& value ) { _out->writeGLenum(value); return *this; } - OutputStream& operator<<( const ObjectProperty& prop ) { _out->writeProperty(prop); return *this; } - OutputStream& operator<<( const ObjectMark& mark ) { _out->writeMark(mark); return *this; } - - OutputStream& operator<<( const osg::Vec2b& v ); - OutputStream& operator<<( const osg::Vec3b& v ); - OutputStream& operator<<( const osg::Vec4b& v ); - OutputStream& operator<<( const osg::Vec4ub& v ); - OutputStream& operator<<( const osg::Vec2s& v ); - OutputStream& operator<<( const osg::Vec3s& v ); - OutputStream& operator<<( const osg::Vec4s& v ); - OutputStream& operator<<( const osg::Vec2f& v ); - OutputStream& operator<<( const osg::Vec3f& v ); - OutputStream& operator<<( const osg::Vec4f& v ); - OutputStream& operator<<( const osg::Vec2d& v ); - OutputStream& operator<<( const osg::Vec3d& v ); - OutputStream& operator<<( const osg::Vec4d& v ); - OutputStream& operator<<( const osg::Quat& q ); - OutputStream& operator<<( const osg::Plane& p ); - OutputStream& operator<<( const osg::Matrixf& mat ); - OutputStream& operator<<( const osg::Matrixd& mat ); - - OutputStream& operator<<( const osg::Array* a ) { writeArray(a); return *this; } - OutputStream& operator<<( const osg::Image* img ) { writeImage(img); return *this; } - OutputStream& operator<<( const osg::PrimitiveSet* p ) { writePrimitiveSet(p); return *this; } - OutputStream& operator<<( const osg::Object* obj ) { writeObject(obj); return *this; } - - OutputStream& operator<<( const osg::ref_ptr& ptr ) { writeArray(ptr.get()); return *this; } - OutputStream& operator<<( const osg::ref_ptr& ptr ) { writeImage(ptr.get()); return *this; } - OutputStream& operator<<( const osg::ref_ptr& ptr ) { writePrimitiveSet(ptr.get()); return *this; } - - template OutputStream& operator<<( const osg::ref_ptr& ptr ) - { writeObject(ptr.get()); return *this; } - - // Convenient methods for writing - void writeWrappedString( const std::string& str ) { _out->writeWrappedString(str); } - void writeCharArray( const char* s, unsigned int size ) { _out->writeCharArray(s, size); } - - // method for converting all data structure sizes to unsigned int to ensure architecture portability. - template - void writeSize(T size) { *this<(size); } - - // Global writing functions - void writeArray( const osg::Array* a ); - void writePrimitiveSet( const osg::PrimitiveSet* p ); - void writeImage( const osg::Image* img ); - void writeObject( const osg::Object* obj ); - void writeObjectFields( const osg::Object* obj ); - - /// set an output iterator, used directly when not using OutputStream with a traditional file releated stream. - void setOutputIterator( OutputIterator* oi ) { _out = oi; } - - /// start writing to OutputStream treating it as a traditional file releated stream, handles headers and versioning - void start( OutputIterator* outIterator, WriteType type ); - - void compress( std::ostream* ostream ); - - // Schema handlers - void writeSchema( std::ostream& fout ); - - // Exception handlers - inline void throwException( const std::string& msg ); - const OutputException* getException() const { return _exception.get(); } - -protected: - template - void writeArrayImplementation( const T*, int write_size, unsigned int numInRow=1 ); - - unsigned int findOrCreateArrayID( const osg::Array* array, bool& newID ); - unsigned int findOrCreateObjectID( const osg::Object* obj, bool& newID ); - - ArrayMap _arrayMap; - ObjectMap _objectMap; - - WriteImageHint _writeImageHint; - bool _useSchemaData; - std::map _inbuiltSchemaMap; - std::vector _fields; - std::string _schemaName; - std::string _compressorName; - std::stringstream _compressSource; - osg::ref_ptr _out; - osg::ref_ptr _exception; - osg::ref_ptr _options; -}; - -void OutputStream::throwException( const std::string& msg ) -{ - _exception = new OutputException(_fields, msg); -} - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/ParameterOutput b/libs/lib/mac32/include/osgDB/ParameterOutput deleted file mode 100644 index f5398b914..000000000 --- a/libs/lib/mac32/include/osgDB/ParameterOutput +++ /dev/null @@ -1,186 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_PARAMETEROUTPUT -#define OSGDB_PARAMETEROUTPUT 1 - -#include - -namespace osgDB { - -class ParameterOutput -{ - public: - - ParameterOutput(Output& fw): - _fw(fw), - _numItemsPerLine(fw.getNumIndicesPerLine()), - _column(0) {} - - ParameterOutput(Output& fw,int numItemsPerLine): - _fw(fw), - _numItemsPerLine(numItemsPerLine), - _column(0) {} - - void begin() - { - _fw.indent() << "{"< - void write(const T& t) - { - if (_column==0) _fw.indent(); - - _fw << t; - - ++_column; - if (_column==_numItemsPerLine) - { - _fw << std::endl; - _column = 0; - } - else - { - _fw << " "; - } - - } - - template - void write(Iterator first, Iterator last) - { - for(Iterator itr=first; - itr!=last; - ++itr) - { - write(*itr); - } - - } - - template - void writeAsInts(Iterator first, Iterator last) - { - for(Iterator itr=first; - itr!=last; - ++itr) - { - write((int)*itr); - } - - } - - - protected: - - ParameterOutput& operator = (const ParameterOutput&) { return *this; } - - Output& _fw; - int _numItemsPerLine; - int _column; -}; - - -template -void writeArray(Output& fw, Iterator first, Iterator last,int noItemsPerLine=0) -{ - if (noItemsPerLine==0) noItemsPerLine=fw.getNumIndicesPerLine(); - - fw.indent() << "{"< -void writeArrayAsInts(Output& fw, Iterator first, Iterator last,int noItemsPerLine=0) -{ - if (noItemsPerLine==0) noItemsPerLine=fw.getNumIndicesPerLine(); - - fw.indent() << "{"< -#include - -#include -#include - -#include -#include - -namespace osgDB -{ - -typedef std::list FileNameList; - -FileNameList OSGDB_EXPORT listAllAvailablePlugins(); - -class ReaderWriterInfo : public osg::Referenced -{ - public: - - ReaderWriterInfo() {} - - std::string plugin; - std::string description; - ReaderWriter::FormatDescriptionMap protocols; - ReaderWriter::FormatDescriptionMap extensions; - ReaderWriter::FormatDescriptionMap options; - ReaderWriter::Features features; - - protected: - - virtual ~ReaderWriterInfo() {} -}; - -typedef std::list< osg::ref_ptr > ReaderWriterInfoList; - -bool OSGDB_EXPORT queryPlugin(const std::string& fileName, ReaderWriterInfoList& infoList); - -bool OSGDB_EXPORT outputPluginDetails(std::ostream& out, const std::string& fileName); - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/ReadFile b/libs/lib/mac32/include/osgDB/ReadFile deleted file mode 100644 index 01a26ce97..000000000 --- a/libs/lib/mac32/include/osgDB/ReadFile +++ /dev/null @@ -1,284 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_READFILE -#define OSGDB_READFILE 1 - -#include - -#include -#include -#include - -#include -#include - -namespace osgDB { - - -/** Read an osg::Object from file. - * Return valid osg::Object on success, - * return NULL on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::Object* readObjectFile(const std::string& filename,const Options* options); - -/** Read an osg::Object from file. - * Return valid osg::Object on success, - * return NULL on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::Object* readObjectFile(const std::string& filename) -{ - return readObjectFile(filename,Registry::instance()->getOptions()); -} - -/** Read an osg::Image from file. - * Return valid osg::Image on success, - * return NULL on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::Image* readImageFile(const std::string& filename,const Options* options); - -/** Read an osg::Image from file. - * Return valid osg::Image on success, - * return NULL on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::Image* readImageFile(const std::string& filename) -{ - return readImageFile(filename,Registry::instance()->getOptions()); -} - -/** Read an osg::HeightField from file. - * Return valid osg::HeightField on success, - * return NULL on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::HeightField* readHeightFieldFile(const std::string& filename,const Options* options); - -/** Read an osg::HeightField from file. - * Return valid osg::HeightField on success, - * return NULL on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::HeightField* readHeightFieldFile(const std::string& filename) -{ - return readHeightFieldFile(filename,Registry::instance()->getOptions()); -} - -/** Read an osg::Node from file. - * Return valid osg::Node on success, - * return NULL on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::Node* readNodeFile(const std::string& filename,const Options* options); - -/** Read an osg::Node from file. - * Return valid osg::Node on success, - * return NULL on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::Node* readNodeFile(const std::string& filename) -{ - return readNodeFile(filename,Registry::instance()->getOptions()); -} - - -/** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more - * than one subgraph has been loaded. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * Does NOT ignore strings beginning with a dash '-' character. */ -extern OSGDB_EXPORT osg::Node* readNodeFiles(std::vector& fileList,const Options* options); - -/** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more - * than one subgraph has been loaded.*/ -inline osg::Node* readNodeFiles(std::vector& fileList) -{ - return readNodeFiles(fileList,Registry::instance()->getOptions()); -} - - -/** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more - * than one subgraph has been loaded. - * Use the Options object to control cache operations and file search paths in osgDB::Registry.*/ -extern OSGDB_EXPORT osg::Node* readNodeFiles(osg::ArgumentParser& parser,const Options* options); - -/** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more - * than one subgraph has been loaded.*/ -inline osg::Node* readNodeFiles(osg::ArgumentParser& parser) -{ - return readNodeFiles(parser,Registry::instance()->getOptions()); -} - -/** Read an osg::Shader from file. - * Return valid osg::Shader on success, - * return NULL on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::Shader* readShaderFile(const std::string& filename,const Options* options); - -/** Read an osg::Shader from file. - * Return valid osg::Shader on success, - * return NULL on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::Shader* readShaderFile(const std::string& filename) -{ - return readShaderFile(filename,Registry::instance()->getOptions()); -} - -/** Read an osg::Shader from file and set to specified shader type. - * Return valid osg::Shader on success, - * return NULL on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::Shader* readShaderFile(osg::Shader::Type type, const std::string& filename,const Options* options) -{ - osg::Shader* shader = readShaderFile(filename, options); - if (shader && type != osg::Shader::UNDEFINED) shader->setType(type); - return shader; -} - -/** Read an osg::Shader from file and set to specified shader type - * Return valid osg::Shader on success, - * return NULL on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::Shader* readShaderFile(osg::Shader::Type type, const std::string& filename) -{ - return readShaderFile(type, filename,Registry::instance()->getOptions()); -} - -/** Read an osg::Object from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::ref_ptr readRefObjectFile(const std::string& filename,const Options* options); - -/** Read an osg::Object from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::ref_ptr readRefObjectFile(const std::string& filename) -{ - return readRefObjectFile(filename,Registry::instance()->getOptions()); -} - -/** Read an osg::Image from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::ref_ptr readRefImageFile(const std::string& filename,const Options* options); - -/** Read an osg::Image from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::ref_ptr readRefImageFile(const std::string& filename) -{ - return readRefImageFile(filename,Registry::instance()->getOptions()); -} - -/** Read an osg::HeightField from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::ref_ptr readRefHeightFieldFile(const std::string& filename,const Options* options); - -/** Read an osg::HeightField from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::ref_ptr readRefHeightFieldFile(const std::string& filename) -{ - return readRefHeightFieldFile(filename,Registry::instance()->getOptions()); -} - -/** Read an osg::Node from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::ref_ptr readRefNodeFile(const std::string& filename,const Options* options); - -/** Read an osg::Node from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::ref_ptr readRefNodeFile(const std::string& filename) -{ - return readRefNodeFile(filename,Registry::instance()->getOptions()); -} - -/** Read an osg::Shader from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -extern OSGDB_EXPORT osg::ref_ptr readRefShaderFile(const std::string& filename,const Options* options); - -/** Read an osg::Shader from file. - * Return an assigned osg::ref_ptr on success, - * return an osg::ref_ptr with a NULL pointer assigned to it on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to read the specified file.*/ -inline osg::ref_ptr readRefShaderFile(const std::string& filename) -{ - return readRefShaderFile(filename,Registry::instance()->getOptions()); -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/ReaderWriter b/libs/lib/mac32/include/osgDB/ReaderWriter deleted file mode 100644 index 43b3f8d4b..000000000 --- a/libs/lib/mac32/include/osgDB/ReaderWriter +++ /dev/null @@ -1,266 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_READERWRITER -#define OSGDB_READERWRITER 1 - -#include -#include -#include - -#include - -#include -#include -#include - -namespace osgDB { - -class Archive; - -/** List of directories to search through which searching for files. */ -typedef std::deque FilePathList; - -// forward declare -class Options; - -/** Pure virtual base class for reading and writing of non native formats. */ -class OSGDB_EXPORT ReaderWriter : public osg::Object -{ - public: - - - ReaderWriter(): - osg::Object(true) {} - - ReaderWriter(const ReaderWriter& rw,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - osg::Object(rw,copyop) {} - - virtual ~ReaderWriter(); - - META_Object(osgDB,ReaderWriter); - - typedef std::map FormatDescriptionMap; - typedef std::list FeatureList; - - /** Return which protocols are supported by ReaderWriter. */ - virtual const FormatDescriptionMap& supportedProtocols() const { return _supportedProtocols; } - - /** Return which list of file extensions supported by ReaderWriter. */ - virtual const FormatDescriptionMap& supportedExtensions() const { return _supportedExtensions; } - - /** Return which list of file extensions supported by ReaderWriter. */ - virtual const FormatDescriptionMap& supportedOptions() const { return _supportedOptions; } - - /** Return true if ReaderWriter accepts specified file extension.*/ - virtual bool acceptsExtension(const std::string& /*extension*/) const; - - /// Bit mask for setting up which feature types are available for read and/or write - enum Features - { - FEATURE_NONE = 0, - FEATURE_READ_OBJECT = 1<<0, - FEATURE_READ_IMAGE = 1<<1, - FEATURE_READ_HEIGHT_FIELD = 1<<2, - FEATURE_READ_NODE = 1<<3, - FEATURE_READ_SHADER = 1<<4, - FEATURE_WRITE_OBJECT = 1<<5, - FEATURE_WRITE_IMAGE = 1<<6, - FEATURE_WRITE_HEIGHT_FIELD = 1<<7, - FEATURE_WRITE_NODE = 1<<8, - FEATURE_WRITE_SHADER = 1<<9, - FEATURE_ALL = FEATURE_READ_OBJECT | - FEATURE_READ_IMAGE | - FEATURE_READ_HEIGHT_FIELD | - FEATURE_READ_NODE | - FEATURE_READ_SHADER | - FEATURE_WRITE_OBJECT | - FEATURE_WRITE_IMAGE | - FEATURE_WRITE_HEIGHT_FIELD | - FEATURE_WRITE_NODE | - FEATURE_WRITE_SHADER - }; - /** Return available features*/ - virtual Features supportedFeatures() const; - - /** Return feature as string */ - static FeatureList featureAsString(Features feature); - - - - class OSGDB_EXPORT ReadResult - { - public: - - enum ReadStatus - { - NOT_IMPLEMENTED, //!< read*() method not implemented in concrete ReaderWriter. - FILE_NOT_HANDLED, //!< File is not appropriate for this file reader, due to some incompatibility, but *not* a read error. - FILE_NOT_FOUND, //!< File could not be found or could not be read. - FILE_LOADED, //!< File successfully found, loaded, and converted into osg. - FILE_LOADED_FROM_CACHE, //!< File found in cache and returned. - ERROR_IN_READING_FILE, //!< File found, loaded, but an error was encountered during processing. - FILE_REQUESTED, //!< Asynchronous file read has been requested, but returning immediately, keep polling plugin until file read has been completed. - INSUFFICIENT_MEMORY_TO_LOAD //!< File found but not loaded because estimated required memory surpasses available memory. - }; - - ReadResult(ReadStatus status=FILE_NOT_HANDLED):_status(status) {} - ReadResult(const std::string& m):_status(ERROR_IN_READING_FILE),_message(m) {} - ReadResult(osg::Object* obj, ReadStatus status=FILE_LOADED):_status(status),_object(obj) {} - - ReadResult(const ReadResult& rr):_status(rr._status),_message(rr._message),_object(rr._object) {} - ReadResult& operator = (const ReadResult& rr) { if (this==&rr) return *this; _status=rr._status; _message=rr._message;_object=rr._object; return *this; } - - osg::Object* getObject(); - osg::Image* getImage(); - osg::HeightField* getHeightField(); - osg::Node* getNode(); - osgDB::Archive* getArchive(); - osg::Shader* getShader(); - - bool validObject() { return _object.valid(); } - bool validImage() { return getImage()!=0; } - bool validHeightField() { return getHeightField()!=0; } - bool validNode() { return getNode()!=0; } - bool validArchive() { return getArchive()!=0; } - bool validShader() { return getShader()!=0; } - - osg::Object* takeObject(); - osg::Image* takeImage(); - osg::HeightField* takeHeightField(); - osg::Node* takeNode(); - osgDB::Archive* takeArchive(); - osg::Shader* takeShader(); - - std::string& message() { return _message; } - const std::string& message() const { return _message; } - - ReadStatus status() const { return _status; } - bool success() const { return _status==FILE_LOADED || _status==FILE_LOADED_FROM_CACHE ; } - bool loadedFromCache() const { return _status==FILE_LOADED_FROM_CACHE; } - bool error() const { return _status==ERROR_IN_READING_FILE; } - bool notHandled() const { return _status==FILE_NOT_HANDLED || _status==NOT_IMPLEMENTED; } - bool notFound() const { return _status==FILE_NOT_FOUND; } - bool notEnoughMemory() const { return _status==INSUFFICIENT_MEMORY_TO_LOAD; } - - protected: - - ReadStatus _status; - std::string _message; - osg::ref_ptr _object; - - }; - - class WriteResult - { - public: - - enum WriteStatus - { - NOT_IMPLEMENTED, //!< write*() method not implemented in concrete ReaderWriter. - FILE_NOT_HANDLED, - FILE_SAVED, - ERROR_IN_WRITING_FILE - }; - - WriteResult(WriteStatus status=FILE_NOT_HANDLED):_status(status) {} - WriteResult(const std::string& m):_status(ERROR_IN_WRITING_FILE),_message(m) {} - - WriteResult(const WriteResult& rr):_status(rr._status),_message(rr._message) {} - WriteResult& operator = (const WriteResult& rr) { if (this==&rr) return *this; _status=rr._status; _message=rr._message; return *this; } - - std::string& message() { return _message; } - const std::string& message() const { return _message; } - - WriteStatus status() const { return _status; } - bool success() const { return _status==FILE_SAVED; } - bool error() const { return _status==ERROR_IN_WRITING_FILE; } - bool notHandled() const { return _status==FILE_NOT_HANDLED || _status==NOT_IMPLEMENTED; } - - protected: - - WriteStatus _status; - std::string _message; - }; - - enum ArchiveStatus - { - READ, - WRITE, - CREATE - }; - - typedef osgDB::Options Options; - - /** Determine if a file exists, normally the default implementation will be appropiate for local file access - * but with plugins like the libcurl based one it will return true if the file is accessible at the server. */ - virtual bool fileExists(const std::string& filename, const Options* options) const; - - /** Open an archive for reading, writing, or to create an empty archive for writing to.*/ - virtual ReadResult openArchive(const std::string& /*fileName*/,ArchiveStatus, unsigned int =4096, const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - - /** Open an archive for reading.*/ - virtual ReadResult openArchive(std::istream& /*fin*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - - virtual ReadResult readObject(const std::string& /*fileName*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - virtual ReadResult readImage(const std::string& /*fileName*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - virtual ReadResult readHeightField(const std::string& /*fileName*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - virtual ReadResult readNode(const std::string& /*fileName*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - virtual ReadResult readShader(const std::string& /*fileName*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - - virtual WriteResult writeObject(const osg::Object& /*obj*/,const std::string& /*fileName*/,const Options* =NULL) const {return WriteResult(WriteResult::NOT_IMPLEMENTED); } - virtual WriteResult writeImage(const osg::Image& /*image*/,const std::string& /*fileName*/,const Options* =NULL) const {return WriteResult(WriteResult::NOT_IMPLEMENTED); } - virtual WriteResult writeHeightField(const osg::HeightField& /*heightField*/,const std::string& /*fileName*/,const Options* =NULL) const {return WriteResult(WriteResult::NOT_IMPLEMENTED); } - virtual WriteResult writeNode(const osg::Node& /*node*/,const std::string& /*fileName*/,const Options* =NULL) const { return WriteResult(WriteResult::NOT_IMPLEMENTED); } - virtual WriteResult writeShader(const osg::Shader& /*shader*/,const std::string& /*fileName*/,const Options* =NULL) const {return WriteResult(WriteResult::NOT_IMPLEMENTED); } - - virtual ReadResult readObject(std::istream& /*fin*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - virtual ReadResult readImage(std::istream& /*fin*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - virtual ReadResult readHeightField(std::istream& /*fin*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - virtual ReadResult readNode(std::istream& /*fin*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - virtual ReadResult readShader(std::istream& /*fin*/,const Options* =NULL) const { return ReadResult(ReadResult::NOT_IMPLEMENTED); } - - virtual WriteResult writeObject(const osg::Object& /*obj*/,std::ostream& /*fout*/,const Options* =NULL) const { return WriteResult(WriteResult::NOT_IMPLEMENTED); } - virtual WriteResult writeImage(const osg::Image& /*image*/,std::ostream& /*fout*/,const Options* =NULL) const { return WriteResult(WriteResult::NOT_IMPLEMENTED); } - virtual WriteResult writeHeightField(const osg::HeightField& /*heightField*/,std::ostream& /*fout*/,const Options* =NULL) const { return WriteResult(WriteResult::NOT_IMPLEMENTED); } - virtual WriteResult writeNode(const osg::Node& /*node*/,std::ostream& /*fout*/,const Options* =NULL) const { return WriteResult(WriteResult::NOT_IMPLEMENTED); } - virtual WriteResult writeShader(const osg::Shader& /*shader*/,std::ostream& /*fout*/,const Options* =NULL) const { return WriteResult(WriteResult::NOT_IMPLEMENTED); } - - /** Specify fmt string as a supported protocol. - * Please note, this method should usually only be used internally by subclasses of ReaderWriter, Only in special cases - * will a ReaderWriter implementation be able to handle a protocol format that it wasn't originally designed for. - * To know whether it's safe to inject a new protocol format into an existing ReaderWriter you will need to review - * the source code and dependencies of that ReaderWriter. */ - void supportsProtocol(const std::string& fmt, const std::string& description); - - /** Specify ext string as a supported file extension. - * Please note, this method should usually only be used internally by subclasses of ReaderWriter. Only in special cases - * will a ReaderWriter implementation be able to handle a file extension that it wasn't originally designed for. - * To know whether it's safe to inject a new file extension into an existing ReaderWriter you will need to review the - * the source code and dependencies of that ReaderWriter. */ - void supportsExtension(const std::string& ext, const std::string& description); - - /** Specify option string as a supported option string. - * Please note, this should usually only be used internally by subclasses of ReaderWriter. */ - void supportsOption(const std::string& opt, const std::string& description); - - protected: - - FormatDescriptionMap _supportedProtocols; - FormatDescriptionMap _supportedExtensions; - FormatDescriptionMap _supportedOptions; -}; - -} - -#endif // OSGDB_READERWRITER diff --git a/libs/lib/mac32/include/osgDB/Registry b/libs/lib/mac32/include/osgDB/Registry deleted file mode 100644 index 641f1e08f..000000000 --- a/libs/lib/mac32/include/osgDB/Registry +++ /dev/null @@ -1,724 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_REGISTRY -#define OSGDB_REGISTRY 1 - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -extern "C" -{ - typedef void (* CPluginFunction) (void); -} - -namespace osgDB { - -/** basic structure for custom runtime inheritance checking */ -struct basic_type_wrapper { - virtual ~basic_type_wrapper() {} - virtual bool matches(const osg::Object *proto) const = 0; -}; - -/** a class template that checks inheritance between a given - Object's class and a class defined at compile time through - the template parameter T. - This is used in conjunction with readObjectOfType() to - specify an abstract class as reference type. -**/ -template -struct type_wrapper: basic_type_wrapper { - bool matches(const osg::Object *proto) const - { - return dynamic_cast(proto) != 0; - } -}; - -/** - Registry is a singleton factory which stores - the reader/writers which are linked in - at runtime for reading non-native file formats. - - The RegisterReaderWriterProxy can be used to automatically - register at runtime a reader/writer with the Registry. -*/ -class OSGDB_EXPORT Registry : public osg::Referenced -{ - public: - - - - - static Registry* instance(bool erase = false); - - /** read the command line arguments.*/ - void readCommandLine(osg::ArgumentParser& commandLine); - - /** register an .fileextension alias to mapExt toExt, the later - * should the the extension name of the readerwriter plugin library. - * For example to map .tif files to the tiff loader, use - * addExtAlias("tif","tiff") which will enable .tif to be read - * by the libdb_tiff readerwriter plugin.*/ - void addFileExtensionAlias(const std::string mapExt, const std::string toExt); - - /** Reads a file that configures extension mappings. File is ASCII text - * and each line contains the parameters to the addFileExtensionAlias - * method. Lines can be commented out with an initial '#' character.*/ - bool readPluginAliasConfigurationFile( const std::string& file ); - - /** Registers a mapping of a mime-type to an extension. A process fetching data - * over HTTP can use this facility to determine the proper ReaderWriter to use - * when there is no filename extension to rely upon. - */ - void addMimeTypeExtensionMapping(const std::string fromMimeType, const std::string toExt); - - void addReaderWriter(ReaderWriter* rw); - void removeReaderWriter(ReaderWriter* rw); - - void addImageProcessor(ImageProcessor* ip); - void removeImageProcessor(ImageProcessor* ip); - - /** create the platform specific library name associated with file.*/ - std::string createLibraryNameForFile(const std::string& fileName); - - /** create the platform specific library name associated with file extension.*/ - std::string createLibraryNameForExtension(const std::string& ext); - - /** create the platform specific library name associated with nodekit library name.*/ - std::string createLibraryNameForNodeKit(const std::string& name); - - - enum LoadStatus { - NOT_LOADED = 0, - PREVIOUSLY_LOADED, - LOADED - }; - - /** find the library in the OSG_LIBRARY_PATH and load it.*/ - LoadStatus loadLibrary(const std::string& fileName); - - /** close the attached library with specified name.*/ - bool closeLibrary(const std::string& fileName); - - /** close all libraries.*/ - void closeAllLibraries(); - - typedef std::vector< osg::ref_ptr > ReaderWriterList; - - /** get a reader writer which handles specified extension.*/ - ReaderWriter* getReaderWriterForExtension(const std::string& ext); - - /** gets a reader/writer that handles the extension mapped to by one of - * the registered mime-types. */ - ReaderWriter* getReaderWriterForMimeType(const std::string& mimeType); - - /** get list of all registered ReaderWriters.*/ - ReaderWriterList& getReaderWriterList() { return _rwList; } - - /** get const list of all registered ReaderWriters.*/ - const ReaderWriterList& getReaderWriterList() const { return _rwList; } - - - typedef std::vector< osg::ref_ptr > ImageProcessorList; - - /** get a image processor if available.*/ - ImageProcessor* getImageProcessor(); - - /** get a image processor which is associated specified extension.*/ - ImageProcessor* getImageProcessorForExtension(const std::string& ext); - - /** get list of all registered ImageProcessors.*/ - ImageProcessorList& getImageProcessorList() { return _ipList; } - - /** get const list of all registered ImageProcessors.*/ - const ImageProcessorList& getImageProcessorList() const { return _ipList; } - - - typedef class osgDB::FindFileCallback FindFileCallback; - typedef class osgDB::ReadFileCallback ReadFileCallback; - typedef class osgDB::WriteFileCallback WriteFileCallback; - typedef class osgDB::FileLocationCallback FileLocationCallback; - - /** Set the Registry callback to use in place of the default findFile calls.*/ - void setFindFileCallback( FindFileCallback* cb) { _findFileCallback = cb; } - - /** Get the findFile callback.*/ - FindFileCallback* getFindFileCallback() { return _findFileCallback.get(); } - - /** Get the const findFile callback.*/ - const FindFileCallback* getFindFileCallback() const { return _findFileCallback.get(); } - - - std::string findDataFile(const std::string& fileName, const Options* options, CaseSensitivity caseSensitivity) - { - if (options && options->getFindFileCallback()) return options->getFindFileCallback()->findDataFile(fileName, options, caseSensitivity); - else if (_findFileCallback.valid()) return _findFileCallback->findDataFile(fileName, options, caseSensitivity); - else return findDataFileImplementation(fileName, options, caseSensitivity); - } - std::string findDataFileImplementation(const std::string& fileName, const Options* options, CaseSensitivity caseSensitivity); - - std::string findLibraryFile(const std::string& fileName, const Options* options, CaseSensitivity caseSensitivity) - { - if (options && options->getFindFileCallback()) return options->getFindFileCallback()->findLibraryFile(fileName, options, caseSensitivity); - else if (_findFileCallback.valid()) return _findFileCallback->findLibraryFile(fileName, options, caseSensitivity); - else return findLibraryFileImplementation(fileName, options, caseSensitivity); - } - std::string findLibraryFileImplementation(const std::string& fileName, const Options* options, CaseSensitivity caseSensitivity); - - - - /** Set the Registry callback to use in place of the default readFile calls.*/ - void setReadFileCallback( ReadFileCallback* cb) { _readFileCallback = cb; } - - /** Get the readFile callback.*/ - ReadFileCallback* getReadFileCallback() { return _readFileCallback.get(); } - - /** Get the const readFile callback.*/ - const ReadFileCallback* getReadFileCallback() const { return _readFileCallback.get(); } - - - ReaderWriter::ReadResult openArchive(const std::string& fileName,ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const Options* options) - { - if (options && options->getReadFileCallback()) return options->getReadFileCallback()->openArchive(fileName, status, indexBlockSizeHint, options); - else if (_readFileCallback.valid()) return _readFileCallback->openArchive(fileName, status, indexBlockSizeHint, options); - else return openArchiveImplementation(fileName, status, indexBlockSizeHint, options); - } - ReaderWriter::ReadResult openArchiveImplementation(const std::string& fileName, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const Options* options); - - ReaderWriter::ReadResult readObject(const std::string& fileName,const Options* options, bool buildKdTreeIfRequired=true) - { - ReaderWriter::ReadResult result; - if (options && options->getReadFileCallback()) result = options->getReadFileCallback()->readObject(fileName,options); - else if (_readFileCallback.valid()) result = _readFileCallback->readObject(fileName,options); - else result = readObjectImplementation(fileName,options); - - if (buildKdTreeIfRequired) _buildKdTreeIfRequired(result, options); - - return result; - } - ReaderWriter::ReadResult readObjectImplementation(const std::string& fileName,const Options* options); - - ReaderWriter::ReadResult readImage(const std::string& fileName,const Options* options) - { - if (options && options->getReadFileCallback()) return options->getReadFileCallback()->readImage(fileName,options); - else if (_readFileCallback.valid()) return _readFileCallback->readImage(fileName,options); - else return readImageImplementation(fileName,options); - } - ReaderWriter::ReadResult readImageImplementation(const std::string& fileName,const Options* options); - - ReaderWriter::ReadResult readHeightField(const std::string& fileName,const Options* options) - { - if (options && options->getReadFileCallback()) return options->getReadFileCallback()->readHeightField(fileName,options); - else if (_readFileCallback.valid()) return _readFileCallback->readHeightField(fileName,options); - else return readHeightFieldImplementation(fileName,options); - } - ReaderWriter::ReadResult readHeightFieldImplementation(const std::string& fileName,const Options* options); - - ReaderWriter::ReadResult readNode(const std::string& fileName,const Options* options, bool buildKdTreeIfRequired=true) - { - ReaderWriter::ReadResult result; - if (options && options->getReadFileCallback()) result = options->getReadFileCallback()->readNode(fileName,options); - else if (_readFileCallback.valid()) result = _readFileCallback->readNode(fileName,options); - else result = readNodeImplementation(fileName,options); - - if (buildKdTreeIfRequired) _buildKdTreeIfRequired(result, options); - - return result; - } - ReaderWriter::ReadResult readNodeImplementation(const std::string& fileName,const Options* options); - - ReaderWriter::ReadResult readShader(const std::string& fileName,const Options* options) - { - if (options && options->getReadFileCallback()) return options->getReadFileCallback()->readShader(fileName,options); - if (_readFileCallback.valid()) return _readFileCallback->readShader(fileName,options); - else return readShaderImplementation(fileName,options); - } - ReaderWriter::ReadResult readShaderImplementation(const std::string& fileName,const Options* options); - - - /** Set the Registry callback to use in place of the default writeFile calls.*/ - void setWriteFileCallback( WriteFileCallback* cb) { _writeFileCallback = cb; } - - /** Get the writeFile callback.*/ - WriteFileCallback* getWriteFileCallback() { return _writeFileCallback.get(); } - - /** Get the const writeFile callback.*/ - const WriteFileCallback* getWriteFileCallback() const { return _writeFileCallback.get(); } - - - ReaderWriter::WriteResult writeObject(const osg::Object& obj, const std::string& fileName,const Options* options) - { - if (options && options->getWriteFileCallback()) return options->getWriteFileCallback()->writeObject(obj,fileName,options); - else if (_writeFileCallback.valid()) return _writeFileCallback->writeObject(obj,fileName,options); - else return writeObjectImplementation(obj,fileName,options); - } - ReaderWriter::WriteResult writeObjectImplementation(const osg::Object& obj, const std::string& fileName,const Options* options); - - ReaderWriter::WriteResult writeImage(const osg::Image& obj, const std::string& fileName,const Options* options) - { - if (options && options->getWriteFileCallback()) return options->getWriteFileCallback()->writeImage(obj,fileName,options); - else if (_writeFileCallback.valid()) return _writeFileCallback->writeImage(obj,fileName,options); - else return writeImageImplementation(obj,fileName,options); - } - ReaderWriter::WriteResult writeImageImplementation(const osg::Image& obj, const std::string& fileName,const Options* options); - - ReaderWriter::WriteResult writeHeightField(const osg::HeightField& obj, const std::string& fileName,const Options* options) - { - if (options && options->getWriteFileCallback()) return options->getWriteFileCallback()->writeHeightField(obj,fileName,options); - else if (_writeFileCallback.valid()) return _writeFileCallback->writeHeightField(obj,fileName,options); - else return writeHeightFieldImplementation(obj,fileName,options); - } - ReaderWriter::WriteResult writeHeightFieldImplementation(const osg::HeightField& obj, const std::string& fileName,const Options* options); - - ReaderWriter::WriteResult writeNode(const osg::Node& node, const std::string& fileName,const Options* options) - { - if (options && options->getWriteFileCallback()) return options->getWriteFileCallback()->writeNode(node,fileName,options); - else if (_writeFileCallback.valid()) return _writeFileCallback->writeNode(node,fileName,options); - else return writeNodeImplementation(node,fileName,options); - } - ReaderWriter::WriteResult writeNodeImplementation(const osg::Node& node, const std::string& fileName,const Options* options); - - ReaderWriter::WriteResult writeShader(const osg::Shader& obj, const std::string& fileName,const Options* options) - { - if (options && options->getWriteFileCallback()) return options->getWriteFileCallback()->writeShader(obj,fileName,options); - else if (_writeFileCallback.valid()) return _writeFileCallback->writeShader(obj,fileName,options); - else return writeShaderImplementation(obj,fileName,options); - } - ReaderWriter::WriteResult writeShaderImplementation(const osg::Shader& obj, const std::string& fileName,const Options* options); - - - inline void _buildKdTreeIfRequired(ReaderWriter::ReadResult& result, const Options* options) - { - bool doKdTreeBuilder = (options && options->getBuildKdTreesHint()!=Options::NO_PREFERENCE) ? - options->getBuildKdTreesHint() == Options::BUILD_KDTREES : - _buildKdTreesHint == Options::BUILD_KDTREES; - - if (doKdTreeBuilder && _kdTreeBuilder.valid() && result.validNode()) - { - osg::ref_ptr builder = _kdTreeBuilder->clone(); - result.getNode()->accept(*builder); - } - } - - /** Set the callback to use inform to the DatabasePager whether a file is located on local or remote file system.*/ - void setFileLocationCallback( FileLocationCallback* cb) { _fileLocationCallback = cb; } - - /** Get the callback to use inform to the DatabasePager whether a file is located on local or remote file system.*/ - FileLocationCallback* getFileLocationCallback() const { return _fileLocationCallback.get(); } - - - - /** Set whether the KdTrees should be built for geometry in the loader model. */ - void setBuildKdTreesHint(Options::BuildKdTreesHint hint) { _buildKdTreesHint = hint; } - - /** Get whether the KdTrees should be built for geometry in the loader model. */ - Options::BuildKdTreesHint getBuildKdTreesHint() const { return _buildKdTreesHint; } - - /** Set the KdTreeBuilder visitor that is used to build KdTree on loaded models.*/ - void setKdTreeBuilder(osg::KdTreeBuilder* builder) { _kdTreeBuilder = builder; } - - /** Get the KdTreeBuilder visitor that is used to build KdTree on loaded models.*/ - osg::KdTreeBuilder* getKdTreeBuilder() { return _kdTreeBuilder.get(); } - - - /** Set the FileCache that is used to manage local storage of files downloaded from the internet.*/ - void setFileCache(FileCache* fileCache) { _fileCache = fileCache; } - - /** Get the FileCache that is used to manage local storage of files downloaded from the internet.*/ - FileCache* getFileCache() { return _fileCache.get(); } - - /** Get the const FileCache that is used to manage local storage of files downloaded from the internet.*/ - const FileCache* getFileCache() const { return _fileCache.get(); } - - - /** Set the password map to be used by plugins when access files from secure locations.*/ - void setAuthenticationMap(AuthenticationMap* authenticationMap) { _authenticationMap = authenticationMap; } - - /** Get the password map to be used by plugins when access files from secure locations.*/ - AuthenticationMap* getAuthenticationMap() { return _authenticationMap.get(); } - - /** Get the password map to be used by plugins when access files from secure locations.*/ - const AuthenticationMap* getAuthenticationMap() const { return _authenticationMap.get(); } - - - void setCreateNodeFromImage(bool flag) { _createNodeFromImage = flag; } - bool getCreateNodeFromImage() const { return _createNodeFromImage; } - - - void setOptions(Options* opt) { _options = opt; } - Options* getOptions() { return _options.get(); } - const Options* getOptions() const { return _options.get(); } - - - /** initialize both the Data and Library FilePaths, by default called by the - * constructor, so it should only be required if you want to force - * the re-reading of environmental variables.*/ - void initFilePathLists() { initDataFilePathList(); initLibraryFilePathList(); } - - /** initialize the Data FilePath by reading the OSG_FILE_PATH environmental variable.*/ - void initDataFilePathList(); - - /** Set the data file path using a list of paths stored in a FilePath, which is used when search for data files.*/ - void setDataFilePathList(const FilePathList& filepath) { _dataFilePath = filepath; } - - /** Set the data file path using a single string delimited either with ';' (Windows) or ':' (All other platforms), which is used when search for data files.*/ - void setDataFilePathList(const std::string& paths); - - /** get the data file path which is used when search for data files.*/ - FilePathList& getDataFilePathList() { return _dataFilePath; } - - /** get the const data file path which is used when search for data files.*/ - const FilePathList& getDataFilePathList() const { return _dataFilePath; } - - /** initialize the Library FilePath by reading the OSG_LIBRARY_PATH - * and the appropriate system environmental variables*/ - void initLibraryFilePathList(); - - /** Set the library file path using a list of paths stored in a FilePath, which is used when search for data files.*/ - void setLibraryFilePathList(const FilePathList& filepath) { _libraryFilePath = filepath; } - - /** Set the library file path using a single string delimited either with ';' (Windows) or ':' (All other platforms), which is used when search for data files.*/ - void setLibraryFilePathList(const std::string& paths); - - /** get the library file path which is used when search for library (dso/dll's) files.*/ - FilePathList& getLibraryFilePathList() { return _libraryFilePath; } - - /** get the const library file path which is used when search for library (dso/dll's) files.*/ - const FilePathList& getLibraryFilePathList() const { return _libraryFilePath; } - - /** For each object in the cache which has an reference count greater than 1 - * (and therefore referenced by elsewhere in the application) set the time stamp - * for that object in the cache to specified time. - * This would typically be called once per frame by applications which are doing database paging, - * and need to prune objects that are no longer required. - * The time used is taken from the FrameStamp::getReferenceTime().*/ - void updateTimeStampOfObjectsInCacheWithExternalReferences(const osg::FrameStamp& frameStamp); - - /** Removed object in the cache which have a time stamp at or before the specified expiry time. - * This would typically be called once per frame by applications which are doing database paging, - * and need to prune objects that are no longer required, and called after the a called - * after the call to updateTimeStampOfObjectsInCacheWithExternalReferences(frameStamp).*/ - void removeExpiredObjectsInCache(const osg::FrameStamp& frameStamp); - - /** set hint to viewer code calling removeExpiredObjectsInCache to specify how long it should give before expiring objects in Registry cache,*/ - void setExpiryDelay(double expiryDelay) { _expiryDelay = expiryDelay; } - - double getExpiryDelay() const { return _expiryDelay; } - - - /** Remove all objects in the cache regardless of having external references or expiry times.*/ - void clearObjectCache(); - - /** Add a filename,object,timestamp triple to the Registry::ObjectCache.*/ - void addEntryToObjectCache(const std::string& filename, osg::Object* object, double timestamp = 0.0); - - /** Get an Object from the object cache*/ - osg::Object* getFromObjectCache(const std::string& fileName); - - /** Get an ref_ptr from the object cache*/ - osg::ref_ptr getRefFromObjectCache(const std::string& fileName); - - /** Add archive to archive cache so that future calls reference this archive.*/ - void addToArchiveCache(const std::string& fileName, osgDB::Archive* archive); - - /** Remove Archive from cache.*/ - void removeFromArchiveCache(const std::string& fileName); - - /** Get an Archive from the archive cache.*/ - osgDB::Archive* getFromArchiveCache(const std::string& fileName); - - /** Get an ref_ptr from the archive cache.*/ - osg::ref_ptr getRefFromArchiveCache(const std::string& fileName); - - /** Remove all archives from the archive cache.*/ - void clearArchiveCache(); - - /** If State is non-zero, this function releases OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objexts - * for all graphics contexts. */ - void releaseGLObjects(osg::State* state=0); - - /** get the attached library with specified name.*/ - DynamicLibrary* getLibrary(const std::string& fileName); - - /** Set the SharedStateManager.*/ - void setSharedStateManager(SharedStateManager* SharedStateManager) { _sharedStateManager = SharedStateManager; } - - /** Get the SharedStateManager, creating one if one is not already created.*/ - SharedStateManager* getOrCreateSharedStateManager(); - - /** Get the SharedStateManager. Return 0 if no SharedStateManager has been assigned.*/ - SharedStateManager* getSharedStateManager() { return _sharedStateManager.get(); } - - /** Add an Archive extension.*/ - void addArchiveExtension(const std::string ext); - - /** registers a protocol */ - void registerProtocol(const std::string& protocol); - - /** returns true, if named protocol is registered */ - bool isProtocolRegistered(const std::string& protocol); - - /** Get the ObjectWrapperManager that is used to store all the ObjectWrappers. */ - ObjectWrapperManager* getObjectWrapperManager() { return _objectWrapperManager.get(); } - - /** Get the ObjectWrapperManager that is used to store all the ObjectWrappers. */ - DeprecatedDotOsgWrapperManager* getDeprecatedDotOsgObjectWrapperManager() { return _deprecatedDotOsgWrapperManager.get(); } - - typedef std::vector< std::string> ArchiveExtensionList; - const ArchiveExtensionList& getArchiveExtensions() const { return _archiveExtList; } - - protected: - - virtual ~Registry(); - - typedef std::vector< osg::ref_ptr > DynamicLibraryList; - typedef std::map< std::string, std::string> ExtensionAliasMap; - typedef std::map< std::string, std::string> MimeTypeExtensionMap; - - typedef std::pair, double > ObjectTimeStampPair; - typedef std::map ObjectCache; - typedef std::map > ArchiveCache; - - typedef std::set RegisteredProtocolsSet; - - /** constructor is private, as its a singleton, preventing - construction other than via the instance() method and - therefore ensuring only one copy is ever constructed*/ - Registry(); - - /** get the attached library with specified name.*/ - DynamicLibraryList::iterator getLibraryItr(const std::string& fileName); - - Options::BuildKdTreesHint _buildKdTreesHint; - osg::ref_ptr _kdTreeBuilder; - - osg::ref_ptr _fileCache; - - osg::ref_ptr _authenticationMap; - - bool _createNodeFromImage; - - RegisteredProtocolsSet _registeredProtocols; - - public: - /** Functor used in internal implementations.*/ - struct ReadFunctor - { - ReadFunctor(const std::string& filename, const Options* options): - _filename(filename), - _options(options) {} - - virtual ~ReadFunctor() {} - virtual ReaderWriter::ReadResult doRead(ReaderWriter& rw) const = 0; - virtual bool isValid(ReaderWriter::ReadResult& readResult) const = 0; - virtual bool isValid(osg::Object* object) const = 0; - - std::string _filename; - const Options* _options; - }; - - protected: - - void destruct(); - - // forward declare helper classes - struct ReadObjectFunctor; - struct ReadImageFunctor; - struct ReadHeightFieldFunctor; - struct ReadNodeFunctor; - struct ReadArchiveFunctor; - struct ReadShaderFunctor; - - // make helper classes friends to get round VS6.0 "issues" - friend struct ReadFunctor; - friend struct ReadObjectFunctor; - friend struct ReadImageFunctor; - friend struct ReadHeightFieldFunctor; - friend struct ReadNodeFunctor; - friend struct ReadArchiveFunctor; - friend struct ReadShaderFunctor; - - ReaderWriter::ReadResult read(const ReadFunctor& readFunctor); - ReaderWriter::ReadResult readImplementation(const ReadFunctor& readFunctor,Options::CacheHintOptions cacheHint); - - - // forward declare helper class - class AvailableReaderWriterIterator; - friend class AvailableReaderWriterIterator; - class AvailableArchiveIterator; - friend class AvailableArchiveIterator; - - - osg::ref_ptr _findFileCallback; - osg::ref_ptr _readFileCallback; - osg::ref_ptr _writeFileCallback; - osg::ref_ptr _fileLocationCallback; - - OpenThreads::ReentrantMutex _pluginMutex; - ReaderWriterList _rwList; - ImageProcessorList _ipList; - DynamicLibraryList _dlList; - - OpenThreads::ReentrantMutex _archiveCacheMutex; - ArchiveCache _archiveCache; - - bool _openingLibrary; - - // map to alias to extensions to plugins. - ExtensionAliasMap _extAliasMap; - - // maps mime-types to extensions. - MimeTypeExtensionMap _mimeTypeExtMap; - - // Utility: Removes whitespace from both ends of a string. - static std::string trim( const std::string& str ); - - // options to pass to reader writers. - osg::ref_ptr _options; - - FilePathList _dataFilePath; - FilePathList _libraryFilePath; - - double _expiryDelay; - ObjectCache _objectCache; - OpenThreads::Mutex _objectCacheMutex; - - - ArchiveExtensionList _archiveExtList; - - osg::ref_ptr _sharedStateManager; - - osg::ref_ptr _objectWrapperManager; - osg::ref_ptr _deprecatedDotOsgWrapperManager; -}; - -/** read the command line arguments.*/ -inline void readCommandLine(osg::ArgumentParser& parser) -{ - Registry::instance()->readCommandLine(parser); -} - -/** Proxy class for automatic registration of reader/writers with the Registry.*/ -template -class RegisterReaderWriterProxy -{ - public: - RegisterReaderWriterProxy() - { - if (Registry::instance()) - { - _rw = new T; - Registry::instance()->addReaderWriter(_rw.get()); - } - } - - ~RegisterReaderWriterProxy() - { - if (Registry::instance()) - { - Registry::instance()->removeReaderWriter(_rw.get()); - } - } - - T* get() { return _rw.get(); } - - protected: - osg::ref_ptr _rw; -}; - - -/** Proxy class for automatic registration of reader/writers with the Registry.*/ -template -class RegisterImageProcessorProxy -{ - public: - RegisterImageProcessorProxy() - { - if (Registry::instance()) - { - _rw = new T; - Registry::instance()->addImageProcessor(_rw.get()); - } - } - - ~RegisterImageProcessorProxy() - { - if (Registry::instance()) - { - Registry::instance()->removeImageProcessor(_rw.get()); - } - } - - T* get() { return _rw.get(); } - - protected: - osg::ref_ptr _rw; -}; - -struct PluginFunctionProxy -{ - PluginFunctionProxy(CPluginFunction function) { (function)(); } -}; - -#define USE_OSGPLUGIN(ext) \ - extern "C" void osgdb_##ext(void); \ - static osgDB::PluginFunctionProxy proxy_##ext(osgdb_##ext); - -#define USE_DOTOSGWRAPPER(classname) \ - extern "C" void dotosgwrapper_##classname(void); \ - static osgDB::PluginFunctionProxy proxy_dotosgwrapper_##classname(dotosgwrapper_##classname); - -#define USE_DOTOSGWRAPPER_LIBRARY(libname) \ - extern "C" void dotosgwrapper_library_##libname(void); \ - static osgDB::PluginFunctionProxy proxy_dotosgwrapper_library_##libname(dotosgwrapper_library_##libname); - -#define USE_SERIALIZER_WRAPPER(classname) \ - extern "C" void wrapper_serializer_##classname(void); \ - static osgDB::PluginFunctionProxy proxy_serializer_##classname(wrapper_serializer_##classname); - -#define USE_SERIALIZER_WRAPPER_LIBRARY(libname) \ - extern "C" void wrapper_serializer_library_##libname(void); \ - static osgDB::PluginFunctionProxy proxy_serializer_library_##libname(wrapper_serializer_library_##libname); - -#define USE_COMPRESSOR_WRAPPER(classname) \ - extern "C" void wrapper_serializer_##classname(void); \ - static osgDB::PluginFunctionProxy proxy_compressor_##classname(wrapper_compressor_##classname); - -#define REGISTER_OSGPLUGIN(ext, classname) \ - extern "C" void osgdb_##ext(void) {} \ - static osgDB::RegisterReaderWriterProxy g_proxy_##classname; - -#define REGISTER_OSGIMAGEPROCESSOR(ext, classname) \ - extern "C" void osgdb_##ext(void) {} \ - static osgDB::RegisterImageProcessorProxy g_proxy_##classname; - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/Serializer b/libs/lib/mac32/include/osgDB/Serializer deleted file mode 100644 index 67dd03e77..000000000 --- a/libs/lib/mac32/include/osgDB/Serializer +++ /dev/null @@ -1,985 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGDB__SERIALIZER -#define OSGDB__SERIALIZER - -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace osgDB -{ - -#ifndef OBJECT_CAST - #define OBJECT_CAST static_cast -#endif - -class IntLookup -{ -public: - typedef int Value; - typedef std::map StringToValue; - typedef std::map ValueToString; - - IntLookup() {} - unsigned int size() const { return _stringToValue.size(); } - - void add( const char* str, Value value ) - { - if ( _valueToString.find(value)!=_valueToString.end() ) - { - osg::notify(osg::WARN) << "Duplicate enum value " << value - << " with old string: " << _valueToString[value] - << " and new string: " << str << std::endl; - } - _valueToString[value] = str; - _stringToValue[str] = value; - } - - Value getValue( const char* str ) - { - StringToValue::iterator itr = _stringToValue.find(str); - if ( itr==_stringToValue.end() ) - { - Value value; - std::stringstream stream; - stream << str; stream >> value; - _stringToValue[str] = value; - return value; - } - return itr->second; - } - - const std::string& getString( Value value ) - { - ValueToString::iterator itr = _valueToString.find(value); - if ( itr==_valueToString.end() ) - { - std::string str; - std::stringstream stream; - stream << value; stream >> str; - _valueToString[value] = str; - return _valueToString[value]; - } - return itr->second; - } - -protected: - StringToValue _stringToValue; - ValueToString _valueToString; -}; - -class UserLookupTableProxy -{ -public: - typedef void (*AddValueFunc)( IntLookup* lookup ); - UserLookupTableProxy( AddValueFunc func ) { if ( func ) (*func)(&_lookup); } - - IntLookup _lookup; -}; - -#define BEGIN_USER_TABLE(NAME, CLASS) \ - static void add_user_value_func_##NAME(osgDB::IntLookup*); \ - static osgDB::UserLookupTableProxy s_user_lookup_table_##NAME(&add_user_value_func_##NAME); \ - static void add_user_value_func_##NAME(osgDB::IntLookup* lookup) { typedef CLASS MyClass -#define ADD_USER_VALUE(VALUE) lookup->add(#VALUE, MyClass::VALUE) -#define END_USER_TABLE() } - -#define USER_READ_FUNC(NAME, FUNCNAME) \ - static int FUNCNAME(osgDB::InputStream& is) { \ - int value; if (is.isBinary()) is >> value; \ - else { std::string str; is >> str; \ - value = (s_user_lookup_table_##NAME)._lookup.getValue(str.c_str()); } \ - return value; } - -#define USER_WRITE_FUNC(NAME, FUNCNAME) \ - static void FUNCNAME(osgDB::OutputStream& os, int value) { \ - if (os.isBinary()) os << value; \ - else os << (s_user_lookup_table_##NAME)._lookup.getString(value); } \ - -class BaseSerializer : public osg::Referenced -{ - friend class ObjectWrapper; -public: - enum Type - { - RW_UNDEFINED = 0, RW_USER, RW_OBJECT, RW_IMAGE, RW_LIST, - RW_BOOL, RW_CHAR, RW_UCHAR, RW_SHORT, RW_USHORT, RW_INT, RW_UINT, RW_FLOAT, RW_DOUBLE, - RW_VEC2F, RW_VEC2D, RW_VEC3F, RW_VEC3D, RW_VEC4F, RW_VEC4D, RW_QUAT, RW_PLANE, - RW_MATRIXF, RW_MATRIXD, RW_MATRIX, RW_GLENUM, RW_STRING, RW_ENUM - }; - - BaseSerializer() : _firstVersion(0), _lastVersion(INT_MAX) {} - - virtual bool read( InputStream&, osg::Object& ) = 0; - virtual bool write( OutputStream&, const osg::Object& ) = 0; - virtual const std::string& getName() const = 0; - -protected: - int _firstVersion; // Library version when the serializer is first introduced - int _lastVersion; // Library version when the serializer is last required. -}; - -template -class UserSerializer : public BaseSerializer -{ -public: - typedef bool (*Checker)( const C& ); - typedef bool (*Reader)( InputStream&, C& ); - typedef bool (*Writer)( OutputStream&, const C& ); - - UserSerializer( const char* name, Checker cf, Reader rf, Writer wf ) - : BaseSerializer(), _name(name), _checker(cf), _reader(rf), _writer(wf) {} - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - if ( is.isBinary() ) - { - bool ok = false; is >> ok; - if ( !ok ) return true; - } - else - { - if ( !is.matchString(_name) ) - return true; - } - return (*_reader)(is, object); - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - bool ok = (*_checker)(object); - if ( os.isBinary() ) - { - os << ok; - if ( !ok ) return true; - } - else - { - if ( !ok ) return true; - os << PROPERTY(_name.c_str()); - } - return (*_writer)(os, object); - } - - virtual const std::string& getName() const { return _name; } - -protected: - std::string _name; - Checker _checker; - -public: - Reader _reader; - Writer _writer; -}; - -template -class TemplateSerializer : public BaseSerializer -{ -public: - - TemplateSerializer( const char* name, P def) - : BaseSerializer(), _name(name), _defaultValue(def) {} - - virtual bool read( InputStream& is, osg::Object& obj ) = 0; - virtual bool write( OutputStream& os, const osg::Object& obj ) = 0; - virtual const std::string& getName() const { return _name; } - -protected: - std::string _name; - P _defaultValue; -}; - -template -class PropByValSerializer : public TemplateSerializer

-{ -public: - typedef TemplateSerializer

ParentType; - typedef P (C::*Getter)() const; - typedef void (C::*Setter)( P ); - - PropByValSerializer( const char* name, P def, Getter gf, Setter sf, bool useHex=false ) - : ParentType(name, def), _getter(gf), _setter(sf), _useHex(useHex) {} - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - P value; - if ( is.isBinary() ) - { - is >> value; - if ( ParentType::_defaultValue!=value ) - (object.*_setter)( value ); - } - else if ( is.matchString(ParentType::_name) ) - { - if ( _useHex ) is >> std::hex; - is >> value; - if ( _useHex ) is >> std::dec; - (object.*_setter)( value ); - } - return true; - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - P value = (object.*_getter)(); - if ( os.isBinary() ) - { - os << value; - } - else if ( ParentType::_defaultValue!=value ) - { - os << PROPERTY((ParentType::_name).c_str()); - if ( _useHex ) os << std::hex; - os << value; - if ( _useHex ) os << std::dec; - os << std::endl; - } - return true; - } - -public: - Getter _getter; - Setter _setter; - -protected: - bool _useHex; -}; - -template -class PropByRefSerializer : public TemplateSerializer

-{ -public: - typedef TemplateSerializer

ParentType; - typedef const P& CP; - typedef CP (C::*Getter)() const; - typedef void (C::*Setter)( CP ); - - PropByRefSerializer( const char* name, CP def, Getter gf, Setter sf ) - : ParentType(name, def), _getter(gf), _setter(sf) {} - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - P value; - if ( is.isBinary() ) - { - is >> value; - if ( ParentType::_defaultValue!=value ) - (object.*_setter)( value ); - } - else if ( is.matchString(ParentType::_name) ) - { - is >> value; - (object.*_setter)( value ); - } - return true; - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - CP value = (object.*_getter)(); - if ( os.isBinary() ) - { - os << value; - } - else if ( ParentType::_defaultValue!=value ) - { - os << PROPERTY((ParentType::_name).c_str()) << value << std::endl; - } - return true; - } - -public: - Getter _getter; - Setter _setter; -}; - -template -class MatrixSerializer : public TemplateSerializer -{ -public: - typedef TemplateSerializer ParentType; - typedef const osg::Matrix& (C::*Getter)() const; - typedef void (C::*Setter)( const osg::Matrix& ); - - MatrixSerializer( const char* name, const osg::Matrix& def, Getter gf, Setter sf ) - : ParentType(name, def), _getter(gf), _setter(sf) {} - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - osg::Matrix value; - if ( is.isBinary() ) - { - readMatrixImplementation( is, value ); - if ( ParentType::_defaultValue!=value ) - (object.*_setter)( value ); - } - else if ( is.matchString(ParentType::_name) ) - { - readMatrixImplementation( is, value ); - (object.*_setter)( value ); - } - return true; - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - - const C& object = OBJECT_CAST(obj); - const osg::Matrix& value = (object.*_getter)(); - if ( os.isBinary() ) - { - os << value; - } - else if ( ParentType::_defaultValue!=value ) - { - os << PROPERTY((ParentType::_name).c_str()) << value << std::endl; - } - return true; - } - -protected: - void readMatrixImplementation( InputStream& is, osg::Matrix& matrix ) - { -#if 1 - is >> matrix; -#else - if ( is.getUseFloatMatrix() ) - { - osg::Matrixf realValue; is >> realValue; - matrix = realValue; - } - else - { - osg::Matrixd realValue; is >> realValue; - matrix = realValue; - } -#endif - } - -public: - Getter _getter; - Setter _setter; -}; - -template -class GLenumSerializer : public TemplateSerializer

-{ -public: - typedef TemplateSerializer

ParentType; - typedef P (C::*Getter)() const; - typedef void (C::*Setter)( P ); - - GLenumSerializer( const char* name, P def, Getter gf, Setter sf ) - : ParentType(name, def), _getter(gf), _setter(sf) {} - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - if ( is.isBinary() ) - { - GLenum value; is >> value; - if ( ParentType::_defaultValue!=static_cast

(value) ) - (object.*_setter)( static_cast

(value) ); - } - else if ( is.matchString(ParentType::_name) ) - { - DEF_GLENUM(value); is >> value; - (object.*_setter)( static_cast

(value.get()) ); - } - return true; - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - const P value = (object.*_getter)(); - if ( os.isBinary() ) - { - os << static_cast(value); - } - else if ( ParentType::_defaultValue!=value ) - { - os << PROPERTY((ParentType::_name).c_str()) << GLENUM(value) << std::endl; - } - return true; - } - -public: - Getter _getter; - Setter _setter; -}; - -template -class StringSerializer : public TemplateSerializer -{ -public: - typedef TemplateSerializer ParentType; - typedef const std::string& (C::*Getter)() const; - typedef void (C::*Setter)( const std::string& ); - - StringSerializer( const char* name, const std::string& def, Getter gf, Setter sf ) - : ParentType(name, def), _getter(gf), _setter(sf) {} - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - std::string value; - if ( is.isBinary() ) - { - is >> value; - if ( ParentType::_defaultValue!=value ) - (object.*_setter)( value ); - } - else if ( is.matchString(ParentType::_name) ) - { - is.readWrappedString( value ); - if ( !value.empty() ) - (object.*_setter)( value ); - } - return true; - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - const std::string& value = (object.*_getter)(); - if ( os.isBinary() ) - { - os << value; - } - else if ( ParentType::_defaultValue!=value ) - { - os << PROPERTY((ParentType::_name).c_str()); - os.writeWrappedString( value ); - os << std::endl; - } - return true; - } - -public: - Getter _getter; - Setter _setter; -}; - -template -class ObjectSerializer : public TemplateSerializer -{ -public: - typedef TemplateSerializer ParentType; - typedef const P* (C::*Getter)() const; - typedef void (C::*Setter)( P* ); - - ObjectSerializer( const char* name, P* def, Getter gf, Setter sf ) - : ParentType(name, def), _getter(gf), _setter(sf) {} - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - bool hasObject = false; - if ( is.isBinary() ) - { - is >> hasObject; - if ( hasObject ) - { - P* value = dynamic_cast( is.readObject() ); - if ( ParentType::_defaultValue!=value ) - (object.*_setter)( value ); - } - } - else if ( is.matchString(ParentType::_name) ) - { - is >> hasObject; - if ( hasObject ) - { - is >> BEGIN_BRACKET; - P* value = dynamic_cast( is.readObject() ); - if ( ParentType::_defaultValue!=value ) - (object.*_setter)( value ); - is >> END_BRACKET; - } - } - return true; - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - const P* value = (object.*_getter)(); - bool hasObject = (value!=NULL); - if ( os.isBinary() ) - { - os << hasObject; - os.writeObject( value ); - } - else if ( ParentType::_defaultValue!=value ) - { - os << PROPERTY((ParentType::_name).c_str()) << hasObject; - if ( hasObject ) - { - os << BEGIN_BRACKET << std::endl; - os.writeObject( value ); - os << END_BRACKET; - } - os << std::endl; - } - return true; - } - -public: - Getter _getter; - Setter _setter; -}; - -template -class ImageSerializer : public TemplateSerializer -{ -public: - typedef TemplateSerializer ParentType; - typedef const P* (C::*Getter)() const; - typedef void (C::*Setter)( P* ); - - ImageSerializer( const char* name, P* def, Getter gf, Setter sf ) - : ParentType(name, def), _getter(gf), _setter(sf) {} - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - bool hasObject = false; - if ( is.isBinary() ) - { - is >> hasObject; - if ( hasObject ) - { - P* value = dynamic_cast( is.readImage() ); - if ( ParentType::_defaultValue!=value ) - (object.*_setter)( value ); - } - } - else if ( is.matchString(ParentType::_name) ) - { - is >> hasObject; - if ( hasObject ) - { - is >> BEGIN_BRACKET; - P* value = dynamic_cast( is.readImage() ); - if ( ParentType::_defaultValue!=value ) - (object.*_setter)( value ); - is >> END_BRACKET; - } - } - return true; - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - const P* value = (object.*_getter)(); - bool hasObject = (value!=NULL); - if ( os.isBinary() ) - { - os << hasObject; - os.writeImage( value ); - } - else if ( ParentType::_defaultValue!=value ) - { - os << PROPERTY((ParentType::_name).c_str()) << hasObject; - if ( hasObject ) - { - os << BEGIN_BRACKET << std::endl; - os.writeImage( value ); - os << END_BRACKET; - } - os << std::endl; - } - return true; - } - -public: - Getter _getter; - Setter _setter; -}; - -template -class EnumSerializer : public TemplateSerializer

-{ -public: - typedef TemplateSerializer

ParentType; - typedef P (C::*Getter)() const; - typedef B (C::*Setter)( P ); - - EnumSerializer( const char* name, P def, Getter gf, Setter sf ) - : ParentType(name, def), _getter(gf), _setter(sf) {} - - void add( const char* str, P value ) - { _lookup.add(str, static_cast(value)); } - - P getValue( const char* str ) - { return static_cast

(_lookup.getValue(str)); } - - const std::string& getString( P value ) - { return _lookup.getString(static_cast(value)); } - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - IntLookup::Value value; - if ( is.isBinary() ) - { - is >> value; - if ( ParentType::_defaultValue!=static_cast

(value) ) - (object.*_setter)( static_cast

(value) ); - } - else if ( is.matchString(ParentType::_name) ) - { - std::string str; is >> str; - (object.*_setter)( getValue(str.c_str()) ); - } - return true; - } - - virtual bool write( osgDB::OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - const P value = (object.*_getter)(); - if ( os.isBinary() ) - { - os << (IntLookup::Value)value; - } - else if ( ParentType::_defaultValue!=value ) - { - os << PROPERTY((ParentType::_name).c_str()) << getString(value) << std::endl; - } - return true; - } - -public: - Getter _getter; - Setter _setter; - -protected: - IntLookup _lookup; -}; - - -template -class ListSerializer : public BaseSerializer -{ -public: - typedef typename P::value_type ValueType; - typedef typename P::const_iterator ConstIterator; - typedef const P& (C::*Getter)() const; - typedef void (C::*Setter)( const P& ); - - ListSerializer( const char* name, Getter gf, Setter sf ) - : _name(name), _getter(gf), _setter(sf) {} - - virtual const std::string& getName() const { return _name; } - - virtual bool read( InputStream& is, osg::Object& obj ) - { - C& object = OBJECT_CAST(obj); - unsigned int size = 0; - P list; - if ( is.isBinary() ) - { - is >> size; - for ( unsigned int i=0; i> value; - list.push_back( value ); - } - if ( size>0 ) (object.*_setter)( list ); - } - else if ( is.matchString(_name) ) - { - is >> size; - if ( size>0 ) is >> BEGIN_BRACKET; - for ( unsigned int i=0; i> value; - list.push_back( value ); - } - if ( size>0 ) - { - is >> END_BRACKET; - (object.*_setter)( list ); - } - } - return true; - } - - virtual bool write( OutputStream& os, const osg::Object& obj ) - { - const C& object = OBJECT_CAST(obj); - const P& list = (object.*_getter)(); - unsigned int size = (unsigned int)list.size(); - if ( os.isBinary() ) - { - os << size; - for ( ConstIterator itr=list.begin(); - itr!=list.end(); ++itr ) - { - os << (*itr); - } - } - else if ( size>0 ) - { - os << PROPERTY((_name).c_str()) << size << BEGIN_BRACKET << std::endl; - for ( ConstIterator itr=list.begin(); - itr!=list.end(); ++itr ) - { - os << (*itr); - } - os << std::endl; - os << END_BRACKET << std::endl; - } - return true; - } - -public: - std::string _name; - Getter _getter; - Setter _setter; -}; - -// ADDING MANIPULATORS -#define ADD_SERIALIZER(S) \ - wrapper->addSerializer( (S) ) - -#define ADD_USER_SERIALIZER(PROP) \ - wrapper->addSerializer( new osgDB::UserSerializer( \ - #PROP, &check##PROP, &read##PROP, &write##PROP), osgDB::BaseSerializer::RW_USER ) - -#define ADD_BOOL_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, bool >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_BOOL ) - -#define ADD_CHAR_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, char >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_CHAR ) - -#define ADD_UCHAR_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned char >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_UCHAR ) - -#define ADD_SHORT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, short >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_SHORT ) - -#define ADD_USHORT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned short >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_USHORT ) - -#define ADD_HEXSHORT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned short >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP, true), osgDB::BaseSerializer::RW_USHORT ) - -#define ADD_INT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, int >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_INT ) - -#define ADD_UINT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned int >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_UINT ) - -#define ADD_GLINT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, GLint >( \ - #PROP, ((int)(DEF)), &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_INT ) - -#define ADD_HEXINT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned int >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP, true), osgDB::BaseSerializer::RW_UINT ) - -#define ADD_FLOAT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, float >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_FLOAT ) - -#define ADD_DOUBLE_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, double >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_DOUBLE ) - -#define ADD_REF_BOOL_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, bool >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_BOOL ) - -#define ADD_REF_CHAR_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, char >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_CHAR ) - -#define ADD_REF_UCHAR_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned char >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_UCHAR ) - -#define ADD_REF_SHORT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, short >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_SHORT ) - -#define ADD_REF_USHORT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned short >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_USHORT ) - -#define ADD_REF_HEXSHORT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned short >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP, true), osgDB::BaseSerializer::RW_USHORT ) - -#define ADD_REF_INT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, int >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_INT ) - -#define ADD_REF_UINT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned int >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_UINT ) - -#define ADD_REF_GLINT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, GLint >( \ - #PROP, ((int)(DEF)), &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_INT ) - -#define ADD_REF_HEXINT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned int >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP, true), osgDB::BaseSerializer::RW_UINT ) - -#define ADD_REF_FLOAT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, float >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_FLOAT ) - -#define ADD_REF_DOUBLE_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, double >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_DOUBLE ) - -#define ADD_VEC2F_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2f >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2F ) - -#define ADD_VEC2D_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2d >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2D ) - -#define ADD_VEC2_SERIALIZER(PROP, DEF) ADD_VEC2F_SERIALIZER(PROP, DEF) - -#define ADD_VEC3F_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3f >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3F ) - -#define ADD_VEC3D_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3d >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3D ) - -#define ADD_VEC3_SERIALIZER(PROP, DEF) ADD_VEC3F_SERIALIZER(PROP, DEF) - -#define ADD_VEC4F_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4f >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4F ) - -#define ADD_VEC4D_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4d >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4D ) - -#define ADD_VEC4_SERIALIZER(PROP, DEF) ADD_VEC4F_SERIALIZER(PROP, DEF) - -#define ADD_QUAT_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Quat >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_QUAT ) - -#define ADD_PLANE_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Plane >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_PLANE ) - -#define ADD_MATRIXF_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Matrixf >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_MATRIXF ) - -#define ADD_MATRIXD_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Matrixd >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_MATRIXD ) - -#define ADD_MATRIX_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::MatrixSerializer< MyClass >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_MATRIX ) - -#define ADD_GLENUM_SERIALIZER(PROP, TYPE, DEF) \ - wrapper->addSerializer( new osgDB::GLenumSerializer< MyClass, TYPE >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_GLENUM ) - -#define ADD_STRING_SERIALIZER(PROP, DEF) \ - wrapper->addSerializer( new osgDB::StringSerializer< MyClass >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_STRING ) - -#define ADD_OBJECT_SERIALIZER(PROP, TYPE, DEF) \ - wrapper->addSerializer( new osgDB::ObjectSerializer< MyClass, TYPE >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_OBJECT ) - -#define ADD_IMAGE_SERIALIZER(PROP, TYPE, DEF) \ - wrapper->addSerializer( new osgDB::ImageSerializer< MyClass, TYPE >( \ - #PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_IMAGE ) - -#define ADD_LIST_SERIALIZER(PROP, TYPE) \ - wrapper->addSerializer( new osgDB::ListSerializer< MyClass, TYPE >( \ - #PROP, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_LIST ) - -#define BEGIN_ENUM_SERIALIZER(PROP, DEF) \ - { typedef osgDB::EnumSerializer MySerializer; \ - osg::ref_ptr serializer = new MySerializer( \ - #PROP, MyClass::DEF, &MyClass::get##PROP, &MyClass::set##PROP) - -#define BEGIN_ENUM_SERIALIZER2(PROP, TYPE, DEF) \ - { typedef osgDB::EnumSerializer MySerializer; \ - osg::ref_ptr serializer = new MySerializer( \ - #PROP, MyClass::DEF, &MyClass::get##PROP, &MyClass::set##PROP) - -#define BEGIN_ENUM_SERIALIZER3(PROP, DEF) \ - { typedef osgDB::EnumSerializer MySerializer; \ - osg::ref_ptr serializer = new MySerializer( \ - #PROP, MyClass::DEF, &MyClass::get##PROP, &MyClass::set##PROP) - -#define BEGIN_ENUM_SERIALIZER4(PROPERTIES_CLASS, PROP, DEF) \ - { typedef osgDB::EnumSerializer MySerializer; \ - osg::ref_ptr serializer = new MySerializer( \ - #PROP, PROPERTIES_CLASS::DEF, &MyClass::get##PROP, &MyClass::set##PROP) - -#define ADD_ENUM_VALUE(VALUE) \ - serializer->add(#VALUE, MyClass::VALUE) - -#define ADD_ENUM_CLASS_VALUE(CLASS, VALUE) \ - serializer->add(#VALUE, CLASS::VALUE) - -#define END_ENUM_SERIALIZER() \ - wrapper->addSerializer(serializer.get(), osgDB::BaseSerializer::RW_ENUM); } - -// VERSION CONTROL OPERATORS -#define UPDATE_TO_VERSION(VER) \ - wrapper->setUpdatedVersion( (VER) ); - -#define REMOVE_SERIALIZER(PROP) \ - wrapper->markSerializerAsRemoved( #PROP ); - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/SharedStateManager b/libs/lib/mac32/include/osgDB/SharedStateManager deleted file mode 100644 index bfd113b11..000000000 --- a/libs/lib/mac32/include/osgDB/SharedStateManager +++ /dev/null @@ -1,141 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_SHAREDSTATEMANAGER -#define OSGDB_SHAREDSTATEMANAGER 1 - - -#include -#include - -#include - -#include - -#include - - -namespace osgDB { - - class OSGDB_EXPORT SharedStateManager : public osg::NodeVisitor - { - public: - - enum ShareMode - { - SHARE_NONE = 0, - SHARE_STATIC_TEXTURES = 1<<0, - SHARE_UNSPECIFIED_TEXTURES = 1<<1, - SHARE_DYNAMIC_TEXTURES = 1<<2, - SHARE_STATIC_STATESETS = 1<<3, - SHARE_UNSPECIFIED_STATESETS = 1<<4, - SHARE_DYNAMIC_STATESETS = 1<<5, - SHARE_TEXTURES = SHARE_STATIC_TEXTURES | SHARE_UNSPECIFIED_TEXTURES, - SHARE_STATESETS = SHARE_STATIC_STATESETS | SHARE_UNSPECIFIED_STATESETS, - SHARE_ALL = SHARE_TEXTURES | - SHARE_STATESETS - }; - - SharedStateManager(unsigned int mode = SHARE_ALL); - - META_NodeVisitor("osgDB","SharedStateManager") - - void setShareMode(unsigned int mode); - - unsigned int getShareMode() { return _shareMode; } - - // Call right after each unload and before Registry cache prune. - void prune(); - - // Call right after each load - void share(osg::Node *node, OpenThreads::Mutex *mt=0); - - void apply(osg::Node& node); - void apply(osg::Geode& geode); - - // Answers the question "Will this state set be eliminated by - // the SharedStateManager because an equivalent one has been - // seen already?" Safe to call from the pager thread. - bool isShared(osg::StateSet* stateSet); - - bool isShared(osg::Texture* texture); - - void releaseGLObjects(osg::State* state ) const; - - protected: - - inline bool shareTexture(osg::Object::DataVariance variance) - { - return _shareTexture[variance]; - } - - inline bool shareStateSet(osg::Object::DataVariance variance) - { - return _shareStateSet[variance]; - } - - - void process(osg::StateSet* ss, osg::Object* parent); - osg::StateAttribute *find(osg::StateAttribute *sa); - osg::StateSet *find(osg::StateSet *ss); - void setStateSet(osg::StateSet* ss, osg::Object* object); - void shareTextures(osg::StateSet* ss); - - struct CompareStateAttributes - { - bool operator()(const osg::ref_ptr& lhs, - const osg::ref_ptr& rhs) const - { - return *lhs < *rhs; - } - }; - - struct CompareStateSets - { - bool operator()(const osg::ref_ptr& lhs, - const osg::ref_ptr& rhs) const - { - return lhs->compare(*rhs, true) < 0; - } - }; - - // Lists of shared objects - typedef std::set< osg::ref_ptr, CompareStateAttributes > TextureSet; - TextureSet _sharedTextureList; - - typedef std::set< osg::ref_ptr, CompareStateSets > StateSetSet; - StateSetSet _sharedStateSetList; - - // Temporary lists just to avoid unnecessary find calls - typedef std::pair TextureSharePair; - typedef std::map TextureTextureSharePairMap; - TextureTextureSharePairMap tmpSharedTextureList; - - typedef std::pair StateSetSharePair; - typedef std::map StateSetStateSetSharePairMap; - StateSetStateSetSharePairMap tmpSharedStateSetList; - - unsigned int _shareMode; - bool _shareTexture[3]; - bool _shareStateSet[3]; - - // Share connection mutex - - OpenThreads::Mutex *_mutex; - // Mutex for doing isShared queries from other threads - mutable OpenThreads::Mutex _listMutex; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/StreamOperator b/libs/lib/mac32/include/osgDB/StreamOperator deleted file mode 100644 index f808d2d7d..000000000 --- a/libs/lib/mac32/include/osgDB/StreamOperator +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef OSGDB_STREAMOPERATOR -#define OSGDB_STREAMOPERATOR - -#include -#include -#include - -namespace osgDB -{ - -class OSGDB_EXPORT OutputIterator : public osg::Referenced -{ -public: - OutputIterator() : _out(0) {} - virtual ~OutputIterator() {} - - void setStream( std::ostream* ostream ) { _out = ostream; } - std::ostream* getStream() { return _out; } - const std::ostream* getStream() const { return _out; } - - virtual bool isBinary() const = 0; - - virtual void writeBool( bool b ) = 0; - virtual void writeChar( char c ) = 0; - virtual void writeUChar( unsigned char c ) = 0; - virtual void writeShort( short s ) = 0; - virtual void writeUShort( unsigned short s ) = 0; - virtual void writeInt( int i ) = 0; - virtual void writeUInt( unsigned int i ) = 0; - virtual void writeLong( long l ) = 0; - virtual void writeULong( unsigned long l ) = 0; - virtual void writeFloat( float f ) = 0; - virtual void writeDouble( double d ) = 0; - virtual void writeString( const std::string& s ) = 0; - virtual void writeStream( std::ostream& (*fn)(std::ostream&) ) = 0; - virtual void writeBase( std::ios_base& (*fn)(std::ios_base&) ) = 0; - - virtual void writeGLenum( const ObjectGLenum& value ) = 0; - virtual void writeProperty( const ObjectProperty& prop ) = 0; - virtual void writeMark( const ObjectMark& mark ) = 0; - virtual void writeCharArray( const char* s, unsigned int size ) = 0; - virtual void writeWrappedString( const std::string& str ) = 0; - - virtual void flush() { _out->flush(); } - -protected: - // Return true if the manipulator is std::endl - bool isEndl( std::ostream& (*fn)(std::ostream&) ) - { -#ifdef __sun - // What a mess, but solaris does not like taking the address below - std::stringstream ss; - ss << fn; - std::string s = ss.str(); - return !s.empty() && s[0] == '\n'; -#else - return fn==static_cast(std::endl); -#endif - } - - std::ostream* _out; -}; - -class OSGDB_EXPORT InputIterator : public osg::Referenced -{ -public: - InputIterator() : _in(0), _failed(false) {} - virtual ~InputIterator() {} - - void setStream( std::istream* istream ) { _in = istream; } - std::istream* getStream() { return _in; } - const std::istream* getStream() const { return _in; } - - void checkStream() const { if (_in->rdstate()&_in->failbit) _failed = true; } - bool isFailed() const { return _failed; } - - virtual bool isBinary() const = 0; - - virtual void readBool( bool& b ) = 0; - virtual void readChar( char& c ) = 0; - virtual void readSChar( signed char& c ) = 0; - virtual void readUChar( unsigned char& c ) = 0; - virtual void readShort( short& s ) = 0; - virtual void readUShort( unsigned short& s ) = 0; - virtual void readInt( int& i ) = 0; - virtual void readUInt( unsigned int& i ) = 0; - virtual void readLong( long& l ) = 0; - virtual void readULong( unsigned long& l ) = 0; - virtual void readFloat( float& f ) = 0; - virtual void readDouble( double& d ) = 0; - virtual void readString( std::string& s ) = 0; - virtual void readStream( std::istream& (*fn)(std::istream&) ) = 0; - virtual void readBase( std::ios_base& (*fn)(std::ios_base&) ) = 0; - - virtual void readGLenum( ObjectGLenum& value ) = 0; - virtual void readProperty( ObjectProperty& prop ) = 0; - virtual void readMark( ObjectMark& mark ) = 0; - virtual void readCharArray( char* s, unsigned int size ) = 0; - virtual void readWrappedString( std::string& str ) = 0; - - virtual bool matchString( const std::string& /*str*/ ) { return false; } - virtual void advanceToCurrentEndBracket() {} - -protected: - std::istream* _in; - mutable bool _failed; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/Version b/libs/lib/mac32/include/osgDB/Version deleted file mode 100644 index e6c6bf907..000000000 --- a/libs/lib/mac32/include/osgDB/Version +++ /dev/null @@ -1,46 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_VERSION -#define OSGDB_VERSION 1 - -#include - -extern "C" { - -/** - * osgDBGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgDBGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph (OSG) DB library - # - AC_CHECK_LIB(osg, osgDBGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph DB library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -extern OSGDB_EXPORT const char* osgDBGetVersion(); - -/** - * getLibraryName() returns the library name in human friendly form. -*/ -extern OSGDB_EXPORT const char* osgDBGetLibraryName(); - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/WriteFile b/libs/lib/mac32/include/osgDB/WriteFile deleted file mode 100644 index 2567edb4d..000000000 --- a/libs/lib/mac32/include/osgDB/WriteFile +++ /dev/null @@ -1,130 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_WRITEFILE -#define OSGDB_WRITEFILE 1 - -#include -#include -#include - -#include -#include - -#include - -namespace osgDB { - -/** Write an osg::Object to file. - * Return true on success, - * return false on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -extern OSGDB_EXPORT bool writeObjectFile(const osg::Object& object, const std::string& filename, const Options* options ); - -/** Write an osg::Object to file. - * Return true on success, - * return false on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -inline bool writeObjectFile(const osg::Object& object, const std::string& filename) -{ - return writeObjectFile( object, filename, Registry::instance()->getOptions() ); -} - -/** Write an osg::Image to file. - * Return true on success, - * return false on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -extern OSGDB_EXPORT bool writeImageFile(const osg::Image& image, const std::string& filename, const Options* options ); - -/** Write an osg::Image to file. - * Return true on success, - * return false on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -inline bool writeImageFile(const osg::Image& image, const std::string& filename) -{ - return writeImageFile( image, filename, Registry::instance()->getOptions() ); -} - -/** Write an osg::HeightField to file. - * Return true on success, - * return false on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -extern OSGDB_EXPORT bool writeHeightFieldFile(const osg::HeightField& hf, const std::string& filename, const Options* options ); - -/** Write an osg::HeightField to file. - * Return true on success, - * return false on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -inline bool writeHeightFieldFile(const osg::HeightField& hf, const std::string& filename) -{ - return writeHeightFieldFile( hf, filename, Registry::instance()->getOptions() ); -} - -/** Write an osg::Node to file. - * Return true on success, - * return false on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -extern OSGDB_EXPORT bool writeNodeFile(const osg::Node& node, const std::string& filename, const Options* options ); - -/** Write an osg::Node to file. - * Return true on success, - * return false on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -inline bool writeNodeFile(const osg::Node& node, const std::string& filename) -{ - return writeNodeFile( node, filename, Registry::instance()->getOptions() ); -} - -/** Write an osg::Shader to file. - * Return true on success, - * return false on failure. - * Use the Options object to control cache operations and file search paths in osgDB::Registry. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -extern OSGDB_EXPORT bool writeShaderFile(const osg::Shader& shader, const std::string& filename, const Options* options ); - -/** Write an osg::Shader to file. - * Return true on success, - * return false on failure. - * The osgDB::Registry is used to load the appropriate ReaderWriter plugin - * for the filename extension, and this plugin then handles the request - * to write the specified file.*/ -inline bool writeShaderFile(const osg::Shader& shader, const std::string& filename) -{ - return writeShaderFile( shader, filename, Registry::instance()->getOptions() ); -} - -} - -#endif diff --git a/libs/lib/mac32/include/osgDB/XmlParser b/libs/lib/mac32/include/osgDB/XmlParser deleted file mode 100644 index 23bd68a46..000000000 --- a/libs/lib/mac32/include/osgDB/XmlParser +++ /dev/null @@ -1,156 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_XML_PARSER -#define OSGDB_XML_PARSER 1 - -#include - -namespace osgDB { - -// forward declare -class XmlNode; - -/** read an Xml file, find the file in Options DataFilePathList.*/ -extern OSGDB_EXPORT XmlNode* readXmlFile(const std::string& filename,const Options* options); - -/** read an Xml file, find the file in osgDB::Registry's eaderWriter::Options DataFilePathList.*/ -inline XmlNode* readXmlFile(const std::string& filename) -{ - return readXmlFile(filename, osgDB::Registry::instance()->getOptions()); -} - -/** read an Xml from from an istream.*/ -extern OSGDB_EXPORT XmlNode* readXmlStream(std::istream& fin); - -extern OSGDB_EXPORT std::string trimEnclosingSpaces(const std::string& str); - -/** XmlNode class for very basic reading and writing of xml files.*/ -class OSGDB_EXPORT XmlNode : public osg::Referenced -{ - public: - - XmlNode(); - - enum NodeType - { - UNASSIGNED, - ATOM, - NODE, - GROUP, - ROOT, - COMMENT, - INFORMATION - }; - - typedef std::map< std::string, std::string > Properties; - typedef std::vector< osg::ref_ptr > Children; - - NodeType type; - std::string name; - std::string contents; - Properties properties; - Children children; - - std::string getTrimmedContents() const { return trimEnclosingSpaces(contents); } - - public: - - class OSGDB_EXPORT ControlMap - { - public: - ControlMap(); - - typedef std::map< std::string, int > ControlToCharacterMap; - typedef std::map< int, std::string> CharacterToControlMap; - - void addControlToCharacter(const std::string& control, int c); - - ControlToCharacterMap _controlToCharacterMap; - CharacterToControlMap _characterToControlMap; - - private: - - void setUpControlMappings(); - - }; - - class OSGDB_EXPORT Input : public ControlMap - { - public: - - Input(); - Input(const Input&); - - ~Input(); - - typedef std::string::size_type size_type; - - void open(const std::string& filename); - void attach(std::istream& istream); - - void readAllDataIntoBuffer(); - - operator bool () const { return _currentPos<_buffer.size(); } - - size_type currentPosition() const { return _currentPos; } - - int get() { if (_currentPos<_buffer.size()) return _buffer[_currentPos++]; else return -1; } - - int operator [] (size_type i) const { if ((_currentPos+i)<_buffer.size()) return _buffer[_currentPos+i]; else return -1; } - - void operator ++ () { if (_currentPos<_buffer.size()) ++_currentPos; } - - void operator += (size_type n) { if ((_currentPos+n)<_buffer.size()) _currentPos+=n; else _currentPos = _buffer.size(); } - - void skipWhiteSpace(); - - std::string substr(size_type pos, size_type n=std::string::npos) { return (_currentPos<_buffer.size()) ? _buffer.substr(_currentPos+pos,n) : std::string(); } - - size_type find(const std::string& str) - { - if (_currentPos<_buffer.size()) - { - size_type pos = _buffer.find(str, _currentPos); - if (pos==std::string::npos) return std::string::npos; - else return pos-_currentPos; - } else return std::string::npos; - } - - bool match(const std::string& str) { return (_currentPos<_buffer.size()) ? _buffer.compare(_currentPos, str.size(), str)==0 : false; } - - private: - - size_type _currentPos; - - std::ifstream _fin; - std::string _buffer; - - }; - - bool read(Input& input); - bool write(std::ostream& fout, const std::string& indent = "") const; - - bool write(const ControlMap& controlMap, std::ostream& fout, const std::string& indent = "") const; - bool writeString(const ControlMap& controlMap, std::ostream& fout, const std::string& str) const; - - protected: - - bool writeChildren(const ControlMap& controlMap, std::ostream& fout, const std::string& indent) const; - bool writeProperties(const ControlMap& controlMap, std::ostream& fout) const; - - bool readAndReplaceControl(std::string& contents, Input& input); -}; - -} -#endif diff --git a/libs/lib/mac32/include/osgDB/fstream b/libs/lib/mac32/include/osgDB/fstream deleted file mode 100644 index 3f6b803af..000000000 --- a/libs/lib/mac32/include/osgDB/fstream +++ /dev/null @@ -1,69 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGDB_FSTREAM -#define OSGDB_FSTREAM 1 - -#include -#include - -#include - -namespace osgDB -{ - -/** -* Replacements for std::fstream, std::ifstream, and std::ofstream to -* automatically handle UTF-8 to UTF-16 filename conversion. Always use one -* of these classes in any OpenSceneGraph code instead of the STL equivalent. -*/ - -class OSGDB_EXPORT fstream : public std::fstream -{ -public: - fstream(); - explicit fstream(const char* filename, - std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out); - ~fstream(); - - void open(const char* filename, - std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out); -}; - -class OSGDB_EXPORT ifstream : public std::ifstream -{ -public: - ifstream(); - explicit ifstream(const char* filename, - std::ios_base::openmode mode = std::ios_base::in); - ~ifstream(); - - void open(const char* filename, - std::ios_base::openmode mode = std::ios_base::in); -}; - -class OSGDB_EXPORT ofstream : public std::ofstream -{ -public: - ofstream(); - explicit ofstream(const char* filename, - std::ios_base::openmode mode = std::ios_base::out); - ~ofstream(); - - void open(const char* filename, - std::ios_base::openmode mode = std::ios_base::out); -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/AnisotropicLighting b/libs/lib/mac32/include/osgFX/AnisotropicLighting deleted file mode 100644 index 50bde13aa..000000000 --- a/libs/lib/mac32/include/osgFX/AnisotropicLighting +++ /dev/null @@ -1,122 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_ANISOTROPICLIGHTING_ -#define OSGFX_ANISOTROPICLIGHTING_ - -#include -#include - -#include -#include - -namespace osgFX -{ - - /** - This single-pass effect implements a sort of anisotropic - lighting that replaces the standard OpenGL lighting model. - The final color of vertices is not computed directly, it is - the result of a texture lookup on a user-supplied lighting - image map. A vertex program is used to compute the s and t - texture coordinates as follows: s = (N dot H) ; t = (N dot L) - where N is the vertex normal, L is the light-to-vertex vector, - H is the half-way vector. This is a good example of how you - can use the State::getInitialViewMatrix() method to retrieve - the view matrix and perform view-dependant effects without - fakes of any kind. - This effect requires the ARB_vertex_program extension. - */ - class OSGFX_EXPORT AnisotropicLighting: public Effect { - public: - AnisotropicLighting(); - AnisotropicLighting(const AnisotropicLighting& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Effect(osgFX, AnisotropicLighting, - - "Anisotropic Lighting", - - "This single-pass effect implements a sort of anisotropic " - "lighting that replaces the standard OpenGL lighting model.\n" - "The final color of vertices is not computed directly, it is " - "the result of a texture lookup on a user-supplied lighting " - "image map. A vertex program is used to compute the s and t " - "texture coordinates as follows: s = (N dot H) ; t = (N dot L) " - "where N is the vertex normal, L is the light-to-vertex vector, " - "H is the half-way vector. This is a good example of how you " - "can use the State::getInitialViewMatrix() method to retrieve " - "the view matrix and perform view-dependant effects without " - "fakes of any kind.\n" - "This effect requires the ARB_vertex_program extension.", - - "Marco Jez"); - - - /** get the lighting map */ - inline osg::Image* getLightingMap(); - - /** get the const lighting map */ - inline const osg::Image* getLightingMap() const; - - /** set the lighting map */ - inline void setLightingMap(osg::Image* image); - - /** get the OpenGL light number */ - inline int getLightNumber() const; - - /** set the OpenGL light number that will be used in lighting computations */ - inline void setLightNumber(int n); - - protected: - virtual ~AnisotropicLighting() {} - AnisotropicLighting& operator=(const AnisotropicLighting&) { return *this; } - - bool define_techniques(); - - private: - int _lightnum; - osg::ref_ptr _texture; - }; - - // INLINE METHODS - - inline osg::Image* AnisotropicLighting::getLightingMap() - { - return _texture->getImage(); - } - - inline const osg::Image* AnisotropicLighting::getLightingMap() const - { - return _texture->getImage(); - } - - inline void AnisotropicLighting::setLightingMap(osg::Image* image) - { - _texture->setImage(image); - } - - inline int AnisotropicLighting::getLightNumber() const - { - return _lightnum; - } - - inline void AnisotropicLighting::setLightNumber(int n) - { - _lightnum = n; - dirtyTechniques(); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/BumpMapping b/libs/lib/mac32/include/osgFX/BumpMapping deleted file mode 100644 index b4429a881..000000000 --- a/libs/lib/mac32/include/osgFX/BumpMapping +++ /dev/null @@ -1,198 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_BUMPMAPPING_ -#define OSGFX_BUMPMAPPING_ - -#include -#include - -#include -#include - -namespace osgFX -{ - - /** - This effect makes surfaces appear bumpy. Children nodes must use two textures, - one for diffuse color and one for the normal map (which can be created - from a height map with tools like nVIDIA's normal map generator). Furthermore, - tangent-space basis vectors must be created and assigned to each Geometry; this - can be done quickly by calling BumpMapping::prepareChildren(). Note that both - diffuse and normal map textures must have corresponding UV maps defined in - Geometry objects. - This effect defines a preferred technique which uses ARB vertex & fragment - programs, and a fallback technique which doesn't use fragment programs. The - latter is more limited though since it can't handle ambient and specular - components. - */ - class OSGFX_EXPORT BumpMapping: public Effect { - public: - BumpMapping(); - BumpMapping(const BumpMapping& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Effect(osgFX, BumpMapping, - - "Bump Mapping", - - "This effect makes surfaces appear bumpy. Children nodes must use two textures, " - "one for diffuse color and one for the normal map (which can be created " - "from a height map with tools like nVIDIA's normal map generator). Furthermore, " - "tangent-space basis vectors must be created and assigned to each Geometry; this " - "can be done quickly by calling BumpMapping::prepareChildren(). Note that both " - "diffuse and normal map textures must have corresponding UV maps defined in " - "Geometry objects.\n" - "This effect defines a preferred technique which uses ARB vertex & fragment " - "programs, and a fallback technique which doesn't use fragment programs. The " - "latter is more limited though since it can't handle ambient and specular " - "components.", - - "Marco Jez"); - - - /** get the OpenGL light number */ - inline int getLightNumber() const; - - /** set the OpenGL light number that will be used in lighting computations */ - inline void setLightNumber(int n); - - /** get the texture unit that contains diffuse color texture. Default is 1 */ - inline int getDiffuseTextureUnit() const; - - /** set the texture unit that contains diffuse color texture. Default is 1 */ - inline void setDiffuseTextureUnit(int n); - - /** get the texture unit that contains normal map texture. Default is 0 */ - inline int getNormalMapTextureUnit() const; - - /** set the texture unit that contains normal map texture. Default is 0 */ - inline void setNormalMapTextureUnit(int n); - - /** get the diffuse color texture that overrides children's texture */ - inline osg::Texture2D* getOverrideDiffuseTexture(); - - /** get the const diffuse color texture that overrides children's texture */ - inline const osg::Texture2D* getOverrideDiffuseTexture() const; - - /** set the diffuse color texture that overrides children's texture */ - inline void setOverrideDiffuseTexture(osg::Texture2D* texture); - - /** get the normal map texture that overrides children's texture */ - inline osg::Texture2D* getOverrideNormalMapTexture(); - - /** get the const normal map texture that overrides children's texture */ - inline const osg::Texture2D* getOverrideNormalMapTexture() const; - - /** set the normal map texture that overrides children's texture */ - inline void setOverrideNormalMapTexture(osg::Texture2D* texture); - - /** - prepare a Geometry for bump lighting. Tangent-space basis vectors are - generated and attached to the geometry as vertex attribute arrays. - */ - void prepareGeometry(osg::Geometry* geo); - - /** prepare a Node for bump lighting, calling prepareGeometry() for each Geometry */ - void prepareNode(osg::Node* node); - - /** prepare children for bump lighting. Actually calls prepareNode() for each child */ - void prepareChildren(); - - /** set up a demo environment with predefined diffuse and normal maps, as well as texture coordinates */ - void setUpDemo(); - - protected: - virtual ~BumpMapping() {} - BumpMapping &operator=(const BumpMapping &) { return *this; } - - bool define_techniques(); - - private: - int _lightnum; - int _diffuse_unit; - int _normal_unit; - osg::ref_ptr _diffuse_tex; - osg::ref_ptr _normal_tex; - }; - - // INLINE METHODS - - inline int BumpMapping::getLightNumber() const - { - return _lightnum; - } - - inline void BumpMapping::setLightNumber(int n) - { - _lightnum = n; - dirtyTechniques(); - } - - inline int BumpMapping::getDiffuseTextureUnit() const - { - return _diffuse_unit; - } - - inline void BumpMapping::setDiffuseTextureUnit(int n) - { - _diffuse_unit = n; - dirtyTechniques(); - } - - inline int BumpMapping::getNormalMapTextureUnit() const - { - return _normal_unit; - } - - inline void BumpMapping::setNormalMapTextureUnit(int n) - { - _normal_unit = n; - dirtyTechniques(); - } - - inline osg::Texture2D* BumpMapping::getOverrideDiffuseTexture() - { - return _diffuse_tex.get(); - } - - inline const osg::Texture2D* BumpMapping::getOverrideDiffuseTexture() const - { - return _diffuse_tex.get(); - } - - inline void BumpMapping::setOverrideDiffuseTexture(osg::Texture2D* texture) - { - _diffuse_tex = texture; - dirtyTechniques(); - } - - inline osg::Texture2D* BumpMapping::getOverrideNormalMapTexture() - { - return _normal_tex.get(); - } - - inline const osg::Texture2D* BumpMapping::getOverrideNormalMapTexture() const - { - return _normal_tex.get(); - } - - inline void BumpMapping::setOverrideNormalMapTexture(osg::Texture2D* texture) - { - _normal_tex = texture; - dirtyTechniques(); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Cartoon b/libs/lib/mac32/include/osgFX/Cartoon deleted file mode 100644 index 8d5a86ede..000000000 --- a/libs/lib/mac32/include/osgFX/Cartoon +++ /dev/null @@ -1,122 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_CARTOON_ -#define OSGFX_CARTOON_ - -#include -#include - -#include -#include - -namespace osgFX -{ - - /** - This effect implements a technique called 'Cel-Shading' to produce a - cartoon-style (non photorealistic) rendering. Two passes are required: - the first one draws solid surfaces, the second one draws the outlines. - A vertex program is used to setup texture coordinates for a sharp lighting - texture on unit 0 which is generated on-the-fly. - This effect requires the ARB_vertex_program extension. - */ - class OSGFX_EXPORT Cartoon: public Effect { - public: - Cartoon(); - Cartoon(const Cartoon& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - // effect class informations - META_Effect( - osgFX, - Cartoon, - - "Cartoon", - - "This effect implements a technique called 'Cel-Shading' to produce a " - "cartoon-style (non photorealistic) rendering. Two passes are required: " - "the first one draws solid surfaces, the second one draws the outlines. " - "A vertex program is used to setup texture coordinates for a sharp lighting " - "texture on unit 0 which is generated on-the-fly.\n" - "This effect requires the ARB_vertex_program extension " - "or OpenGL Shading Language.", - - "Marco Jez; OGLSL port by Mike Weiblen"); - - /** get the outline color */ - inline const osg::Vec4& getOutlineColor() const; - - /** set the outline color */ - inline void setOutlineColor(const osg::Vec4& color); - - /** get the outline line width */ - inline float getOutlineLineWidth() const; - - /** set the outline line width */ - inline void setOutlineLineWidth(float w); - - /** get the OpenGL light number */ - inline int getLightNumber() const; - - /** set the OpenGL light number that will be used in lighting computations */ - inline void setLightNumber(int n); - - protected: - virtual ~Cartoon() {} - Cartoon& operator=(const Cartoon&) { return *this; } - - bool define_techniques(); - - private: - osg::ref_ptr _wf_mat; - osg::ref_ptr _wf_lw; - int _lightnum; - }; - - // INLINE METHODS - - inline const osg::Vec4& Cartoon::getOutlineColor() const - { - return _wf_mat->getEmission(osg::Material::FRONT_AND_BACK); - } - - inline void Cartoon::setOutlineColor(const osg::Vec4& color) - { - _wf_mat->setEmission(osg::Material::FRONT_AND_BACK, color); - } - - inline float Cartoon::getOutlineLineWidth() const - { - return _wf_lw->getWidth(); - } - - inline void Cartoon::setOutlineLineWidth(float w) - { - _wf_lw->setWidth(w); - } - - inline int Cartoon::getLightNumber() const - { - return _lightnum; - } - - inline void Cartoon::setLightNumber(int n) - { - _lightnum = n; - dirtyTechniques(); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Effect b/libs/lib/mac32/include/osgFX/Effect deleted file mode 100644 index 092f8d9b7..000000000 --- a/libs/lib/mac32/include/osgFX/Effect +++ /dev/null @@ -1,217 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX__effect -#define OSGFX__effect - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -/** - An helper macro that defines the methods like effectName() and effectDescription() - making them return the strings passed as parameters, after the usual library name - and class name. - */ -#define META_Effect(library, classname, effectname, effectdescription, effectauthor) \ - META_Node(library, classname) \ - virtual const char *effectName() const { return effectname; } \ - virtual const char *effectDescription() const { return effectdescription; } \ - virtual const char *effectAuthor() const { return effectauthor; } - - -namespace osgFX -{ - - /** - The base class for special effects. An effect is basically a collection of - state attributes and an interface for configuring them in a predefined - fashion. The Effect class does more however, as it handles multipass - rendering transparently and it allows more than one "technique" to be - defined. Each technique tries to implement the effect in a different way, - often using different OpenGL extensions. The active technique can be - selected either manually, with selectTechnique(), or automatically, in which - case the first technique that is supported by all active rendering contexts - is chosen. - If you are an Effect user, then simply use it as a node group. Create an - instance of your desired effect, add it to your scene graph and call its - addChild() method to add a child node as you would do with a Group. - If you are an Effect developer, you will have to implement the method - define_techniques() to define the different techniques that can be used - for obtaining the desired effect. In define_techniques() you will usually - create one or more instances of custom classes derived from Technique and - you will add them to the effect with addTechnique(). The order is important: - techniques added first will have higher priority and will be used first as - soon as all rendering contexts support it. - */ - class OSGFX_EXPORT Effect: public osg::Group { - public: - Effect(); - Effect(const Effect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual inline bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != NULL; } - virtual inline const char* libraryName() const { return "osgFX"; } - virtual inline const char* className() const { return "Effect"; } - - /** get the name of this Effect */ - virtual const char *effectName() const = 0; - - /** get a brief description of this Effect*/ - virtual const char *effectDescription() const = 0; - - /** get the effect author's name */ - virtual const char *effectAuthor() const = 0; - - /** get whether the effect is enabled or not */ - inline bool getEnabled() const; - - /** set whether the effect is enabled or not */ - inline void setEnabled(bool v); - - /** - optional: set effect parameters to produce a visually significant - result to be used in demo applications like osgfxbrowser. Default - is to do nothing. - */ - inline virtual void setUpDemo() {} - - /** get the number of techniques defined for this Effect */ - inline int getNumTechniques() const; - - /** get the i-th Technique */ - inline Technique* getTechnique(int i); - - /** get the i-th const Technique */ - inline const Technique* getTechnique(int i) const; - - /** get the index of the currently selected Technique */ - inline int getSelectedTechnique() const; - - enum TechniqueSelection { - AUTO_DETECT = -1 - }; - - /** select a technique or enable automatic detection */ - inline void selectTechnique(int i = AUTO_DETECT); - - /** custom traversal */ - virtual void traverse(osg::NodeVisitor& nv); - - /** default traversal */ - inline void inherited_traverse(osg::NodeVisitor& nv); - - protected: - virtual ~Effect(); - Effect &operator=(const Effect &) { return *this; } - - /** force rebuilding of techniques on next traversal */ - inline void dirtyTechniques(); - - /** add a technique to the Effect */ - inline void addTechnique(Technique* tech); - - /** - abstract method to be implemented in derived classes; its purpose - if to create the techniques that can be used for obtaining the - desired effect. You will usually call addTechnique() inside - this method. - */ - virtual bool define_techniques() = 0; - - private: - friend class Validator; - - bool _enabled; - - typedef std::vector > Technique_list; - Technique_list _techs; - - mutable osg::buffered_value _sel_tech; - - // use int instead of bool to avoid errors - mutable osg::buffered_value _tech_selected; - - int _global_sel_tech; - - bool _techs_defined; - - osg::ref_ptr _dummy_for_validation; - - void build_dummy_node(); - }; - - // INLINE METHODS - - inline bool Effect::getEnabled() const - { - return _enabled; - } - - inline void Effect::setEnabled(bool v) - { - _enabled = v; - } - - inline int Effect::getNumTechniques() const - { - return static_cast(_techs.size()); - } - - inline Technique* Effect::getTechnique(int i) - { - return _techs[i].get(); - } - - inline const Technique* Effect::getTechnique(int i) const - { - return _techs[i].get(); - } - - inline int Effect::getSelectedTechnique() const - { - return _global_sel_tech; - } - - inline void Effect::selectTechnique(int i) - { - _global_sel_tech = i; - } - - inline void Effect::addTechnique(Technique* tech) - { - _techs.push_back(tech); - } - - inline void Effect::dirtyTechniques() - { - _techs_defined = false; - } - - inline void Effect::inherited_traverse(osg::NodeVisitor& nv) - { - typedef osg::Group inherited; - inherited::traverse(nv); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Export b/libs/lib/mac32/include/osgFX/Export deleted file mode 100644 index 36c66d803..000000000 --- a/libs/lib/mac32/include/osgFX/Export +++ /dev/null @@ -1,40 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_EXPORT_ -#define OSGFX_EXPORT_ - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGFX_EXPORT - # elif defined( OSGFX_LIBRARY ) - # define OSGFX_EXPORT __declspec(dllexport) - # else - # define OSGFX_EXPORT __declspec(dllimport) - # endif -#else - # define OSGFX_EXPORT -#endif - -/** - -\namespace osgFX - -The osgFX library is a NodeKit that extends the core scene graph to provide a special effects framework. -osgFX's framework allows multiple rendering techniques to be provide for each effect, thereby provide the use -appropriate rendering techniques for each different class of graphics hardware, i.e. support for both modern -programmable graphics hardware and still have standard OpenGL 1.1 support as a fallback. -*/ - -#endif diff --git a/libs/lib/mac32/include/osgFX/MultiTextureControl b/libs/lib/mac32/include/osgFX/MultiTextureControl deleted file mode 100644 index 57c9b6031..000000000 --- a/libs/lib/mac32/include/osgFX/MultiTextureControl +++ /dev/null @@ -1,53 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGFX_MULTITEXTURECONTROL -#define OSGFX_MULTITEXTURECONTROL - -#include - -#include - -namespace osgFX -{ - /** - This node provides control over the which texture units are active and the - blending weighting between them. - */ - class OSGFX_EXPORT MultiTextureControl: public osg::Group { - public: - - MultiTextureControl(); - MultiTextureControl(const MultiTextureControl& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgFX, MultiTextureControl); - - void setTextureWeight(unsigned int unit, float weight); - - float getTextureWeight(unsigned int unit) const { return (unit<_textureWeightList.size()) ? _textureWeightList[unit] : 0.0f; } - - unsigned int getNumTextureWeights() const { return _textureWeightList.size(); } - - protected: - virtual ~MultiTextureControl() {} - MultiTextureControl& operator = (const MultiTextureControl&) { return *this; } - - void updateStateSet(); - - typedef std::vector TextureWeightList; - TextureWeightList _textureWeightList; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Outline b/libs/lib/mac32/include/osgFX/Outline deleted file mode 100644 index efd970340..000000000 --- a/libs/lib/mac32/include/osgFX/Outline +++ /dev/null @@ -1,97 +0,0 @@ -// -*-c++-*- - -/* - * OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - */ - -/* - * osgFX::Outline - Copyright (C) 2004,2009 Ulrich Hertlein - */ - -#ifndef OSGFX_OUTLINE_ -#define OSGFX_OUTLINE_ - -#include -#include - -namespace osgFX -{ - /** - * Outline effect. - * This effect draws a stencil buffer-based outline around an object. - * Color and width of the outline can be modified. - * To function correctly the context must be setup with a stencil buffer - * and the stencil buffer must be cleared to zero before each render. - * - * osg::DisplaySettings::instance()->setMinimumNumStencilBits(1); - * camera->setClearMask(clearMask | GL_STENCIL_BUFFER_BIT); - * camera->setClearStencil(0); - */ - class OSGFX_EXPORT Outline : public Effect - { - public: - /// Constructor. - Outline(); - - /// Copy constructor. - Outline(const Outline& copy, const osg::CopyOp& op = osg::CopyOp::SHALLOW_COPY) : Effect(copy, op) { - _width = copy._width; - _color = copy._color; - _technique = copy._technique; - } - - // Effect class info - META_Effect(osgFX, Outline, "Outline", - "Stencil buffer based object outline effect.\n" - "This effect needs a properly setup stencil buffer.", - "Ulrich Hertlein"); - - /// Set outline width. - void setWidth(float w); - - /// Get outline width. - float getWidth() const { - return _width; - } - - /// Set outline color. - void setColor(const osg::Vec4& color); - - /// Get outline color. - const osg::Vec4& getColor() const { - return _color; - } - - protected: - /// Destructor. - virtual ~Outline() { - } - - /// Define available techniques. - bool define_techniques(); - - private: - /// Outline width. - float _width; - - /// Outline color. - osg::Vec4 _color; - - /// Technique. - class OutlineTechnique; - OutlineTechnique* _technique; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Registry b/libs/lib/mac32/include/osgFX/Registry deleted file mode 100644 index 9c57a5f06..000000000 --- a/libs/lib/mac32/include/osgFX/Registry +++ /dev/null @@ -1,74 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_REGISTRY_ -#define OSGFX_REGISTRY_ - -#include -#include - -#include - -#include -#include - -namespace osgFX -{ - - class OSGFX_EXPORT Registry : public osg::Referenced - { - public: - - struct Proxy { - Proxy(const Effect* effect) - { - Registry::instance()->registerEffect(effect); - } - }; - - typedef std::map > EffectMap; - - static Registry* instance(); - - inline void registerEffect(const Effect* effect); - - inline const EffectMap& getEffectMap() const; - - protected: - - // Registry is a singleton; constructor and destructor must be protected - Registry(); - ~Registry() {} - - private: - EffectMap _effects; - }; - - // INLINE METHODS - - - - inline const Registry::EffectMap& Registry::getEffectMap() const - { - return _effects; - } - - inline void Registry::registerEffect(const Effect* effect) - { - _effects[effect->effectName()] = effect; - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Scribe b/libs/lib/mac32/include/osgFX/Scribe deleted file mode 100644 index e38179c73..000000000 --- a/libs/lib/mac32/include/osgFX/Scribe +++ /dev/null @@ -1,101 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_SCRIBE_ -#define OSGFX_SCRIBE_ - -#include -#include - -#include -#include - -namespace osgFX -{ - - /** - This is a two-passes effect; the first pass renders the subgraph as usual - while the second pass switches to wireframe mode, sets up lighting and - material to obtain a fixed (user-defined) color and then renders the subgraph. - This effect uses the PolygonOffset attribute to avoid Z-fighting, so it - requires at least OpenGL version 1.1. - */ - class OSGFX_EXPORT Scribe: public Effect { - public: - Scribe(); - Scribe(const Scribe& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - // effect class informations - META_Effect( - osgFX, - Scribe, - - "Scribe", - - "This is a two-passes effect; the first pass renders the subgraph as usual " - "while the second pass switches to wireframe mode, sets up lighting and " - "material to obtain a fixed (user-defined) color and then renders the subgraph.\n" - "This effect uses the PolygonOffset attribute to avoid Z-fighting, so it " - "requires at least OpenGL version 1.1.", - - "Marco Jez"); - - /** get the wireframe color */ - inline const osg::Vec4& getWireframeColor() const; - - /** set the wireframe color */ - inline void setWireframeColor(const osg::Vec4& color); - - /** get the wireframe line width */ - inline float getWireframeLineWidth() const; - - /** set the wireframe line width */ - inline void setWireframeLineWidth(float w); - - protected: - virtual ~Scribe() {} - Scribe& operator=(const Scribe&) { return *this; } - - bool define_techniques(); - - private: - osg::ref_ptr _wf_mat; - osg::ref_ptr _wf_lw; - }; - - // INLINE METHODS - - inline const osg::Vec4& Scribe::getWireframeColor() const - { - return _wf_mat->getEmission(osg::Material::FRONT_AND_BACK); - } - - inline void Scribe::setWireframeColor(const osg::Vec4& color) - { - _wf_mat->setEmission(osg::Material::FRONT_AND_BACK, color); - } - - inline float Scribe::getWireframeLineWidth() const - { - return _wf_lw->getWidth(); - } - - inline void Scribe::setWireframeLineWidth(float w) - { - _wf_lw->setWidth(w); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/SpecularHighlights b/libs/lib/mac32/include/osgFX/SpecularHighlights deleted file mode 100644 index 9dc7cdaa2..000000000 --- a/libs/lib/mac32/include/osgFX/SpecularHighlights +++ /dev/null @@ -1,138 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_SPECULARHIGHLIGHTS_ -#define OSGFX_SPECULARHIGHLIGHTS_ - -#include -#include - -namespace osgFX -{ - - /** - This effect applies additive specular highlights at fragment level (instead - of OpenGL's vertex-level lighting) by using a cube map and reflective texgen. - A texture matrix is computed to rotate the cube map automatically; this makes - the specular effect consistent with respect to view direction and light position. - The user can choose which light should be used to compute the texture matrix. - This effect requires the GL_ARB_texture_env_add extension and one of the cube map - extensions (GL_EXT_texture_cube_map, GL_ARB_texture_cube_map or OpenGL v1.3). - */ - class OSGFX_EXPORT SpecularHighlights: public Effect { - public: - SpecularHighlights(); - SpecularHighlights(const SpecularHighlights& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Effect(osgFX, SpecularHighlights, - - "Specular Highlights", - - "This effect applies additive specular highlights at fragment level (instead " - "of OpenGL's vertex-level lighting) by using a cube map and reflective texgen. " - "A texture matrix is computed to rotate the cube map automatically; this makes " - "the specular effect consistent with respect to view direction and light position. " - "The user can choose which light should be used to compute the texture matrix.\n" - "This effect requires the GL_ARB_texture_env_add extension and one of the cube map " - "extensions (GL_EXT_texture_cube_map, GL_ARB_texture_cube_map or OpenGL v1.3).", - - "Marco Jez"); - - - /** get the OpenGL light number */ - inline int getLightNumber() const; - - /** set the OpenGL light number that will be used in lighting computations */ - inline void setLightNumber(int n); - - /** get the texture unit number */ - inline int getTextureUnit() const; - - /** set the texture unit that will be used to apply the cube map */ - inline void setTextureUnit(int n); - - /** get the specular color */ - inline const osg::Vec4& getSpecularColor() const; - - /** set the specular color */ - inline void setSpecularColor(const osg::Vec4& color); - - /** get the specular exponent */ - inline float getSpecularExponent() const; - - /** set the specular exponent */ - inline void setSpecularExponent(float e); - - protected: - virtual ~SpecularHighlights() {} - SpecularHighlights& operator=(const SpecularHighlights&) { return *this; } - - bool define_techniques(); - - private: - int _lightnum; - int _unit; - osg::Vec4 _color; - float _sexp; - }; - - // INLINE METHODS - - inline int SpecularHighlights::getLightNumber() const - { - return _lightnum; - } - - inline void SpecularHighlights::setLightNumber(int n) - { - _lightnum = n; - dirtyTechniques(); - } - - inline int SpecularHighlights::getTextureUnit() const - { - return _unit; - } - - inline void SpecularHighlights::setTextureUnit(int n) - { - _unit = n; - dirtyTechniques(); - } - - inline const osg::Vec4& SpecularHighlights::getSpecularColor() const - { - return _color; - } - - inline void SpecularHighlights::setSpecularColor(const osg::Vec4& color) - { - _color = color; - dirtyTechniques(); - } - - inline float SpecularHighlights::getSpecularExponent() const - { - return _sexp; - } - - inline void SpecularHighlights::setSpecularExponent(float e) - { - _sexp = e; - dirtyTechniques(); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Technique b/libs/lib/mac32/include/osgFX/Technique deleted file mode 100644 index 899e4d623..000000000 --- a/libs/lib/mac32/include/osgFX/Technique +++ /dev/null @@ -1,158 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_TECHNIQUE_ -#define OSGFX_TECHNIQUE_ - -#include - -#include -#include -#include -#include - -#include -#include - -/** - An helper macro that defines the methods techniqueName() and - techniqueDescription() making them return the strings passed as parameters. - */ -#define META_Technique(name, description) \ - inline virtual const char *techniqueName() { return name; } \ - inline virtual const char *techniqueDescription() { return description; } - - -namespace osgFX -{ - - class Effect; - - /** - This is the base class for effect techniques. A technique represents one - of the possible ways to implement a special effect. This base class is - abstract, you will have to subclass your own techniques for your custom - effects. - Derived classes will have to implement the define_passes() method to - configure the rendering pass(es) that make up the technique. Usually - you will create one StateSet object for each rendering pass and then - you'll call addPass(stateset). - The validate() method should return true if the technique is valid within - the current rendering context, false otherwise. The default implementation - of validate() calls getRequiredExtensions() and tests whether all required - extensions are supported or not, returning false if at least one extension - is not supported. - */ - class OSGFX_EXPORT Technique: public osg::Referenced { - public: - Technique(); - - /** get the name of this Technique */ - virtual const char *techniqueName() { return "Default"; } - - /** get a brief description of this Technique */ - virtual const char *techniqueDescription() { return "This is the default technique"; } - - /** - collect the GL extension strings which are required for this technique - to work properly. This method is called from the default implementation - of validate(). - */ - virtual void getRequiredExtensions(std::vector& /*extensions*/) const {}; - - /** - tests whether this technique is valid for the current rendering context. - The default behavior is to call getRequiredExtensions() and check for - extension availability. - */ - virtual bool validate(osg::State& ) const; - - /** get the number of rendering passes defined in this Technique */ - inline int getNumPasses() const; - - /** get the StateSet object associated to the i-th pass */ - inline osg::StateSet* getPassStateSet(int i); - - /** get the const StateSet object associated to the i-th pass */ - inline const osg::StateSet* getPassStateSet(int i) const; - - /** - traverse children with multipass if necessary. By default this method - simply calls the protected method traverse_implementation(); you can - override it to change the default behavior. - Don't call this method directly as it is called by osgFX::Effect - */ - inline virtual void traverse(osg::NodeVisitor& nv, Effect* fx); - - protected: - Technique(const Technique &): osg::Referenced() {} // copying is nonsense ;) - virtual ~Technique() {} - Technique &operator=(const Technique &) { return *this; } - - /** force rebuilding of pass nodes on next traversal */ - inline void dirtyPasses(); - - /** create a new pass node, add it to the technique and associate a StateSet */ - void addPass(osg::StateSet* ss = 0); - - /** optional: return a node that overrides the child node on a specified pass */ - inline virtual osg::Node* getOverrideChild(int) { return 0; } - - /** - define the rendering passes that make up this technique. You must - implement this method in derived classes to add the required passes. - */ - virtual void define_passes() = 0; - - /** - traverse children with multipass if necessary. Don't call this method - directly unless you are in a customized version of traverse(). - */ - void traverse_implementation(osg::NodeVisitor& nv, Effect* fx); - - private: - typedef std::vector > Pass_list; - Pass_list _passes; - }; - - // INLINE METHODS - - inline int Technique::getNumPasses() const - { - return static_cast(_passes.size()); - } - - inline osg::StateSet* Technique::getPassStateSet(int i) - { - return _passes[i].get(); - } - - inline const osg::StateSet* Technique::getPassStateSet(int i) const - { - return _passes[i].get(); - } - - inline void Technique::dirtyPasses() - { - _passes.clear(); - } - - inline void Technique::traverse(osg::NodeVisitor& nv, Effect* fx) - { - traverse_implementation(nv, fx); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Validator b/libs/lib/mac32/include/osgFX/Validator deleted file mode 100644 index 1b38e0ee3..000000000 --- a/libs/lib/mac32/include/osgFX/Validator +++ /dev/null @@ -1,75 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgFX - Copyright (C) 2003 Marco Jez - -#ifndef OSGFX_VALIDATOR_ -#define OSGFX_VALIDATOR_ - -#include - -#include -#include - -#include - -namespace osgFX -{ - - /** - This class is used internally by osgFX::Effect to choose between different - techniques dynamically. The apply() method will call each technique's - validate() method and store the results in a buffered array. The Effect - class will then choose the first technique that could be validated in all - active rendering contexts. - */ - class OSGFX_EXPORT Validator: public osg::StateAttribute { - public: - - Validator(); - Validator(Effect* effect); - Validator(const Validator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_StateAttribute(osgFX, Validator, VALIDATOR); - - void apply(osg::State& state) const; - void compileGLObjects(osg::State& state) const; - - inline int compare(const osg::StateAttribute& sa) const; - - inline void disable() { _effect = 0; } - - protected: - virtual ~Validator() {} - Validator& operator=(const Validator&) { return *this; } - - private: - mutable Effect* _effect; - }; - - // INLINE METHODS - - inline int Validator::compare(const osg::StateAttribute& sa) const - { - // check the types are equal and then create the rhs variable - //used by the COMPARE_StateAttribute_Parameter macros below. - COMPARE_StateAttribute_Types(Validator,sa) - - // compare parameters - COMPARE_StateAttribute_Parameter(_effect) - - return 0; - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgFX/Version b/libs/lib/mac32/include/osgFX/Version deleted file mode 100644 index 3437cfcfb..000000000 --- a/libs/lib/mac32/include/osgFX/Version +++ /dev/null @@ -1,46 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGFX_VERSION -#define OSGFX_VERSION 1 - -#include - -extern "C" { - -/** - * osgFXGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgFXGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph (OSG) FX library - # - AC_CHECK_LIB(osg, osgFXGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph FX library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -extern OSGFX_EXPORT const char* osgFXGetVersion(); - -/** - * getLibraryName() returns the library name in human friendly form. -*/ -extern OSGFX_EXPORT const char* osgFXGetLibraryName(); - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/AnimationPathManipulator b/libs/lib/mac32/include/osgGA/AnimationPathManipulator deleted file mode 100644 index c01d0cfd0..000000000 --- a/libs/lib/mac32/include/osgGA/AnimationPathManipulator +++ /dev/null @@ -1,121 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_ANIMATION_PATH_MANIPULATOR -#define OSGGA_ANIMATION_PATH_MANIPULATOR 1 - -#include -#include -#include - -namespace osgGA{ - -// -// The AnimationPathManipulator is a Matrix Manipulator that reads an -// animation path from a file and plays it back. The file is expected -// to be ascii and a succession of lines with 8 floating point values -// per line. The succession of values are: -// time px py pz ax ay az aw -// where: -// time = elapsed time in seconds from the beginning of the animation -// px py pz = World position in cartesian coordinates -// ax ay az aw = Orientation (attitude) defined as a quaternion - -class OSGGA_EXPORT AnimationPathManipulator : public CameraManipulator -{ - public: - - AnimationPathManipulator( osg::AnimationPath* animationPath=0 ); - - AnimationPathManipulator( const std::string& filename ); - - virtual const char* className() const { return "AnimationPath"; } - - void setTimeScale(double s) { _timeScale = s; } - double getTimeScale() const { return _timeScale; } - - void setTimeOffset(double o) { _timeOffset = o; } - double getTimeOffset() const { return _timeOffset; } - - struct AnimationCompletedCallback : public virtual osg::Referenced - { - virtual void completed(const AnimationPathManipulator* apm) = 0; - }; - - void setAnimationCompletedCallback(AnimationCompletedCallback* acc) { _animationCompletedCallback = acc; } - AnimationCompletedCallback* getAnimationCompletedCallback() { return _animationCompletedCallback.get(); } - const AnimationCompletedCallback* getAnimationCompletedCallback() const { return _animationCompletedCallback.get(); } - - void setPrintOutTimingInfo(bool printOutTimingInfo) { _printOutTimingInfo=printOutTimingInfo; } - bool getPrintOutTimingInfo() const { return _printOutTimingInfo; } - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByMatrix(const osg::Matrixd& matrix) { _matrix = matrix; } - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByInverseMatrix(const osg::Matrixd& matrix) { _matrix.invert(matrix); } - - /** get the position of the manipulator as 4x4 Matrix.*/ - virtual osg::Matrixd getMatrix() const { return _matrix; } - - /** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/ - virtual osg::Matrixd getInverseMatrix() const { return osg::Matrixd::inverse(_matrix); } - - - void setAnimationPath( osg::AnimationPath* animationPath ) { _animationPath=animationPath; } - - osg::AnimationPath* getAnimationPath() { return _animationPath.get(); } - - const osg::AnimationPath* getAnimationPath() const { return _animationPath.get(); } - - bool valid() const { return _animationPath.valid(); } - - void init(const GUIEventAdapter& ea,GUIActionAdapter& us); - - void home(const GUIEventAdapter& ea,GUIActionAdapter& us); - void home(double currentTime); - - virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us); - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; - - protected: - - bool _valid; - - bool _printOutTimingInfo; - - void handleFrame( double time ); - - osg::ref_ptr _animationPath; - - double _timeOffset; - double _timeScale; - - osg::ref_ptr _animationCompletedCallback; - - double _pauseTime; - bool _isPaused; - - double _realStartOfTimedPeriod; - double _animStartOfTimedPeriod; - int _numOfFramesSinceStartOfTimedPeriod; - - osg::Matrixd _matrix; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/CameraManipulator b/libs/lib/mac32/include/osgGA/CameraManipulator deleted file mode 100644 index 866210d71..000000000 --- a/libs/lib/mac32/include/osgGA/CameraManipulator +++ /dev/null @@ -1,188 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_CameraManipulator -#define OSGGA_CameraManipulator 1 - -#include -#include -#include - -#include - -#include -#include -#include -#include - -namespace osgGA{ - -#define NEW_HOME_POSITION - -/** - -CameraManipulator is an abstract base class defining the interface, and a certain -amount of default functionality, for classes which wish to control OSG cameras -in response to GUI events. - -*/ -class OSGGA_EXPORT CameraManipulator : public GUIEventHandler -{ - typedef GUIEventHandler inherited; - - public: - - // We are not using META_Object as this is abstract class. - // Use META_Object(osgGA,YourManipulator); in your descendant non-abstract classes. - virtual const char* className() const { return "CameraManipulator"; } - - /** callback class to use to allow matrix manipulators to query the application for the local coordinate frame.*/ - class CoordinateFrameCallback : public osg::Referenced - { - public: - virtual osg::CoordinateFrame getCoordinateFrame(const osg::Vec3d& position) const = 0; - protected: - virtual ~CoordinateFrameCallback() {} - }; - - /** set the coordinate frame which callback tells the manipulator which way is up, east and north.*/ - virtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb) { _coordinateFrameCallback = cb; } - - /** get the coordinate frame callback which tells the manipulator which way is up, east and north.*/ - CoordinateFrameCallback* getCoordinateFrameCallback() { return _coordinateFrameCallback.get(); } - - /** get the coordinate frame callback which tells the manipulator which way is up, east and north.*/ - const CoordinateFrameCallback* getCoordinateFrameCallback() const { return _coordinateFrameCallback.get(); } - - /** get the coordinate frame.*/ - osg::CoordinateFrame getCoordinateFrame(const osg::Vec3d& position) const - { - if (_coordinateFrameCallback.valid()) return _coordinateFrameCallback->getCoordinateFrame(position); - return osg::CoordinateFrame(); - } - - osg::Vec3d getSideVector(const osg::CoordinateFrame& cf) const { return osg::Vec3d(cf(0,0),cf(0,1),cf(0,2)); } - osg::Vec3d getFrontVector(const osg::CoordinateFrame& cf) const { return osg::Vec3d(cf(1,0),cf(1,1),cf(1,2)); } - osg::Vec3d getUpVector(const osg::CoordinateFrame& cf) const { return osg::Vec3d(cf(2,0),cf(2,1),cf(2,2)); } - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByMatrix(const osg::Matrixd& matrix) = 0; - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByInverseMatrix(const osg::Matrixd& matrix) = 0; - - /** get the position of the manipulator as 4x4 Matrix.*/ - virtual osg::Matrixd getMatrix() const = 0; - - /** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/ - virtual osg::Matrixd getInverseMatrix() const = 0; - - /** Get the FusionDistanceMode. Used by SceneView for setting up stereo convergence.*/ - virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const { return osgUtil::SceneView::PROPORTIONAL_TO_SCREEN_DISTANCE; } - - /** Get the FusionDistanceValue. Used by SceneView for setting up stereo convergence.*/ - virtual float getFusionDistanceValue() const { return 1.0f; } - - /** Set the mask to use when set up intersection traversal such as used in manipulators that follow terrain or have collision detection. - * The intersection traversal mask is useful for controlling what parts of the scene graph should be used for intersection purposes.*/ - void setIntersectTraversalMask(unsigned int mask) { _intersectTraversalMask = mask; } - - /** Get the mask to use when set up intersection traversal such as used in manipulators that follow terrain or have collision detection.*/ - unsigned int getIntersectTraversalMask() const { return _intersectTraversalMask; } - - /** - Attach a node to the manipulator, automatically detaching any previously attached node. - setNode(NULL) detaches previous nodes. - May be ignored by manipulators which do not require a reference model. - */ - virtual void setNode(osg::Node*) {} - - /** Return const node if attached.*/ - virtual const osg::Node* getNode() const { return NULL; } - - /** Return node if attached.*/ - virtual osg::Node* getNode() { return NULL; } - - /** Manually set the home position, and set the automatic compute of home position. */ - virtual void setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up, bool autoComputeHomePosition=false) - { - setAutoComputeHomePosition(autoComputeHomePosition); - _homeEye = eye; - _homeCenter = center; - _homeUp = up; - } - - /** Get the manually set home position. */ - virtual void getHomePosition(osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up) const - { - eye = _homeEye; - center = _homeCenter; - up = _homeUp; - } - - /** Set whether the automatic compute of the home position is enabled.*/ - virtual void setAutoComputeHomePosition(bool flag) { _autoComputeHomePosition = flag; } - - /** Get whether the automatic compute of the home position is enabled.*/ - bool getAutoComputeHomePosition() const { return _autoComputeHomePosition; } - - /** Compute the home position.*/ - virtual void computeHomePosition(const osg::Camera *camera = NULL, bool useBoundingBox = false); - - /** - Move the camera to the default position. - May be ignored by manipulators if home functionality is not appropriate. - */ - virtual void home(const GUIEventAdapter& ,GUIActionAdapter&) {} - - /** - Move the camera to the default position. - This version does not require GUIEventAdapter and GUIActionAdapter so may be - called from somewhere other than a handle() method in GUIEventHandler. Application - must be aware of implications. - */ - virtual void home(double /*currentTime*/) {} - - /** - Start/restart the manipulator. - FIXME: what does this actually mean? Provide examples. - */ - virtual void init(const GUIEventAdapter& ,GUIActionAdapter&) {} - - /** Handle events, return true if handled, false otherwise. */ - virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us); - - protected: - - CameraManipulator(); - CameraManipulator(const CameraManipulator& mm, const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY); - - virtual ~CameraManipulator(); - - std::string getManipulatorName() const; - - unsigned int _intersectTraversalMask; - - bool _autoComputeHomePosition; - - osg::Vec3d _homeEye; - osg::Vec3d _homeCenter; - osg::Vec3d _homeUp; - - osg::ref_ptr _coordinateFrameCallback; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/CameraViewSwitchManipulator b/libs/lib/mac32/include/osgGA/CameraViewSwitchManipulator deleted file mode 100644 index 52f97cc75..000000000 --- a/libs/lib/mac32/include/osgGA/CameraViewSwitchManipulator +++ /dev/null @@ -1,79 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_VIEWLISTMANIPULATOR -#define OSGGA_VIEWLISTMANIPULATOR 1 - -#include -#include -#include - -namespace osgGA{ - -class OSGGA_EXPORT CameraViewSwitchManipulator : public CameraManipulator -{ - public: - CameraViewSwitchManipulator() {} - - virtual const char* className() const { return "CameraViewSwitcher"; } - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByMatrix(const osg::Matrixd& /*matrix*/) {} - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByInverseMatrix(const osg::Matrixd& /*matrix*/) {} - - /** get the position of the manipulator as 4x4 Matrix.*/ - virtual osg::Matrixd getMatrix() const; - - /** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/ - virtual osg::Matrixd getInverseMatrix() const; - - - /** Attach a node to the manipulator. - Automatically detaches previously attached node. - setNode(NULL) detaches previously nodes. - Is ignored by manipulators which do not require a reference model.*/ - virtual void setNode(osg::Node*); - - /** Return node if attached.*/ - virtual const osg::Node* getNode() const { return _node.get();} - - /** Return node if attached.*/ - virtual osg::Node* getNode() { return _node.get();} - - /** Start/restart the manipulator.*/ - virtual void init(const GUIEventAdapter& /*ea*/,GUIActionAdapter& /*aa*/) { _currentView = 0; } - - /** handle events, return true if handled, false otherwise.*/ - virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us); - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; - - typedef std::vector< osg::ref_ptr > CameraViewList; - - protected: - - virtual ~CameraViewSwitchManipulator() {} - - osg::ref_ptr _node; - - CameraViewList _cameraViews; - unsigned int _currentView; -}; - -} - -#endif - diff --git a/libs/lib/mac32/include/osgGA/DriveManipulator b/libs/lib/mac32/include/osgGA/DriveManipulator deleted file mode 100644 index d645fa06c..000000000 --- a/libs/lib/mac32/include/osgGA/DriveManipulator +++ /dev/null @@ -1,123 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_DRIVEMANIPULATOR -#define OSGGA_DRIVEMANIPULATOR 1 - -#include -#include - -namespace osgGA{ - -/** -DriveManipulator is a camera manipulator which provides drive-like -functionality. By default, the left mouse button accelerates, the right -mouse button decelerates, and the middle mouse button (or left and -right simultaneously) stops dead. -*/ - -class OSGGA_EXPORT DriveManipulator : public CameraManipulator -{ - public: - - DriveManipulator(); - - virtual const char* className() const { return "Drive"; } - - /** Get the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByMatrix(const osg::Matrixd& matrix); - - /** Set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByInverseMatrix(const osg::Matrixd& matrix) { setByMatrix(osg::Matrixd::inverse(matrix)); } - - /** Get the position of the manipulator as 4x4 Matrix.*/ - virtual osg::Matrixd getMatrix() const; - - /** Get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/ - virtual osg::Matrixd getInverseMatrix() const; - - virtual void setNode(osg::Node*); - - virtual const osg::Node* getNode() const; - - virtual osg::Node* getNode(); - - virtual void computeHomePosition(); - - virtual void home(const GUIEventAdapter& ea,GUIActionAdapter& us); - - virtual void init(const GUIEventAdapter& ea,GUIActionAdapter& us); - - virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us); - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; - - void setModelScale( double in_ms ) { _modelScale = in_ms; } - double getModelScale() const { return _modelScale; } - - void setVelocity( double in_vel ) { _velocity = in_vel; } - double getVelocity() const { return _velocity; } - - void setHeight( double in_h ) { _height = in_h; } - double getHeight() const { return _height; } - - protected: - - virtual ~DriveManipulator(); - - bool intersect(const osg::Vec3d& start, const osg::Vec3d& end, osg::Vec3d& intersection, osg::Vec3d& normal) const; - - /** Reset the internal GUIEvent stack.*/ - void flushMouseEventStack(); - - /** Add the current mouse GUIEvent to internal stack.*/ - void addMouseEvent(const GUIEventAdapter& ea); - - void computePosition(const osg::Vec3d& eye,const osg::Vec3d& lv,const osg::Vec3d& up); - - /** For the given mouse movement calculate the movement of the camera. - * Return true if camera has moved and a redraw is required. - */ - bool calcMovement(); - - // Internal event stack comprising last two mouse events. - osg::ref_ptr _ga_t1; - osg::ref_ptr _ga_t0; - - osg::observer_ptr _node; - - double _modelScale; - double _velocity; - double _height; - double _buffer; - - enum SpeedControlMode { - USE_MOUSE_Y_FOR_SPEED, - USE_MOUSE_BUTTONS_FOR_SPEED - }; - - SpeedControlMode _speedMode; - - osg::Vec3d _eye; - osg::Quat _rotation; - double _pitch; - double _distance; - - bool _pitchUpKeyPressed; - bool _pitchDownKeyPressed; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/EventQueue b/libs/lib/mac32/include/osgGA/EventQueue deleted file mode 100644 index 3306acf87..000000000 --- a/libs/lib/mac32/include/osgGA/EventQueue +++ /dev/null @@ -1,239 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_EVENTQUEUE -#define OSGGA_EVENTQUEUE 1 - -#include - -#include -#include - -#include -#include - -namespace osgGA { - -/** - * EventQueue implementation for collecting and adapting windowing events - */ -class OSGGA_EXPORT EventQueue : public osg::Referenced -{ - public: - - EventQueue(GUIEventAdapter::MouseYOrientation mouseYOrientation=GUIEventAdapter::Y_INCREASING_DOWNWARDS); - - typedef std::list< osg::ref_ptr > Events; - - /** Set events.*/ - void setEvents(Events& events); - - /** Take the entire event queue leaving the EventQueue' event queue empty.*/ - bool takeEvents(Events& events); - - /** Take the events that were recorded before with specified time queue.*/ - bool takeEvents(Events& events, double cutOffTime); - - /** Take a copy the entire event queue leaving the EventQueue' event queue intact.*/ - bool copyEvents(Events& events) const; - - /** Add events to end of event queue.*/ - void appendEvents(Events& events); - - /** Add an event to the end of the event queue.*/ - void addEvent(GUIEventAdapter* event); - - - /** Specify if mouse coordinates should be transformed into a pre defined input range, or whether they - * should be simply based on as local coordinates to the window that generated the mouse events.*/ - void setUseFixedMouseInputRange(bool useFixedMouseInputRange) { _useFixedMouseInputRange = useFixedMouseInputRange; } - - /** Get whether the mouse coordinates should be transformed into a pre defined input range.*/ - bool getUseFixedMouseInputRange() { return _useFixedMouseInputRange; } - - - /** Set the graphics context associated with this event queue.*/ - void setGraphicsContext(osg::GraphicsContext* context) { getCurrentEventState()->setGraphicsContext(context); } - - - /** Set the mouse input range.*/ - void setMouseInputRange(float xMin, float yMin, float xMax, float yMax) { getCurrentEventState()->setInputRange(xMin, yMin, xMax, yMax); } - - - /** Method for adapting window resize event, placing this event on the back of the event queue. */ - void windowResize(int x, int y, int width, int height) { windowResize(x,y,width,height,getTime()); } - - /** Method for adapting window resize event, placing this event on the back of the event queue, with specified time. */ - void windowResize(int x, int y, int width, int height, double time); - - - /** Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. */ - void mouseScroll(GUIEventAdapter::ScrollingMotion sm) { mouseScroll(sm,getTime()); } - - /** Method for adapting mouse scroll wheel events, placing this event on the back of the event queue, with specified time. */ - void mouseScroll(GUIEventAdapter::ScrollingMotion sm, double time); - - - /** Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. */ - void mouseScroll2D(float x, float y) { mouseScroll2D(x, y, getTime()); } - - /** Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. */ - void mouseScroll2D(float x, float y, double time); - - - /** Method for adapting pen pressure events, placing this event on the back of the event queue.*/ - void penPressure(float pressure) { penPressure(pressure, getTime()); } - - /** Method for adapting pen pressure events, placing this event on the back of the event queue, with specified time.*/ - void penPressure(float pressure, double time); - - /** Method for adapting pen orientation events, placing this event on the back of the event queue.*/ - void penOrientation(float tiltX, float tiltY, float rotation) { penOrientation(tiltX, tiltY, rotation, getTime()); } - - /** Method for adapting pen orientation events, placing this event on the back of the event queue, with specified time.*/ - void penOrientation(float tiltX, float tiltY, float rotation, double time); - - /** Method for adapting pen proximity events, placing this event on the back of the event queue.*/ - void penProximity(GUIEventAdapter::TabletPointerType pt, bool isEntering) { penProximity(pt, isEntering, getTime()); } - - /** Method for adapting pen proximity events, placing this event on the back of the event queue, with specified time.*/ - void penProximity(GUIEventAdapter::TabletPointerType pt, bool isEntering, double time); - - - /** Method for updating in response to a mouse warp. Note, just moves the mouse position without creating a new event for it.*/ - void mouseWarped(float x, float y); - - - /** Method for adapting mouse motion events, placing this event on the back of the event queue.*/ - void mouseMotion(float x, float y) { mouseMotion(x,y, getTime()); } - - /** Method for adapting mouse motion events, placing this event on the back of the event queue, with specified time.*/ - void mouseMotion(float x, float y, double time); - - - /** Method for adapting mouse button pressed events, placing this event on the back of the event queue. - * Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */ - void mouseButtonPress(float x, float y, unsigned int button) { mouseButtonPress(x, y, button, getTime()); } - - /** Method for adapting mouse button pressed events, placing this event on the back of the event queue, with specified time. - * Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */ - void mouseButtonPress(float x, float y, unsigned int button, double time); - - - /** Method for adapting mouse button pressed events, placing this event on the back of the event queue. - * Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */ - void mouseDoubleButtonPress(float x, float y, unsigned int button) { mouseDoubleButtonPress(x, y, button, getTime()); } - - /** Method for adapting mouse button pressed events, placing this event on the back of the event queue, with specified time. - * Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */ - void mouseDoubleButtonPress(float x, float y, unsigned int button, double time); - - - /** Method for adapting mouse button release events, placing this event on the back of the event queue. - * Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */ - void mouseButtonRelease(float x, float y, unsigned int button) { mouseButtonRelease(x, y, button, getTime()); } - - /** Method for adapting mouse button release events, placing this event on the back of the event queue, with specified time. - * Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */ - void mouseButtonRelease(float x, float y, unsigned int button, double time); - - - /** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings.*/ - void keyPress(int key, int unmodifiedKey = 0) { keyPress(key, getTime(), unmodifiedKey); } - - /** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time.*/ - void keyPress(int key, double time, int unmodifiedKey = 0); - - - /** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings.*/ - void keyRelease(int key, int unmodifiedKey = 0) { keyRelease(key, getTime(), unmodifiedKey); } - - /** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time.*/ - void keyRelease(int key, double time, int unmodifiedKey = 0); - - GUIEventAdapter* touchBegan(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, double time); - GUIEventAdapter* touchBegan(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y) { - return touchBegan(id, phase, x, y, getTime()); - } - - GUIEventAdapter* touchMoved(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, double time); - GUIEventAdapter* touchMoved(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y) { - return touchMoved(id, phase, x, y, getTime()); - } - - GUIEventAdapter* touchEnded(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, unsigned int tap_count, double time); - GUIEventAdapter* touchEnded(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, unsigned int tap_count) { - return touchEnded(id, phase, x, y, tap_count, getTime()); - } - - - - /** Method for adapting close window events.*/ - void closeWindow() { closeWindow(getTime()); } - - /** Method for adapting close window event with specified event time.*/ - void closeWindow(double time); - - - /** Method for adapting application quit events.*/ - void quitApplication() { quitApplication(getTime()); } - - /** Method for adapting application quit events with specified event time.*/ - void quitApplication(double time); - - - /** Method for adapting frame events.*/ - void frame(double time); - - - void setStartTick(osg::Timer_t tick) { _startTick = tick; } - osg::Timer_t getStartTick() const { return _startTick; } - - double getTime() const { return osg::Timer::instance()->delta_s(_startTick, osg::Timer::instance()->tick()); } - - - /** convenience method for create an event ready to fill in. Clones the getCurrentEventState() to produce a up to date event state. */ - GUIEventAdapter* createEvent(); - - - void setCurrentEventState(GUIEventAdapter* ea) { _accumulateEventState = ea; } - GUIEventAdapter* getCurrentEventState() { return _accumulateEventState.get(); } - const GUIEventAdapter* getCurrentEventState() const { return _accumulateEventState.get(); } - - /** Method for adapting user defined events */ - void userEvent(osg::Referenced* userEventData) { userEvent(userEventData, getTime()); } - - /** Method for adapting user defined events with specified event time */ - void userEvent(osg::Referenced* userEventData, double time); - - - protected: - - virtual ~EventQueue(); - - /** Prevent unwanted copy operator.*/ - EventQueue& operator = (const EventQueue&) { return *this; } - - osg::ref_ptr _accumulateEventState; - - bool _useFixedMouseInputRange; - - osg::Timer_t _startTick; - mutable OpenThreads::Mutex _eventQueueMutex; - Events _eventQueue; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/EventVisitor b/libs/lib/mac32/include/osgGA/EventVisitor deleted file mode 100644 index 3e8acb219..000000000 --- a/libs/lib/mac32/include/osgGA/EventVisitor +++ /dev/null @@ -1,146 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_EVENTVISITOR -#define OSGGA_EVENTVISITOR 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace osgGA { - -/** - * Basic EventVisitor implementation for animating a scene. - * This visitor traverses the scene graph, calling each nodes appCallback if - * it exists. - */ -class OSGGA_EXPORT EventVisitor : public osg::NodeVisitor -{ - public: - - EventVisitor(); - virtual ~EventVisitor(); - - META_NodeVisitor("osgGA","EventVisitor") - - void setActionAdapter(osgGA::GUIActionAdapter* actionAdapter) { _actionAdapter=actionAdapter; } - - osgGA::GUIActionAdapter* getActionAdapter() { return _actionAdapter; } - - const osgGA::GUIActionAdapter* getActionAdapter() const { return _actionAdapter; } - - - typedef std::list< osg::ref_ptr > EventList; - - void addEvent(GUIEventAdapter* event); - void removeEvent(GUIEventAdapter* event); - - void setEventHandled(bool handled) { _handled = handled; } - bool getEventHandled() const { return _handled; } - - - void setEvents(const EventQueue::Events& events) { _events = events; } - EventQueue::Events& getEvents() { return _events; } - const EventQueue::Events& getEvents() const { return _events; } - - public: - - virtual void reset(); - - /** During traversal each type of node calls its callbacks and its children traversed. */ - virtual void apply(osg::Node& node) { handle_callbacks_and_traverse(node); } - - virtual void apply(osg::Geode& node) { handle_geode_callbacks(node); } - virtual void apply(osg::Billboard& node) { handle_geode_callbacks(node); } - - virtual void apply(osg::LightSource& node) { handle_callbacks_and_traverse(node); } - - virtual void apply(osg::Group& node) { handle_callbacks_and_traverse(node); } - virtual void apply(osg::Transform& node) { handle_callbacks_and_traverse(node); } - virtual void apply(osg::Projection& node) { handle_callbacks_and_traverse(node); } - virtual void apply(osg::Switch& node) { handle_callbacks_and_traverse(node); } - virtual void apply(osg::LOD& node) { handle_callbacks_and_traverse(node); } - virtual void apply(osg::OccluderNode& node) { handle_callbacks_and_traverse(node); } - - - protected: - - /** Prevent unwanted copy operator.*/ - EventVisitor& operator = (const EventVisitor&) { return *this; } - - inline void handle_callbacks(osg::StateSet* stateset) - { - if (stateset && stateset->requiresEventTraversal()) - { - stateset->runEventCallbacks(this); - } - } - - inline void handle_callbacks_and_traverse(osg::Node& node) - { - handle_callbacks(node.getStateSet()); - - osg::NodeCallback* callback = node.getEventCallback(); - if (callback) (*callback)(&node,this); - else if (node.getNumChildrenRequiringEventTraversal()>0) traverse(node); - } - - inline void handle_geode_callbacks(osg::Geode& node) - { - handle_callbacks(node.getStateSet()); - - osg::NodeCallback* callback = node.getEventCallback(); - if (callback) (*callback)(&node,this); - /*else if (node.getNumChildrenRequiringEventTraversal()>0)*/ - traverseGeode(node); - } - - inline void traverseGeode(osg::Geode& geode) - { - traverse((osg::Node&)geode); - - // Call the app callbacks on the drawables. - for(unsigned int i=0;igetEventCallback(); - if (callback) callback->event(this,geode.getDrawable(i)); - - handle_callbacks(geode.getDrawable(i)->getStateSet()); - } - } - - osgGA::GUIActionAdapter* _actionAdapter; - - osg::ref_ptr _accumulateEventState; - - bool _handled; - EventQueue::Events _events; - -}; - -} - -#endif - diff --git a/libs/lib/mac32/include/osgGA/Export b/libs/lib/mac32/include/osgGA/Export deleted file mode 100644 index 95bc45556..000000000 --- a/libs/lib/mac32/include/osgGA/Export +++ /dev/null @@ -1,74 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -// The following symbol has a underscore suffix for compatibility. -#ifndef OSGGA_EXPORT_ -#define OSGGA_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4267 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGGA_EXPORT - # elif defined( OSGGA_LIBRARY ) - # define OSGGA_EXPORT __declspec(dllexport) - # else - # define OSGGA_EXPORT __declspec(dllimport) - #endif -#else - #define OSGGA_EXPORT -#endif - -#endif - - -/** - -\namespace osgGA - -The 'GA' in osgGA stands for 'GUI Abstraction'; the osgGA namespace provides facilities to -help developers write the glue to allow the osg to work with varying window systems. - -As a cross-platform, window system-agnostic class library, the OpenSceneGraph -has no direct ties to any given windowing environment. Viewers, however, must at -some level interact with a window system - where Window system may refer to a windowing -API, e.g. GLUT, Qt, FLTK, MFC, ... - -There is much commonality in the implementation of Viewers for varying windowing -environments. E.g. most Viewers will update a Camera position in response to a mouse -event, and may request that a timer be started as a result of a model being 'spun'. - -The purpose of the osgGA namespace is to centralise the common areas of this -functionality. The viewer writer needs then only write a GUIEventAdapter, a -GUIActionAdapter, and assemble a collection of GUIEventHandlers -as appropriate for the viewer. - -Events from the windowing environment are adpated, and then fed into the GUIEventHandlers. -The GUIEventHandlers analyse and take action, and make requests of the windowing -environemnt via the GUIActionAdapter. The viewer writer should then honour these -requests, translating them into calls to the windowing API. - -*/ - - diff --git a/libs/lib/mac32/include/osgGA/FirstPersonManipulator b/libs/lib/mac32/include/osgGA/FirstPersonManipulator deleted file mode 100644 index b0326380b..000000000 --- a/libs/lib/mac32/include/osgGA/FirstPersonManipulator +++ /dev/null @@ -1,112 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * FirstPersonManipulator code Copyright (C) 2010 PCJohn (Jan Peciva) - * while some pieces of code were taken from OSG. - * Thanks to company Cadwork (www.cadwork.ch) and - * Brno University of Technology (www.fit.vutbr.cz) for open-sourcing this work. -*/ - -#ifndef OSGGA_FIRST_PERSON_MANIPULATOR -#define OSGGA_FIRST_PERSON_MANIPULATOR 1 - -#include - - -namespace osgGA { - - -/** FirstPersonManipulator is base class for camera control based on position - and orientation of camera, like walk, drive, and flight manipulators. */ -class OSGGA_EXPORT FirstPersonManipulator : public StandardManipulator -{ - typedef StandardManipulator inherited; - - public: - - FirstPersonManipulator( int flags = DEFAULT_SETTINGS ); - FirstPersonManipulator( const FirstPersonManipulator& fpm, - const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY ); - - META_Object( osgGA, FirstPersonManipulator ); - - virtual void setByMatrix( const osg::Matrixd& matrix ); - virtual void setByInverseMatrix( const osg::Matrixd& matrix ); - virtual osg::Matrixd getMatrix() const; - virtual osg::Matrixd getInverseMatrix() const; - - virtual void setTransformation( const osg::Vec3d& eye, const osg::Quat& rotation ); - virtual void setTransformation( const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up ); - virtual void getTransformation( osg::Vec3d& eye, osg::Quat& rotation ) const; - virtual void getTransformation( osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up ) const; - - virtual void setVelocity( const double& velocity ); - inline double getVelocity() const; - virtual void setAcceleration( const double& acceleration, bool relativeToModelSize = false ); - double getAcceleration( bool *relativeToModelSize = NULL ) const; - virtual void setMaxVelocity( const double& maxVelocity, bool relativeToModelSize = false ); - double getMaxVelocity( bool *relativeToModelSize = NULL ) const; - - virtual void setWheelMovement( const double& wheelMovement, bool relativeToModelSize = false ); - double getWheelMovement( bool *relativeToModelSize = NULL ) const; - - virtual void home( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual void home( double ); - - virtual void init( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - protected: - - virtual bool handleMouseWheel( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - virtual bool performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMouseDeltaMovement( const float dx, const float dy ); - virtual void applyAnimationStep( const double currentProgress, const double prevProgress ); - virtual bool startAnimationByMousePointerIntersection( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - void moveForward( const double distance ); - void moveForward( const osg::Quat& rotation, const double distance ); - void moveRight( const double distance ); - void moveUp( const double distance ); - - osg::Vec3d _eye; - osg::Quat _rotation; - double _velocity; - - double _acceleration; - static int _accelerationFlagIndex; - double _maxVelocity; - static int _maxVelocityFlagIndex; - double _wheelMovement; - static int _wheelMovementFlagIndex; - - class FirstPersonAnimationData : public AnimationData { - public: - osg::Quat _startRot; - osg::Quat _targetRot; - void start( const osg::Quat& startRotation, const osg::Quat& targetRotation, const double startTime ); - }; - virtual void allocAnimationData() { _animationData = new FirstPersonAnimationData(); } -}; - - -// -// inline methods -// - -/// Returns velocity. -double FirstPersonManipulator::getVelocity() const { return _velocity; } - - -} - -#endif /* OSGGA_FIRST_PERSON_MANIPULATOR */ diff --git a/libs/lib/mac32/include/osgGA/FlightManipulator b/libs/lib/mac32/include/osgGA/FlightManipulator deleted file mode 100644 index b5ea50d56..000000000 --- a/libs/lib/mac32/include/osgGA/FlightManipulator +++ /dev/null @@ -1,83 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_FLIGHT_MANIPULATOR -#define OSGGA_FLIGHT_MANIPULATOR 1 - -#include - - -namespace osgGA { - - -/** FlightManipulator is a MatrixManipulator which provides flight simulator-like - * updating of the camera position & orientation. By default, the left mouse - * button accelerates, the right mouse button decelerates, and the middle mouse - * button (or left and right simultaneously) stops dead. - */ -class OSGGA_EXPORT FlightManipulator : public FirstPersonManipulator -{ - typedef FirstPersonManipulator inherited; - - public: - - enum YawControlMode - { - YAW_AUTOMATICALLY_WHEN_BANKED, - NO_AUTOMATIC_YAW - }; - - FlightManipulator( int flags = UPDATE_MODEL_SIZE | COMPUTE_HOME_USING_BBOX ); - FlightManipulator( const FlightManipulator& fpm, - const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY ); - - META_Object( osgGA, FlightManipulator ); - - virtual void setYawControlMode( YawControlMode ycm ); - inline YawControlMode getYawControlMode() const; - - virtual void home( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual void init( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual void getUsage( osg::ApplicationUsage& usage ) const; - - protected: - - virtual bool handleFrame( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMouseMove( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMouseDrag( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMousePush( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMouseRelease( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleKeyDown( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool flightHandleEvent( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - virtual bool performMovement(); - virtual bool performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy ); - - YawControlMode _yawMode; - -}; - - -// -// inline methods -// - -/// Returns the Yaw control for the flight model. -inline FlightManipulator::YawControlMode FlightManipulator::getYawControlMode() const { return _yawMode; } - - -} - -#endif /* OSGGA_FLIGHT_MANIPULATOR */ diff --git a/libs/lib/mac32/include/osgGA/GUIActionAdapter b/libs/lib/mac32/include/osgGA/GUIActionAdapter deleted file mode 100644 index 999ab88e8..000000000 --- a/libs/lib/mac32/include/osgGA/GUIActionAdapter +++ /dev/null @@ -1,91 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_GUIACTIONADAPTER -#define OSGGA_GUIACTIONADAPTER 1 - -#include -#include - -namespace osgGA{ - -/** -Abstract base class defining the interface by which GUIEventHandlers may request -actions of the GUI system in use. These requests for actions should then be honored -by the GUI toolkit of the user's application. - -To provide more detail, when a GUIEventHandler (e.g. a TrackballManipulator) -handles an incoming event, such as a mouse event, it may wish to make -a request of the GUI. E.g. if a model is 'thrown', the trackball manipulator -may wish to start a timer, and be repeatedly called, to continuously refresh the -camera's position and orientation. However, it has no way of doing this, as it -knows nothing of the window system in which it's operating. Instead, the -GUIEventHandler issues it's request via a GUIActionAdapter, and the viewer -in use should honour the request, using the GUI system in play. - -There is more than one way of using the GUIActionAdapter. E.g. it may be inherited -into a Viewer class, as is done with osgGLUT::Viewer. Alternatively, a simple -subclass of GUIActionAdapter (e.g. osgQt::QtActionAdapter) may be passed to -the GUIEventHandler::handle() function; once the function has returned, the viewer -will then unpack the results and work out what to do to respond to the -requests. - -Also there are several ways to run your app and handle the updating of -the window. osgGLUT::Viewer always has a idle callback registered which does a -redraw all the time. osgGLUT::Viewer can safely ignore both requestRedraw() and -requestContinousUpdate() as these are happening all the time anyway. - -Other apps will probably want to respond to the requestRedraw() and -requestContinousUpdate(bool) and again there is more than one way to handle it. -You can override requestRedraw() and implement to call your own window -redraw straight away. Or you can implement so that a flag is set and -then you then respond the flag being set in your own leisure. - -*/ -class GUIActionAdapter -{ -public: - virtual ~GUIActionAdapter() {} - - /** Provide a mechanism for getting the osg::View associated with this GUIActionAdapter. - * One would use this to case view to osgViewer::View(er) if supported by the subclass.*/ - virtual osg::View* asView() { return 0; } - - /** - requestRedraw() requests a single redraw. - */ - virtual void requestRedraw() = 0; - - /** - requestContinousUpdate(bool) is for en/disabling a throw or idle - callback to be requested by a GUIEventHandler (typically a MatrixManipulator, - though other GUIEventHandler's may also provide functionality). - GUI toolkits can respond to this immediately by registering an idle/timed - callback, or can delay setting the callback and update at their own leisure. - */ - virtual void requestContinuousUpdate(bool needed=true) = 0; - - /** - requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer - to a specified x,y location on the window. This is used by some camera manipulators - to initialise the mouse pointer when mouse position relative to a controls - neutral mouse position is required, i.e when mimicking a aircrafts joystick. - */ - virtual void requestWarpPointer(float x,float y) = 0; - -}; - -} - -#endif - diff --git a/libs/lib/mac32/include/osgGA/GUIEventAdapter b/libs/lib/mac32/include/osgGA/GUIEventAdapter deleted file mode 100644 index 0c1613e94..000000000 --- a/libs/lib/mac32/include/osgGA/GUIEventAdapter +++ /dev/null @@ -1,630 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_EVENT -#define OSGGA_EVENT 1 - -#include -#include -#include -#include - -namespace osgGA{ - - -/** Event class for storing Keyboard, mouse and window events. -*/ -class OSGGA_EXPORT GUIEventAdapter : public osg::Object -{ -public: - - enum MouseButtonMask { - LEFT_MOUSE_BUTTON = 1<<0, - MIDDLE_MOUSE_BUTTON = 1<<1, - RIGHT_MOUSE_BUTTON = 1<<2 - }; - - enum EventType { - NONE = 0, - PUSH = 1<<0, - RELEASE = 1<<1, - DOUBLECLICK = 1<<2, - DRAG = 1<<3, - MOVE = 1<<4, - KEYDOWN = 1<<5, - KEYUP = 1<<6, - FRAME = 1<<7, - RESIZE = 1<<8, - SCROLL = 1<<9, - PEN_PRESSURE = 1<<10, - PEN_ORIENTATION = 1<<11, - PEN_PROXIMITY_ENTER = 1<<12, - PEN_PROXIMITY_LEAVE = 1<<13, - CLOSE_WINDOW = 1<<14, - QUIT_APPLICATION = 1<<15, - USER = 1<<16 - }; - - enum KeySymbol - { - KEY_Space = 0x20, - - KEY_0 = '0', - KEY_1 = '1', - KEY_2 = '2', - KEY_3 = '3', - KEY_4 = '4', - KEY_5 = '5', - KEY_6 = '6', - KEY_7 = '7', - KEY_8 = '8', - KEY_9 = '9', - KEY_A = 'a', - KEY_B = 'b', - KEY_C = 'c', - KEY_D = 'd', - KEY_E = 'e', - KEY_F = 'f', - KEY_G = 'g', - KEY_H = 'h', - KEY_I = 'i', - KEY_J = 'j', - KEY_K = 'k', - KEY_L = 'l', - KEY_M = 'm', - KEY_N = 'n', - KEY_O = 'o', - KEY_P = 'p', - KEY_Q = 'q', - KEY_R = 'r', - KEY_S = 's', - KEY_T = 't', - KEY_U = 'u', - KEY_V = 'v', - KEY_W = 'w', - KEY_X = 'x', - KEY_Y = 'y', - KEY_Z = 'z', - - KEY_Exclaim = 0x21, - KEY_Quotedbl = 0x22, - KEY_Hash = 0x23, - KEY_Dollar = 0x24, - KEY_Ampersand = 0x26, - KEY_Quote = 0x27, - KEY_Leftparen = 0x28, - KEY_Rightparen = 0x29, - KEY_Asterisk = 0x2A, - KEY_Plus = 0x2B, - KEY_Comma = 0x2C, - KEY_Minus = 0x2D, - KEY_Period = 0x2E, - KEY_Slash = 0x2F, - KEY_Colon = 0x3A, - KEY_Semicolon = 0x3B, - KEY_Less = 0x3C, - KEY_Equals = 0x3D, - KEY_Greater = 0x3E, - KEY_Question = 0x3F, - KEY_At = 0x40, - KEY_Leftbracket = 0x5B, - KEY_Backslash = 0x5C, - KEY_Rightbracket = 0x5D, - KEY_Caret = 0x5E, - KEY_Underscore = 0x5F, - KEY_Backquote = 0x60, - - KEY_BackSpace = 0xFF08, /* back space, back char */ - KEY_Tab = 0xFF09, - KEY_Linefeed = 0xFF0A, /* Linefeed, LF */ - KEY_Clear = 0xFF0B, - KEY_Return = 0xFF0D, /* Return, enter */ - KEY_Pause = 0xFF13, /* Pause, hold */ - KEY_Scroll_Lock = 0xFF14, - KEY_Sys_Req = 0xFF15, - KEY_Escape = 0xFF1B, - KEY_Delete = 0xFFFF, /* Delete, rubout */ - - - /* Cursor control & motion */ - - KEY_Home = 0xFF50, - KEY_Left = 0xFF51, /* Move left, left arrow */ - KEY_Up = 0xFF52, /* Move up, up arrow */ - KEY_Right = 0xFF53, /* Move right, right arrow */ - KEY_Down = 0xFF54, /* Move down, down arrow */ - KEY_Prior = 0xFF55, /* Prior, previous */ - KEY_Page_Up = 0xFF55, - KEY_Next = 0xFF56, /* Next */ - KEY_Page_Down = 0xFF56, - KEY_End = 0xFF57, /* EOL */ - KEY_Begin = 0xFF58, /* BOL */ - - - /* Misc Functions */ - - KEY_Select = 0xFF60, /* Select, mark */ - KEY_Print = 0xFF61, - KEY_Execute = 0xFF62, /* Execute, run, do */ - KEY_Insert = 0xFF63, /* Insert, insert here */ - KEY_Undo = 0xFF65, /* Undo, oops */ - KEY_Redo = 0xFF66, /* redo, again */ - KEY_Menu = 0xFF67, /* On Windows, this is VK_APPS, the context-menu key */ - KEY_Find = 0xFF68, /* Find, search */ - KEY_Cancel = 0xFF69, /* Cancel, stop, abort, exit */ - KEY_Help = 0xFF6A, /* Help */ - KEY_Break = 0xFF6B, - KEY_Mode_switch = 0xFF7E, /* Character set switch */ - KEY_Script_switch = 0xFF7E, /* Alias for mode_switch */ - KEY_Num_Lock = 0xFF7F, - - /* Keypad Functions, keypad numbers cleverly chosen to map to ascii */ - - KEY_KP_Space = 0xFF80, /* space */ - KEY_KP_Tab = 0xFF89, - KEY_KP_Enter = 0xFF8D, /* enter */ - KEY_KP_F1 = 0xFF91, /* PF1, KP_A, ... */ - KEY_KP_F2 = 0xFF92, - KEY_KP_F3 = 0xFF93, - KEY_KP_F4 = 0xFF94, - KEY_KP_Home = 0xFF95, - KEY_KP_Left = 0xFF96, - KEY_KP_Up = 0xFF97, - KEY_KP_Right = 0xFF98, - KEY_KP_Down = 0xFF99, - KEY_KP_Prior = 0xFF9A, - KEY_KP_Page_Up = 0xFF9A, - KEY_KP_Next = 0xFF9B, - KEY_KP_Page_Down = 0xFF9B, - KEY_KP_End = 0xFF9C, - KEY_KP_Begin = 0xFF9D, - KEY_KP_Insert = 0xFF9E, - KEY_KP_Delete = 0xFF9F, - KEY_KP_Equal = 0xFFBD, /* equals */ - KEY_KP_Multiply = 0xFFAA, - KEY_KP_Add = 0xFFAB, - KEY_KP_Separator = 0xFFAC, /* separator, often comma */ - KEY_KP_Subtract = 0xFFAD, - KEY_KP_Decimal = 0xFFAE, - KEY_KP_Divide = 0xFFAF, - - KEY_KP_0 = 0xFFB0, - KEY_KP_1 = 0xFFB1, - KEY_KP_2 = 0xFFB2, - KEY_KP_3 = 0xFFB3, - KEY_KP_4 = 0xFFB4, - KEY_KP_5 = 0xFFB5, - KEY_KP_6 = 0xFFB6, - KEY_KP_7 = 0xFFB7, - KEY_KP_8 = 0xFFB8, - KEY_KP_9 = 0xFFB9, - - /* - * Auxiliary Functions; note the duplicate definitions for left and right - * function keys; Sun keyboards and a few other manufactures have such - * function key groups on the left and/or right sides of the keyboard. - * We've not found a keyboard with more than 35 function keys total. - */ - - KEY_F1 = 0xFFBE, - KEY_F2 = 0xFFBF, - KEY_F3 = 0xFFC0, - KEY_F4 = 0xFFC1, - KEY_F5 = 0xFFC2, - KEY_F6 = 0xFFC3, - KEY_F7 = 0xFFC4, - KEY_F8 = 0xFFC5, - KEY_F9 = 0xFFC6, - KEY_F10 = 0xFFC7, - KEY_F11 = 0xFFC8, - KEY_F12 = 0xFFC9, - KEY_F13 = 0xFFCA, - KEY_F14 = 0xFFCB, - KEY_F15 = 0xFFCC, - KEY_F16 = 0xFFCD, - KEY_F17 = 0xFFCE, - KEY_F18 = 0xFFCF, - KEY_F19 = 0xFFD0, - KEY_F20 = 0xFFD1, - KEY_F21 = 0xFFD2, - KEY_F22 = 0xFFD3, - KEY_F23 = 0xFFD4, - KEY_F24 = 0xFFD5, - KEY_F25 = 0xFFD6, - KEY_F26 = 0xFFD7, - KEY_F27 = 0xFFD8, - KEY_F28 = 0xFFD9, - KEY_F29 = 0xFFDA, - KEY_F30 = 0xFFDB, - KEY_F31 = 0xFFDC, - KEY_F32 = 0xFFDD, - KEY_F33 = 0xFFDE, - KEY_F34 = 0xFFDF, - KEY_F35 = 0xFFE0, - - /* Modifiers */ - - KEY_Shift_L = 0xFFE1, /* Left shift */ - KEY_Shift_R = 0xFFE2, /* Right shift */ - KEY_Control_L = 0xFFE3, /* Left control */ - KEY_Control_R = 0xFFE4, /* Right control */ - KEY_Caps_Lock = 0xFFE5, /* Caps lock */ - KEY_Shift_Lock = 0xFFE6, /* Shift lock */ - - KEY_Meta_L = 0xFFE7, /* Left meta */ - KEY_Meta_R = 0xFFE8, /* Right meta */ - KEY_Alt_L = 0xFFE9, /* Left alt */ - KEY_Alt_R = 0xFFEA, /* Right alt */ - KEY_Super_L = 0xFFEB, /* Left super */ - KEY_Super_R = 0xFFEC, /* Right super */ - KEY_Hyper_L = 0xFFED, /* Left hyper */ - KEY_Hyper_R = 0xFFEE /* Right hyper */ - }; - - - enum ModKeyMask - { - MODKEY_LEFT_SHIFT = 0x0001, - MODKEY_RIGHT_SHIFT = 0x0002, - MODKEY_LEFT_CTRL = 0x0004, - MODKEY_RIGHT_CTRL = 0x0008, - MODKEY_LEFT_ALT = 0x0010, - MODKEY_RIGHT_ALT = 0x0020, - MODKEY_LEFT_META = 0x0040, - MODKEY_RIGHT_META = 0x0080, - MODKEY_LEFT_SUPER = 0x0100, - MODKEY_RIGHT_SUPER = 0x0200, - MODKEY_LEFT_HYPER = 0x0400, - MODKEY_RIGHT_HYPER = 0x0800, - MODKEY_NUM_LOCK = 0x1000, - MODKEY_CAPS_LOCK = 0x2000, - MODKEY_CTRL = (MODKEY_LEFT_CTRL|MODKEY_RIGHT_CTRL), - MODKEY_SHIFT = (MODKEY_LEFT_SHIFT|MODKEY_RIGHT_SHIFT), - MODKEY_ALT = (MODKEY_LEFT_ALT|MODKEY_RIGHT_ALT), - MODKEY_META = (MODKEY_LEFT_META|MODKEY_RIGHT_META), - MODKEY_SUPER = (MODKEY_LEFT_SUPER|MODKEY_RIGHT_SUPER), - MODKEY_HYPER = (MODKEY_LEFT_HYPER|MODKEY_RIGHT_HYPER) - }; - - enum MouseYOrientation - { - Y_INCREASING_UPWARDS, - Y_INCREASING_DOWNWARDS - }; - - enum ScrollingMotion - { - SCROLL_NONE, - SCROLL_LEFT, - SCROLL_RIGHT, - SCROLL_UP, - SCROLL_DOWN, - SCROLL_2D - }; - - enum TabletPointerType - { - UNKNOWN = 0, - PEN, - PUCK, - ERASER - }; - - enum TouchPhase - { - TOUCH_UNKNOWN, - TOUCH_BEGAN, - TOUCH_MOVED, - TOUCH_STATIONERY, - TOUCH_ENDED - }; - - class TouchData : public osg::Referenced { - public: - struct TouchPoint { - unsigned int id; - TouchPhase phase; - float x, y; - - unsigned int tapCount; - TouchPoint() : id(0), phase(TOUCH_UNKNOWN), x(0.0f), y(0.0f), tapCount(0) {} - TouchPoint(unsigned int in_id, TouchPhase in_phase, float in_x, float in_y, unsigned int in_tap_count) - : id(in_id), - phase(in_phase), - x(in_x), - y(in_y), - tapCount(in_tap_count) - { - } - }; - - typedef std::vector TouchSet; - - typedef TouchSet::iterator iterator; - typedef TouchSet::const_iterator const_iterator; - - TouchData() : osg::Referenced() {} - - unsigned int getNumTouchPoints() const { return _touches.size(); } - - iterator begin() { return _touches.begin(); } - const_iterator begin() const { return _touches.begin(); } - - iterator end() { return _touches.end(); } - const_iterator end() const { return _touches.end(); } - - const TouchPoint get(unsigned int i) const { return _touches[i]; } - - protected: - - void addTouchPoint(unsigned int id, TouchPhase phase, float x, float y, unsigned int tap_count) { - _touches.push_back(TouchPoint(id, phase, x, y, tap_count)); - } - - TouchSet _touches; - - friend class GUIEventAdapter; - }; - - public: - - GUIEventAdapter(); - - GUIEventAdapter(const GUIEventAdapter& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgGA, GUIEventAdapter); - - - /** Get the accumulated event state singleton. - * Typically all EventQueue will share this single GUIEventAdapter object for tracking - * the mouse position, keyboard and mouse masks. */ - static osg::ref_ptr& getAccumulatedEventState(); - - - /** Set whether this event has been handled by an event handler or not.*/ - void setHandled(bool handled) const { _handled = handled; } - - /** Get whether this event has been handled by an event handler or not.*/ - bool getHandled() const { return _handled; } - - /** set the event type. */ - void setEventType(EventType Type) { _eventType = Type; } - - /** get the event type. */ - virtual EventType getEventType() const { return _eventType; } - - /** set time in seconds of event. */ - void setTime(double time) { _time = time; } - - /** get time in seconds of event. */ - double getTime() const { return _time; } - - /** deprecated function for getting time of event. */ - double time() const { return _time; } - - - void setGraphicsContext(osg::GraphicsContext* context) { _context = context; } - const osg::GraphicsContext* getGraphicsContext() const { return _context.get(); } - - - /** set window rectangle. */ - void setWindowRectangle(int x, int y, int width, int height, bool updateMouseRange = true); - - /** get window x origin.*/ - int getWindowX() const { return _windowX; } - - /** get window y origin.*/ - int getWindowY() const { return _windowY; } - - /** get window width.*/ - int getWindowWidth() const { return _windowWidth; } - - /** get window height.*/ - int getWindowHeight() const { return _windowHeight; } - - - /** set key pressed. */ - inline void setKey(int key) { _key = key; } - - /** get key pressed, return -1 if inappropriate for this GUIEventAdapter. */ - virtual int getKey() const { return _key; } - - /** set virtual key pressed. */ - void setUnmodifiedKey(int key) { _unmodifiedKey = key; } - - /** get virtual key pressed. */ - int getUnmodifiedKey() const { return _unmodifiedKey; } - - /** set button pressed/released.*/ - void setButton(int button) { _button = button; } - - /** button pressed/released, return -1 if inappropriate for this GUIEventAdapter.*/ - int getButton() const { return _button; } - - - /** set mouse input range. */ - void setInputRange(float Xmin, float Ymin, float Xmax, float Ymax); - - /** get mouse minimum x. */ - float getXmin() const { return _Xmin; } - - /** get mouse maximum x. */ - float getXmax() const { return _Xmax; } - - /** get mouse minimum y. */ - float getYmin() const { return _Ymin; } - - /** get mouse maximum y. */ - float getYmax() const { return _Ymax; } - - /** set current mouse x position.*/ - void setX(float x) { _mx = x; } - - /** get current mouse x position.*/ - float getX() const { return _mx; } - - /** set current mouse y position.*/ - void setY(float y) { _my = y; } - - /** get current mouse y position.*/ - float getY() const { return _my; } - - /** - * return the current mouse x value normalized to the range of -1 to 1. - * -1 would be the left hand side of the window. - * 0.0 would be the middle of the window. - * +1 would be the right hand side of the window. - */ - inline float getXnormalized() const { return 2.0f*(getX()-getXmin())/(getXmax()-getXmin())-1.0f; } - - /** - * return the current mouse y value normalized to the range of -1 to 1. - * -1 would be the bottom of the window. - * 0.0 would be the middle of the window. - * +1 would be the top of the window. - */ - inline float getYnormalized() const - { - if (_mouseYOrientation==Y_INCREASING_UPWARDS) return 2.0f*(getY()-getYmin())/(getYmax()-getYmin())-1.0f; - else return -(2.0f*(getY()-getYmin())/(getYmax()-getYmin())-1.0f); - } - - /// set mouse-Y orientation (mouse-Y increases upwards or downwards). - void setMouseYOrientation(MouseYOrientation myo) { _mouseYOrientation = myo; } - - /// get mouse-Y orientation (mouse-Y increases upwards or downwards). - MouseYOrientation getMouseYOrientation() const { return _mouseYOrientation; } - - /// set current mouse button state. - void setButtonMask(int mask) { _buttonMask = mask; } - - /// get current mouse button state. - int getButtonMask() const { return _buttonMask; } - - /// set modifier key mask. - void setModKeyMask(int mask) { _modKeyMask = mask; } - - /// get modifier key mask. - int getModKeyMask() const { return _modKeyMask; } - - /// set scrolling motion (for EventType::SCROLL). - void setScrollingMotion(ScrollingMotion motion) { _scrolling.motion = motion; } - - /// get scrolling motion (for EventType::SCROLL). - ScrollingMotion getScrollingMotion() const { return _scrolling.motion; } - - /// set the scrolling delta to x,y and the scrolling motion to SCROLL_2D. - void setScrollingMotionDelta(float x, float y) { - _scrolling.motion = SCROLL_2D; - _scrolling.deltaX = x; - _scrolling.deltaY = y; - } - - /// get the scrolling x-delta. - float getScrollingDeltaX() const { return _scrolling.deltaX; } - - /// get the scrolling y-delta. - float getScrollingDeltaY() const { return _scrolling.deltaY; } - - - /// set the tablet pen pressure (range 0..1). - void setPenPressure(float pressure) { _tabletPen.pressure = pressure; } - - /// get the tablet pen pressure (range 0..1). - float getPenPressure() const { return _tabletPen.pressure; } - - /// set the tablet pen tiltX in degrees. - void setPenTiltX(float tiltX) { _tabletPen.tiltX = tiltX; } - - /// get the tablet pen tiltX in degrees. - float getPenTiltX() const { return _tabletPen.tiltX; } - - /// set the tablet pen tiltY in degrees. - void setPenTiltY(float tiltY) { _tabletPen.tiltY = tiltY; } - - /// get the tablet pen tiltY in degrees. - float getPenTiltY() const { return _tabletPen.tiltY; } - - /// set the tablet pen rotation around the Z-axis in degrees. - void setPenRotation(float rotation) { _tabletPen.rotation = rotation; } - - /// get the tablet pen rotation around the Z-axis in degrees. - float getPenRotation() const { return _tabletPen.rotation; } - - /// set the tablet pointer type. - void setTabletPointerType(TabletPointerType pt) { _tabletPen.tabletPointerType = pt; } - - /// get the tablet pointer type. - TabletPointerType getTabletPointerType() const { return _tabletPen.tabletPointerType; } - - /// set the orientation from a tablet input device as a matrix. - const osg::Matrix getPenOrientation() const; - - void addTouchPoint(unsigned int id, TouchPhase phase, float x, float y, unsigned int tapCount = 0); - - TouchData* getTouchData() const { return _touchData.get(); } - bool isMultiTouchEvent() const { return (_touchData.valid()); } - - protected: - - /** Force users to create on heap, so that multiple referencing is safe.*/ - virtual ~GUIEventAdapter(); - - mutable bool _handled; - EventType _eventType; - double _time; - - osg::observer_ptr _context; - int _windowX; - int _windowY; - int _windowWidth; - int _windowHeight; - int _key; - int _unmodifiedKey; - int _button; - float _Xmin,_Xmax; - float _Ymin,_Ymax; - float _mx; - float _my; - int _buttonMask; - int _modKeyMask; - MouseYOrientation _mouseYOrientation; - - struct Scrolling { - ScrollingMotion motion; - float deltaX; - float deltaY; - - Scrolling() : motion(SCROLL_NONE), deltaX(0), deltaY(0) {} - Scrolling(const Scrolling& rhs) : motion(rhs.motion), deltaX(rhs.deltaX), deltaY(rhs.deltaY) {} - }; - Scrolling _scrolling; - - struct TabletPen { - float pressure; - float tiltX; - float tiltY; - float rotation; - TabletPointerType tabletPointerType; - - TabletPen() : pressure(0), tiltX(0), tiltY(0), rotation(0), tabletPointerType(UNKNOWN) {} - TabletPen(const TabletPen& rhs) : pressure(rhs.pressure), tiltX(rhs.tiltX), tiltY(rhs.tiltY), rotation(rhs.rotation), tabletPointerType(rhs.tabletPointerType) {} - }; - TabletPen _tabletPen; - - osg::ref_ptr _touchData; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/GUIEventHandler b/libs/lib/mac32/include/osgGA/GUIEventHandler deleted file mode 100644 index 4dce9b72d..000000000 --- a/libs/lib/mac32/include/osgGA/GUIEventHandler +++ /dev/null @@ -1,138 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_GUIEVENTHANDLER -#define OSGGA_GUIEVENTHANDLER 1 - -#include - -#include -#include -#include - -#include -#include -#include - - -// #define COMPILE_COMPOSITE_EVENTHANDLER - -namespace osgGA{ - -/** - -GUIEventHandler provides a basic interface for any class which wants to handle -a GUI Events. - -The GUIEvent is supplied by a GUIEventAdapter. Feedback resulting from the -handle method is supplied by a GUIActionAdapter, which allows the GUIEventHandler -to ask the GUI to take some action in response to an incoming event. - -For example, consider a Trackball Viewer class which takes mouse events and -manipulates a scene camera in response. The Trackball Viewer is a GUIEventHandler, -and receives the events via the handle method. If the user 'throws' the model, -the Trackball Viewer class can detect this via the incoming events, and -request that the GUI set up a timer callback to continually redraw the view. -This request is made via the GUIActionAdapter class. - -*/ - -class OSGGA_EXPORT GUIEventHandler : public osg::NodeCallback, public osg::Drawable::EventCallback -{ -public: - - GUIEventHandler() : _ignoreHandledEventsMask(GUIEventAdapter::NONE) {} - GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp& copyop): - osg::NodeCallback(eh, copyop), - osg::Drawable::EventCallback(eh, copyop), - _ignoreHandledEventsMask(eh._ignoreHandledEventsMask) {} - - META_Object(osgGA,GUIEventHandler); - - /** Event traversal node callback method.*/ - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); - - /** Event traversal drawable callback method.*/ - virtual void event(osg::NodeVisitor* nv, osg::Drawable* drawable); - - /** Handle events, return true if handled, false otherwise. */ - virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor*) { return handle(ea,aa); } - - /** Convenience method that only passes on to the handle(,,,) method events that either haven't been - * handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask. - * Note, this method is an inline method, and not appropriate for users to override, override the handle(,,,) - * method instead.*/ - inline bool handleWithCheckAgainstIgnoreHandledEventsMask(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv) - { - if (!ea.getHandled() || - (ea.getEventType() & _ignoreHandledEventsMask)==0) - { - bool handled = handle(ea,aa,object,nv); - if (handled) ea.setHandled(true); - return handled; - } - else - { - return false; - } - } - - /** Deprecated, Handle events, return true if handled, false otherwise. */ - virtual bool handle(const GUIEventAdapter&,GUIActionAdapter&) { return false; } - - /** Convenience method that only passes on to the handle(,) method events that either haven't been - * handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask. - * Note, this method is an inline method, and not appropriate for users to override, override the handle(,) - * method instead.*/ - inline bool handleWithCheckAgainstIgnoreHandledEventsMask(const GUIEventAdapter& ea,GUIActionAdapter& aa) - { - if (!ea.getHandled() || - (ea.getEventType() & _ignoreHandledEventsMask)==0) - { - bool handled = handle(ea,aa); - if (handled) ea.setHandled(true); - return handled; - } - else - { - return false; - } - } - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage&) const {} - - /** Set a mask of osgGA::GUIEeventAdapter::Event to be ignored if marked as handled */ - void setIgnoreHandledEventsMask(unsigned int mask) { _ignoreHandledEventsMask = mask; } - - /** Get the event mask of the osgGA::GUIEeventAdapter::Event to be ignored if marked as handled */ - unsigned int getIgnoreHandledEventsMask() const { return _ignoreHandledEventsMask; }; - -protected: - unsigned int _ignoreHandledEventsMask; - -}; - -#ifdef USE_DEPRECATED_API - // keep for backwards compatibility - class GUIEventHandlerVisitor - { - public: - - void visit(GUIEventHandler&) {} - }; -#endif - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/KeySwitchMatrixManipulator b/libs/lib/mac32/include/osgGA/KeySwitchMatrixManipulator deleted file mode 100644 index d318008c1..000000000 --- a/libs/lib/mac32/include/osgGA/KeySwitchMatrixManipulator +++ /dev/null @@ -1,136 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGUTIL_KEYSWITCMATRIXMANIPULATOR -#define OSGUTIL_KEYSWITCMATRIXMANIPULATOR 1 - -#include -#include -#include - -namespace osgGA{ - -class GUIActionAdapter; - -/** -KeySwitchMatrixManipulator is a decorator which allows the type of camera manipulator -being used to be switched by pressing a key. E.g. '1' for a TrackballManipultor, -'2' for a DriveManipulator, '3' for a FlightManipulator. The manipulators available, -and the associated switch keys, can be configured. -*/ -class OSGGA_EXPORT KeySwitchMatrixManipulator : public CameraManipulator -{ - public: - - typedef std::pair > NamedManipulator; - typedef std::map KeyManipMap; - - virtual const char* className() const { return "KeySwitchMatrixManipulator"; } - - /** - Add a camera manipulator with an associated name, and a key to - trigger the switch, - */ - void addMatrixManipulator(int key, std::string name, CameraManipulator *cm); - - /** - Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd. - */ - void addNumberedMatrixManipulator(CameraManipulator *cm); - - unsigned int getNumMatrixManipulators() const { return _manips.size(); } - - void selectMatrixManipulator(unsigned int num); - - /** Get the complete list of manipulators attached to this keyswitch manipulator.*/ - KeyManipMap& getKeyManipMap() { return _manips; } - - /** Get the const complete list of manipulators attached to this keyswitch manipulator.*/ - const KeyManipMap& getKeyManipMap() const { return _manips; } - - - /** Get the current active manipulators.*/ - CameraManipulator* getCurrentMatrixManipulator() { return _current.get(); } - - /** Get the const current active manipulators.*/ - const CameraManipulator* getCurrentMatrixManipulator() const { return _current.get(); } - - - /** Get manipulator assigned to a specified index.*/ - CameraManipulator* getMatrixManipulatorWithIndex(unsigned int key); - - /** Get const manipulator assigned to a specified index.*/ - const CameraManipulator* getMatrixManipulatorWithIndex(unsigned int key) const; - - /** Get manipulator assigned to a specified key.*/ - CameraManipulator* getMatrixManipulatorWithKey(unsigned int key); - - /** Get const manipulator assigned to a specified key.*/ - const CameraManipulator* getMatrixManipulatorWithKey(unsigned int key) const; - - - // Overrides from CameraManipulator... - - /** set the coordinate frame which callback tells the manipulator which way is up, east and north.*/ - virtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb); - - /** Set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByMatrix(const osg::Matrixd& matrix) { _current->setByMatrix(matrix); } - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByInverseMatrix(const osg::Matrixd& matrix) { _current->setByInverseMatrix(matrix); } - - /** get the position of the manipulator as 4x4 Matrix.*/ - virtual osg::Matrixd getMatrix() const { return _current->getMatrix(); } - - /** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/ - virtual osg::Matrixd getInverseMatrix() const { return _current->getInverseMatrix(); } - - /** Get the FusionDistanceMode. Used by SceneView for setting up stereo convergence.*/ - virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const { return _current->getFusionDistanceMode(); } - - /** Get the FusionDistanceValue. Used by SceneView for setting up stereo convergence.*/ - virtual float getFusionDistanceValue() const { return _current->getFusionDistanceValue(); } - - - virtual void setNode(osg::Node* n); - - virtual const osg::Node* getNode() const { return _current->getNode(); } - - virtual osg::Node* getNode() { return _current->getNode(); } - - virtual void setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up, bool autoComputeHomePosition=false); - - virtual void setAutoComputeHomePosition(bool flag); - - virtual void computeHomePosition(); - - virtual void home(const GUIEventAdapter& ee,GUIActionAdapter& aa); - - virtual void init(const GUIEventAdapter& ee,GUIActionAdapter& aa) { if (_current.valid()) _current->init(ee,aa); } - - virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us); - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; - - private: - - KeyManipMap _manips; - - osg::ref_ptr _current; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/MultiTouchTrackballManipulator b/libs/lib/mac32/include/osgGA/MultiTouchTrackballManipulator deleted file mode 100644 index 0e5763aac..000000000 --- a/libs/lib/mac32/include/osgGA/MultiTouchTrackballManipulator +++ /dev/null @@ -1,47 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_MULTITOUCH_TRACKBALL_MANIPULATOR -#define OSGGA_MULTITOUCH_TRACKBALL_MANIPULATOR 1 - -#include - - -namespace osgGA { - - -class OSGGA_EXPORT MultiTouchTrackballManipulator : public TrackballManipulator -{ - typedef TrackballManipulator inherited; - - public: - - MultiTouchTrackballManipulator( int flags = DEFAULT_SETTINGS ); - MultiTouchTrackballManipulator( const MultiTouchTrackballManipulator& tm, - const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY ); - - META_Object( osgGA, MultiTouchTrackballManipulator ); - - bool handle( const GUIEventAdapter& ea, GUIActionAdapter& us ); - - protected: - - void handleMultiTouchDrag(GUIEventAdapter::TouchData* now, GUIEventAdapter::TouchData* last, const double eventTimeDelta); - - osg::ref_ptr _lastTouchData; -}; - - -} - -#endif /* OSGGA_MULTITOUCH_TRACKBALL_MANIPULATOR */ diff --git a/libs/lib/mac32/include/osgGA/NodeTrackerManipulator b/libs/lib/mac32/include/osgGA/NodeTrackerManipulator deleted file mode 100644 index 01b2e0bc3..000000000 --- a/libs/lib/mac32/include/osgGA/NodeTrackerManipulator +++ /dev/null @@ -1,107 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_NODE_TRACKER_MANIPULATOR -#define OSGGA_NODE_TRACKER_MANIPULATOR 1 - -#include -#include - - -namespace osgGA { - - -class OSGGA_EXPORT NodeTrackerManipulator : public OrbitManipulator -{ - typedef OrbitManipulator inherited; - - public: - - NodeTrackerManipulator( int flags = DEFAULT_SETTINGS ); - - NodeTrackerManipulator( const NodeTrackerManipulator& om, - const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY ); - - META_Object( osgGA, NodeTrackerManipulator ); - - void setTrackNodePath(const osg::NodePath& nodePath); - void setTrackNodePath(const osg::ObserverNodePath& nodePath) { _trackNodePath = nodePath; } - osg::ObserverNodePath& getTrackNodePath() { return _trackNodePath; } - - void setTrackNode(osg::Node* node); - osg::Node* getTrackNode() { osg::NodePath nodePath; return _trackNodePath.getNodePath(nodePath) && !nodePath.empty() ? nodePath.back() : 0; } - const osg::Node* getTrackNode() const { osg::NodePath nodePath; return _trackNodePath.getNodePath(nodePath) && !nodePath.empty() ? nodePath.back() : 0; } - - enum TrackerMode - { - /** Track the center of the node's bounding sphere, but not rotations of the node. - * For databases which have a CoordinateSystemNode, the orientation is kept relative the coordinate frame if the center of the node. - */ - NODE_CENTER, - /** Track the center of the node's bounding sphere, and the azimuth rotation (about the z axis of the current coordinate frame). - * For databases which have a CoordinateSystemNode, the orientation is kept relative the coordinate frame if the center of the node. - */ - NODE_CENTER_AND_AZIM, - /** Tack the center of the node's bounding sphere, and the all rotations of the node. - */ - NODE_CENTER_AND_ROTATION - }; - - void setTrackerMode(TrackerMode mode); - TrackerMode getTrackerMode() const { return _trackerMode; } - - - enum RotationMode - { - /** Use a trackball style manipulation of the view direction w.r.t the tracked orientation. - */ - TRACKBALL, - /** Allow the elevation and azimuth angles to be adjust w.r.t the tracked orientation. - */ - ELEVATION_AZIM - }; - - void setRotationMode(RotationMode mode); - RotationMode getRotationMode() const; - - - virtual void setByMatrix(const osg::Matrixd& matrix); - virtual osg::Matrixd getMatrix() const; - virtual osg::Matrixd getInverseMatrix() const; - - virtual void setNode(osg::Node*); - - virtual void computeHomePosition(); - - protected: - - virtual bool performMovementLeftMouseButton(const double eventTimeDelta, const double dx, const double dy); - virtual bool performMovementMiddleMouseButton(const double eventTimeDelta, const double dx, const double dy); - virtual bool performMovementRightMouseButton(const double eventTimeDelta, const double dx, const double dy); - - void computeNodeWorldToLocal(osg::Matrixd& worldToLocal) const; - void computeNodeLocalToWorld(osg::Matrixd& localToWorld) const; - - void computeNodeCenterAndRotation(osg::Vec3d& center, osg::Quat& rotation) const; - - void computePosition(const osg::Vec3d& eye,const osg::Vec3d& lv,const osg::Vec3d& up); - - - osg::ObserverNodePath _trackNodePath; - TrackerMode _trackerMode; - -}; - -} - -#endif /* OSGGA_NODE_TRACKER_MANIPULATOR */ diff --git a/libs/lib/mac32/include/osgGA/OrbitManipulator b/libs/lib/mac32/include/osgGA/OrbitManipulator deleted file mode 100644 index 8cb633444..000000000 --- a/libs/lib/mac32/include/osgGA/OrbitManipulator +++ /dev/null @@ -1,127 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * OrbitManipulator code Copyright (C) 2010 PCJohn (Jan Peciva) - * while some pieces of code were taken from OSG. - * Thanks to company Cadwork (www.cadwork.ch) and - * Brno University of Technology (www.fit.vutbr.cz) for open-sourcing this work. -*/ - -#ifndef OSGGA_ORBIT_MANIPULATOR -#define OSGGA_ORBIT_MANIPULATOR 1 - -#include - - -namespace osgGA { - - -/** OrbitManipulator is base class for camera control based on focal center, - distance from the center, and orientation of distance vector to the eye. - This is the base class for trackball style manipulators.*/ -class OSGGA_EXPORT OrbitManipulator : public StandardManipulator -{ - typedef StandardManipulator inherited; - - public: - - OrbitManipulator( int flags = DEFAULT_SETTINGS ); - OrbitManipulator( const OrbitManipulator& om, - const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY ); - - META_Object( osgGA, OrbitManipulator ); - - virtual void setByMatrix( const osg::Matrixd& matrix ); - virtual void setByInverseMatrix( const osg::Matrixd& matrix ); - virtual osg::Matrixd getMatrix() const; - virtual osg::Matrixd getInverseMatrix() const; - - virtual void setTransformation( const osg::Vec3d& eye, const osg::Quat& rotation ); - virtual void setTransformation( const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up ); - virtual void getTransformation( osg::Vec3d& eye, osg::Quat& rotation ) const; - virtual void getTransformation( osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up ) const; - - void setHeading( double azimuth ); - double getHeading() const; - void setElevation( double elevation ); - double getElevation() const; - - virtual void setCenter( const osg::Vec3d& center ); - const osg::Vec3d& getCenter() const; - virtual void setRotation( const osg::Quat& rotation ); - const osg::Quat& getRotation() const; - virtual void setDistance( double distance ); - double getDistance() const; - - virtual void setTrackballSize( const double& size ); - inline double getTrackballSize() const; - virtual void setWheelZoomFactor( double wheelZoomFactor ); - inline double getWheelZoomFactor() const; - - virtual void setMinimumDistance( const double& minimumDistance, bool relativeToModelSize = NULL ); - double getMinimumDistance( bool *relativeToModelSize = NULL ) const; - - virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const; - virtual float getFusionDistanceValue() const; - - protected: - - virtual bool handleMouseWheel( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - virtual bool performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMouseDeltaMovement( const float dx, const float dy ); - virtual void applyAnimationStep( const double currentProgress, const double prevProgress ); - - virtual void rotateTrackball( const float px0, const float py0, - const float px1, const float py1, const float scale ); - virtual void rotateWithFixedVertical( const float dx, const float dy ); - virtual void rotateWithFixedVertical( const float dx, const float dy, const osg::Vec3f& up ); - virtual void panModel( const float dx, const float dy, const float dz = 0.f ); - virtual void zoomModel( const float dy, bool pushForwardIfNeeded = true ); - void trackball( osg::Vec3d& axis, float& angle, float p1x, float p1y, float p2x, float p2y ); - float tb_project_to_sphere( float r, float x, float y ); - virtual bool startAnimationByMousePointerIntersection( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - osg::Vec3d _center; - osg::Quat _rotation; - double _distance; - - double _trackballSize; - double _wheelZoomFactor; - - double _minimumDistance; - static int _minimumDistanceFlagIndex; - - class OrbitAnimationData : public AnimationData { - public: - osg::Vec3d _movement; - void start( const osg::Vec3d& movement, const double startTime ); - }; - virtual void allocAnimationData() { _animationData = new OrbitAnimationData(); } -}; - - -// -// inline functions -// - -/** Get the size of the trackball relative to the model size. */ -inline double OrbitManipulator::getTrackballSize() const { return _trackballSize; } -/** Get the mouse wheel zoom factor.*/ -inline double OrbitManipulator::getWheelZoomFactor() const { return _wheelZoomFactor; } - - -} - -#endif /* OSGGA_ORBIT_MANIPULATOR */ diff --git a/libs/lib/mac32/include/osgGA/SphericalManipulator b/libs/lib/mac32/include/osgGA/SphericalManipulator deleted file mode 100644 index bc63fb287..000000000 --- a/libs/lib/mac32/include/osgGA/SphericalManipulator +++ /dev/null @@ -1,178 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef __SphericalManipulator_h__ -#define __SphericalManipulator_h__ - -#include -#include -#include - -namespace osgGA -{ - -class OSGGA_EXPORT SphericalManipulator : public CameraManipulator -{ - public: - SphericalManipulator(); - - virtual const char* className() const { return "Spherical Manipulator"; } - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByMatrix(const osg::Matrixd& matrix); - - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ - virtual void setByInverseMatrix(const osg::Matrixd& matrix) { setByMatrix(osg::Matrixd::inverse(matrix)); } - - /** get the position of the manipulator as 4x4 Matrix.*/ - virtual osg::Matrixd getMatrix() const; - - /** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/ - virtual osg::Matrixd getInverseMatrix() const; - - /** Get the FusionDistanceMode. Used by SceneView for setting up stereo convergence.*/ - virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const { return osgUtil::SceneView::USE_FUSION_DISTANCE_VALUE; } - - /** Get the FusionDistanceValue. Used by SceneView for setting up stereo convergence.*/ - virtual float getFusionDistanceValue() const { return _distance; } - - /** Attach a node to the manipulator. - Automatically detaches previously attached node. - setNode(NULL) detaches previously nodes. - Is ignored by manipulators which do not require a reference model.*/ - virtual void setNode(osg::Node*); - - /** Return node if attached.*/ - virtual const osg::Node* getNode() const; - - /** Return node if attached.*/ - virtual osg::Node* getNode(); - - /** Move the camera to the default position. - May be ignored by manipulators if home functionality is not appropriate.*/ - virtual void home(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); - virtual void home(double); - - /** Start/restart the manipulator.*/ - virtual void init(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); - - void zoomOn(const osg::BoundingSphere& bound); - - /** handle events, return true if handled, false otherwise.*/ - virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); - - /** Compute the home position.*/ - virtual void computeHomePosition(); - - void computeViewPosition(const osg::BoundingSphere& bound,double& scale,double& distance,osg::Vec3d& center); - - void setCenter(const osg::Vec3d& center) {_center=center;} - const osg::Vec3d& getCenter() const {return _center;} - - bool setDistance(double distance); - double getDistance() const { return _distance; } - - double getHomeDistance() const { return _homeDistance; } - - void setHeading(double azimuth) { _heading = azimuth; } - double getHeading() const {return _heading;} - - void setElevation(double elevation) { _elevation = elevation; } - double getElevtion() const {return _elevation;} - - - /** get the minimum distance (as ratio) the eye point can be zoomed in */ - double getMinimumZoomScale() const { return _minimumZoomScale; } - - /** set the minimum distance (as ratio) the eye point can be zoomed in towards the - center before the center is pushed forward.*/ - void setMinimumZoomScale(double minimumZoomScale) {_minimumZoomScale=minimumZoomScale;} - - - /** set the mouse scroll wheel zoom delta. - * Range -1.0 to +1.0, -ve value inverts wheel direction and zero switches off scroll wheel. */ - void setScroolWheelZoomDelta(double zoomDelta) { _zoomDelta = zoomDelta; } - - /** get the mouse scroll wheel zoom delta. */ - double getScroolWheelZoomDelta() const { return _zoomDelta; } - - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; - - enum RotationMode - { - ELEVATION_HEADING=0, - HEADING, - ELEVATION, - MAP - }; - - RotationMode getRotationMode() const {return _rotationMode;} - void setRotationMode(RotationMode mode); - - /** Returns true if the camera can be thrown, false otherwise. This defaults to true. */ - bool getAllowThrow() const { return _allowThrow; } - /** Set the 'allow throw' flag. Releasing the mouse button while moving the camera results in a throw. */ - void setAllowThrow(bool allowThrow) { _allowThrow = allowThrow; } - - protected: - - virtual ~SphericalManipulator(); - - /** Reset the internal GUIEvent stack.*/ - void flushMouseEventStack(); - /** Add the current mouse GUIEvent to internal stack.*/ - void addMouseEvent(const osgGA::GUIEventAdapter& ea); - - /** For the give mouse movement calculate the movement of the camera. - Return true is camera has moved and a redraw is required.*/ - bool calcMovement(); - - /** Check the speed at which the mouse is moving. - If speed is below a threshold then return false, otherwise return true.*/ - bool isMouseMoving(); - - // Internal event stack comprising last two mouse events. - osg::ref_ptr _ga_t1; - osg::ref_ptr _ga_t0; - - osg::observer_ptr _node; - - double _modelScale; - double _minimumZoomScale; - - bool _thrown; - bool _allowThrow; - - /** The approximate amount of time it is currently taking to draw a frame. - * This is used to compute the delta in translation/rotation during a thrown display update. - * It allows us to match an delta in position/rotation independent of the rendering frame rate. - */ - double _delta_frame_time; - - /** The time the last frame started. - * Used when _rate_sensitive is true so that we can match display update rate to rotation/translation rate. - */ - double _last_frame_time; - - RotationMode _rotationMode; - osg::Vec3d _center; - double _distance; - double _heading; // angle from x axis in xy plane - double _elevation; // angle from xy plane, positive upwards towards the z axis - double _homeDistance; - double _zoomDelta; -}; -} -#endif diff --git a/libs/lib/mac32/include/osgGA/StandardManipulator b/libs/lib/mac32/include/osgGA/StandardManipulator deleted file mode 100644 index cc117322a..000000000 --- a/libs/lib/mac32/include/osgGA/StandardManipulator +++ /dev/null @@ -1,203 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * StandardManipulator code Copyright (C) 2010 PCJohn (Jan Peciva) - * while some pieces of code were taken from OSG. - * Thanks to company Cadwork (www.cadwork.ch) and - * Brno University of Technology (www.fit.vutbr.cz) for open-sourcing this work. -*/ - -#ifndef OSGGA_CAMERA_MANIPULATOR -#define OSGGA_CAMERA_MANIPULATOR 1 - -#include - - -namespace osgGA { - - -/** StandardManipulator class provides basic functionality - for user controlled manipulation.*/ -class OSGGA_EXPORT StandardManipulator : public CameraManipulator -{ - typedef CameraManipulator inherited; - - public: - - // flags - enum UserInteractionFlags - { - UPDATE_MODEL_SIZE = 0x01, - COMPUTE_HOME_USING_BBOX = 0x02, - PROCESS_MOUSE_WHEEL = 0x04, - SET_CENTER_ON_WHEEL_FORWARD_MOVEMENT = 0x08, - DEFAULT_SETTINGS = UPDATE_MODEL_SIZE /*| COMPUTE_HOME_USING_BBOX*/ | PROCESS_MOUSE_WHEEL - }; - - StandardManipulator( int flags = DEFAULT_SETTINGS ); - StandardManipulator( const StandardManipulator& m, - const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY ); - - // We are not using META_Object as this is abstract class. - // Use META_Object(osgGA,YourManipulator); in your descendant non-abstract classes. - virtual const char* className() const { return "StandardManipulator"; } - - /** Sets manipulator by eye position and eye orientation.*/ - virtual void setTransformation( const osg::Vec3d& eye, const osg::Quat& rotation ) = 0; - - /** Sets manipulator by eye position, center of rotation, and up vector.*/ - virtual void setTransformation( const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up ) = 0; - - /** Gets manipulator's eye position and eye orientation.*/ - virtual void getTransformation( osg::Vec3d& eye, osg::Quat& rotation ) const = 0; - - /** Gets manipulator's focal center, eye position, and up vector.*/ - virtual void getTransformation( osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up ) const = 0; - - virtual void setNode( osg::Node* ); - virtual const osg::Node* getNode() const; - virtual osg::Node* getNode(); - - virtual void setVerticalAxisFixed( bool value ); - inline bool getVerticalAxisFixed() const; - inline bool getAllowThrow() const; - virtual void setAllowThrow( bool allowThrow ); - - virtual void setAnimationTime( const double t ); - double getAnimationTime() const; - bool isAnimating() const; - virtual void finishAnimation(); - - virtual void home( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual void home( double ); - - virtual void init( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual void getUsage( osg::ApplicationUsage& usage ) const; - - protected: - - virtual bool handleFrame( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleResize( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMouseMove( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMouseDrag( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMousePush( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMouseRelease( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleKeyDown( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleKeyUp( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMouseWheel( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool handleMouseDeltaMovement( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - virtual bool performMovement(); - virtual bool performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMouseDeltaMovement( const float dx, const float dy ); - virtual bool performAnimationMovement( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual void applyAnimationStep( const double currentProgress, const double prevProgress ); - - void addMouseEvent( const osgGA::GUIEventAdapter& ea ); - void flushMouseEventStack(); - virtual bool isMouseMoving() const; - float getThrowScale( const double eventTimeDelta ) const; - virtual void centerMousePointer( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - static void rotateYawPitch( osg::Quat& rotation, const double yaw, const double pitch, - const osg::Vec3d& localUp = osg::Vec3d( 0.,0.,0.) ); - static void fixVerticalAxis( osg::Quat& rotation, const osg::Vec3d& localUp, bool disallowFlipOver ); - void fixVerticalAxis( osg::Vec3d& eye, osg::Quat& rotation, bool disallowFlipOver ); - static void fixVerticalAxis( const osg::Vec3d& forward, const osg::Vec3d& up, osg::Vec3d& newUp, - const osg::Vec3d& localUp, bool disallowFlipOver ); - virtual bool setCenterByMousePointerIntersection( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - virtual bool startAnimationByMousePointerIntersection( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ); - - // mouse state - bool _thrown; - bool _allowThrow; - float _mouseCenterX, _mouseCenterY; - - // internal event stack comprising last two mouse events. - osg::ref_ptr< const osgGA::GUIEventAdapter > _ga_t1; - osg::ref_ptr< const osgGA::GUIEventAdapter > _ga_t0; - - /** The approximate amount of time it is currently taking to draw a frame. - * This is used to compute the delta in translation/rotation during a thrown display update. - * It allows us to match an delta in position/rotation independent of the rendering frame rate. - */ - double _delta_frame_time; - - /** The time the last frame started. - * Used when _rate_sensitive is true so that we can match display update rate to rotation/translation rate. - */ - double _last_frame_time; - - // scene data - osg::ref_ptr< osg::Node > _node; - double _modelSize; - bool _verticalAxisFixed; - - // animation stuff - class OSGGA_EXPORT AnimationData : public osg::Referenced { - public: - double _animationTime; - bool _isAnimating; - double _startTime; - double _phase; - AnimationData(); - void start( const double startTime ); - }; - osg::ref_ptr< AnimationData > _animationData; - virtual void allocAnimationData() { _animationData = new AnimationData(); } - - // flags - int _flags; - - // flags indicating that a value is relative to model size - int _relativeFlags; - inline bool getRelativeFlag( int index ) const; - inline void setRelativeFlag( int index, bool value ); - static int numRelativeFlagsAllocated; - static int allocateRelativeFlag(); -}; - - -// -// inline methods -// - -inline bool StandardManipulator::getRelativeFlag( int index ) const -{ - return ( _relativeFlags & (0x01 << index) ) != 0; -} - -inline void StandardManipulator::setRelativeFlag( int index, bool value ) -{ - if( value ) _relativeFlags |= (0x01 << index); - else _relativeFlags &= (~0x01 << index); -} - -/// Returns whether manipulator preserves camera's "UP" vector. -inline bool StandardManipulator::getVerticalAxisFixed() const -{ - return _verticalAxisFixed; -} - -/// Returns true if the camera can be thrown, false otherwise. It defaults to true. -inline bool StandardManipulator::getAllowThrow() const -{ - return _allowThrow; -} - - -} - -#endif /* OSGGA_CAMERA_MANIPULATOR */ diff --git a/libs/lib/mac32/include/osgGA/StateSetManipulator b/libs/lib/mac32/include/osgGA/StateSetManipulator deleted file mode 100644 index db1ddcfdb..000000000 --- a/libs/lib/mac32/include/osgGA/StateSetManipulator +++ /dev/null @@ -1,110 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_STATESET_MANIPULATOR -#define OSGGA_STATESET_MANIPULATOR 1 - -#include -#include -#include -#include - -#include -#include - - -namespace osgGA { - -/** -Experimental class, not been looked at for a while, but which will -be returned to at some point :-\ -*/ -class OSGGA_EXPORT StateSetManipulator : public GUIEventHandler -{ -public: - - StateSetManipulator(osg::StateSet* stateset=0); - - virtual const char* className() const { return "StateSetManipulator"; } - - /** attach a StateSet to the manipulator to be used for specifying view.*/ - virtual void setStateSet(osg::StateSet*); - - /** get the attached a StateSet.*/ - virtual osg::StateSet * getStateSet(); - - /** get the attached a StateSet.*/ - virtual const osg::StateSet * getStateSet() const; - - - /** Handle events, return true if handled, false otherwise.*/ - virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us); - - /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; - - void setMaximumNumOfTextureUnits(unsigned int i) { _maxNumOfTextureUnits = i; } - unsigned int getMaximumNumOfTextureUnits() const { return _maxNumOfTextureUnits; } - - void setBackfaceEnabled(bool newbackface); - bool getBackfaceEnabled() const {return _backface;}; - - void setLightingEnabled(bool newlighting); - bool getLightingEnabled() const {return _lighting;}; - - void setTextureEnabled(bool newtexture); - bool getTextureEnabled() const {return _texture;}; - - void setPolygonMode(osg::PolygonMode::Mode newpolygonmode); - osg::PolygonMode::Mode getPolygonMode() const; - - void cyclePolygonMode(); - - - void setKeyEventToggleBackfaceCulling(int key) { _keyEventToggleBackfaceCulling = key; } - int getKeyEventToggleBackfaceCulling() const { return _keyEventToggleBackfaceCulling; } - - void setKeyEventToggleLighting(int key) { _keyEventToggleLighting = key; } - int getKeyEventToggleLighting() const { return _keyEventToggleLighting; } - - void setKeyEventToggleTexturing(int key) { _keyEventToggleTexturing = key; } - int getKeyEventToggleTexturing() const { return _keyEventToggleTexturing; } - - void setKeyEventCyclePolygonMode(int key) { _keyEventCyclePolygonMode = key; } - int getKeyEventCyclePolygonMode() const { return _keyEventCyclePolygonMode; } - -protected: - - virtual ~StateSetManipulator(); - - void clone(); - - osg::ref_ptr _stateset; - - bool _initialized; - bool _backface; - bool _lighting; - bool _texture; - unsigned int _maxNumOfTextureUnits; - - int _keyEventToggleBackfaceCulling; - int _keyEventToggleLighting; - int _keyEventToggleTexturing; - int _keyEventCyclePolygonMode; - - osg::PolygonMode* getOrCreatePolygonMode(); -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/TerrainManipulator b/libs/lib/mac32/include/osgGA/TerrainManipulator deleted file mode 100644 index 9ed2fedc0..000000000 --- a/libs/lib/mac32/include/osgGA/TerrainManipulator +++ /dev/null @@ -1,64 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_TERRAIN_MANIPULATOR -#define OSGGA_TERRAIN_MANIPULATOR 1 - -#include - - -namespace osgGA { - - -class OSGGA_EXPORT TerrainManipulator : public OrbitManipulator -{ - typedef OrbitManipulator inherited; - -public: - - TerrainManipulator( int flags = DEFAULT_SETTINGS ); - TerrainManipulator( const TerrainManipulator& tm, - const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY ); - - META_Object( osgGA, TerrainManipulator ); - - enum RotationMode - { - ELEVATION_AZIM_ROLL, - ELEVATION_AZIM - }; - - virtual void setRotationMode(RotationMode mode); - RotationMode getRotationMode() const; - - virtual void setByMatrix( const osg::Matrixd& matrix ); - - virtual void setTransformation( const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up ); - - virtual void setNode( osg::Node* node ); - -protected: - - virtual bool performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy ); - virtual bool performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy ); - - bool intersect( const osg::Vec3d& start, const osg::Vec3d& end, osg::Vec3d& intersection ) const; - void clampOrientation(); - - osg::Vec3d _previousUp; -}; - - -} - -#endif /* OSGGA_TERRAIN_MANIPULATOR */ diff --git a/libs/lib/mac32/include/osgGA/TrackballManipulator b/libs/lib/mac32/include/osgGA/TrackballManipulator deleted file mode 100644 index 92aba5526..000000000 --- a/libs/lib/mac32/include/osgGA/TrackballManipulator +++ /dev/null @@ -1,40 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_TRACKBALL_MANIPULATOR -#define OSGGA_TRACKBALL_MANIPULATOR 1 - -#include - - -namespace osgGA { - - -class OSGGA_EXPORT TrackballManipulator : public OrbitManipulator -{ - typedef OrbitManipulator inherited; - - public: - - TrackballManipulator( int flags = DEFAULT_SETTINGS ); - TrackballManipulator( const TrackballManipulator& tm, - const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY ); - - META_Object( osgGA, TrackballManipulator ); - -}; - - -} - -#endif /* OSGGA_TRACKBALL_MANIPULATOR */ diff --git a/libs/lib/mac32/include/osgGA/UFOManipulator b/libs/lib/mac32/include/osgGA/UFOManipulator deleted file mode 100644 index f07eea82b..000000000 --- a/libs/lib/mac32/include/osgGA/UFOManipulator +++ /dev/null @@ -1,188 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_UFO_MANIPULATOR_DEF -#define OSGGA_UFO_MANIPULATOR_DEF 1 - -#include - -#include -#include -#include - -/** - \class osgGA::UFOManipulator - \brief A UFO manipulator driven with keybindings. - - The UFOManipulator is better suited for applications that employ - architectural walk-throughs, or situations where the eyepoint motion - model must move slowly, deliberately and well controlled. - - The UFO Manipulator allows the following movements with the listed - Key combinations: - \param UpArrow Acceleration forward. - \param DownArrow Acceleration backward (or deceleration forward). - \param LeftArrow Rotate view and direction of travel to the left. - \param RightArrow Rotate view and direction of travel to the right. - \param SpaceBar Brake. Gradually decelerates linear and rotational movement. - \param Shift/UpArrow Accelerate up. - \param Shift/DownArrow Accelerate down. - \param Shift/LeftArrow Accelerate (linearly) left. - \param Shift/RightArrow Accelerate (linearly) right. - \param Shift/SpaceBar Instant brake. Immediately stop all linear and rotational movement. - -When the Shift key is released, up, down, linear left and/or linear right movement is decelerated. - - \param Ctrl/UpArrow Rotate view (but not direction of travel) up. - \param Ctrl/DownArrow Rotate view (but not direction of travel) down. - \param Ctrl/LeftArrow Rotate view (but not direction of travel) left. - \param Ctrl/RightArrow Rotate view (but not direction of travel) right. - \param Ctrl/Return Straightens out the view offset. - -*/ - -namespace osgGA { - -class OSGGA_EXPORT UFOManipulator : public osgGA::CameraManipulator -{ - - public: - /** Default constructor */ - UFOManipulator(); - - /** return className - \return returns constant "UFO" - */ - virtual const char* className() const; - - /** Set the current position with a matrix - \param matrix A viewpoint matrix. - */ - virtual void setByMatrix( const osg::Matrixd &matrix ) ; - - /** Set the current position with the inverse matrix - \param invmat The inverse of a viewpoint matrix - */ - virtual void setByInverseMatrix( const osg::Matrixd &invmat); - - /** Get the current viewmatrix */ - virtual osg::Matrixd getMatrix() const; - - /** Get the current inverse view matrix */ - virtual osg::Matrixd getInverseMatrix() const ; - - /** Set the subgraph this manipulator is driving the eye through. - \param node root of subgraph - */ - virtual void setNode(osg::Node* node); - - /** Get the root node of the subgraph this manipulator is driving the eye through (const)*/ - virtual const osg::Node* getNode() const; - - /** Get the root node of the subgraph this manipulator is driving the eye through */ - virtual osg::Node* getNode(); - - /** Computes the home position based on the extents and scale of the - scene graph rooted at node */ - virtual void computeHomePosition(); - - /** Sets the viewpoint matrix to the home position */ - virtual void home(const osgGA::GUIEventAdapter&, osgGA::GUIActionAdapter&) ; - void home(double); - - virtual void init(const GUIEventAdapter& ,GUIActionAdapter&); - - /** Handles incoming osgGA events */ - bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter &aa); - - /** Reports Usage parameters to the application */ - void getUsage(osg::ApplicationUsage& usage) const; - - /** Report the current position as LookAt vectors */ - void getCurrentPositionAsLookAt( osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up ); - - - void setMinHeight( double in_min_height ) { _minHeightAboveGround = in_min_height; } - double getMinHeight() const { return _minHeightAboveGround; } - - void setMinDistance( double in_min_dist ) { _minDistanceInFront = in_min_dist; } - double getMinDistance() const { return _minDistanceInFront; } - - void setForwardSpeed( double in_fs ) { _forwardSpeed = in_fs; } - double getForwardSpeed() const { return _forwardSpeed; } - - void setSideSpeed( double in_ss ) { _sideSpeed = in_ss; } - double getSideSpeed() const { return _sideSpeed; } - - void setRotationSpeed( double in_rot_speed ) { _directionRotationRate = in_rot_speed; } - double getRotationSpeed() const { return _directionRotationRate; } - - - protected: - - virtual ~UFOManipulator(); - - bool intersect(const osg::Vec3d& start, const osg::Vec3d& end, osg::Vec3d& intersection) const; - - osg::observer_ptr _node; - float _viewAngle; - osg::Matrixd _matrix; - osg::Matrixd _inverseMatrix; - osg::Matrixd _offset; - - double _minHeightAboveGround; - double _minDistanceInFront; - - double _speedEpsilon; - double _forwardSpeed; - double _sideSpeed; - double _upSpeed; - double _speedAccelerationFactor; - double _speedDecelerationFactor; - - bool _decelerateUpSideRate; - - double _directionRotationEpsilon; - double _directionRotationRate; - double _directionRotationAcceleration; - double _directionRotationDeceleration; - - double _viewOffsetDelta; - double _pitchOffsetRate; - double _pitchOffset; - double _yawOffsetRate; - double _yawOffset; - - double _t0; - double _dt; - osg::Vec3d _direction; - osg::Vec3d _position; - - - bool _shift; - bool _ctrl; - bool _decelerateOffsetRate; - - bool _straightenOffset; - - void _stop(); - void _keyDown( const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &); - void _keyUp( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter &); - void _frame(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter &); - - void _adjustPosition(); -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgGA/Version b/libs/lib/mac32/include/osgGA/Version deleted file mode 100644 index 909b96414..000000000 --- a/libs/lib/mac32/include/osgGA/Version +++ /dev/null @@ -1,48 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGGA_VERSION -#define OSGGA_VERSION 1 - -#include - - -extern "C" { - -/** - * osgGAGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgGAGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph (OSG) GA library - # - AC_CHECK_LIB(osg, osgGAGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph GA library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -extern OSGGA_EXPORT const char* osgGAGetVersion(); - -/** - * getLibraryName_osgGA() returns the library name in human friendly form. -*/ -extern OSGGA_EXPORT const char* osgGAGetLibraryName(); - -} - -#endif - diff --git a/libs/lib/mac32/include/osgManipulator/AntiSquish b/libs/lib/mac32/include/osgManipulator/AntiSquish deleted file mode 100644 index 802c0aeba..000000000 --- a/libs/lib/mac32/include/osgManipulator/AntiSquish +++ /dev/null @@ -1,84 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgDragger - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef _OSG_ANTISQUISH_ -#define _OSG_ANTISQUISH_ 1 - -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace osgManipulator { - -/** - * Class that performs the Anti Squish by making the scaling uniform along all axes. - */ -class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform -{ - public : - AntiSquish(); - AntiSquish(const osg::Vec3d& pivot); - AntiSquish(const osg::Vec3d& pivot, const osg::Vec3d& position); - AntiSquish(const AntiSquish& pat, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - virtual osg::Object* cloneType() const { return new AntiSquish(); } - - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new AntiSquish (*this,copyop); } - - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - - void setPivot(const osg::Vec3d& pvt) - { - _pivot = pvt; - _usePivot = true; - _dirty = true; - } - - const osg::Vec3d& getPivot() const { return _pivot; } - - void setPosition(const osg::Vec3d& pos) - { - _position = pos; - _usePosition = true; - _dirty = true; - } - - const osg::Vec3d& getPosition() const { return _position; } - - virtual ~AntiSquish(); - - osg::Matrix computeUnSquishedMatrix(const osg::Matrix&, bool& flag); - - protected: - - osg::NodeCallback* _asqCallback; - - osg::Vec3d _pivot; - bool _usePivot; - - osg::Vec3d _position; - bool _usePosition; - - bool _dirty; - osg::Matrix _cachedLocalToWorld; -}; - -} -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Command b/libs/lib/mac32/include/osgManipulator/Command deleted file mode 100644 index 2ac6b2f48..000000000 --- a/libs/lib/mac32/include/osgManipulator/Command +++ /dev/null @@ -1,318 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_COMMAND -#define OSGMANIPULATOR_COMMAND 1 - -#include - -#include -#include -#include - -#include - -namespace osgManipulator { - -class Constraint; - -/** Base class for motion commands that are generated by draggers. */ -class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced -{ - public: - - /** - * Motion command are based on click-drag-release actions. So each - * command needs to indicate which stage of the motion the command - * represents. - */ - enum Stage - { - NONE, - /** Click or pick start. */ - START, - /** Drag or pick move. */ - MOVE, - /** Release or pick finish. */ - FINISH - }; - - MotionCommand(); - - /** create a MotionCommand that is the inverse of this command, and if applied will undo this commands changes. */ - virtual MotionCommand* createCommandInverse() = 0; - - /** - * Gets the matrix for transforming the object being dragged. This matrix is in the - * command's coordinate systems. - */ - virtual osg::Matrix getMotionMatrix() const = 0; - - /** - * Sets the matrix for transforming the command's local coordinate - * system to the world/object coordinate system. - */ - void setLocalToWorldAndWorldToLocal(const osg::Matrix& localToWorld, const osg::Matrix& worldToLocal) - { - _localToWorld = localToWorld; - _worldToLocal = worldToLocal; - } - - /** - * Gets the matrix for transforming the command's local coordinate - * system to the world/object coordinate system. - */ - inline const osg::Matrix& getLocalToWorld() const { return _localToWorld; } - - /** - * Gets the matrix for transforming the command's world/object - * coordinate system to the command's local coordinate system. - */ - inline const osg::Matrix& getWorldToLocal() const { return _worldToLocal; } - - void setStage(const Stage s) { _stage = s; } - Stage getStage() const { return _stage; } - - protected: - - virtual ~MotionCommand(); - - private: - osg::Matrix _localToWorld; - osg::Matrix _worldToLocal; - - Stage _stage; -}; - - -/** - * Command for translating in a line. - */ -class OSGMANIPULATOR_EXPORT TranslateInLineCommand : public MotionCommand -{ - public: - - TranslateInLineCommand(); - - TranslateInLineCommand(const osg::LineSegment::vec_type& s, const osg::LineSegment::vec_type& e); - - virtual MotionCommand* createCommandInverse(); - - inline void setLine(const osg::LineSegment::vec_type& s, const osg::LineSegment::vec_type& e) { _line->start() = s; _line->end() = e; } - inline const osg::LineSegment::vec_type& getLineStart() const { return _line->start(); } - inline const osg::LineSegment::vec_type& getLineEnd() const { return _line->end(); } - - inline void setTranslation(const osg::Vec3& t) { _translation = t; } - inline const osg::Vec3d& getTranslation() const { return _translation; } - - virtual osg::Matrix getMotionMatrix() const - { - return osg::Matrix::translate(_translation); - } - - protected: - - virtual ~TranslateInLineCommand(); - - private: - osg::ref_ptr _line; - osg::Vec3d _translation; -}; - -/** - * Command for translating in a plane. - */ -class OSGMANIPULATOR_EXPORT TranslateInPlaneCommand : public MotionCommand -{ - public: - - TranslateInPlaneCommand(); - - TranslateInPlaneCommand(const osg::Plane& plane); - - virtual MotionCommand* createCommandInverse(); - - inline void setPlane(const osg::Plane& plane) { _plane = plane; } - inline const osg::Plane& getPlane() const { return _plane; } - - inline void setTranslation(const osg::Vec3d& t) { _translation = t; } - inline const osg::Vec3d& getTranslation() const { return _translation; } - - /** ReferencePoint is used only for snapping. */ - inline void setReferencePoint(const osg::Vec3d& rp) { _referencePoint = rp; } - inline const osg::Vec3d& getReferencePoint() const { return _referencePoint; } - - virtual osg::Matrix getMotionMatrix() const - { - return osg::Matrix::translate(_translation); - } - - protected: - - virtual ~TranslateInPlaneCommand(); - - private: - osg::Plane _plane; - osg::Vec3d _translation; - osg::Vec3d _referencePoint; -}; - -/** - * Command for 1D scaling. - */ -class OSGMANIPULATOR_EXPORT Scale1DCommand : public MotionCommand -{ - public: - - Scale1DCommand(); - - virtual MotionCommand* createCommandInverse(); - - inline void setScale(double s) { _scale = s; } - inline double getScale() const { return _scale; } - - inline void setScaleCenter(double center) { _scaleCenter = center; } - inline double getScaleCenter() const { return _scaleCenter; } - - /** ReferencePoint is used only for snapping. */ - inline void setReferencePoint(double rp) { _referencePoint = rp; } - inline double getReferencePoint() const { return _referencePoint; } - - inline void setMinScale(double min) { _minScale = min; } - inline double getMinScale() const { return _minScale; } - - virtual osg::Matrix getMotionMatrix() const - { - return (osg::Matrix::translate(-_scaleCenter,0.0,0.0) - * osg::Matrix::scale(_scale,1.0,1.0) - * osg::Matrix::translate(_scaleCenter,0.0,0.0)); - } - - protected: - - virtual ~Scale1DCommand(); - - private: - double _scale; - double _scaleCenter; - double _referencePoint; - double _minScale; -}; - -/** - * Command for 2D scaling. - */ -class OSGMANIPULATOR_EXPORT Scale2DCommand : public MotionCommand -{ - public: - - Scale2DCommand(); - - virtual MotionCommand* createCommandInverse(); - - inline void setScale(const osg::Vec2d& s) { _scale = s; } - inline const osg::Vec2d& getScale() const { return _scale; } - - inline void setScaleCenter(const osg::Vec2d& center) { _scaleCenter = center; } - inline const osg::Vec2d& getScaleCenter() const { return _scaleCenter; } - - /** ReferencePoint is used only for snapping. */ - inline void setReferencePoint(const osg::Vec2d& rp) { _referencePoint = rp; } - inline const osg::Vec2d& getReferencePoint() const { return _referencePoint; } - - inline void setMinScale(const osg::Vec2d& min) { _minScale = min; } - inline const osg::Vec2d& getMinScale() const { return _minScale; } - - virtual osg::Matrix getMotionMatrix() const - { - return (osg::Matrix::translate(-_scaleCenter[0],0.0,-_scaleCenter[1]) - * osg::Matrix::scale(_scale[0],1.0,_scale[1]) - * osg::Matrix::translate(_scaleCenter[0],0.0,_scaleCenter[1])); - } - - protected: - - virtual ~Scale2DCommand(); - - private: - osg::Vec2d _scale; - osg::Vec2d _scaleCenter; - osg::Vec2d _referencePoint; - osg::Vec2d _minScale; -}; - -/** - * Command for uniform 3D scaling. - */ -class OSGMANIPULATOR_EXPORT ScaleUniformCommand : public MotionCommand -{ - public: - - ScaleUniformCommand(); - - virtual MotionCommand* createCommandInverse(); - - inline void setScale(double s) { _scale = s; } - inline double getScale() const { return _scale; } - - inline void setScaleCenter(const osg::Vec3d& center) { _scaleCenter = center; } - inline const osg::Vec3d& getScaleCenter() const { return _scaleCenter; } - - virtual osg::Matrix getMotionMatrix() const - { - return (osg::Matrix::translate(-_scaleCenter) - * osg::Matrix::scale(_scale,_scale,_scale) - * osg::Matrix::translate(_scaleCenter)); - } - - protected: - - virtual ~ScaleUniformCommand(); - - private: - double _scale; - osg::Vec3d _scaleCenter; -}; - -/** - * Command for rotation in 3D. - */ -class OSGMANIPULATOR_EXPORT Rotate3DCommand : public MotionCommand -{ - public: - - Rotate3DCommand(); - - virtual MotionCommand* createCommandInverse(); - - inline void setRotation(const osg::Quat& rotation) { _rotation = rotation; } - inline const osg::Quat& getRotation() const { return _rotation; } - - virtual osg::Matrix getMotionMatrix() const - { - return osg::Matrix::rotate(_rotation); - } - - protected: - - virtual ~Rotate3DCommand(); - - private: - osg::Quat _rotation; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/CommandManager b/libs/lib/mac32/include/osgManipulator/CommandManager deleted file mode 100644 index 59cee7e6a..000000000 --- a/libs/lib/mac32/include/osgManipulator/CommandManager +++ /dev/null @@ -1,83 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_COMMANDMANAGER -#define OSGMANIPULATOR_COMMANDMANAGER 1 - -#include -#include -#include - -namespace osgManipulator { - -/** - * Deprecated. - * CommandManager class is now no longer required as Dragger now matains all references to Constraints and Selections (now just generic MatrixTransforms). - * To replace CommandManager usage simple replace cmdMgr->connect(*dragger, *selection) with dragger->addTransformUpdating(selection) and - * cmdMgr->connect(*dragger, *selection) with dragger->addConstaint(constraint). - */ -class CommandManager : public osg::Referenced -{ - public: - CommandManager() {} - - bool connect(Dragger& dragger, Selection& selection) - { - dragger.addTransformUpdating(&selection); - - return true; - } - - bool connect(Dragger& dragger, Constraint& constraint) - { - dragger.addConstraint(&constraint); - - return true; - } - - bool disconnect(Dragger& dragger) - { - dragger.getConstraints().clear(); - dragger.getDraggerCallbacks().clear(); - - return true; - } - - typedef std::list< osg::ref_ptr > Selections; - - Selections getConnectedSelections(Dragger& dragger) - { - Selections selections; - - for(Dragger::DraggerCallbacks::iterator itr = dragger.getDraggerCallbacks().begin(); - itr != dragger.getDraggerCallbacks().end(); - ++itr) - { - DraggerCallback* dc = itr->get(); - DraggerTransformCallback* dtc = dynamic_cast(dc); - if (dtc && dtc->getTransform()) selections.push_back(dtc->getTransform()); - } - - return selections; - } - - protected: - - virtual ~CommandManager() {} - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Constraint b/libs/lib/mac32/include/osgManipulator/Constraint deleted file mode 100644 index ab49a3869..000000000 --- a/libs/lib/mac32/include/osgManipulator/Constraint +++ /dev/null @@ -1,99 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_CONSTRAINT -#define OSGMANIPULATOR_CONSTRAINT 1 - -#include - -#include -#include -#include - -namespace osgManipulator { - -class MotionCommand; -class TranslateInLineCommand; -class TranslateInPlaneCommand; -class Scale1DCommand; -class Scale2DCommand; -class ScaleUniformCommand; - -class OSGMANIPULATOR_EXPORT Constraint : public osg::Referenced -{ - public: - - virtual bool constrain(MotionCommand&) const { return false; } - virtual bool constrain(TranslateInLineCommand& command) const { return constrain((MotionCommand&)command); } - virtual bool constrain(TranslateInPlaneCommand& command) const { return constrain((MotionCommand&)command); } - virtual bool constrain(Scale1DCommand& command) const { return constrain((MotionCommand&)command); } - virtual bool constrain(Scale2DCommand& command) const { return constrain((MotionCommand&)command); } - virtual bool constrain(ScaleUniformCommand& command) const { return constrain((MotionCommand&)command); } - - protected: - - Constraint(osg::Node& refNode) : _refNode(&refNode) {} - virtual ~Constraint() {} - - osg::Node& getReferenceNode() { return *_refNode; } - const osg::Node& getReferenceNode() const { return *_refNode; } - - const osg::Matrix& getLocalToWorld() const { return _localToWorld; } - const osg::Matrix& getWorldToLocal() const { return _worldToLocal; } - - void computeLocalToWorldAndWorldToLocal() const; - - private: - - osg::observer_ptr _refNode; - mutable osg::Matrix _localToWorld; - mutable osg::Matrix _worldToLocal; -}; - -/** - * Constraint to snap motion commands to a sugar cube grid. - */ -class OSGMANIPULATOR_EXPORT GridConstraint : public Constraint -{ - public: - - GridConstraint(osg::Node& refNode, const osg::Vec3d& origin, const osg::Vec3d& spacing); - - void setOrigin(const osg::Vec3d& origin) { _origin = origin; } - const osg::Vec3d& getOrigin() const { return _origin; } - - void setSpacing(const osg::Vec3d& spacing) { _spacing = spacing; } - const osg::Vec3d& getSpacing() const { return _spacing; } - - virtual bool constrain(TranslateInLineCommand& command) const; - virtual bool constrain(TranslateInPlaneCommand& command) const; - virtual bool constrain(Scale1DCommand& command) const; - virtual bool constrain(Scale2DCommand& command) const; - virtual bool constrain(ScaleUniformCommand& command) const; - - protected: - - virtual ~GridConstraint() {} - - private: - - osg::Vec3d _origin; - osg::Vec3d _spacing; - mutable osg::Matrix _startMatrix; - mutable osg::Matrix _matrix; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Dragger b/libs/lib/mac32/include/osgManipulator/Dragger deleted file mode 100644 index 7edb3cf84..000000000 --- a/libs/lib/mac32/include/osgManipulator/Dragger +++ /dev/null @@ -1,345 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_DRAGGER -#define OSGMANIPULATOR_DRAGGER 1 - -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace osgManipulator -{ - -class CompositeDragger; -class MotionCommand; -class TranslateInLineCommand; -class TranslateInPlaneCommand; -class Scale1DCommand; -class Scale2DCommand; -class ScaleUniformCommand; -class Rotate3DCommand; - -/** Computes the nodepath from the given node all the way upto the root. */ -extern OSGMANIPULATOR_EXPORT void computeNodePathToRoot(osg::Node& node, osg::NodePath& np); - -class DraggerCallback : virtual public osg::Object -{ - public: - DraggerCallback(): - osg::Object(true) {} - - DraggerCallback(const DraggerCallback&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): - osg::Object(true) {} - - META_Object(osgManipulator, DraggerCallback); - - /** - * Receive motion commands. Returns true on success. - */ - virtual bool receive(const MotionCommand&) { return false; } - virtual bool receive(const TranslateInLineCommand& command) { return receive((MotionCommand&)command); } - virtual bool receive(const TranslateInPlaneCommand& command) { return receive((MotionCommand&)command); } - virtual bool receive(const Scale1DCommand& command) { return receive((MotionCommand&)command); } - virtual bool receive(const Scale2DCommand& command) { return receive((MotionCommand&)command); } - virtual bool receive(const ScaleUniformCommand& command) { return receive((MotionCommand&)command); } - virtual bool receive(const Rotate3DCommand& command) { return receive((MotionCommand&)command); } -}; - -class OSGMANIPULATOR_EXPORT DraggerTransformCallback : public DraggerCallback -{ - public: - - DraggerTransformCallback(osg::MatrixTransform* transform); - - virtual bool receive(const MotionCommand&); - - osg::MatrixTransform* getTransform() { return _transform.get(); } - const osg::MatrixTransform* getTransform() const { return _transform.get(); } - - protected: - - osg::observer_ptr _transform; - osg::Matrix _startMotionMatrix; - - osg::Matrix _localToWorld; - osg::Matrix _worldToLocal; -}; - - -class OSGMANIPULATOR_EXPORT PointerInfo -{ - public: - - PointerInfo(); - - PointerInfo(const PointerInfo& rhs): - _hitList(rhs._hitList), - _nearPoint(rhs._nearPoint), - _farPoint(rhs._farPoint), - _eyeDir(rhs._eyeDir) - { - _hitIter = _hitList.begin(); - } - - void reset() - { - _hitList.clear(); - _hitIter = _hitList.begin(); - setCamera(0); - } - - - bool completed() const { return _hitIter==_hitList.end(); } - - void next() - { - if (!completed()) ++_hitIter; - } - - typedef std::pair NodePathIntersectionPair; - typedef std::list< NodePathIntersectionPair> IntersectionList; - - - osg::Vec3d getLocalIntersectPoint() const { return _hitIter->second; } - - - - void setNearFarPoints (osg::Vec3d nearPoint, osg::Vec3d farPoint) { - _nearPoint = nearPoint; - _farPoint=farPoint; - _eyeDir = farPoint - nearPoint; - } - - const osg::Vec3d& getEyeDir() const {return _eyeDir;} - - void getNearFarPoints( osg::Vec3d& nearPoint, osg::Vec3d& farPoint) const { - nearPoint = _nearPoint; - farPoint = _farPoint; - } - - bool contains(const osg::Node* node) const; - - void setCamera(osg::Camera* camera) - { - - if (camera) - { - _MVPW = camera->getViewMatrix() * camera->getProjectionMatrix(); - if (camera->getViewport()) _MVPW.postMult(camera->getViewport()->computeWindowMatrix()); - _inverseMVPW.invert(_MVPW); - osg::Vec3d eye, center, up; - camera->getViewMatrix().getLookAt(eye, center, up); - _eyeDir = eye - center; - - } - else - { - _MVPW.makeIdentity(); - _inverseMVPW.makeIdentity(); - _eyeDir = osg::Vec3d(0,0,1); - } - - } - - void addIntersection(const osg::NodePath& nodePath, const osg::Vec3d& intersectionPoint) - { - bool needToResetHitIter = _hitList.empty(); - _hitList.push_back(NodePathIntersectionPair(nodePath, intersectionPoint)); - if (needToResetHitIter) _hitIter = _hitList.begin(); - } - - void setMousePosition(float pixel_x, float pixel_y) - { - projectWindowXYIntoObject(osg::Vec2d(pixel_x, pixel_y), _nearPoint, _farPoint); - } - - protected: - bool projectWindowXYIntoObject(const osg::Vec2d& windowCoord, osg::Vec3d& nearPoint, osg::Vec3d& farPoint) const; - - public: - IntersectionList _hitList; - IntersectionList::const_iterator _hitIter; - - protected: - - osg::Vec3d _nearPoint,_farPoint; - osg::Vec3d _eyeDir; - - osg::Matrix _MVPW; - osg::Matrix _inverseMVPW; - -}; - -/** - * Base class for draggers. Concrete draggers implement the pick event handler - * and generate motion commands (translate, rotate, ...) and sends these - * command to all the DraggerCallbacks & Transforms that are connected to the Dragger that generates the - * commands. - */ -class OSGMANIPULATOR_EXPORT Dragger : public osg::MatrixTransform -{ - public: - - - META_Node(osgManipulator,Dragger) - - /** - * Set/Get parent dragger. For simple draggers parent points to itself. - * For composite draggers parent points to the parent dragger that uses - * this dragger. - */ - virtual void setParentDragger(Dragger* parent) { _parentDragger = parent; } - Dragger* getParentDragger() { return _parentDragger; } - const Dragger* getParentDragger() const { return _parentDragger; } - - /** Returns 0 if this Dragger is not a CompositeDragger. */ - virtual const CompositeDragger* getComposite() const { return 0; } - - /** Returns 0 if this Dragger is not a CompositeDragger. */ - virtual CompositeDragger* getComposite() { return 0; } - - - void setHandleEvents(bool flag); - bool getHandleEvents() const { return _handleEvents; } - - void setActivationModKeyMask(unsigned int mask) { _activationModKeyMask = mask; } - unsigned int getActivationModKeyMask() const { return _activationModKeyMask; } - - void setActivationKeyEvent(int key) { _activationKeyEvent = key; } - int getActivationKeyEvent() const { return _activationKeyEvent; } - - - virtual void traverse(osg::NodeVisitor& nv); - - virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa); - virtual bool handle(const PointerInfo&, const osgGA::GUIEventAdapter&, osgGA::GUIActionAdapter&) { return false; } - - - typedef std::vector< osg::ref_ptr > Constraints; - - void addConstraint(Constraint* constraint); - void removeConstraint(Constraint* constraint); - - Constraints& getConstraints() { return _constraints; } - const Constraints& getConstraints() const { return _constraints; } - - - typedef std::vector< osg::ref_ptr > DraggerCallbacks; - - void addDraggerCallback(DraggerCallback* dc); - void removeDraggerCallback(DraggerCallback* dc); - - DraggerCallbacks& getDraggerCallbacks() { return _draggerCallbacks; } - const DraggerCallbacks& getDraggerCallbacks() const { return _draggerCallbacks; } - - void addTransformUpdating(MatrixTransform* transform); - void removeTransformUpdating(MatrixTransform* transform); - - /** Setup default geometry for dragger. */ - virtual void setupDefaultGeometry() {} - - virtual bool receive(const MotionCommand& command); - void dispatch(MotionCommand& command); - - void setDraggerActive(bool active) { _draggerActive = active; } - bool getDraggerActive() const { return _draggerActive; } - - protected: - - Dragger(); - Dragger(const Dragger& rhs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual ~Dragger(); - - - bool _handleEvents; - bool _draggerActive; - - unsigned int _activationModKeyMask; - int _activationKeyEvent; - bool _activationPermittedByModKeyMask; - bool _activationPermittedByKeyEvent; - - osgManipulator::PointerInfo _pointer; - - Dragger* _parentDragger; - - osg::ref_ptr _selfUpdater; - Constraints _constraints; - DraggerCallbacks _draggerCallbacks; - -}; - - -/** - * CompositeDragger allows to create complex draggers that are composed of a - * hierarchy of Draggers. - */ -class OSGMANIPULATOR_EXPORT CompositeDragger : public Dragger -{ - public: - - META_Node(osgManipulator,CompositeDragger) - - typedef std::vector< osg::ref_ptr > DraggerList; - - virtual const CompositeDragger* getComposite() const { return this; } - virtual CompositeDragger* getComposite() { return this; } - - virtual void setParentDragger(Dragger* parent); - - virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa); - - // Composite-specific methods below - virtual bool addDragger(Dragger* dragger); - virtual bool removeDragger(Dragger* dragger); - unsigned int getNumDraggers() const { return _draggerList.size(); } - Dragger* getDragger(unsigned int i) { return _draggerList[i].get(); } - const Dragger* getDragger(unsigned int i) const { return _draggerList[i].get(); } - bool containsDragger(const Dragger* dragger) const; - DraggerList::iterator findDragger(const Dragger* dragger); - - protected: - - CompositeDragger() {} - CompositeDragger(const CompositeDragger& rhs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual ~CompositeDragger() {} - - DraggerList _draggerList; -}; - -/** - * Culls the drawable all the time. Used by draggers to have invisible geometry - * around lines and points so that they can be picked. For example, a dragger - * could have a line with an invisible cylinder around it to enable picking on - * that line. - */ -void OSGMANIPULATOR_EXPORT setDrawableToAlwaysCull(osg::Drawable& drawable); - -/** - * Convenience function for setting the material color on a node. - */ -void OSGMANIPULATOR_EXPORT setMaterialColor(const osg::Vec4& color, osg::Node& node); - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Export b/libs/lib/mac32/include/osgManipulator/Export deleted file mode 100644 index 822828696..000000000 --- a/libs/lib/mac32/include/osgManipulator/Export +++ /dev/null @@ -1,44 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_EXPORT_ -#define OSGMANIPULATOR_EXPORT_ 1 - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGMANIPULATOR_EXPORT - # elif defined( OSGMANIPULATOR_LIBRARY ) - # define OSGMANIPULATOR_EXPORT __declspec(dllexport) - # else - # define OSGMANIPULATOR_EXPORT __declspec(dllimport) - # endif -#else - # define OSGMANIPULATOR_EXPORT -#endif - -#define META_OSGMANIPULATOR_Object(library,name) \ -virtual osg::Object* cloneType() const { return new name (); } \ -virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ -virtual const char* libraryName() const { return #library; }\ -virtual const char* className() const { return #name; } - - -/** - -\namespace osgManipulator - -The osgManipulator library is a NodeKit that extends the core scene graph to support 3D interactive manipulators. -*/ - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Projector b/libs/lib/mac32/include/osgManipulator/Projector deleted file mode 100644 index 68963b65e..000000000 --- a/libs/lib/mac32/include/osgManipulator/Projector +++ /dev/null @@ -1,302 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_PROJECTOR -#define OSGMANIPULATOR_PROJECTOR 1 - -#include - -#include -#include - -#include - -namespace osgManipulator { - -/** - * Base class for Projectors. Projectors maps 2D cursor motions to 3D motions. - */ -class OSGMANIPULATOR_EXPORT Projector : public osg::Referenced -{ - public: - - Projector(); - - /** - * Calculates the object/world coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto some shape or - * geometry (implemented in derived classes). SceneView in used for i - * projecting window coordinates into object coordinates and vice versa. - * Returns true on successful projection. - */ - virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const = 0; - - /** - * Sets the matrix for transforming the projector's local coordinate - * system to the world/object coordinate system. - */ - void setLocalToWorld(const osg::Matrix& localToWorld) - { - _localToWorld = localToWorld; - _worldToLocalDirty = true; - } - - /** - * Gets the matrix for transforming the projector's local coordinate - * system to the world/object coordinate system. - */ - inline const osg::Matrix& getLocalToWorld() const { return _localToWorld; } - - /** - * Gets the matrix for transforming the world/object coordinate - * system to the command's local coordinate system. - */ - inline const osg::Matrix& getWorldToLocal() const - { - if (_worldToLocalDirty) - { - _worldToLocal.invert(_localToWorld); - _worldToLocalDirty = false; - } - return _worldToLocal; - } - - protected: - - virtual ~Projector(); - - osg::Matrix _localToWorld; - mutable osg::Matrix _worldToLocal; - - mutable bool _worldToLocalDirty; -}; - - -/** - * LineProjector projects points onto the closest point on the given line. - */ -class OSGMANIPULATOR_EXPORT LineProjector : public Projector -{ - public: - - LineProjector(); - - LineProjector(const osg::LineSegment::vec_type& s, const osg::LineSegment::vec_type& e); - - inline void setLine(const osg::LineSegment::vec_type& s, const osg::LineSegment::vec_type& e) { _line->start() = s; _line->end() = e; } - - inline const osg::LineSegment::vec_type& getLineStart() const { return _line->start(); } - inline osg::LineSegment::vec_type& getLineStart() { return _line->start(); } - - inline const osg::LineSegment::vec_type& getLineEnd() const { return _line->end(); } - inline osg::LineSegment::vec_type& getLineEnd() { return _line->end(); } - - /** - * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given line. - * Returns true on successful projection. - */ - virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const; - - protected: - - virtual ~LineProjector(); - - osg::ref_ptr _line; -}; - -/** - * PlaneProjector projects points onto the given line. - */ -class OSGMANIPULATOR_EXPORT PlaneProjector : public Projector -{ - public: - - PlaneProjector(); - - PlaneProjector(const osg::Plane& plane); - - inline void setPlane(const osg::Plane& plane) { _plane = plane; } - inline const osg::Plane& getPlane() const { return _plane; } - - /** - * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given plane. - * Returns true on successful projection. - */ - virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const; - - protected: - - virtual ~PlaneProjector(); - - osg::Plane _plane; -}; - -/** - * SphereProjector projects points onto the given sphere. - */ -class OSGMANIPULATOR_EXPORT SphereProjector : public Projector -{ - public: - - SphereProjector(); - - SphereProjector(osg::Sphere* sphere); - - inline void setSphere(osg::Sphere* sphere) { _sphere = sphere; } - inline const osg::Sphere* getSphere() const { return _sphere.get(); } - - /** - * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given sphere. - * Returns true on successful projection. - */ - virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const; - - /** - * Returns true is the point is in front of the cylinder given the eye - * direction. - */ - bool isPointInFront(const PointerInfo& pi, const osg::Matrix& localToWorld) const; - - void setFront(bool front) { _front = front; } - - protected: - - virtual ~SphereProjector(); - - osg::ref_ptr _sphere; - bool _front; -}; - -/** - * SpherePlaneProjector projects points onto a sphere, failing which it project - * onto a plane oriented to the viewing direction. - */ -class OSGMANIPULATOR_EXPORT SpherePlaneProjector : public SphereProjector -{ - public: - - SpherePlaneProjector(); - - SpherePlaneProjector(osg::Sphere* sphere); - - /** - * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given sphere. - * Returns true on successful projection. - */ - virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const; - - /** - * Returns true if the previous projection was on the sphere and false - * if the projection was on the plane. - */ - bool isProjectionOnSphere() const { return _onSphere; } - - osg::Quat getRotation(const osg::Vec3d& p1, bool p1OnSphere, - const osg::Vec3d& p2, bool p2OnSphere, - float radialFactor = 0.0f) const; - - protected: - - virtual ~SpherePlaneProjector(); - - mutable osg::Plane _plane; - mutable bool _onSphere; -}; - -/** - * CylinderProjector projects points onto the given cylinder. - */ -class OSGMANIPULATOR_EXPORT CylinderProjector : public Projector -{ - public: - - CylinderProjector(); - - CylinderProjector(osg::Cylinder* cylinder); - - inline void setCylinder(osg::Cylinder* cylinder) - { - _cylinder = cylinder; - _cylinderAxis = osg::Vec3d(0.0,0.0,1.0) * osg::Matrix(cylinder->getRotation()); - _cylinderAxis.normalize(); - } - inline const osg::Cylinder* getCylinder() const { return _cylinder.get(); } - - /** - * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given plane. - * Returns true on successful projection. - */ - virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const; - - - /** - * Returns true is the point is in front of the cylinder given the eye - * direction. - */ - bool isPointInFront(const PointerInfo& pi, const osg::Matrix& localToWorld) const; - - void setFront(bool front) { _front = front; } - - protected: - - virtual ~CylinderProjector(); - - osg::ref_ptr _cylinder; - osg::Vec3d _cylinderAxis; - bool _front; -}; - -/** - * CylinderPlaneProjector projects points onto the given cylinder. - */ -class OSGMANIPULATOR_EXPORT CylinderPlaneProjector : public CylinderProjector -{ - public: - - CylinderPlaneProjector(); - - CylinderPlaneProjector(osg::Cylinder* cylinder); - - /** - * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given plane. - * Returns true on successful projection. - */ - virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const; - - /** - * Returns true if the previous projection was on the cylinder and - * false if the projection was on the plane. - */ - bool isProjectionOnCylinder() const { return _onCylinder; } - - osg::Quat getRotation(const osg::Vec3d& p1, bool p1OnCyl, const osg::Vec3d& p2, bool p2OnCyl) const; - - protected: - - virtual ~CylinderPlaneProjector(); - - mutable osg::Plane _plane; - mutable bool _onCylinder; - mutable osg::Vec3d _planeLineStart, _planeLineEnd; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/RotateCylinderDragger b/libs/lib/mac32/include/osgManipulator/RotateCylinderDragger deleted file mode 100644 index 318fbfb88..000000000 --- a/libs/lib/mac32/include/osgManipulator/RotateCylinderDragger +++ /dev/null @@ -1,73 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_ROTATECYLINDERDRAGGER -#define OSGMANIPULATOR_ROTATECYLINDERDRAGGER 1 - -#include -#include - -namespace osgManipulator { - -/** - * Dragger for performing 3D rotation on a cylinder. - */ -class OSGMANIPULATOR_EXPORT RotateCylinderDragger : public Dragger -{ - public: - - RotateCylinderDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,RotateCylinderDragger) - - /** - * Handle pick events on dragger and generate TranslateInLine commands. - */ - virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - /** Set/Get color for dragger. */ - inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); } - inline const osg::Vec4& getColor() const { return _color; } - - /** - * Set/Get pick color for dragger. Pick color is color of the dragger - * when picked. It gives a visual feedback to show that the dragger has - * been picked. - */ - inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } - inline const osg::Vec4& getPickColor() const { return _pickColor; } - - - protected: - - virtual ~RotateCylinderDragger(); - - osg::ref_ptr _projector; - - osg::Vec3d _prevWorldProjPt; - bool _prevPtOnCylinder; - osg::Matrix _startLocalToWorld, _startWorldToLocal; - osg::Quat _prevRotation; - - osg::Vec4 _color; - osg::Vec4 _pickColor; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/RotateSphereDragger b/libs/lib/mac32/include/osgManipulator/RotateSphereDragger deleted file mode 100644 index 8efe3131d..000000000 --- a/libs/lib/mac32/include/osgManipulator/RotateSphereDragger +++ /dev/null @@ -1,72 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_ROTATESPHEREDRAGGER -#define OSGMANIPULATOR_ROTATESPHEREDRAGGER 1 - -#include -#include - -namespace osgManipulator { - -/** - * Dragger for performing 3D rotation on a sphere. - */ -class OSGMANIPULATOR_EXPORT RotateSphereDragger : public Dragger -{ - public: - - RotateSphereDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,RotateSphereDragger) - - /** - * Handle pick events on dragger and generate TranslateInLine commands. - */ - virtual bool handle(const PointerInfo&, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - /** Set/Get color for dragger. */ - inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); } - inline const osg::Vec4& getColor() const { return _color; } - - /** - * Set/Get pick color for dragger. Pick color is color of the dragger - * when picked. It gives a visual feedback to show that the dragger has - * been picked. - */ - inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } - inline const osg::Vec4& getPickColor() const { return _pickColor; } - - protected: - - virtual ~RotateSphereDragger(); - - osg::ref_ptr _projector; - - osg::Vec3d _prevWorldProjPt; - bool _prevPtOnSphere; - osg::Matrix _startLocalToWorld, _startWorldToLocal; - osg::Quat _prevRotation; - - osg::Vec4 _color; - osg::Vec4 _pickColor; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Scale1DDragger b/libs/lib/mac32/include/osgManipulator/Scale1DDragger deleted file mode 100644 index 828cfa6c0..000000000 --- a/libs/lib/mac32/include/osgManipulator/Scale1DDragger +++ /dev/null @@ -1,99 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_SCALE1DDRAGGER -#define OSGMANIPULATOR_SCALE1DDRAGGER 1 - -#include -#include - -namespace osgManipulator { - -/** - * Dragger for performing 1D scaling. - */ -class OSGMANIPULATOR_EXPORT Scale1DDragger : public Dragger -{ - public: - - enum ScaleMode - { - SCALE_WITH_ORIGIN_AS_PIVOT = 0, - SCALE_WITH_OPPOSITE_HANDLE_AS_PIVOT - }; - - Scale1DDragger(ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT); - - META_OSGMANIPULATOR_Object(osgManipulator,Scale1DDragger) - - /** - * Handle pick events on dragger and generate TranslateInLine commands. - */ - virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - /** Set/Get min scale for dragger. */ - inline void setMinScale(double min) { _minScale = min; } - inline double getMinScale() const { return _minScale; } - - /** Set/Get color for dragger. */ - inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); } - inline const osg::Vec4& getColor() const { return _color; } - - /** - * Set/Get pick color for dragger. Pick color is color of the dragger - * when picked. It gives a visual feedback to show that the dragger has - * been picked. - */ - inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } - inline const osg::Vec4& getPickColor() const { return _pickColor; } - - /** Set/Get left and right handle nodes for dragger. */ - inline void setLeftHandleNode (osg::Node& node) { _leftHandleNode = &node; } - inline void setRightHandleNode(osg::Node& node) { _rightHandleNode = &node; } - inline osg::Node* getLeftHandleNode() { return _leftHandleNode.get(); } - inline const osg::Node* getLeftHandleNode() const { return _leftHandleNode.get(); } - inline osg::Node* getRightHandleNode() { return _rightHandleNode.get(); } - inline const osg::Node* getRightHandleNode() const { return _rightHandleNode.get(); } - - /** Set left/right handle position. */ - inline void setLeftHandlePosition(double pos) { _projector->getLineStart() = osg::Vec3d(pos,0.0,0.0); } - inline double getLeftHandlePosition() const { return _projector->getLineStart()[0]; } - inline void setRightHandlePosition(double pos) { _projector->getLineEnd() = osg::Vec3d(pos,0.0,0.0); } - inline double getRightHandlePosition() const { return _projector->getLineEnd()[0]; } - - protected: - - virtual ~Scale1DDragger(); - - osg::ref_ptr< LineProjector > _projector; - osg::Vec3d _startProjectedPoint; - double _scaleCenter; - double _minScale; - - osg::ref_ptr< osg::Node > _leftHandleNode; - osg::ref_ptr< osg::Node > _rightHandleNode; - - osg::Vec4 _color; - osg::Vec4 _pickColor; - - ScaleMode _scaleMode; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Scale2DDragger b/libs/lib/mac32/include/osgManipulator/Scale2DDragger deleted file mode 100644 index e97f1ee73..000000000 --- a/libs/lib/mac32/include/osgManipulator/Scale2DDragger +++ /dev/null @@ -1,117 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_SCALE2DDRAGGER -#define OSGMANIPULATOR_SCALE2DDRAGGER 1 - -#include -#include - -namespace osgManipulator { - -/** - * Dragger for performing 2D scaling. - */ -class OSGMANIPULATOR_EXPORT Scale2DDragger : public Dragger -{ - public: - - enum ScaleMode - { - SCALE_WITH_ORIGIN_AS_PIVOT = 0, - SCALE_WITH_OPPOSITE_HANDLE_AS_PIVOT - }; - - Scale2DDragger(ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT); - - META_OSGMANIPULATOR_Object(osgManipulator,Scale2DDragger) - - /** - * Handle pick events on dragger and generate TranslateInLine commands. - */ - virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - /** Set/Get min scale for dragger. */ - inline void setMinScale(const osg::Vec2d& min) { _minScale = min; } - inline const osg::Vec2d& getMinScale() const { return _minScale; } - - /** Set/Get color for dragger. */ - inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); } - inline const osg::Vec4& getColor() const { return _color; } - - /** - * Set/Get pick color for dragger. Pick color is color of the dragger - * when picked. It gives a visual feedback to show that the dragger has - * been picked. - */ - inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } - inline const osg::Vec4& getPickColor() const { return _pickColor; } - - /** Set/Get the handle nodes for dragger. */ - inline void setTopLeftHandleNode (osg::Node& node) { _topLeftHandleNode = &node; } - inline osg::Node* getTopLeftHandleNode() { return _topLeftHandleNode.get(); } - inline const osg::Node* getTopLeftHandleNode() const { return _topLeftHandleNode.get(); } - inline void setBottomLeftHandleNode (osg::Node& node) { _bottomLeftHandleNode = &node; } - inline osg::Node* getBottomLeftHandleNode() { return _bottomLeftHandleNode.get(); } - inline const osg::Node* getBottomLeftHandleNode() const { return _bottomLeftHandleNode.get(); } - inline void setTopRightHandleNode(osg::Node& node) { _topRightHandleNode = &node; } - inline osg::Node* getTopRightHandleNode() { return _topRightHandleNode.get(); } - inline const osg::Node* getTopRightHandleNode() const { return _topRightHandleNode.get(); } - inline void setBottomRightHandleNode(osg::Node& node) { _bottomRightHandleNode = &node; } - inline osg::Node* getBottomRightHandleNode() { return _bottomRightHandleNode.get(); } - inline const osg::Node* getBottomRightHandleNode() const { return _bottomRightHandleNode.get(); } - - /** Set/Get the handle nodes postion for dragger. */ - inline void setTopLeftHandlePosition(const osg::Vec2d& pos) { _topLeftHandlePosition = pos; } - const osg::Vec2d& getTopLeftHandlePosition() const { return _topLeftHandlePosition; } - inline void setBottomLeftHandlePosition(const osg::Vec2d& pos) { _bottomLeftHandlePosition = pos; } - const osg::Vec2d& getBottomLeftHandlePosition() const { return _bottomLeftHandlePosition; } - inline void setTopRightHandlePosition(const osg::Vec2d& pos) { _topRightHandlePosition = pos; } - const osg::Vec2d& getTopRightHandlePosition() const { return _topRightHandlePosition; } - inline void setBottomRightHandlePosition(const osg::Vec2d& pos){ _bottomRightHandlePosition = pos; } - const osg::Vec2d& getBottomRightHandlePosition() const { return _bottomRightHandlePosition; } - - protected: - - virtual ~Scale2DDragger(); - - osg::ref_ptr< PlaneProjector > _projector; - osg::Vec3d _startProjectedPoint; - osg::Vec2d _scaleCenter; - osg::Vec2d _referencePoint; - osg::Vec2d _minScale; - - osg::ref_ptr< osg::Node > _topLeftHandleNode; - osg::ref_ptr< osg::Node > _bottomLeftHandleNode; - osg::ref_ptr< osg::Node > _topRightHandleNode; - osg::ref_ptr< osg::Node > _bottomRightHandleNode; - - osg::Vec2d _topLeftHandlePosition; - osg::Vec2d _bottomLeftHandlePosition; - osg::Vec2d _topRightHandlePosition; - osg::Vec2d _bottomRightHandlePosition; - - osg::Vec4 _color; - osg::Vec4 _pickColor; - - ScaleMode _scaleMode; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/ScaleAxisDragger b/libs/lib/mac32/include/osgManipulator/ScaleAxisDragger deleted file mode 100644 index 0c26a333d..000000000 --- a/libs/lib/mac32/include/osgManipulator/ScaleAxisDragger +++ /dev/null @@ -1,48 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_SCALEAXISDRAGGER -#define OSGMANIPULATOR_SCALEAXISDRAGGER 1 - -#include - -namespace osgManipulator { - -/** - * Dragger for performing scaling on all 3 axes. - */ -class OSGMANIPULATOR_EXPORT ScaleAxisDragger : public CompositeDragger -{ - public: - - ScaleAxisDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,ScaleAxisDragger) - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - protected: - - virtual ~ScaleAxisDragger(); - - osg::ref_ptr< Scale1DDragger > _xDragger; - osg::ref_ptr< Scale1DDragger > _yDragger; - osg::ref_ptr< Scale1DDragger > _zDragger; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Selection b/libs/lib/mac32/include/osgManipulator/Selection deleted file mode 100644 index 8a99bc26e..000000000 --- a/libs/lib/mac32/include/osgManipulator/Selection +++ /dev/null @@ -1,29 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_SELECTION -#define OSGMANIPULATOR_SELECTION 1 - -#include -#include - -namespace osgManipulator { - - -typedef osg::MatrixTransform Selection; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/TabBoxDragger b/libs/lib/mac32/include/osgManipulator/TabBoxDragger deleted file mode 100644 index 486ef6ce1..000000000 --- a/libs/lib/mac32/include/osgManipulator/TabBoxDragger +++ /dev/null @@ -1,49 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TABBOXDRAGGER -#define OSGMANIPULATOR_TABBOXDRAGGER 1 - -#include - -namespace osgManipulator { - -/** - * TabBoxDragger consists of 6 TabPlaneDraggers to form a box dragger that - * performs translation and scaling. - */ -class OSGMANIPULATOR_EXPORT TabBoxDragger : public CompositeDragger -{ - public: - - TabBoxDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,TabBoxDragger) - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - void setPlaneColor(const osg::Vec4& color); - - protected: - - virtual ~TabBoxDragger(); - - std::vector< osg::ref_ptr< TabPlaneDragger > > _planeDraggers; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/TabBoxTrackballDragger b/libs/lib/mac32/include/osgManipulator/TabBoxTrackballDragger deleted file mode 100644 index c1d6f8470..000000000 --- a/libs/lib/mac32/include/osgManipulator/TabBoxTrackballDragger +++ /dev/null @@ -1,48 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TABBOXTRACKBALLDRAGGER -#define OSGMANIPULATOR_TABBOXTRACKBALLDRAGGER 1 - -#include -#include - -namespace osgManipulator { - -/** - * Dragger for performing rotation in all axes. - */ -class OSGMANIPULATOR_EXPORT TabBoxTrackballDragger : public CompositeDragger -{ - public: - - TabBoxTrackballDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,TabBoxTrackballDragger) - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - protected: - - virtual ~TabBoxTrackballDragger(); - - osg::ref_ptr _trackballDragger; - osg::ref_ptr _tabBoxDragger; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/TabPlaneDragger b/libs/lib/mac32/include/osgManipulator/TabPlaneDragger deleted file mode 100644 index 12b82a778..000000000 --- a/libs/lib/mac32/include/osgManipulator/TabPlaneDragger +++ /dev/null @@ -1,58 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TABPLANEDRAGGER -#define OSGMANIPULATOR_TABPLANEDRAGGER 1 - -#include -#include -#include - -namespace osgManipulator { - -/** - * Tab plane dragger consists of a plane with tabs on it's corners and edges - * for scaling. And the plane is used as a 2D translate dragger. - */ -class OSGMANIPULATOR_EXPORT TabPlaneDragger : public CompositeDragger -{ - public: - - TabPlaneDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,TabPlaneDragger) - - virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(bool twoSidedHandle = true); - - void setPlaneColor(const osg::Vec4& color) { _translateDragger->setColor(color); } - - protected: - - virtual ~TabPlaneDragger(); - - osg::ref_ptr< TranslatePlaneDragger > _translateDragger; - osg::ref_ptr< Scale2DDragger > _cornerScaleDragger; - osg::ref_ptr< Scale1DDragger > _horzEdgeScaleDragger; - osg::ref_ptr< Scale1DDragger > _vertEdgeScaleDragger; - - float _handleScaleFactor; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/TabPlaneTrackballDragger b/libs/lib/mac32/include/osgManipulator/TabPlaneTrackballDragger deleted file mode 100644 index df56d7fd7..000000000 --- a/libs/lib/mac32/include/osgManipulator/TabPlaneTrackballDragger +++ /dev/null @@ -1,50 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TABPLANETRACKBALLDRAGGER -#define OSGMANIPULATOR_TABPLANETRACKBALLDRAGGER 1 - -#include -#include - -namespace osgManipulator { - -/** - * Dragger for performing rotation in all axes. - */ -class OSGMANIPULATOR_EXPORT TabPlaneTrackballDragger : public CompositeDragger -{ - public: - - TabPlaneTrackballDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,TabPlaneTrackballDragger) - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - void setPlaneColor(const osg::Vec4& color) { _tabPlaneDragger->setPlaneColor(color); } - - protected: - - virtual ~TabPlaneTrackballDragger(); - - osg::ref_ptr _trackballDragger; - osg::ref_ptr _tabPlaneDragger; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/TrackballDragger b/libs/lib/mac32/include/osgManipulator/TrackballDragger deleted file mode 100644 index f4a531e25..000000000 --- a/libs/lib/mac32/include/osgManipulator/TrackballDragger +++ /dev/null @@ -1,50 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TRACKBALLDRAGGER -#define OSGMANIPULATOR_TRACKBALLDRAGGER 1 - -#include -#include - -namespace osgManipulator { - -/** - * Dragger for performing rotation in all axes. - */ -class OSGMANIPULATOR_EXPORT TrackballDragger : public CompositeDragger -{ - public: - - TrackballDragger(bool useAutoTransform=false); - - META_OSGMANIPULATOR_Object(osgManipulator,TrackballDragger) - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - protected: - - virtual ~TrackballDragger(); - - osg::ref_ptr _xDragger; - osg::ref_ptr _yDragger; - osg::ref_ptr _zDragger; - osg::ref_ptr _xyzDragger; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Translate1DDragger b/libs/lib/mac32/include/osgManipulator/Translate1DDragger deleted file mode 100644 index eefa70c3a..000000000 --- a/libs/lib/mac32/include/osgManipulator/Translate1DDragger +++ /dev/null @@ -1,70 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TRANSLATE1DDRAGGER -#define OSGMANIPULATOR_TRANSLATE1DDRAGGER 1 - -#include -#include - -namespace osgManipulator { - - -/** - * Dragger for performing 1D translation. - */ -class OSGMANIPULATOR_EXPORT Translate1DDragger : public Dragger -{ - public: - - Translate1DDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,Translate1DDragger) - - Translate1DDragger(const osg::Vec3d& s, const osg::Vec3d& e); - - /** Handle pick events on dragger and generate TranslateInLine commands. */ - virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - /** Set/Get color for dragger. */ - inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); } - inline const osg::Vec4& getColor() const { return _color; } - - /** Set/Get pick color for dragger. Pick color is color of the dragger when picked. - It gives a visual feedback to show that the dragger has been picked. */ - inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } - inline const osg::Vec4& getPickColor() const { return _pickColor; } - - inline void setCheckForNodeInNodePath(bool onOff) { _checkForNodeInNodePath = onOff; } - - protected: - - virtual ~Translate1DDragger(); - - osg::ref_ptr< LineProjector > _projector; - osg::Vec3d _startProjectedPoint; - - osg::Vec4 _color; - osg::Vec4 _pickColor; - - bool _checkForNodeInNodePath; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Translate2DDragger b/libs/lib/mac32/include/osgManipulator/Translate2DDragger deleted file mode 100644 index 9cb5cb6d9..000000000 --- a/libs/lib/mac32/include/osgManipulator/Translate2DDragger +++ /dev/null @@ -1,68 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TRANSLATE2DDRAGGER -#define OSGMANIPULATOR_TRANSLATE2DDRAGGER 1 - -#include -#include - -#include - -namespace osgManipulator { - -/** - * Dragger for performing 2D translation. - */ -class OSGMANIPULATOR_EXPORT Translate2DDragger : public Dragger -{ - public: - - Translate2DDragger(); - - Translate2DDragger(const osg::Plane& plane); - - META_OSGMANIPULATOR_Object(osgManipulator,Translate2DDragger) - - /** Handle pick events on dragger and generate TranslateInLine commands. */ - virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - /** Set/Get color for dragger. */ - inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); } - inline const osg::Vec4& getColor() const { return _color; } - - /** Set/Get pick color for dragger. Pick color is color of the dragger when picked. - It gives a visual feedback to show that the dragger has been picked. */ - inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } - inline const osg::Vec4& getPickColor() const { return _pickColor; } - - protected: - - virtual ~Translate2DDragger(); - - osg::ref_ptr< PlaneProjector > _projector; - osg::Vec3d _startProjectedPoint; - - osg::Vec4 _color; - osg::Vec4 _pickColor; - osg::ref_ptr _polygonOffset; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/TranslateAxisDragger b/libs/lib/mac32/include/osgManipulator/TranslateAxisDragger deleted file mode 100644 index 863c6e855..000000000 --- a/libs/lib/mac32/include/osgManipulator/TranslateAxisDragger +++ /dev/null @@ -1,48 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TRANSLATEAXISDRAGGER -#define OSGMANIPULATOR_TRANSLATEAXISDRAGGER 1 - -#include - -namespace osgManipulator { - -/** - * Dragger for performing translation in all three axes. - */ -class OSGMANIPULATOR_EXPORT TranslateAxisDragger : public CompositeDragger -{ - public: - - TranslateAxisDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,TranslateAxisDragger) - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - protected: - - virtual ~TranslateAxisDragger(); - - osg::ref_ptr< Translate1DDragger > _xDragger; - osg::ref_ptr< Translate1DDragger > _yDragger; - osg::ref_ptr< Translate1DDragger > _zDragger; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/TranslatePlaneDragger b/libs/lib/mac32/include/osgManipulator/TranslatePlaneDragger deleted file mode 100644 index 25ddb1819..000000000 --- a/libs/lib/mac32/include/osgManipulator/TranslatePlaneDragger +++ /dev/null @@ -1,57 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V. - -#ifndef OSGMANIPULATOR_TRANSLATEPLANEDRAGGER -#define OSGMANIPULATOR_TRANSLATEPLANEDRAGGER 1 - -#include -#include - -namespace osgManipulator { - -/** - * Tab plane dragger consists of a plane with tabs on it's corners and edges - * for scaling. And the plane is used as a 2D translate dragger. - */ -class OSGMANIPULATOR_EXPORT TranslatePlaneDragger : public CompositeDragger -{ - public: - - TranslatePlaneDragger(); - - META_OSGMANIPULATOR_Object(osgManipulator,TranslatePlaneDragger) - - virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); - - /** Setup default geometry for dragger. */ - void setupDefaultGeometry(); - - inline void setColor(const osg::Vec4& color) { if (_translate2DDragger.valid()) _translate2DDragger->setColor(color); } - - Translate1DDragger* getTranslate1DDragger() { return _translate1DDragger.get(); } - Translate2DDragger* getTranslate2DDragger() { return _translate2DDragger.get(); } - - protected: - - virtual ~TranslatePlaneDragger(); - - osg::ref_ptr< Translate2DDragger > _translate2DDragger; - osg::ref_ptr< Translate1DDragger > _translate1DDragger; - bool _usingTranslate1DDragger; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgManipulator/Version b/libs/lib/mac32/include/osgManipulator/Version deleted file mode 100644 index b25effa2f..000000000 --- a/libs/lib/mac32/include/osgManipulator/Version +++ /dev/null @@ -1,48 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGMANIPULATOR_VERSION -#define OSGMANIPULATOR_VERSION 1 - -#include - - -extern "C" { - -/** - * osgManipulatorGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgManipulatorGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph (OSG) Manipulator library - # - AC_CHECK_LIB(osg, osgManipulatorGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph Manipulator library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -extern OSGMANIPULATOR_EXPORT const char* osgManipulatorGetVersion(); - -/** - * osgManipulatorGetLibraryName() returns the library name in human friendly form. - */ -extern OSGMANIPULATOR_EXPORT const char* osgManipulatorGetLibraryName(); - -} - -#endif - diff --git a/libs/lib/mac32/include/osgParticle/AccelOperator b/libs/lib/mac32/include/osgParticle/AccelOperator deleted file mode 100644 index 1e2755550..000000000 --- a/libs/lib/mac32/include/osgParticle/AccelOperator +++ /dev/null @@ -1,108 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_ACCELOPERATOR -#define OSGPARTICLE_ACCELOPERATOR 1 - -#include -#include -#include - -#include -#include -#include - -namespace osgParticle -{ - - /** An operator class that applies a constant acceleration to the particles. - */ - class AccelOperator: public Operator { - public: - inline AccelOperator(); - inline AccelOperator(const AccelOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, AccelOperator); - - /// Get the acceleration vector. - inline const osg::Vec3& getAcceleration() const; - - /// Set the acceleration vector. - inline void setAcceleration(const osg::Vec3& v); - - /** Quickly set the acceleration vector to the gravity on earth (0, 0, -9.81). - The acceleration will be multiplied by the scale parameter. - */ - inline void setToGravity(float scale = 1); - - /// Apply the acceleration to a particle. Do not call this method manually. - inline void operate(Particle* P, double dt); - - /// Perform some initializations. Do not call this method manually. - inline void beginOperate(Program *prg); - - protected: - virtual ~AccelOperator() {} - AccelOperator &operator=(const AccelOperator &) { return *this; } - - private: - osg::Vec3 _accel; - osg::Vec3 _xf_accel; - }; - - // INLINE FUNCTIONS - - inline AccelOperator::AccelOperator() - : Operator(), _accel(0, 0, 0) - { - } - - inline AccelOperator::AccelOperator(const AccelOperator& copy, const osg::CopyOp& copyop) - : Operator(copy, copyop), _accel(copy._accel) - { - } - - inline const osg::Vec3& AccelOperator::getAcceleration() const - { - return _accel; - } - - inline void AccelOperator::setAcceleration(const osg::Vec3& v) - { - _accel = v; - } - - inline void AccelOperator::setToGravity(float scale) - { - _accel.set(0, 0, -9.80665f * scale); - } - - inline void AccelOperator::operate(Particle* P, double dt) - { - P->addVelocity(_xf_accel * dt); - } - - inline void AccelOperator::beginOperate(Program *prg) - { - if (prg->getReferenceFrame() == ModularProgram::RELATIVE_RF) { - _xf_accel = prg->rotateLocalToWorld(_accel); - } else { - _xf_accel = _accel; - } - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/AngularAccelOperator b/libs/lib/mac32/include/osgParticle/AngularAccelOperator deleted file mode 100644 index 71149fc55..000000000 --- a/libs/lib/mac32/include/osgParticle/AngularAccelOperator +++ /dev/null @@ -1,99 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_ANGULARACCELOPERATOR -#define OSGPARTICLE_ANGULARACCELOPERATOR 1 - -#include -#include -#include - -#include -#include -#include - -namespace osgParticle -{ - - /** An operator class that applies a constant angular acceleration to - * the particles. - */ - class AngularAccelOperator: public Operator { - public: - inline AngularAccelOperator(); - inline AngularAccelOperator(const AngularAccelOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, AngularAccelOperator); - - /// Get the angular acceleration vector. - inline const osg::Vec3& getAngularAcceleration() const; - - /// Set the angular acceleration vector. - inline void setAngularAcceleration(const osg::Vec3& v); - - /// Apply the angular acceleration to a particle. Do not call this method manually. - inline void operate(Particle* P, double dt); - - /// Perform some initializations. Do not call this method manually. - inline void beginOperate(Program *prg); - - protected: - virtual ~AngularAccelOperator() {} - AngularAccelOperator& operator=(const AngularAccelOperator& ) { return *this; } - - private: - osg::Vec3 _angul_araccel; - osg::Vec3 _xf_angul_araccel; - }; - - // INLINE FUNCTIONS - - inline AngularAccelOperator::AngularAccelOperator() - : Operator(), _angul_araccel(0, 0, 0) - { - } - - inline AngularAccelOperator::AngularAccelOperator(const AngularAccelOperator& copy, const osg::CopyOp& copyop) - : Operator(copy, copyop), _angul_araccel(copy._angul_araccel) - { - } - - inline const osg::Vec3& AngularAccelOperator::getAngularAcceleration() const - { - return _angul_araccel; - } - - inline void AngularAccelOperator::setAngularAcceleration(const osg::Vec3& v) - { - _angul_araccel = v; - } - - inline void AngularAccelOperator::operate(Particle* P, double dt) - { - P->addAngularVelocity(_xf_angul_araccel * dt); - } - - inline void AngularAccelOperator::beginOperate(Program *prg) - { - if (prg->getReferenceFrame() == ModularProgram::RELATIVE_RF) { - _xf_angul_araccel = prg->rotateLocalToWorld(_angul_araccel); - } else { - _xf_angul_araccel = _angul_araccel; - } - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/AngularDampingOperator b/libs/lib/mac32/include/osgParticle/AngularDampingOperator deleted file mode 100644 index b2b61667a..000000000 --- a/libs/lib/mac32/include/osgParticle/AngularDampingOperator +++ /dev/null @@ -1,94 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGPARTICLE_ANGULARDAMPINGOPERATOR -#define OSGPARTICLE_ANGULARDAMPINGOPERATOR - -#include -#include - -namespace osgParticle -{ - - -/** A angular damping operator applies damping constant to particle's angular velocity. - Refer to David McAllister's Particle System API (http://www.particlesystems.org) -*/ -class AngularDampingOperator : public Operator -{ -public: - AngularDampingOperator() : Operator(), _cutoffLow(0.0f), _cutoffHigh(FLT_MAX) - {} - - AngularDampingOperator( const AngularDampingOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) - : Operator(copy, copyop), _damping(copy._damping), - _cutoffLow(copy._cutoffLow), _cutoffHigh(copy._cutoffHigh) - {} - - META_Object( osgParticle, AngularDampingOperator ); - - /// Set the damping factors - void setDamping( float x, float y, float z ) { _damping.set(x, y, z); } - void setDamping( const osg::Vec3& damping ) { _damping = damping; } - - /// Set the damping factors to one value - void setDamping( float x ) { _damping.set(x, x, x); } - - /// Get the damping factors - void getDamping( float& x, float& y, float& z ) const - { x = _damping.x(); y = _damping.y(); z = _damping.z(); } - - const osg::Vec3& getDamping() const { return _damping; } - - /// Set the velocity cutoff factors - void setCutoff( float low, float high ) { _cutoffLow = low; _cutoffHigh = high; } - void setCutoffLow( float low ) { _cutoffLow = low; } - void setCutoffHigh( float low ) { _cutoffHigh = low; } - - /// Get the velocity cutoff factors - void getCutoff( float& low, float& high ) const { low = _cutoffLow; high = _cutoffHigh; } - float getCutoffLow() const { return _cutoffLow; } - float getCutoffHigh() const { return _cutoffHigh; } - - /// Apply the acceleration to a particle. Do not call this method manually. - inline void operate( Particle* P, double dt ); - -protected: - virtual ~AngularDampingOperator() {} - AngularDampingOperator& operator=( const AngularDampingOperator& ) { return *this; } - - osg::Vec3 _damping; - float _cutoffLow; - float _cutoffHigh; -}; - -// INLINE METHODS - -inline void AngularDampingOperator::operate( Particle* P, double dt ) -{ - const osg::Vec3& vel = P->getAngularVelocity(); - float length2 = vel.length2(); - if ( length2>=_cutoffLow && length2<=_cutoffHigh ) - { - osg::Vec3 newvel( vel.x() * (1.0f - (1.0f - _damping.x()) * dt), - vel.y() * (1.0f - (1.0f - _damping.y()) * dt), - vel.z() * (1.0f - (1.0f - _damping.z()) * dt) ); - P->setAngularVelocity( newvel ); - } -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/BounceOperator b/libs/lib/mac32/include/osgParticle/BounceOperator deleted file mode 100644 index 6244520d4..000000000 --- a/libs/lib/mac32/include/osgParticle/BounceOperator +++ /dev/null @@ -1,78 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGPARTICLE_BOUNCEOPERATOR -#define OSGPARTICLE_BOUNCEOPERATOR - -#include -#include - -namespace osgParticle -{ - - -/** A bounce operator can affect the particle's velocity to make it rebound. - Refer to David McAllister's Particle System API (http://www.particlesystems.org) -*/ -class OSGPARTICLE_EXPORT BounceOperator : public DomainOperator -{ -public: - BounceOperator() - : DomainOperator(), _friction(1.0f), _resilience(0.0f), _cutoff(0.0f) - {} - - BounceOperator( const BounceOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) - : DomainOperator(copy, copyop), - _friction(copy._friction), _resilience(copy._resilience), _cutoff(copy._cutoff) - {} - - META_Object( osgParticle, BounceOperator ); - - /// Set the friction - void setFriction( float f ) { _friction = f; } - - /// Get the friction - float getFriction() const { return _friction; } - - /// Set the resilience - void setResilience( float r ) { _resilience = r; } - - /// Get the velocity cutoff factor - float getResilience() const { return _resilience; } - - /// Set the velocity cutoff factor - void setCutoff( float v ) { _cutoff = v; } - - /// Get the velocity cutoff factor - float getCutoff() const { return _cutoff; } - -protected: - virtual ~BounceOperator() {} - BounceOperator& operator=( const BounceOperator& ) { return *this; } - - virtual void handleTriangle( const Domain& domain, Particle* P, double dt ); - virtual void handleRectangle( const Domain& domain, Particle* P, double dt ); - virtual void handlePlane( const Domain& domain, Particle* P, double dt ); - virtual void handleSphere( const Domain& domain, Particle* P, double dt ); - virtual void handleDisk( const Domain& domain, Particle* P, double dt ); - - float _friction; - float _resilience; - float _cutoff; -}; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/BoxPlacer b/libs/lib/mac32/include/osgParticle/BoxPlacer deleted file mode 100644 index 2be046bc9..000000000 --- a/libs/lib/mac32/include/osgParticle/BoxPlacer +++ /dev/null @@ -1,174 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//Build by Zach Deedler - -#ifndef OSGPARTICLE_BOX_PLACER -#define OSGPARTICLE_BOX_PLACER 1 - -#include -#include -#include - -#include -#include -#include -#include - -namespace osgParticle -{ - - /** A box-shaped particle placer. - This placer sets the initial position of incoming particle by choosing a random position - within the volume of a box; this placer is defined by four parameters: a center point, - which is inherited directly from osgParticle::CenteredPlacer, and three ranges of values - for the valid X, Y, and Z coordinates. - */ - class BoxPlacer: public CenteredPlacer { - public: - inline BoxPlacer(); - inline BoxPlacer(const BoxPlacer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - /// Get the range of possible values along the X axis. - inline const rangef& getXRange() const; - - /// Set the range of possible values along the X axis. - inline void setXRange(const rangef& r); - - /// Set the range of possible values along the X axis. - inline void setXRange(float r1, float r2); - - /// Get the range of possible values along the Y axis. - inline const rangef& getYRange() const; - - /// Set the range of possible values along the Y axis. - inline void setYRange(const rangef& r); - - /// Set the range of possible values along the Y axis. - inline void setYRange(float r1, float r2); - - /// Get the range of possible values along the Z axis. - inline const rangef& getZRange() const; - - /// Set the range of possible values along the Z axis. - inline void setZRange(const rangef& r); - - /// Set the range of possible values along the Z axis. - inline void setZRange(float r1, float r2); - - META_Object(osgParticle, BoxPlacer); - - /// Place a particle. Do not call it manually. - inline void place(Particle* P) const; - - /// return the volume of the box - inline float volume() const; - - /// return the control position - inline osg::Vec3 getControlPosition() const; - - protected: - virtual ~BoxPlacer() {} - BoxPlacer& operator=(const BoxPlacer&) { return *this; } - - private: - rangef _x_range; - rangef _y_range; - rangef _z_range; - }; - - // INLINE FUNCTIONS - - inline BoxPlacer::BoxPlacer() - : CenteredPlacer(), _x_range(-1, 1), _y_range(-1, 1), _z_range(-1, 1) - { - } - - inline BoxPlacer::BoxPlacer(const BoxPlacer& copy, const osg::CopyOp& copyop) - : CenteredPlacer(copy, copyop), - _x_range(copy._x_range), _y_range(copy._y_range), _z_range(copy._z_range) - { - } - - inline const rangef& BoxPlacer::getXRange() const - { - return _x_range; - } - - inline void BoxPlacer::setXRange(const rangef& r) - { - _x_range = r; - } - - inline void BoxPlacer::setXRange(float r1, float r2) - { - _x_range.minimum = r1; - _x_range.maximum = r2; - } - - inline const rangef& BoxPlacer::getYRange() const - { - return _y_range; - } - - inline void BoxPlacer::setYRange(const rangef& r) - { - _y_range = r; - } - - inline void BoxPlacer::setYRange(float r1, float r2) - { - _y_range.minimum = r1; - _y_range.maximum = r2; - } - - inline const rangef& BoxPlacer::getZRange() const - { - return _z_range; - } - - inline void BoxPlacer::setZRange(const rangef& r) - { - _z_range = r; - } - - inline void BoxPlacer::setZRange(float r1, float r2) - { - _z_range.minimum = r1; - _z_range.maximum = r2; - } - - inline void BoxPlacer::place(Particle* P) const - { - osg::Vec3 pos( - getCenter().x() + _x_range.get_random(), - getCenter().y() + _y_range.get_random(), - getCenter().z() + _z_range.get_random()); - - P->setPosition(pos); - } - - inline float BoxPlacer::volume() const - { - return (_x_range.maximum - _x_range.minimum) * - (_y_range.maximum - _y_range.minimum) * - (_z_range.maximum - _z_range.minimum); - } - - inline osg::Vec3 BoxPlacer::getControlPosition() const - { - return getCenter(); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/CenteredPlacer b/libs/lib/mac32/include/osgParticle/CenteredPlacer deleted file mode 100644 index 0ab9604dd..000000000 --- a/libs/lib/mac32/include/osgParticle/CenteredPlacer +++ /dev/null @@ -1,84 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_CENTERED_PLACER -#define OSGPARTICLE_CENTERED_PLACER 1 - -#include - -#include -#include -#include - -namespace osgParticle -{ - - /** An abstract placer base class for placers which need a center point. - */ - class CenteredPlacer: public Placer { - public: - inline CenteredPlacer(); - inline CenteredPlacer(const CenteredPlacer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "CenteredPlacer"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - - /// Get the center point. - inline const osg::Vec3& getCenter() const; - - /// Set the center point. - inline void setCenter(const osg::Vec3& v); - - /// Set the center point. - inline void setCenter(float x, float y, float z); - - protected: - virtual ~CenteredPlacer() {} - - private: - osg::Vec3 center_; - }; - - // INLINE FUNCTIONS - - inline CenteredPlacer::CenteredPlacer() - : Placer(), center_(0, 0, 0) - { - } - - inline CenteredPlacer::CenteredPlacer(const CenteredPlacer& copy, const osg::CopyOp& copyop) - : Placer(copy, copyop), center_(copy.center_) - { - } - - inline const osg::Vec3& CenteredPlacer::getCenter() const - { - return center_; - } - - inline void CenteredPlacer::setCenter(const osg::Vec3& v) - { - center_ = v; - } - - inline void CenteredPlacer::setCenter(float x, float y, float z) - { - center_.set(x, y, z); - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/CompositePlacer b/libs/lib/mac32/include/osgParticle/CompositePlacer deleted file mode 100644 index 226835cd1..000000000 --- a/libs/lib/mac32/include/osgParticle/CompositePlacer +++ /dev/null @@ -1,104 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGPARTICLE_COMPOSITEPLACER -#define OSGPARTICLE_COMPOSITEPLACER - -#include -#include - -namespace osgParticle -{ - - -/** A composite particle placer which allows particles to be generated from a union of placers. */ -class CompositePlacer : public Placer -{ -public: - CompositePlacer() : Placer() {} - - CompositePlacer( const CompositePlacer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) - : Placer(copy, copyop), _placers(copy._placers) {} - - META_Object( osgParticle, CompositePlacer ); - - // Set a child placer at specific index - void setPlacer( unsigned int i, Placer* p ) - { - if (i<_placers.size()) _placers[i] = p; - else addPlacer(p); - } - - /// Add a child placer - void addPlacer( Placer* p ) { _placers.push_back(p); } - - /// Remove a child placer - void removePlacer( unsigned int i ) - { if (i<_placers.size()) _placers.erase(_placers.begin()+i); } - - /// Get a child placer - Placer* getPlacer( unsigned int i ) { return _placers[i].get(); } - const Placer* getPlacer( unsigned int i ) const { return _placers[i].get(); } - - /// Get number of placers - unsigned int getNumPlacers() const { return _placers.size(); } - - /// Place a particle. Do not call it manually. - inline void place( Particle* P ) const; - - /// return the volume of the box - inline float volume() const; - - /// return the control position - inline osg::Vec3 getControlPosition() const; - -protected: - virtual ~CompositePlacer() {} - CompositePlacer& operator=( const CompositePlacer& ) { return *this; } - - typedef std::vector< osg::ref_ptr > PlacerList; - PlacerList _placers; -}; - -// INLINE METHODS - -inline void CompositePlacer::place( Particle* P ) const -{ - rangef sizeRange( 0.0f, volume() ); - float current = 0.0f, selected = sizeRange.get_random(); - for ( PlacerList::const_iterator itr=_placers.begin(); itr!=_placers.end(); ++itr ) - { - current += (*itr)->volume(); - if ( selected<=current ) (*itr)->place( P ); - } -} - -inline float CompositePlacer::volume() const -{ - float total_size = 0.0f; - for ( PlacerList::const_iterator itr=_placers.begin(); itr!=_placers.end(); ++itr ) - total_size += (*itr)->volume(); - return total_size; -} - -inline osg::Vec3 CompositePlacer::getControlPosition() const -{ - if ( !_placers.size() ) return osg::Vec3(); - return _placers.front()->getControlPosition(); -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ConnectedParticleSystem b/libs/lib/mac32/include/osgParticle/ConnectedParticleSystem deleted file mode 100644 index 5df957204..000000000 --- a/libs/lib/mac32/include/osgParticle/ConnectedParticleSystem +++ /dev/null @@ -1,79 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_CONNECTEDPARTICLESYSTEM -#define OSGPARTICLE_CONNECTEDPARTICLESYSTEM 1 - -#include - -namespace osgParticle -{ - - /** ConnectConnectedParticleSystem is a specialise ConnectedParticleSystem for effects - * like missle trails, where the individual particles are rendered as - * single ribbon. - */ - class OSGPARTICLE_EXPORT ConnectedParticleSystem: public osgParticle::ParticleSystem - { - public: - - ConnectedParticleSystem(); - ConnectedParticleSystem(const ConnectedParticleSystem& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, ConnectedParticleSystem); - - /// Create a new particle from the specified template (or the default one if ptemplate is null). - virtual Particle* createParticle(const Particle* ptemplate); - - /// Reuse the i-th particle. - virtual void reuseParticle(int i); - - /// Draw the connected particles as either a line or a quad strip, depending upon viewing distance. . - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; - - ///Get the (const) particle from where the line or quadstrip starts to be drawn - const osgParticle::Particle* getStartParticle() const - { - return (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0; - } - - ///Get the particle from where the line or quadstrip starts to be drawn - osgParticle::Particle* getStartParticle() - { - return (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0; - } - - ///Set the maximum numbers of particles to be skipped during the predraw filtering - void setMaxNumberOfParticlesToSkip(unsigned int maxNumberofParticlesToSkip){_maxNumberOfParticlesToSkip = maxNumberofParticlesToSkip;} - - ///Get the maximum numbers of particles to be skipped during the predraw filtering - unsigned int getMaxNumberOfParticlesToSkip(){ return _maxNumberOfParticlesToSkip;} - - protected: - - virtual ~ConnectedParticleSystem(); - - ConnectedParticleSystem& operator=(const ConnectedParticleSystem&) { return *this; } - - int _lastParticleCreated; - unsigned int _maxNumberOfParticlesToSkip; - - int _startParticle; - - }; - - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ConstantRateCounter b/libs/lib/mac32/include/osgParticle/ConstantRateCounter deleted file mode 100644 index 63565a9db..000000000 --- a/libs/lib/mac32/include/osgParticle/ConstantRateCounter +++ /dev/null @@ -1,77 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_CONSTANTRATECOUNTER -#define OSGPARTICLE_CONSTANTRATECOUNTER 1 - -#include - -#include -#include - -namespace osgParticle -{ - - class ConstantRateCounter: public Counter { - public: - ConstantRateCounter(): - Counter(), - _minimumNumberOfParticlesToCreate(0), - _numberOfParticlesPerSecondToCreate(0), - _carryOver(0) - { - } - - ConstantRateCounter(const ConstantRateCounter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): - Counter(copy, copyop), - _minimumNumberOfParticlesToCreate(copy._minimumNumberOfParticlesToCreate), - _numberOfParticlesPerSecondToCreate(copy._numberOfParticlesPerSecondToCreate), - _carryOver(copy._carryOver) - { - } - - - META_Object(osgParticle, ConstantRateCounter); - - void setMinimumNumberOfParticlesToCreate(int minNumToCreate) { _minimumNumberOfParticlesToCreate = minNumToCreate; } - int getMinimumNumberOfParticlesToCreate() const { return _minimumNumberOfParticlesToCreate; } - - void setNumberOfParticlesPerSecondToCreate(double numPerSecond) { _numberOfParticlesPerSecondToCreate = numPerSecond; } - double getNumberOfParticlesPerSecondToCreate() const { return _numberOfParticlesPerSecondToCreate; } - - /// Return the number of particles to be created in this frame - virtual int numParticlesToCreate(double dt) const - { - double v = (dt*_numberOfParticlesPerSecondToCreate); - int i = (int)(v); - _carryOver += (v-(double)i); - if (_carryOver>1.0) - { - ++i; - _carryOver -= 1.0; - } - return osg::maximum(_minimumNumberOfParticlesToCreate, i); - } - - protected: - virtual ~ConstantRateCounter() {} - - int _minimumNumberOfParticlesToCreate; - double _numberOfParticlesPerSecondToCreate; - mutable double _carryOver; - }; - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Counter b/libs/lib/mac32/include/osgParticle/Counter deleted file mode 100644 index 36fc9e7ec..000000000 --- a/libs/lib/mac32/include/osgParticle/Counter +++ /dev/null @@ -1,54 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_COUNTER -#define OSGPARTICLE_COUNTER 1 - -#include -#include - -namespace osgParticle -{ - - class Counter: public osg::Object { - public: - inline Counter(); - inline Counter(const Counter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "Counter"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - - virtual int numParticlesToCreate(double dt) const = 0; - - protected: - ~Counter() {} - Counter &operator=(const Counter &) { return *this; } - }; - - // INLINE FUNCTIONS - - inline Counter::Counter() - : osg::Object() - { - } - - inline Counter::Counter(const Counter& copy, const osg::CopyOp& copyop) - : osg::Object(copy, copyop) - { - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/DampingOperator b/libs/lib/mac32/include/osgParticle/DampingOperator deleted file mode 100644 index 38bca8ba7..000000000 --- a/libs/lib/mac32/include/osgParticle/DampingOperator +++ /dev/null @@ -1,94 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGPARTICLE_DAMPINGOPERATOR -#define OSGPARTICLE_DAMPINGOPERATOR - -#include -#include - -namespace osgParticle -{ - - -/** A damping operator applies damping constant to particle's velocity. - Refer to David McAllister's Particle System API (http://www.particlesystems.org) -*/ -class DampingOperator : public Operator -{ -public: - DampingOperator() : Operator(), _cutoffLow(0.0f), _cutoffHigh(FLT_MAX) - { _damping.set(1.0f, 1.0f, 1.0f); } - - DampingOperator( const DampingOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) - : Operator(copy, copyop), _damping(copy._damping), - _cutoffLow(copy._cutoffLow), _cutoffHigh(copy._cutoffHigh) - {} - - META_Object( osgParticle, DampingOperator ); - - /// Set the damping factors - void setDamping( float x, float y, float z ) { _damping.set(x, y, z); } - void setDamping( const osg::Vec3& damping ) { _damping = damping; } - - /// Set the damping factors to one value - void setDamping( float x ) { _damping.set(x, x, x); } - - /// Get the damping factors - void getDamping( float& x, float& y, float& z ) const - { x = _damping.x(); y = _damping.y(); z = _damping.z(); } - - const osg::Vec3& getDamping() const { return _damping; } - - /// Set the velocity cutoff factors - void setCutoff( float low, float high ) { _cutoffLow = low; _cutoffHigh = high; } - void setCutoffLow( float low ) { _cutoffLow = low; } - void setCutoffHigh( float low ) { _cutoffHigh = low; } - - /// Get the velocity cutoff factors - void getCutoff( float& low, float& high ) const { low = _cutoffLow; high = _cutoffHigh; } - float getCutoffLow() const { return _cutoffLow; } - float getCutoffHigh() const { return _cutoffHigh; } - - /// Apply the acceleration to a particle. Do not call this method manually. - inline void operate( Particle* P, double dt ); - -protected: - virtual ~DampingOperator() {} - DampingOperator& operator=( const DampingOperator& ) { return *this; } - - osg::Vec3 _damping; - float _cutoffLow; - float _cutoffHigh; -}; - -// INLINE METHODS - -inline void DampingOperator::operate( Particle* P, double dt ) -{ - const osg::Vec3& vel = P->getVelocity(); - float length2 = vel.length2(); - if ( length2>=_cutoffLow && length2<=_cutoffHigh ) - { - osg::Vec3 newvel( vel.x() * (1.0f - (1.0f - _damping.x()) * dt), - vel.y() * (1.0f - (1.0f - _damping.y()) * dt), - vel.z() * (1.0f - (1.0f - _damping.z()) * dt) ); - P->setVelocity( newvel ); - } -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/DomainOperator b/libs/lib/mac32/include/osgParticle/DomainOperator deleted file mode 100644 index f7c9e087b..000000000 --- a/libs/lib/mac32/include/osgParticle/DomainOperator +++ /dev/null @@ -1,235 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGPARTICLE_DOMAINOPERATOR -#define OSGPARTICLE_DOMAINOPERATOR - -#include -#include -#include - -namespace osgParticle -{ - - -/** A domain operator which accepts different domain shapes as the parameter. - It can be derived to implement operators that require particles interacting with domains. - Refer to David McAllister's Particle System API (http://www.particlesystems.org) -*/ -class OSGPARTICLE_EXPORT DomainOperator : public Operator -{ -public: - struct Domain - { - enum Type - { - UNDEFINED_DOMAIN = 0, - POINT_DOMAIN, - LINE_DOMAIN, - TRI_DOMAIN, - RECT_DOMAIN, - PLANE_DOMAIN, - SPHERE_DOMAIN, - BOX_DOMAIN, - DISK_DOMAIN - }; - - Domain( Type t ) : r1(0.0f), r2(0.0f), type(t) {} - osg::Plane plane; - osg::Vec3 v1; - osg::Vec3 v2; - osg::Vec3 v3; - osg::Vec3 s1; - osg::Vec3 s2; - float r1; - float r2; - Type type; - }; - - DomainOperator() - : Operator() - {} - - DomainOperator( const DomainOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) - : Operator(copy, copyop), _domains(copy._domains), _backupDomains(copy._backupDomains) - {} - - META_Object( osgParticle, DomainOperator ); - - /// Add a point domain - inline void addPointDomain( const osg::Vec3& p ); - - /// Add a line segment domain - inline void addLineSegmentDomain( const osg::Vec3& v1, const osg::Vec3& v2 ); - - /// Add a triangle domain - inline void addTriangleDomain( const osg::Vec3& v1, const osg::Vec3& v2, const osg::Vec3& v3 ); - - /// Add a rectangle domain - inline void addRectangleDomain( const osg::Vec3& corner, const osg::Vec3& w, const osg::Vec3& h ); - - /// Add a plane domain - inline void addPlaneDomain( const osg::Plane& plane ); - - /// Add a sphere domain - inline void addSphereDomain( const osg::Vec3& c, float r ); - - /// Add a box domain - inline void addBoxDomain( const osg::Vec3& min, const osg::Vec3& max ); - - /// Add a disk domain - inline void addDiskDomain( const osg::Vec3& c, const osg::Vec3& n, float r1, float r2=0.0f ); - - /// Add a domain object directly, used by the .osg wrappers and serializers. - void addDomain( const Domain& domain ) { _domains.push_back(domain); } - - /// Get a domain object directly, used by the .osg wrappers and serializers. - const Domain& getDomain( unsigned int i ) const { return _domains[i]; } - - /// Remove a domain at specific index - void removeDomain( unsigned int i ) - { if (i<_domains.size()) _domains.erase(_domains.begin() + i); } - - /// Remove all existing domains - void removeAllDomains() { _domains.clear(); } - - /// Get number of domains - unsigned int getNumDomains() const { return _domains.size(); } - - /// Apply the acceleration to a particle. Do not call this method manually. - void operate( Particle* P, double dt ); - - /// Perform some initializations. Do not call this method manually. - void beginOperate( Program* prg ); - - /// Perform some post-operations. Do not call this method manually. - void endOperate(); - -protected: - virtual ~DomainOperator() {} - DomainOperator& operator=( const DomainOperator& ) { return *this; } - - virtual void handlePoint( const Domain& domain, Particle* P, double dt ) { ignore("Point"); } - virtual void handleLineSegment( const Domain& domain, Particle* P, double dt ) { ignore("LineSegment"); } - virtual void handleTriangle( const Domain& domain, Particle* P, double dt ) { ignore("Triangle"); } - virtual void handleRectangle( const Domain& domain, Particle* P, double dt ) { ignore("Rectangle"); } - virtual void handlePlane( const Domain& domain, Particle* P, double dt ) { ignore("Plane"); } - virtual void handleSphere( const Domain& domain, Particle* P, double dt ) { ignore("Sphere"); } - virtual void handleBox( const Domain& domain, Particle* P, double dt ) { ignore("Box"); } - virtual void handleDisk( const Domain& domain, Particle* P, double dt ) { ignore("Disk"); } - - inline void computeNewBasis( const osg::Vec3&, const osg::Vec3&, osg::Vec3&, osg::Vec3& ); - inline void ignore( const std::string& func ); - - std::vector _domains; - std::vector _backupDomains; -}; - -// INLINE METHODS - -inline void DomainOperator::addPointDomain( const osg::Vec3& p ) -{ - Domain domain( Domain::POINT_DOMAIN ); - domain.v1 = p; - _domains.push_back( domain ); -} - -inline void DomainOperator::addLineSegmentDomain( const osg::Vec3& v1, const osg::Vec3& v2 ) -{ - Domain domain( Domain::LINE_DOMAIN ); - domain.v1 = v1; - domain.v2 = v2; - domain.r1 = (v2 - v1).length(); - _domains.push_back( domain ); -} - -inline void DomainOperator::addTriangleDomain( const osg::Vec3& v1, const osg::Vec3& v2, const osg::Vec3& v3 ) -{ - Domain domain( Domain::TRI_DOMAIN ); - domain.v1 = v1; - domain.v2 = v2; - domain.v3 = v3; - domain.plane.set(v1, v2, v3); - computeNewBasis( v2-v1, v3-v1, domain.s1, domain.s2 ); - _domains.push_back( domain ); -} - -inline void DomainOperator::addRectangleDomain( const osg::Vec3& corner, const osg::Vec3& w, const osg::Vec3& h ) -{ - Domain domain( Domain::RECT_DOMAIN ); - domain.v1 = corner; - domain.v2 = w; - domain.v3 = h; - domain.plane.set(corner, corner+w, corner+h); - computeNewBasis( w, h, domain.s1, domain.s2 ); - _domains.push_back( domain ); -} - -inline void DomainOperator::addPlaneDomain( const osg::Plane& plane ) -{ - Domain domain( Domain::PLANE_DOMAIN ); - domain.plane.set(plane); - _domains.push_back( domain ); -} - -inline void DomainOperator::addSphereDomain( const osg::Vec3& c, float r ) -{ - Domain domain( Domain::SPHERE_DOMAIN ); - domain.v1 = c; - domain.r1 = r; - _domains.push_back( domain ); -} - -inline void DomainOperator::addBoxDomain( const osg::Vec3& min, const osg::Vec3& max ) -{ - Domain domain( Domain::BOX_DOMAIN ); - domain.v1 = min; - domain.v2 = max; - _domains.push_back( domain ); -} - -inline void DomainOperator::addDiskDomain( const osg::Vec3& c, const osg::Vec3& n, float r1, float r2 ) -{ - Domain domain( Domain::DISK_DOMAIN ); - domain.v1 = c; - domain.v2 = n; - domain.r1 = r1; - domain.r2 = r2; - domain.plane.set(n, c); - _domains.push_back( domain ); -} - -inline void DomainOperator::computeNewBasis( const osg::Vec3& u, const osg::Vec3& v, osg::Vec3& s1, osg::Vec3& s2 ) -{ - // Copied from David McAllister's Particle System API (http://www.particlesystems.org), pDomain.h - osg::Vec3 w = u ^ v; - float det = w.z()*u.x()*v.y() - w.z()*u.y()*v.x() - u.z()*w.x()*v.y() - - u.x()*v.z()*w.y() + v.z()*w.x()*u.y() + u.z()*v.x()*w.y(); - det = 1.0f / det; - - s1.set( v.y()*w.z() - v.z()*w.y(), v.z()*w.x() - v.x()*w.z(), v.x()*w.y() - v.y()*w.x() ); - s1 = s1 * det; - s2.set( u.y()*w.z() - u.z()*w.y(), u.z()*w.x() - u.x()*w.z(), u.x()*w.y() - u.y()*w.x() ); - s2 = s2 * (-det); -} - -inline void DomainOperator::ignore( const std::string& func ) -{ - OSG_NOTICE << className() << ": " << func << " domain not yet implemented. " << std::endl; -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Emitter b/libs/lib/mac32/include/osgParticle/Emitter deleted file mode 100644 index 4c8340457..000000000 --- a/libs/lib/mac32/include/osgParticle/Emitter +++ /dev/null @@ -1,105 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_EMITTER -#define OSGPARTICLE_EMITTER 1 - -#include -#include -#include - -#include -#include -#include -#include - -namespace osgParticle -{ - - /** An abstract base class for particle emitters. - Descendant classes must override the emitParticles() method to generate new particles by - calling the ParticleSystem::createParticle() method on the particle system associated - to the emitter. - */ - class OSGPARTICLE_EXPORT Emitter: public ParticleProcessor { - public: - Emitter(); - Emitter(const Emitter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "Emitter"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } } - - /// Get the particle template. - inline const Particle& getParticleTemplate() const; - - /// Set the particle template (particle is copied). - inline void setParticleTemplate(const Particle& p); - - /// Return whether the particle system's default template should be used. - inline bool getUseDefaultTemplate() const; - - /** Set whether the default particle template should be used. - When this flag is true, the particle template is ignored, and the - particle system's default template is used instead. - */ - inline void setUseDefaultTemplate(bool v); - - protected: - virtual ~Emitter() {} - Emitter& operator=(const Emitter&) { return *this; } - - inline void process(double dt); - - virtual void emitParticles(double dt) = 0; - - bool _usedeftemp; - Particle _ptemp; - }; - - // INLINE FUNCTIONS - - inline const Particle& Emitter::getParticleTemplate() const - { - return _ptemp; - } - - inline void Emitter::setParticleTemplate(const Particle& p) - { - _ptemp = p; - _usedeftemp = false; - } - - inline bool Emitter::getUseDefaultTemplate() const - { - return _usedeftemp; - } - - inline void Emitter::setUseDefaultTemplate(bool v) - { - _usedeftemp = v; - } - - inline void Emitter::process(double dt) - { - emitParticles(dt); - } - - -} - - -#endif - diff --git a/libs/lib/mac32/include/osgParticle/ExplosionDebrisEffect b/libs/lib/mac32/include/osgParticle/ExplosionDebrisEffect deleted file mode 100644 index 521b84792..000000000 --- a/libs/lib/mac32/include/osgParticle/ExplosionDebrisEffect +++ /dev/null @@ -1,56 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_EXPLOSIONDEBRISEFFECT -#define OSGPARTICLE_EXPLOSIONDEBRISEFFECT - -#include -#include -#include - -namespace osgParticle -{ - - class OSGPARTICLE_EXPORT ExplosionDebrisEffect : public ParticleEffect - { - public: - - explicit ExplosionDebrisEffect(bool automaticSetup=true); - - ExplosionDebrisEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f); - - ExplosionDebrisEffect(const ExplosionDebrisEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,ExplosionDebrisEffect); - - virtual void setDefaults(); - - virtual void setUpEmitterAndProgram(); - - virtual Emitter* getEmitter() { return _emitter.get(); } - virtual const Emitter* getEmitter() const { return _emitter.get(); } - - virtual Program* getProgram() { return _program.get(); } - virtual const Program* getProgram() const { return _program.get(); } - - protected: - - virtual ~ExplosionDebrisEffect() {} - - osg::ref_ptr _emitter; - osg::ref_ptr _program; - - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ExplosionEffect b/libs/lib/mac32/include/osgParticle/ExplosionEffect deleted file mode 100644 index 39ce0838f..000000000 --- a/libs/lib/mac32/include/osgParticle/ExplosionEffect +++ /dev/null @@ -1,56 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_EXPLOSIONEFFECT -#define OSGPARTICLE_EXPLOSIONEFFECT - -#include -#include -#include - -namespace osgParticle -{ - - class OSGPARTICLE_EXPORT ExplosionEffect : public ParticleEffect - { - public: - - explicit ExplosionEffect(bool automaticSetup=true); - - ExplosionEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f); - - ExplosionEffect(const ExplosionEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,ExplosionEffect); - - virtual void setDefaults(); - - virtual void setUpEmitterAndProgram(); - - virtual Emitter* getEmitter() { return _emitter.get(); } - virtual const Emitter* getEmitter() const { return _emitter.get(); } - - virtual Program* getProgram() { return _program.get(); } - virtual const Program* getProgram() const { return _program.get(); } - - protected: - - virtual ~ExplosionEffect() {} - - osg::ref_ptr _emitter; - osg::ref_ptr _program; - - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ExplosionOperator b/libs/lib/mac32/include/osgParticle/ExplosionOperator deleted file mode 100644 index b781fc6d3..000000000 --- a/libs/lib/mac32/include/osgParticle/ExplosionOperator +++ /dev/null @@ -1,127 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGPARTICLE_EXPLOSIONOPERATOR -#define OSGPARTICLE_EXPLOSIONOPERATOR - -#include -#include -#include - -namespace osgParticle -{ - - -/** An explosion operator exerts force on each particle away from the explosion center. - Refer to David McAllister's Particle System API (http://www.particlesystems.org) -*/ -class ExplosionOperator : public Operator -{ -public: - ExplosionOperator() - : Operator(), _radius(1.0f), - _magnitude(1.0f), _epsilon(1e-3), _sigma(1.0f), - _inexp(0.0f), _outexp(0.0f) - {} - - ExplosionOperator( const ExplosionOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) - : Operator(copy, copyop), _center(copy._center), _radius(copy._radius), - _magnitude(copy._magnitude), _epsilon(copy._epsilon), _sigma(copy._sigma), - _inexp(copy._inexp), _outexp(copy._outexp) - {} - - META_Object( osgParticle, ExplosionOperator ); - - /// Set the center of shock wave - void setCenter( const osg::Vec3& c ) { _center = c; } - - /// Get the center of shock wave - const osg::Vec3& getCenter() const { return _center; } - - /// Set the radius of wave peak - void setRadius( float r ) { _radius = r; } - - /// Get the radius of wave peak - float getRadius() const { return _radius; } - - /// Set the acceleration scale - void setMagnitude( float mag ) { _magnitude = mag; } - - /// Get the acceleration scale - float getMagnitude() const { return _magnitude; } - - /// Set the acceleration epsilon - void setEpsilon( float eps ) { _epsilon = eps; } - - /// Get the acceleration epsilon - float getEpsilon() const { return _epsilon; } - - /// Set broadness of the strength of the wave - void setSigma( float s ) { _sigma = s; } - - /// Get broadness of the strength of the wave - float getSigma() const { return _sigma; } - - /// Apply the acceleration to a particle. Do not call this method manually. - inline void operate( Particle* P, double dt ); - - /// Perform some initializations. Do not call this method manually. - inline void beginOperate( Program* prg ); - -protected: - virtual ~ExplosionOperator() {} - ExplosionOperator& operator=( const ExplosionOperator& ) { return *this; } - - osg::Vec3 _center; - osg::Vec3 _xf_center; - float _radius; - float _magnitude; - float _epsilon; - float _sigma; - float _inexp; - float _outexp; -}; - -// INLINE METHODS - -inline void ExplosionOperator::operate( Particle* P, double dt ) -{ - osg::Vec3 dir = P->getPosition() - _xf_center; - float length = dir.length(); - float distanceFromWave2 = (_radius - length) * (_radius - length); - float Gd = exp(distanceFromWave2 * _inexp) * _outexp; - float factor = (_magnitude * dt) / (length * (_epsilon+length*length)); - P->addVelocity( dir * (Gd * factor) ); -} - -inline void ExplosionOperator::beginOperate( Program* prg ) -{ - if ( prg->getReferenceFrame()==ModularProgram::RELATIVE_RF ) - { - _xf_center = prg->transformLocalToWorld(_center); - } - else - { - _xf_center = _center; - } - - float oneOverSigma = (_sigma!=0.0f ? (1.0f / _sigma) : 1.0f); - _inexp = -0.5f * oneOverSigma * oneOverSigma; - _outexp = oneOverSigma / sqrt(osg::PI * 2.0f); -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Export b/libs/lib/mac32/include/osgParticle/Export deleted file mode 100644 index c910514c6..000000000 --- a/libs/lib/mac32/include/osgParticle/Export +++ /dev/null @@ -1,51 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_EXPORT_ -#define OSGPARTICLE_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGPARTICLE_EXPORT - # elif defined( OSGPARTICLE_LIBRARY ) - # define OSGPARTICLE_EXPORT __declspec(dllexport) - # else - # define OSGPARTICLE_EXPORT __declspec(dllimport) - # endif -#else - # define OSGPARTICLE_EXPORT -#endif - -/** - -\namespace osgParticle - -The osgParticle library is a NodeKit that extends the core scene graph to support particle effects. -*/ - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/FireEffect b/libs/lib/mac32/include/osgParticle/FireEffect deleted file mode 100644 index 852eeb297..000000000 --- a/libs/lib/mac32/include/osgParticle/FireEffect +++ /dev/null @@ -1,57 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_FIREEFFECT -#define OSGPARTICLE_FIREEFFECT - -#include -#include -#include - -namespace osgParticle -{ - - class OSGPARTICLE_EXPORT FireEffect : public ParticleEffect - { - public: - - explicit FireEffect(bool automaticSetup=true); - - FireEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f); - - FireEffect(const FireEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,FireEffect); - - virtual void setDefaults(); - - virtual void setUpEmitterAndProgram(); - - virtual Emitter* getEmitter() { return _emitter.get(); } - virtual const Emitter* getEmitter() const { return _emitter.get(); } - - virtual Program* getProgram() { return _program.get(); } - virtual const Program* getProgram() const { return _program.get(); } - - protected: - - virtual ~FireEffect() {} - - osg::ref_ptr _emitter; - osg::ref_ptr _program; - - - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/FluidFrictionOperator b/libs/lib/mac32/include/osgParticle/FluidFrictionOperator deleted file mode 100644 index 27b66ee59..000000000 --- a/libs/lib/mac32/include/osgParticle/FluidFrictionOperator +++ /dev/null @@ -1,148 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_FLUIDFRICTIONOPERATOR -#define OSGPARTICLE_FLUIDFRICTIONOPERATOR 1 - -#include -#include - -#include -#include -#include - -namespace osgParticle -{ - - class Particle; - - /** An operator that simulates the friction of a fluid. - By using this operator you can let the particles move in a fluid of a given density - and viscosity. There are two functions to quickly setup the parameters for pure water - and air. You can decide whether to compute the forces using the particle's physical - radius or another value, by calling the setOverrideRadius() method. - */ - class OSGPARTICLE_EXPORT FluidFrictionOperator: public Operator { - public: - - FluidFrictionOperator(); - FluidFrictionOperator(const FluidFrictionOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, FluidFrictionOperator); - - /// Set the density of the fluid. - inline void setFluidDensity(float d); - - /// Get the density of the fluid. - inline float getFluidDensity() const; - - /// Set the viscosity of the fluid. - inline void setFluidViscosity(float v); - - /// Get the viscosity of the fluid. - inline float getFluidViscosity() const; - - /// Set the wind vector. - inline void setWind(const osg::Vec3& wind) { _wind = wind; } - - /// Get the wind vector. - inline const osg::Vec3& getWind() const { return _wind; } - - /// Set the overriden radius value (pass 0 if you want to use particle's radius). - inline void setOverrideRadius(float r); - - /// Get the overriden radius value. - inline float getOverrideRadius() const; - - /// Set the fluid parameters as for air (20°C temperature). - inline void setFluidToAir(); - - /// Set the fluid parameters as for pure water (20°C temperature). - inline void setFluidToWater(); - - /// Apply the friction forces to a particle. Do not call this method manually. - void operate(Particle* P, double dt); - - /// Perform some initializations. Do not call this method manually. - inline void beginOperate(Program* prg); - - protected: - virtual ~FluidFrictionOperator() {} - FluidFrictionOperator &operator=(const FluidFrictionOperator &) { return *this; } - - private: - float _coeff_A; - float _coeff_B; - float _density; - float _viscosity; - float _ovr_rad; - osg::Vec3 _wind; - Program* _current_program; - }; - - // INLINE FUNCTIONS - - inline float FluidFrictionOperator::getFluidDensity() const - { - return _density; - } - - inline float FluidFrictionOperator::getFluidViscosity() const - { - return _viscosity; - } - - inline void FluidFrictionOperator::setFluidDensity(float d) - { - _density = d; - _coeff_B = 0.2f * osg::PI * _density; - } - - inline void FluidFrictionOperator::setFluidViscosity(float v) - { - _viscosity = v; - _coeff_A = 6 * osg::PI * _viscosity; - } - - inline void FluidFrictionOperator::setFluidToAir() - { - setFluidViscosity(1.8e-5f); - setFluidDensity(1.2929f); - } - - inline void FluidFrictionOperator::setFluidToWater() - { - setFluidViscosity(1.002e-3f); - setFluidDensity(1.0f); - } - - inline float FluidFrictionOperator::getOverrideRadius() const - { - return _ovr_rad; - } - - inline void FluidFrictionOperator::setOverrideRadius(float r) - { - _ovr_rad = r; - } - - inline void FluidFrictionOperator::beginOperate(Program* prg) - { - _current_program = prg; - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/FluidProgram b/libs/lib/mac32/include/osgParticle/FluidProgram deleted file mode 100644 index 53b6a5bf5..000000000 --- a/libs/lib/mac32/include/osgParticle/FluidProgram +++ /dev/null @@ -1,114 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_FLUIDPROGRAM -#define OSGPARTICLE_FLUIDPROGRAM 1 - -#include -#include - -#include -#include -#include -#include - -namespace osgParticle -{ - - /** A program class for performing operations on particles using a sequence of operators. - To use a FluidProgram you have to create some Operator objects and - add them to the program. - All operators will be applied to each particle in the same order they've been added to the program. - */ - class OSGPARTICLE_EXPORT FluidProgram: public Program { - public: - FluidProgram(); - FluidProgram(const FluidProgram& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,FluidProgram); - - /// Set the viscosity of the fluid. - inline void setFluidViscosity(float v) - { - _viscosity = v; - _viscosityCoefficient = 6 * osg::PI * _viscosity; - } - - /// Get the viscosity of the fluid. - inline float getFluidViscosity() const { return _viscosity; } - - /// Set the density of the fluid. - inline void setFluidDensity(float d) - { - _density = d; - _densityCoefficient = 0.2f * osg::PI * _density; - } - - /// Get the density of the fluid. - inline float getFluidDensity() const { return _density; } - - - /// Set the wind vector. - inline void setWind(const osg::Vec3& wind) { _wind = wind; } - - /// Get the wind vector. - inline const osg::Vec3& getWind() const { return _wind; } - - /// Set the acceleration vector. - inline void setAcceleration(const osg::Vec3& v) { _acceleration = v; } - - /// Get the acceleration vector. - inline const osg::Vec3& getAcceleration() const { return _acceleration; } - - /** Set the acceleration vector to the gravity on earth (0, 0, -9.81). - The acceleration will be multiplied by the scale parameter. - */ - inline void setToGravity(float scale = 1.0f) { _acceleration.set(0, 0, -9.81f*scale); } - - /// Set the fluid parameters as for air (20°C temperature). - inline void setFluidToAir() - { - setToGravity(1.0f); - setFluidDensity(1.2929f); - setFluidViscosity(1.8e-5f); - } - - /// Set the fluid parameters as for pure water (20°C temperature). - inline void setFluidToWater() - { - setToGravity(1.0f); - setFluidDensity(1.0f); - setFluidViscosity(1.002e-3f); - } - - - protected: - - virtual ~FluidProgram() {} - FluidProgram& operator=(const FluidProgram&) { return *this; } - - virtual void execute(double dt); - - osg::Vec3 _acceleration; - float _viscosity; - float _density; - osg::Vec3 _wind; - - float _viscosityCoefficient; - float _densityCoefficient; - }; - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ForceOperator b/libs/lib/mac32/include/osgParticle/ForceOperator deleted file mode 100644 index 3daba27f5..000000000 --- a/libs/lib/mac32/include/osgParticle/ForceOperator +++ /dev/null @@ -1,98 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_FORCEOPERATOR -#define OSGPARTICLE_FORCEOPERATOR 1 - -#include -#include -#include - -#include -#include -#include - -namespace osgParticle -{ - - /** An operator that applies a constant force to the particles. - * Remember that if the mass of particles is expressed in kg and the lengths are - * expressed in meters, then the force should be expressed in Newtons. - */ - class ForceOperator: public Operator { - public: - inline ForceOperator(); - inline ForceOperator(const ForceOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, ForceOperator); - - /// Get the force vector. - inline const osg::Vec3& getForce() const; - - /// Set the force vector. - inline void setForce(const osg::Vec3& f); - - /// Apply the force to a particle. Do not call this method manually. - inline void operate(Particle* P, double dt); - - /// Perform some initialization. Do not call this method manually. - inline void beginOperate(Program *prg); - - protected: - virtual ~ForceOperator() {}; - ForceOperator& operator=(const ForceOperator&) { return *this; } - - private: - osg::Vec3 _force; - osg::Vec3 _xf_force; - }; - - // INLINE FUNCTIONS - - inline ForceOperator::ForceOperator() - : Operator(), _force(0, 0, 0) - { - } - - inline ForceOperator::ForceOperator(const ForceOperator& copy, const osg::CopyOp& copyop) - : Operator(copy, copyop), _force(copy._force) - { - } - - inline const osg::Vec3& ForceOperator::getForce() const - { - return _force; - } - - inline void ForceOperator::setForce(const osg::Vec3& v) - { - _force = v; - } - - inline void ForceOperator::operate(Particle* P, double dt) - { - P->addVelocity(_xf_force * (P->getMassInv() * dt)); - } - - inline void ForceOperator::beginOperate(Program *prg) - { - if (prg->getReferenceFrame() == ModularProgram::RELATIVE_RF) { - _xf_force = prg->rotateLocalToWorld(_force); - } else { - _xf_force = _force; - } - } -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Interpolator b/libs/lib/mac32/include/osgParticle/Interpolator deleted file mode 100644 index bebb0fb98..000000000 --- a/libs/lib/mac32/include/osgParticle/Interpolator +++ /dev/null @@ -1,87 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_INTERPOLATOR -#define OSGPARTICLE_INTERPOLATOR - -#include - -#include -#include -#include -#include -#include - -namespace osgParticle -{ - - /// An abstract base class for implementing interpolators. - class Interpolator : public osg::Object { - public: - Interpolator() - : osg::Object() {} - - Interpolator(const Interpolator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) - : osg::Object(copy, copyop) {} - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "Interpolator"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - - /// Interpolate between floats. Must be overriden in descendant classes. - virtual float interpolate(float t, float y1, float y2) const = 0; - - /// Interpolate between 2-dimensional vectors. Default behavior is to interpolate each component separately. - virtual osg::Vec2 interpolate(float t, const osg::Vec2& y1, const osg::Vec2& y2) const - { - return osg::Vec2( - interpolate(t, y1.x(), y2.x()), - interpolate(t, y1.y(), y2.y()) - ); - } - - /// Interpolate between 3-dimensional vectors. Default behavior is to interpolate each component separately. - virtual osg::Vec3 interpolate(float t, const osg::Vec3& y1, const osg::Vec3& y2) const - { - return osg::Vec3( - interpolate(t, y1.x(), y2.x()), - interpolate(t, y1.y(), y2.y()), - interpolate(t, y1.z(), y2.z()) - ); - } - - /// Interpolate between 4-dimensional vectors. Default behavior is to interpolate each component separately. - virtual osg::Vec4 interpolate(float t, const osg::Vec4& y1, const osg::Vec4& y2) const - { - return osg::Vec4( - interpolate(t, y1.x(), y2.x()), - interpolate(t, y1.y(), y2.y()), - interpolate(t, y1.z(), y2.z()), - interpolate(t, y1.w(), y2.w()) - ); - } - - template - ValueType interpolate(float t, const range& r) const - { - return interpolate(t, r.minimum, r.maximum); - } - - protected: - virtual ~Interpolator() {} - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/LinearInterpolator b/libs/lib/mac32/include/osgParticle/LinearInterpolator deleted file mode 100644 index 83fb9987f..000000000 --- a/libs/lib/mac32/include/osgParticle/LinearInterpolator +++ /dev/null @@ -1,51 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_LINEARINTERPOLATOR -#define OSGPARTICLE_LINEARINTERPOLATOR - -#include - -#include -#include -#include -#include - -namespace osgParticle -{ - - /// A linear interpolator. - class LinearInterpolator: public Interpolator - { - public: - LinearInterpolator() - : Interpolator() {} - - LinearInterpolator(const LinearInterpolator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) - : Interpolator(copy, copyop) {} - - META_Object(osgParticle, LinearInterpolator); - - virtual float interpolate(float t, float y1, float y2) const - { - return y1 + (y2 - y1) * t; - } - - protected: - virtual ~LinearInterpolator() {} - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ModularEmitter b/libs/lib/mac32/include/osgParticle/ModularEmitter deleted file mode 100644 index a9584f782..000000000 --- a/libs/lib/mac32/include/osgParticle/ModularEmitter +++ /dev/null @@ -1,158 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_MODULAREMITTER -#define OSGPARTICLE_MODULAREMITTER 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace osgParticle -{ - - /** An emitter class that holds three objects to control the creation of particles. - These objects are a counter, a placer and a shooter. - The counter controls the number of particles to be emitted at each frame; - the placer must initialize the particle's position vector, while the shooter initializes - its velocity vector. - You can use the predefined counter/placer/shooter classes, or you can create your own. - */ - class OSGPARTICLE_EXPORT ModularEmitter: public Emitter { - public: - ModularEmitter(); - ModularEmitter(const ModularEmitter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,ModularEmitter); - - /// Get the counter object. - inline Counter* getCounter(); - - /// Get the const Counter object. - inline const Counter* getCounter() const; - - /// Set the Counter object. - inline void setCounter(Counter* c); - - /// Get the ratio between number of particle to create in compensation for movement of the emitter - inline float getNumParticlesToCreateMovementCompensationRatio() const; - - /// Set the ratio between number of particle to create in compenstation for movement of the emitter - inline void setNumParticlesToCreateMovementCompensationRatio(float r); - - - /// Get the Placer object. - inline Placer* getPlacer(); - - /// Get the const Placer object. - inline const Placer* getPlacer() const; - - /// Set the Placer object. - inline void setPlacer(Placer* p); - - /// Get the Shooter object. - inline Shooter *getShooter(); - - /// Get the const Shooter object. - inline const Shooter *getShooter() const; - - /// Set the Shooter object. - inline void setShooter(Shooter *s); - - protected: - virtual ~ModularEmitter() {} - ModularEmitter &operator=(const ModularEmitter &) { return *this; } - - virtual void emitParticles(double dt); - - private: - - float _numParticleToCreateMovementCompensationRatio; - osg::ref_ptr _counter; - osg::ref_ptr _placer; - osg::ref_ptr _shooter; - }; - - // INLINE FUNCTIONS - - inline Counter* ModularEmitter::getCounter() - { - return _counter.get(); - } - - inline const Counter* ModularEmitter::getCounter() const - { - return _counter.get(); - } - - inline void ModularEmitter::setCounter(Counter* c) - { - _counter = c; - } - - inline float ModularEmitter::getNumParticlesToCreateMovementCompensationRatio() const - { - return _numParticleToCreateMovementCompensationRatio; - } - - inline void ModularEmitter::setNumParticlesToCreateMovementCompensationRatio(float r) - { - _numParticleToCreateMovementCompensationRatio = r; - } - - inline Placer* ModularEmitter::getPlacer() - { - return _placer.get(); - } - - inline const Placer* ModularEmitter::getPlacer() const - { - return _placer.get(); - } - - inline void ModularEmitter::setPlacer(Placer* p) - { - _placer = p; - } - - inline Shooter *ModularEmitter::getShooter() - { - return _shooter.get(); - } - - inline const Shooter *ModularEmitter::getShooter() const - { - return _shooter.get(); - } - - inline void ModularEmitter::setShooter(Shooter *s) - { - _shooter = s; - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ModularProgram b/libs/lib/mac32/include/osgParticle/ModularProgram deleted file mode 100644 index 537fcc6e2..000000000 --- a/libs/lib/mac32/include/osgParticle/ModularProgram +++ /dev/null @@ -1,99 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_MODULARPROGRAM -#define OSGPARTICLE_MODULARPROGRAM 1 - -#include -#include -#include - -#include -#include -#include -#include - -namespace osgParticle -{ - - /** A program class for performing operations on particles using a sequence of operators. - To use a ModularProgram you have to create some Operator objects and - add them to the program. - All operators will be applied to each particle in the same order they've been added to the program. - */ - class OSGPARTICLE_EXPORT ModularProgram: public Program { - public: - ModularProgram(); - ModularProgram(const ModularProgram& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,ModularProgram); - - /// Get the number of operators. - inline int numOperators() const; - - /// Add an operator to the list. - inline void addOperator(Operator* o); - - /// Get a pointer to an operator in the list. - inline Operator* getOperator(int i); - - /// Get a const pointer to an operator in the list. - inline const Operator* getOperator(int i) const; - - /// Remove an operator from the list. - inline void removeOperator(int i); - - protected: - virtual ~ModularProgram() {} - ModularProgram& operator=(const ModularProgram&) { return *this; } - - void execute(double dt); - - private: - typedef std::vector > Operator_vector; - - Operator_vector _operators; - }; - - // INLINE FUNCTIONS - - inline int ModularProgram::numOperators() const - { - return static_cast(_operators.size()); - } - - inline void ModularProgram::addOperator(Operator* o) - { - _operators.push_back(o); - } - - inline Operator* ModularProgram::getOperator(int i) - { - return _operators[i].get(); - } - - inline const Operator* ModularProgram::getOperator(int i) const - { - return _operators[i].get(); - } - - inline void ModularProgram::removeOperator(int i) - { - _operators.erase(_operators.begin()+i); - } - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/MultiSegmentPlacer b/libs/lib/mac32/include/osgParticle/MultiSegmentPlacer deleted file mode 100644 index 19e103319..000000000 --- a/libs/lib/mac32/include/osgParticle/MultiSegmentPlacer +++ /dev/null @@ -1,144 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_MULTISEGMENT_PLACER -#define OSGPARTICLE_MULTISEGMENT_PLACER 1 - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -namespace osgParticle { - - /** A polyline-shaped particle placer. - This placer class sets the position of incoming particles by choosing a random point on the - specified sequence of connected segments. - */ - class OSGPARTICLE_EXPORT MultiSegmentPlacer: public Placer { - public: - MultiSegmentPlacer(); - MultiSegmentPlacer(const MultiSegmentPlacer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, MultiSegmentPlacer); - - /// Get the number of vertices which define the segments. - inline int numVertices() const; - - /// Get a vertex. - inline const osg::Vec3& getVertex(int i) const; - - /// Set a vertex. - inline void setVertex(int i, const osg::Vec3& v); - - /// Set a vertex. - inline void setVertex(int i, float x, float y, float z); - - /// Add a vertex. - inline void addVertex(const osg::Vec3& v); - - /// Add a vertex. - inline void addVertex(float x, float y, float z); - - /// Remove a vertex. - inline void removeVertex(int i); - - /// Place a partice. Called automatically by ModularEmitter, do not call this method manually. - void place(Particle* P) const; - - /// return the length of the multi-segment - inline float volume() const; - - /// return the control position - inline osg::Vec3 getControlPosition() const; - - protected: - virtual ~MultiSegmentPlacer() {} - MultiSegmentPlacer& operator=(const MultiSegmentPlacer&) { return *this; } - - private: - typedef std::pair Vertex_data; - typedef std::vector Vertex_vector; - - Vertex_vector _vx; - float _total_length; - - void recompute_length(); - }; - - // INLINE FUNCTIONS - - - inline int MultiSegmentPlacer::numVertices() const - { - return static_cast(_vx.size()); - } - - inline const osg::Vec3& MultiSegmentPlacer::getVertex(int i) const - { - return _vx[i].first; - } - - inline void MultiSegmentPlacer::setVertex(int i, const osg::Vec3& v) - { - _vx[i].first = v; - recompute_length(); - } - - inline void MultiSegmentPlacer::setVertex(int i, float x, float y, float z) - { - _vx[i].first.set(x, y, z); - recompute_length(); - } - - inline void MultiSegmentPlacer::addVertex(const osg::Vec3& v) - { - float l = 0; - if (_vx.size() > 0) { - l = (v - _vx.back().first).length(); - } - _total_length += l; - _vx.push_back(std::make_pair(v, _total_length)); - } - - inline void MultiSegmentPlacer::addVertex(float x, float y, float z) - { - addVertex(osg::Vec3(x, y, z)); - } - - inline void MultiSegmentPlacer::removeVertex(int i) - { - _vx.erase(_vx.begin()+i); - recompute_length(); - } - - inline float MultiSegmentPlacer::volume() const - { - return _total_length; - } - - inline osg::Vec3 MultiSegmentPlacer::getControlPosition() const - { - return _vx.empty() ? osg::Vec3(0.0f,0.0f,0.0f) : _vx[0].first; - } - -} -#endif diff --git a/libs/lib/mac32/include/osgParticle/Operator b/libs/lib/mac32/include/osgParticle/Operator deleted file mode 100644 index 2bd08bee5..000000000 --- a/libs/lib/mac32/include/osgParticle/Operator +++ /dev/null @@ -1,115 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_OPERATOR -#define OSGPARTICLE_OPERATOR 1 - -#include - -#include -#include -#include - -namespace osgParticle -{ - - // forward declaration to avoid including the whole header file - class Particle; - - /** An abstract base class used by ModularProgram to perform operations on particles before they are updated. - To implement a new operator, derive from this class and override the operate() method. - You should also override the beginOperate() method to query the calling program for the reference frame - used, and initialize the right transformations if needed. - */ - class Operator: public osg::Object { - public: - inline Operator(); - inline Operator(const Operator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "Operator"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - - /// Get whether this operator is enabled. - inline bool isEnabled() const; - - /// Enable or disable this operator. - inline void setEnabled(bool v); - - /** Do something on all emitted particles. - This method is called by ModularProgram objects to perform some operations - on the particles. By default, it will call the operate() method for each particle. - You must override it in descendant classes. - */ - virtual void operateParticles(ParticleSystem* ps, double dt) - { - int n = ps->numParticles(); - for (int i=0; igetParticle(i); - if (P->isAlive() && isEnabled()) operate(P, dt); - } - } - - /** Do something on a particle. - You must override it in descendant classes. Common operations - consist of modifying the particle's velocity vector. The dt parameter is - the time elapsed from last operation. - */ - virtual void operate(Particle* P, double dt) = 0; - - /** Do something before processing particles via the operate() method. - Overriding this method could be necessary to query the calling Program object - for the current reference frame. If the reference frame is RELATIVE_RF, then your - class should prepare itself to do all operations in local coordinates. - */ - virtual void beginOperate(Program *) {} - - /// Do something after all particles have been processed. - virtual void endOperate() {} - - protected: - virtual ~Operator() {} - Operator &operator=(const Operator &) { return *this; } - - private: - bool _enabled; - }; - - // INLINE FUNCTIONS - - inline Operator::Operator() - : osg::Object(), _enabled(true) - { - } - - inline Operator::Operator(const Operator& copy, const osg::CopyOp& copyop) - : osg::Object(copy, copyop), _enabled(copy._enabled) - { - } - - inline bool Operator::isEnabled() const - { - return _enabled; - } - - inline void Operator::setEnabled(bool v) - { - _enabled = v; - } - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/OrbitOperator b/libs/lib/mac32/include/osgParticle/OrbitOperator deleted file mode 100644 index 67a6dcf9d..000000000 --- a/libs/lib/mac32/include/osgParticle/OrbitOperator +++ /dev/null @@ -1,112 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGPARTICLE_ORBITOPERATOR -#define OSGPARTICLE_ORBITOPERATOR - -#include -#include -#include - -namespace osgParticle -{ - - -/** An orbit operator forces particles in the orbit around a point. - Refer to David McAllister's Particle System API (http://www.particlesystems.org) -*/ -class OrbitOperator : public Operator -{ -public: - OrbitOperator() - : Operator(), _magnitude(1.0f), _epsilon(1e-3), _maxRadius(FLT_MAX) - {} - - OrbitOperator( const OrbitOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) - : Operator(copy, copyop), _center(copy._center), _magnitude(copy._magnitude), - _epsilon(copy._epsilon), _maxRadius(copy._maxRadius) - {} - - META_Object( osgParticle, OrbitOperator ); - - /// Set the center of orbit - void setCenter( const osg::Vec3& c ) { _center = c; } - - /// Get the center of orbit - const osg::Vec3& getCenter() const { return _center; } - - /// Set the acceleration scale - void setMagnitude( float mag ) { _magnitude = mag; } - - /// Get the acceleration scale - float getMagnitude() const { return _magnitude; } - - /// Set the acceleration epsilon - void setEpsilon( float eps ) { _epsilon = eps; } - - /// Get the acceleration epsilon - float getEpsilon() const { return _epsilon; } - - /// Set max radius between the center and the particle - void setMaxRadius( float max ) { _maxRadius = max; } - - /// Get max radius between the center and the particle - float getMaxRadius() const { return _maxRadius; } - - /// Apply the acceleration to a particle. Do not call this method manually. - inline void operate( Particle* P, double dt ); - - /// Perform some initializations. Do not call this method manually. - inline void beginOperate( Program* prg ); - -protected: - virtual ~OrbitOperator() {} - OrbitOperator& operator=( const OrbitOperator& ) { return *this; } - - osg::Vec3 _center; - osg::Vec3 _xf_center; - float _magnitude; - float _epsilon; - float _maxRadius; -}; - -// INLINE METHODS - -inline void OrbitOperator::operate( Particle* P, double dt ) -{ - osg::Vec3 dir = _xf_center - P->getPosition(); - float length = dir.length(); - if ( length<_maxRadius ) - { - P->addVelocity( dir * ((_magnitude * dt) / - (length * (_epsilon+length*length))) ); - } -} - -inline void OrbitOperator::beginOperate( Program* prg ) -{ - if ( prg->getReferenceFrame()==ModularProgram::RELATIVE_RF ) - { - _xf_center = prg->transformLocalToWorld(_center); - } - else - { - _xf_center = _center; - } -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Particle b/libs/lib/mac32/include/osgParticle/Particle deleted file mode 100644 index e5a6f9a52..000000000 --- a/libs/lib/mac32/include/osgParticle/Particle +++ /dev/null @@ -1,636 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_PARTICLE -#define OSGPARTICLE_PARTICLE 1 - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace osgParticle -{ - - // forward declare so we can reference it - class ParticleSystem; - - /** Implementation of a particle. - Objects of this class are particles, they have some graphical properties - and some physical properties. Particles are created by emitters and then placed - into Particle Systems, where they live and get updated at each frame. - Particles can either live forever (lifeTime < 0), or die after a specified - time (lifeTime >= 0). For each property which is defined as a range of values, a - "current" value will be evaluated at each frame by interpolating the min - and max values so that curr_value = min when t == 0, and - curr_value = max when t == lifeTime. - You may customize the interpolator objects to achieve any kind of transition. - If you want the particle to live forever, set its lifetime to any value <= 0; - in that case, no interpolation is done to compute real-time properties, and only - minimum values are used. - */ - class OSGPARTICLE_EXPORT Particle { - friend class ParticleSystem; - public: - - enum - { - INVALID_INDEX = -1 - }; - - /** - Shape of particles. - NOTE: the LINE shape should be used in conjunction with FIXED alignment mode (see ParticleSystem). - */ - enum Shape { - POINT, // uses GL_POINTS as primitive - QUAD, // uses GL_QUADS as primitive - QUAD_TRIANGLESTRIP, // uses GL_TRI_angleSTRIP as primitive, but each particle needs a glBegin/glEnd pair - HEXAGON, // may save some filling time, but uses more triangles - LINE, // uses GL_LINES to draw line segments that point to the direction of motion - USER // uses a user-defined drawable as primitive - }; - - Particle(); - - /// Get the shape of the particle. - inline Shape getShape() const; - - /// Set the shape of the particle. - inline void setShape(Shape s); - - /// Get whether the particle is still alive. - inline bool isAlive() const; - - /// Get the life time of the particle (in seconds). - inline double getLifeTime() const; - - /// Get the age of the particle (in seconds). - inline double getAge() const; - - /// Get the minimum and maximum values for polygon size. - inline const rangef& getSizeRange() const; - - /// Get the minimum and maximum values for alpha. - inline const rangef& getAlphaRange() const; - - /// Get the minimum and maximum values for color. - inline const rangev4& getColorRange() const; - - /// Get the interpolator for computing the size of polygons. - inline const Interpolator* getSizeInterpolator() const; - - /// Get the interpolator for computing alpha values. - inline const Interpolator* getAlphaInterpolator() const; - - /// Get the interpolator for computing color values. - inline const Interpolator* getColorInterpolator() const; - - /** Get the physical radius of the particle. - For built-in operators to work correctly, lengths must be expressed in meters. - */ - inline float getRadius() const; - - /** Get the mass of the particle. - For built-in operators to work correctly, remember that the mass is expressed in kg. - */ - inline float getMass() const; - - /// Get 1 / getMass(). - inline float getMassInv() const; - - /// Get the position vector. - inline const osg::Vec3& getPosition() const; - - /** Get the velocity vector. - For built-in operators to work correctly, remember that velocity components are expressed - in meters per second. - */ - inline const osg::Vec3& getVelocity() const; - - /// Get the previous position (the position before last update). - inline const osg::Vec3& getPreviousPosition() const; - - /// Get the angle vector. - inline const osg::Vec3& getAngle() const; - - /// Get the rotational velocity vector. - inline const osg::Vec3& getAngularVelocity() const; - - /// Get the previous angle vector. - inline const osg::Vec3& getPreviousAngle() const; - - /// Get the current color - inline const osg::Vec4& getCurrentColor() const { return _current_color; } - - /// Get the current alpha - inline float getCurrentAlpha() const { return _current_alpha; } - - /// Get the s texture coordinate of the bottom left of the particle - inline float getSTexCoord() const { return _s_coord; } - - /// Get the t texture coordinate of the bottom left of the particle - inline float getTTexCoord() const { return _t_coord; } - - /// Get width of texture tile - inline int getTileS() const; - - /// Get height of texture tile - inline int getTileT() const; - - /// Get number of texture tiles - inline int getNumTiles() const { return _end_tile - _start_tile + 1; } - - /** Kill the particle on next update - NOTE: after calling this function, the isAlive() method will still - return true until the particle is updated again. - */ - inline void kill(); - - /// Set the life time of the particle. - inline void setLifeTime(double t); - - /// Set the minimum and maximum values for polygon size. - inline void setSizeRange(const rangef& r); - - /// Set the minimum and maximum values for alpha. - inline void setAlphaRange(const rangef& r); - - /// Set the minimum and maximum values for color. - inline void setColorRange(const rangev4& r); - - /// Set the interpolator for computing size values. - inline void setSizeInterpolator(Interpolator* ri); - - /// Set the interpolator for computing alpha values. - inline void setAlphaInterpolator(Interpolator* ai); - - /// Set the interpolator for computing color values. - inline void setColorInterpolator(Interpolator* ci); - - /** Set the physical radius of the particle. - For built-in operators to work correctly, lengths must be expressed in meters. - */ - inline void setRadius(float r); - - /** Set the mass of the particle. - For built-in operators to work correctly, remember that the mass is expressed in kg. - */ - inline void setMass(float m); - - /// Set the position vector. - inline void setPosition(const osg::Vec3& p); - - /** Set the velocity vector. - For built-in operators to work correctly, remember that velocity components are expressed - in meters per second. - */ - inline void setVelocity(const osg::Vec3& v); - - /// Add a vector to the velocity vector. - inline void addVelocity(const osg::Vec3& dv); - - /// Transform position and velocity vectors by a matrix. - inline void transformPositionVelocity(const osg::Matrix& xform); - - /// Transform position and velocity vectors by a combination of two matrices - void transformPositionVelocity(const osg::Matrix& xform1, const osg::Matrix& xform2, float r); - - /// Set the angle vector. - inline void setAngle(const osg::Vec3& a); - - /** - Set the angular velocity vector. - Components x, y and z are angles of rotation around the respective axis (in radians). - */ - inline void setAngularVelocity(const osg::Vec3& v); - - /// Add a vector to the angular velocity vector. - inline void addAngularVelocity(const osg::Vec3& dv); - - /// Transform angle and angularVelocity vectors by a matrix. - inline void transformAngleVelocity(const osg::Matrix& xform); - - /** Update the particle (don't call this method manually). - This method is called automatically by ParticleSystem::update(); it - updates the graphical properties of the particle for the current time, - checks whether the particle is still alive, and then updates its position - by computing P = P + V * dt (where P is the position and V is the velocity). - */ - bool update(double dt, bool onlyTimeStamp); - - /// Perform some pre-rendering tasks. Called automatically by particle systems. - inline void beginRender(osg::GLBeginEndAdapter* gl) const; - - /// Render the particle. Called automatically by particle systems. - void render(osg::GLBeginEndAdapter* gl, const osg::Vec3& xpos, const osg::Vec3& px, const osg::Vec3& py, float scale = 1.0f) const; - - /// Render the particle with user-defined drawable - void render(osg::RenderInfo& renderInfo, const osg::Vec3& xpos, const osg::Vec3& xrot) const; - - /// Perform some post-rendering tasks. Called automatically by particle systems. - inline void endRender(osg::GLBeginEndAdapter* gl) const; - - /// Get the current (interpolated) polygon size. Valid only after the first call to update(). - inline float getCurrentSize() const; - - /// Specify how the particle texture is tiled. - /// All tiles in the given range are sequentially displayed during the lifetime - /// of the particle. When no range is given, all tiles are displayed during the lifetime. - inline void setTextureTileRange(int sTile, int tTile, int startTile, int endTile); - - /// Same as above, range starts at 0 and ends at end - inline void setTextureTile(int sTile, int tTile, int end = -1); - - /// Set the previous particle - inline void setPreviousParticle(int previous) { _previousParticle = previous; } - - /// Get the previous particle - inline int getPreviousParticle() const { return _previousParticle; } - - /// Set the next particle - inline void setNextParticle(int next) { _nextParticle = next; } - - /// Get the const next particle - inline int getNextParticle() const { return _nextParticle; } - - /// Set the depth of the particle - inline void setDepth(double d) { _depth = d; } - - /// Get the depth of the particle - inline double getDepth() const { return _depth; } - - /// Set the user-defined particle drawable - inline void setDrawable(osg::Drawable* d) { _drawable = d; } - - /// Get the user-defined particle drawable - inline osg::Drawable* getDrawable() const { return _drawable.get(); } - - /// Sorting operator - bool operator<(const Particle &P) const { return _depth < P._depth; } - - /// Method for initializing a particles texture coords as part of a connected particle system. - void setUpTexCoordsAsPartOfConnectedParticleSystem(ParticleSystem* ps); - - protected: - - Shape _shape; - - rangef _sr; - rangef _ar; - rangev4 _cr; - - osg::ref_ptr _si; - osg::ref_ptr _ai; - osg::ref_ptr _ci; - - bool _mustdie; - double _lifeTime; - - float _radius; - float _mass; - float _massinv; - osg::Vec3 _prev_pos; - osg::Vec3 _position; - osg::Vec3 _velocity; - - osg::Vec3 _prev_angle; - osg::Vec3 _angle; - osg::Vec3 _angul_arvel; - - double _t0; - - float _alive; - float _current_size; - float _current_alpha; - osg::Vec3 _base_prop; // [0] _alive [1] _current_size [2] _current_alpha - osg::Vec4 _current_color; - - float _s_tile; - float _t_tile; - int _start_tile; - int _end_tile; - int _cur_tile; - float _s_coord; - float _t_coord; - - // previous and next Particles are only used in ConnectedParticleSystems - int _previousParticle; - int _nextParticle; - - // the depth of the particle is used only when sorting is enabled - double _depth; - - // the particle drawable is used only when USER shape is enabled - osg::ref_ptr _drawable; - }; - - // INLINE FUNCTIONS - - inline Particle::Shape Particle::getShape() const - { - return _shape; - } - - inline void Particle::setShape(Shape s) - { - _shape = s; - } - - inline bool Particle::isAlive() const - { - return _alive>0.0f; - } - - inline double Particle::getLifeTime() const - { - return _lifeTime; - } - - inline double Particle::getAge() const - { - return _t0; - } - - inline float Particle::getRadius() const - { - return _radius; - } - - inline void Particle::setRadius(float r) - { - _radius = r; - } - - inline const rangef& Particle::getSizeRange() const - { - return _sr; - } - - inline const rangef& Particle::getAlphaRange() const - { - return _ar; - } - - inline const rangev4& Particle::getColorRange() const - { - return _cr; - } - - inline const Interpolator* Particle::getSizeInterpolator() const - { - return _si.get(); - } - - inline const Interpolator* Particle::getAlphaInterpolator() const - { - return _ai.get(); - } - - inline const Interpolator* Particle::getColorInterpolator() const - { - return _ci.get(); - } - - inline const osg::Vec3& Particle::getPosition() const - { - return _position; - } - - inline const osg::Vec3& Particle::getVelocity() const - { - return _velocity; - } - - inline const osg::Vec3& Particle::getPreviousPosition() const - { - return _prev_pos; - } - - inline const osg::Vec3& Particle::getAngle() const - { - return _angle; - } - - inline const osg::Vec3& Particle::getAngularVelocity() const - { - return _angul_arvel; - } - - inline const osg::Vec3& Particle::getPreviousAngle() const - { - return _prev_angle; - } - - inline int Particle::getTileS() const - { - return (_s_tile>0.0f) ? static_cast(1.0f / _s_tile) : 1; - } - - inline int Particle::getTileT() const - { - return (_t_tile>0.0f) ? static_cast(1.0f / _t_tile) : 1; - } - - inline void Particle::kill() - { - _mustdie = true; - } - - inline void Particle::setLifeTime(double t) - { - _lifeTime = t; - } - - inline void Particle::setSizeRange(const rangef& r) - { - _sr = r; - } - - inline void Particle::setAlphaRange(const rangef& r) - { - _ar = r; - } - - inline void Particle::setColorRange(const rangev4& r) - { - _cr = r; - } - - inline void Particle::setSizeInterpolator(Interpolator* ri) - { - _si = ri; - } - - inline void Particle::setAlphaInterpolator(Interpolator* ai) - { - _ai = ai; - } - - inline void Particle::setColorInterpolator(Interpolator* ci) - { - _ci = ci; - } - - inline void Particle::setPosition(const osg::Vec3& p) - { - _position = p; - } - - inline void Particle::setVelocity(const osg::Vec3& v) - { - _velocity = v; - } - - inline void Particle::addVelocity(const osg::Vec3& dv) - { - _velocity += dv; - } - - inline void Particle::transformPositionVelocity(const osg::Matrix& xform) - { - _position = xform.preMult(_position); - _velocity = osg::Matrix::transform3x3(_velocity, xform); - } - - inline void Particle::transformPositionVelocity(const osg::Matrix& xform1, const osg::Matrix& xform2, float r) - { - osg::Vec3 position1 = xform1.preMult(_position); - osg::Vec3 velocity1 = osg::Matrix::transform3x3(_velocity, xform1); - osg::Vec3 position2 = xform2.preMult(_position); - osg::Vec3 velocity2 = osg::Matrix::transform3x3(_velocity, xform2); - float one_minus_r = 1.0f-r; - _position = position1*r + position2*one_minus_r; - _velocity = velocity1*r + velocity2*one_minus_r; - } - - inline void Particle::setAngle(const osg::Vec3& a) - { - _angle = a; - } - - inline void Particle::setAngularVelocity(const osg::Vec3& v) - { - _angul_arvel = v; - } - - inline void Particle::addAngularVelocity(const osg::Vec3& dv) - { - _angul_arvel += dv; - } - - inline void Particle::transformAngleVelocity(const osg::Matrix& xform) - { - // this should be optimized! - - osg::Vec3 a1 = _angle + _angul_arvel; - - _angle = xform.preMult(_angle); - a1 = xform.preMult(a1); - - _angul_arvel = a1 - _angle; - } - - inline float Particle::getMass() const - { - return _mass; - } - - inline float Particle::getMassInv() const - { - return _massinv; - } - - inline void Particle::setMass(float m) - { - _mass = m; - _massinv = 1 / m; - } - - inline void Particle::beginRender(osg::GLBeginEndAdapter* gl) const - { - switch (_shape) - { - case POINT: - gl->Begin(GL_POINTS); - break; - case QUAD: - gl->Begin(GL_QUADS); - break; - case LINE: - gl->Begin(GL_LINES); - break; - default: ; - } - } - - inline void Particle::endRender(osg::GLBeginEndAdapter* gl) const - { - switch (_shape) - { - case POINT: - case QUAD: - case LINE: - gl->End(); - break; - default: ; - } - } - - inline float Particle::getCurrentSize() const - { - return _current_size; - } - - - inline void Particle::setTextureTile(int sTile, int tTile, int end) - { - setTextureTileRange(sTile, tTile, -1, end); - } - - inline void Particle::setTextureTileRange(int sTile, int tTile, int startTile, int endTile) - { - _s_tile = (sTile>0) ? 1.0f / static_cast(sTile) : 1.0f; - _t_tile = (tTile>0) ? 1.0f / static_cast(tTile) : 1.0f; - - if(startTile == -1) - { - _start_tile = 0; - } - else - { - _start_tile = startTile; - } - - if(endTile == -1) - { - _end_tile = sTile * tTile; - } - else - { - _end_tile = endTile; - } - } - -} - -#endif - diff --git a/libs/lib/mac32/include/osgParticle/ParticleEffect b/libs/lib/mac32/include/osgParticle/ParticleEffect deleted file mode 100644 index a96ec45c0..000000000 --- a/libs/lib/mac32/include/osgParticle/ParticleEffect +++ /dev/null @@ -1,118 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_PARTICLEEFFECT -#define OSGPARTICLE_PARTICLEEFFECT - -#include -#include - -namespace osgParticle -{ - - class OSGPARTICLE_EXPORT ParticleEffect : public osg::Group - { - public: - - explicit ParticleEffect(bool automaticSetup=true): - _automaticSetup(automaticSetup), - _useLocalParticleSystem(true), - _scale(1.0f), - _intensity(1.0f), - _startTime(0.0), - _emitterDuration(1.0), - _wind(0.0f,0.0f,0.0f) - {} - - ParticleEffect(const ParticleEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "ParticleEffect"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } } - - void setAutomaticSetup(bool flag) { _automaticSetup = flag; } - bool getAutomaticSetup() const { return _automaticSetup; } - - void setUseLocalParticleSystem(bool local); - bool getUseLocalParticleSystem() const { return _useLocalParticleSystem; } - - void setTextureFileName(const std::string& filename); - const std::string& getTextureFileName() const { return _textureFileName; } - - void setDefaultParticleTemplate(const Particle& p); - const Particle& getDefaultParticleTemplate() const { return _defaultParticleTemplate; } - - void setPosition(const osg::Vec3& position); - const osg::Vec3& getPosition() const { return _position; } - - void setScale(float scale); - float getScale() const { return _scale; } - - void setIntensity(float intensity); - float getIntensity() const { return _intensity; } - - void setStartTime(double startTime); - double getStartTime() const { return _startTime; } - - void setEmitterDuration(double duration); - double getEmitterDuration() const { return _emitterDuration; } - - void setParticleDuration(double duration); - double getParticleDuration() const { return _defaultParticleTemplate.getLifeTime(); } - - void setWind(const osg::Vec3& wind); - const osg::Vec3& getWind() const { return _wind; } - - /// Get whether all particles are dead - bool areAllParticlesDead() const { return _particleSystem.valid()?_particleSystem->areAllParticlesDead():true; } - - virtual Emitter* getEmitter() = 0; - virtual const Emitter* getEmitter() const = 0; - - virtual Program* getProgram() = 0; - virtual const Program* getProgram() const = 0; - - void setParticleSystem(ParticleSystem* ps); - inline ParticleSystem* getParticleSystem() { return _particleSystem.get(); } - inline const ParticleSystem* getParticleSystem() const { return _particleSystem.get(); } - - virtual void setDefaults(); - - virtual void setUpEmitterAndProgram() = 0; - - virtual void buildEffect(); - - protected: - - virtual ~ParticleEffect() {} - - bool _automaticSetup; - - osg::ref_ptr _particleSystem; - - bool _useLocalParticleSystem; - std::string _textureFileName; - Particle _defaultParticleTemplate; - osg::Vec3 _position; - float _scale; - float _intensity; - double _startTime; - double _emitterDuration; - osg::Vec3 _wind; - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ParticleProcessor b/libs/lib/mac32/include/osgParticle/ParticleProcessor deleted file mode 100644 index 85fa7bd99..000000000 --- a/libs/lib/mac32/include/osgParticle/ParticleProcessor +++ /dev/null @@ -1,340 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_PARTICLEPROCESSOR -#define OSGPARTICLE_PARTICLEPROCESSOR 1 - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace osgParticle -{ - - /** A common base interface for those classes which need to do something on particles. Such classes - * are, for example, Emitter (particle generation) and Program (particle animation). - * This class holds some properties, like a reference frame and a reference to a ParticleSystem; - * descendant classes should process the particles taking into account the reference frame, computing the right - * transformations when needed. - */ - class OSGPARTICLE_EXPORT ParticleProcessor: public osg::Node { - public: - - enum ReferenceFrame { - RELATIVE_RF, - ABSOLUTE_RF - }; - - ParticleProcessor(); - ParticleProcessor(const ParticleProcessor& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "ParticleProcessor"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } } - - /// Get the reference frame. - inline ReferenceFrame getReferenceFrame() const; - - /// Set the reference frame. - inline void setReferenceFrame(ReferenceFrame rf); - - /// Get whether this processor is enabled or not. - bool getEnabled() const { return _enabled; } - inline bool isEnabled() const; - - /// Set whether this processor is enabled or not. - inline void setEnabled(bool v); - - /// Get a pointer to the destination particle system. - inline ParticleSystem* getParticleSystem(); - - /// Get a const pointer to the destination particle system. - inline const ParticleSystem* getParticleSystem() const; - - /// Set the destination particle system. - inline void setParticleSystem(ParticleSystem* ps); - - /// Set the endless flag of this processor. - inline void setEndless(bool type); - - /// Check whether this processor is endless. - bool getEndless() const { return _endless; } - inline bool isEndless() const; - - /// Set the lifetime of this processor. - inline void setLifeTime(double t); - - /// Get the lifetime of this processor. - inline double getLifeTime() const; - - /// Set the start time of this processor. - inline void setStartTime(double t); - - /// Get the start time of this processor. - inline double getStartTime() const; - - /// Set the current time of this processor. - inline void setCurrentTime(double t); - - /// Get the current time of this processor. - inline double getCurrentTime() const; - - /// Set the reset time of this processor. A value of 0 disables reset. - inline void setResetTime(double t); - - /// Get the reset time of this processor. - inline double getResetTime() const; - - /** - Check whether the processor is alive with respect to start time and - life duration. Note that this method may return true even if the - processor has been disabled by calling setEnabled(false). To test - whether the processor is actually processing particles or not, you - should evaluate (isEnabled() && isAlive()). - */ - inline bool isAlive() const; - - void traverse(osg::NodeVisitor& nv); - - /// Get the current local-to-world transformation matrix (valid only during cull traversal). - inline const osg::Matrix& getLocalToWorldMatrix(); - - /// Get the current world-to-local transformation matrix (valid only during cull traversal). - inline const osg::Matrix& getWorldToLocalMatrix(); - - /// Get the previous local-to-world transformation matrix (valid only during cull traversal). - inline const osg::Matrix& getPreviousLocalToWorldMatrix(); - - /// Get the previous world-to-local transformation matrix (valid only during cull traversal). - inline const osg::Matrix& getPreviousWorldToLocalMatrix(); - - - /// Transform a point from local to world coordinates (valid only during cull traversal). - inline osg::Vec3 transformLocalToWorld(const osg::Vec3& P); - - /// Transform a vector from local to world coordinates, discarding translation (valid only during cull traversal). - inline osg::Vec3 rotateLocalToWorld(const osg::Vec3& P); - - /// Transform a point from world to local coordinates (valid only during cull traversal). - inline osg::Vec3 transformWorldToLocal(const osg::Vec3& P); - - /// Transform a vector from world to local coordinates, discarding translation (valid only during cull traversal). - inline osg::Vec3 rotateWorldToLocal(const osg::Vec3& P); - - virtual osg::BoundingSphere computeBound() const; - - protected: - virtual ~ParticleProcessor() {} - ParticleProcessor& operator=(const ParticleProcessor&) { return *this; } - - virtual void process(double dt) = 0; - - private: - ReferenceFrame _rf; - bool _enabled; - double _t0; - osg::ref_ptr _ps; - bool _first_ltw_compute; - bool _need_ltw_matrix; - bool _first_wtl_compute; - bool _need_wtl_matrix; - osg::Matrix _ltw_matrix; - osg::Matrix _wtl_matrix; - osg::Matrix _previous_ltw_matrix; - osg::Matrix _previous_wtl_matrix; - osg::NodeVisitor* _current_nodevisitor; - - bool _endless; - - double _lifeTime; - double _startTime; - double _currentTime; - double _resetTime; - - //added- 1/17/06- bgandere@nps.edu - //a var to keep from doing multiple updates - unsigned int _frameNumber; - }; - - // INLINE FUNCTIONS - - inline ParticleProcessor::ReferenceFrame ParticleProcessor::getReferenceFrame() const - { - return _rf; - } - - inline void ParticleProcessor::setReferenceFrame(ReferenceFrame rf) - { - _rf = rf; - } - - inline bool ParticleProcessor::isEnabled() const - { - return _enabled; - } - - inline void ParticleProcessor::setEnabled(bool v) - { - _enabled = v; - if (_enabled) - { - _currentTime = 0; - } - } - - inline ParticleSystem* ParticleProcessor::getParticleSystem() - { - return _ps.get(); - } - - inline const ParticleSystem* ParticleProcessor::getParticleSystem() const - { - return _ps.get(); - } - - inline void ParticleProcessor::setParticleSystem(ParticleSystem* ps) - { - _ps = ps; - } - - inline void ParticleProcessor::setEndless(bool type) - { - _endless = type; - } - - inline bool ParticleProcessor::isEndless() const - { - return _endless; - } - - inline void ParticleProcessor::setLifeTime(double t) - { - _lifeTime = t; - } - - inline double ParticleProcessor::getLifeTime() const - { - return _lifeTime; - } - - inline void ParticleProcessor::setStartTime(double t) - { - _startTime = t; - } - - inline double ParticleProcessor::getStartTime() const - { - return _startTime; - } - inline void ParticleProcessor::setCurrentTime(double t) - { - _currentTime = t; - } - - inline double ParticleProcessor::getCurrentTime() const - { - return _currentTime; - } - - inline void ParticleProcessor::setResetTime(double t) - { - _resetTime = t; - } - - inline double ParticleProcessor::getResetTime() const - { - return _resetTime; - } - - inline const osg::Matrix& ParticleProcessor::getLocalToWorldMatrix() - { - if (_need_ltw_matrix) { - _previous_ltw_matrix = _ltw_matrix; - _ltw_matrix = osg::computeLocalToWorld(_current_nodevisitor->getNodePath()); - if (_first_ltw_compute) - { - _previous_ltw_matrix = _ltw_matrix; - _first_ltw_compute = false; - } - _need_ltw_matrix = false; - } - return _ltw_matrix; - } - - inline const osg::Matrix& ParticleProcessor::getWorldToLocalMatrix() - { - if (_need_wtl_matrix) { - _previous_wtl_matrix = _wtl_matrix; - _wtl_matrix = osg::computeWorldToLocal(_current_nodevisitor->getNodePath()); - if (_first_wtl_compute) - { - _previous_wtl_matrix = _wtl_matrix; - _first_wtl_compute = false; - } - _need_wtl_matrix = false; - } - return _wtl_matrix; - } - - inline const osg::Matrix& ParticleProcessor::getPreviousLocalToWorldMatrix() - { - if (_need_ltw_matrix) getLocalToWorldMatrix(); - return _previous_ltw_matrix; - } - - inline const osg::Matrix& ParticleProcessor::getPreviousWorldToLocalMatrix() - { - if (_need_wtl_matrix) getWorldToLocalMatrix(); - return _previous_wtl_matrix; - } - - inline osg::Vec3 ParticleProcessor::transformLocalToWorld(const osg::Vec3& P) - { - return getLocalToWorldMatrix().preMult(P); - } - - inline osg::Vec3 ParticleProcessor::transformWorldToLocal(const osg::Vec3& P) - { - return getWorldToLocalMatrix().preMult(P); - } - - inline osg::Vec3 ParticleProcessor::rotateLocalToWorld(const osg::Vec3& P) - { - return getLocalToWorldMatrix().preMult(P) - - getLocalToWorldMatrix().preMult(osg::Vec3(0, 0, 0)); - } - - inline osg::Vec3 ParticleProcessor::rotateWorldToLocal(const osg::Vec3& P) - { - return getWorldToLocalMatrix().preMult(P) - - getWorldToLocalMatrix().preMult(osg::Vec3(0, 0, 0)); - } - - inline bool ParticleProcessor::isAlive() const - { - return _currentTime < (_lifeTime + _startTime); - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ParticleSystem b/libs/lib/mac32/include/osgParticle/ParticleSystem deleted file mode 100644 index c4886ef14..000000000 --- a/libs/lib/mac32/include/osgParticle/ParticleSystem +++ /dev/null @@ -1,527 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_PARTICLESYSTEM -#define OSGPARTICLE_PARTICLESYSTEM 1 - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -// 9th Febrary 2009, disabled the use of ReadWriteMutex as it looks like this -// is introducing threading problems due to threading problems in OpenThreads::ReadWriteMutex. -// #define OSGPARTICLE_USE_ReadWriteMutex - -#ifdef OSGPARTICLE_USE_ReadWriteMutex - #include -#else - #include - #include -#endif - - -namespace osgParticle -{ - - /** The heart of this class library; its purpose is to hold a set of particles and manage particle creation, update, rendering and destruction. - * You can add this drawable to any Geode as you usually do with other - * Drawable classes. Each instance of ParticleSystem is a separate set of - * particles; it provides the interface for creating particles and iterating - * through them (see the Emitter and Program classes). - */ - class OSGPARTICLE_EXPORT ParticleSystem: public osg::Drawable { - public: - - enum Alignment { - BILLBOARD, - FIXED - }; - - ParticleSystem(); - ParticleSystem(const ParticleSystem& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, ParticleSystem); - - /// Get the alignment type of particles. - inline Alignment getParticleAlignment() const; - - /// Set the alignment type of particles. - inline void setParticleAlignment(Alignment a); - - /// Get the X-axis alignment vector. - inline const osg::Vec3& getAlignVectorX() const; - - /// Set the X-axis alignment vector. - inline void setAlignVectorX(const osg::Vec3& v); - - /// Get the Y-axis alignment vector. - inline const osg::Vec3& getAlignVectorY() const; - - /// Set the Y-axis alignment vector. - inline void setAlignVectorY(const osg::Vec3& v); - - /// Set the alignment vectors. - inline void setAlignVectors(const osg::Vec3& X, const osg::Vec3& Y); - - - - enum ParticleScaleReferenceFrame - { - LOCAL_COORDINATES, - WORLD_COORDINATES - }; - - /** Set whether the particles should be scaled relative to world coordaintes or local coordinates.*/ - void setParticleScaleReferenceFrame(ParticleScaleReferenceFrame rf) { _particleScaleReferenceFrame = rf; } - - /** Get whether the particles should be scaled relative to world coordaintes or local coordinates.*/ - ParticleScaleReferenceFrame getParticleScaleReferenceFrame() const { return _particleScaleReferenceFrame; } - - - - /// Get the default bounding box - inline const osg::BoundingBox& getDefaultBoundingBox() const; - - /** Set the default bounding box. - The default bounding box is used when a real bounding box cannot be computed, for example - because no particles has been updated yet. - */ - inline void setDefaultBoundingBox(const osg::BoundingBox& bbox); - - /// Return true if we use vertex arrays for rendering particles. - bool getUseVertexArray() const { return _useVertexArray; } - - /** Set to use vertex arrays for rendering particles. - Lots of variables will be omitted: particles' shape, alive or not, visibility distance, and so on, - so the rendering result is not as good as we wish (although it's fast than using glBegin/glEnd). - We had better use this for GLSL shaders, in which particle parameters will be kept as uniforms. - This method is called automatically by setDefaultAttributesUsingShaders(). - */ - void setUseVertexArray(bool v) { _useVertexArray = v; } - - /// Return true if shaders are required. - bool getUseShaders() const { return _useShaders; } - - /** Set to use GLSL shaders for rendering particles. - Particles' parameters will be used as shader attribute arrays, and necessary variables, including - the visibility distance, texture, etc, will be used and updated as uniforms. - */ - void setUseShaders(bool v) { _useShaders = v; _dirty_uniforms = true; } - - /// Get the double pass rendering flag. - inline bool getDoublePassRendering() const; - - /** Set the double pass rendering flag. - Double pass rendering avoids overdraw problems between particle systems - and other opaque objects. If you can render all the particle systems after - the opaque objects, then double pass is not necessary and can be turned off (best choice). - If you set the default attributes with setDefaultAttributes, then the particle - system will fall into a transparent bin. - */ - inline void setDoublePassRendering(bool v); - - /// Return true if the particle system is frozen. - bool getFrozen() const { return _frozen; } - inline bool isFrozen() const; - - /** Set or reset the frozen state. - When the particle system is frozen, emitters and programs won't do anything on it. - */ - inline void setFrozen(bool v); - - /// Get the number of allocated particles (alive + dead). - inline int numParticles() const; - - /// Get the number of dead particles. - inline int numDeadParticles() const; - - /// Get whether all particles are dead - inline bool areAllParticlesDead() const { return numDeadParticles()==numParticles(); } - - /// Get a pointer to the i-th particle. - inline Particle* getParticle(int i); - - /// Get a const pointer to the i-th particle. - inline const Particle* getParticle(int i) const; - - /// Create a new particle from the specified template (or the default one if ptemplate is null). - inline virtual Particle* createParticle(const Particle* ptemplate); - - /// Destroy the i-th particle. - inline virtual void destroyParticle(int i); - - /// Reuse the i-th particle. - inline virtual void reuseParticle(int i) { _deadparts.push(&(_particles[i])); } - - /// Get the last frame number. - inline unsigned int getLastFrameNumber() const; - - /// Get the unique delta time for emitters and updaters to use - inline double& getDeltaTime( double currentTime ); - - /// Get a reference to the default particle template. - inline Particle& getDefaultParticleTemplate(); - - /// Get a const reference to the default particle template. - inline const Particle& getDefaultParticleTemplate() const; - - /// Set the default particle template (particle is copied). - inline void setDefaultParticleTemplate(const Particle& p); - - /// Get whether the particle system can freeze when culled - inline bool getFreezeOnCull() const; - - /// Set whether the particle system can freeze when culled (default is true) - inline void setFreezeOnCull(bool v); - - /** A useful method to set the most common StateAttribute's in one call. - If texturefile is empty, then texturing is turned off. - */ - void setDefaultAttributes(const std::string& texturefile = "", bool emissive_particles = true, bool lighting = false, int texture_unit = 0); - - /** A useful method to set the most common StateAttribute and use GLSL shaders to draw particles. - At present, when enabling shaders in the particle system, user-defined shapes will not be usable. - If texturefile is empty, then texturing is turned off. - */ - void setDefaultAttributesUsingShaders(const std::string& texturefile = "", bool emissive_particles = true, int texture_unit = 0); - - /// (EXPERIMENTAL) Get the level of detail. - inline int getLevelOfDetail() const; - - /** (EXPERIMENTAL) Set the level of detail. The total number of particles is divided by the detail value to - get the actual number of particles to be drawn. This value must be greater than zero. - */ - inline void setLevelOfDetail(int v); - - enum SortMode - { - NO_SORT, - SORT_FRONT_TO_BACK, - SORT_BACK_TO_FRONT - }; - - /// Get the sort mode. - inline SortMode getSortMode() const; - - /** Set the sort mode. It will force resorting the particle list by the Z direction of the view coordinates. - This can be used for the purpose of transparent rendering or setVisibilityDistance(). - */ - inline void setSortMode(SortMode mode); - - /// Get the visibility distance. - inline double getVisibilityDistance() const; - - /** Set the visibility distance which allows the particles to be rendered only when depth is inside the distance. - When using shaders, it can work well directly; otherwise the sort mode should also be set to pre-compute depth. - */ - inline void setVisibilityDistance(double distance); - - /// Update the particles. Don't call this directly, use a ParticleSystemUpdater instead. - virtual void update(double dt, osg::NodeVisitor& nv); - - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; - - virtual osg::BoundingBox computeBound() const; - -#ifdef OSGPARTICLE_USE_ReadWriteMutex - typedef OpenThreads::ReadWriteMutex ReadWriterMutex; - typedef OpenThreads::ScopedReadLock ScopedReadLock; - typedef OpenThreads::ScopedWriteLock ScopedWriteLock; -#else - typedef OpenThreads::Mutex ReadWriterMutex; - typedef OpenThreads::ScopedLock ScopedReadLock; - typedef OpenThreads::ScopedLock ScopedWriteLock; -#endif - - ReadWriterMutex* getReadWriteMutex() const { return &_readWriteMutex; } - - protected: - - virtual ~ParticleSystem(); - - ParticleSystem& operator=(const ParticleSystem&) { return *this; } - - inline void update_bounds(const osg::Vec3& p, float r); - void single_pass_render(osg::RenderInfo& renderInfo, const osg::Matrix& modelview) const; - void render_vertex_array(osg::RenderInfo& renderInfo) const; - - typedef std::vector Particle_vector; - typedef std::stack Death_stack; - - Particle_vector _particles; - Death_stack _deadparts; - - osg::BoundingBox _def_bbox; - - Alignment _alignment; - osg::Vec3 _align_X_axis; - osg::Vec3 _align_Y_axis; - ParticleScaleReferenceFrame _particleScaleReferenceFrame; - - bool _useVertexArray; - bool _useShaders; - bool _dirty_uniforms; - - bool _doublepass; - bool _frozen; - - osg::Vec3 _bmin; - osg::Vec3 _bmax; - - bool _reset_bounds_flag; - bool _bounds_computed; - - Particle _def_ptemp; - mutable unsigned int _last_frame; - mutable bool _dirty_dt; - bool _freeze_on_cull; - - double _t0; - double _dt; - - int _detail; - SortMode _sortMode; - double _visibilityDistance; - - mutable int _draw_count; - - mutable ReadWriterMutex _readWriteMutex; - }; - - // INLINE FUNCTIONS - - inline ParticleSystem::Alignment ParticleSystem::getParticleAlignment() const - { - return _alignment; - } - - inline void ParticleSystem::setParticleAlignment(Alignment a) - { - _alignment = a; - } - - inline const osg::Vec3& ParticleSystem::getAlignVectorX() const - { - return _align_X_axis; - } - - inline void ParticleSystem::setAlignVectorX(const osg::Vec3& v) - { - _align_X_axis = v; - } - - inline const osg::Vec3& ParticleSystem::getAlignVectorY() const - { - return _align_Y_axis; - } - - inline void ParticleSystem::setAlignVectorY(const osg::Vec3& v) - { - _align_Y_axis = v; - } - - inline void ParticleSystem::setAlignVectors(const osg::Vec3& X, const osg::Vec3& Y) - { - _align_X_axis = X; - _align_Y_axis = Y; - } - - inline bool ParticleSystem::isFrozen() const - { - return _frozen; - } - - inline void ParticleSystem::setFrozen(bool v) - { - _frozen = v; - } - - inline const osg::BoundingBox& ParticleSystem::getDefaultBoundingBox() const - { - return _def_bbox; - } - - inline void ParticleSystem::setDefaultBoundingBox(const osg::BoundingBox& bbox) - { - _def_bbox = bbox; - } - - inline bool ParticleSystem::getDoublePassRendering() const - { - return _doublepass; - } - - inline void ParticleSystem::setDoublePassRendering(bool v) - { - _doublepass = v; - } - - inline int ParticleSystem::numParticles() const - { - return static_cast(_particles.size()); - } - - inline int ParticleSystem::numDeadParticles() const - { - return static_cast(_deadparts.size()); - } - - inline Particle* ParticleSystem::getParticle(int i) - { - return &_particles[i]; - } - - inline const Particle* ParticleSystem::getParticle(int i) const - { - return &_particles[i]; - } - - inline void ParticleSystem::destroyParticle(int i) - { - _particles[i].kill(); - } - - inline unsigned int ParticleSystem::getLastFrameNumber() const - { - return _last_frame; - } - - inline double& ParticleSystem::getDeltaTime( double currentTime ) - { - if ( _dirty_dt ) - { - _dt = currentTime - _t0; - if ( _dt<0.0 ) _dt = 0.0; - - _t0 = currentTime; - _dirty_dt = false; - } - return _dt; - } - - inline void ParticleSystem::update_bounds(const osg::Vec3& p, float r) - { - if (_reset_bounds_flag) { - _reset_bounds_flag = false; - _bmin = p - osg::Vec3(r,r,r); - _bmax = p + osg::Vec3(r,r,r); - } else { - if (p.x() - r < _bmin.x()) _bmin.x() = p.x() - r; - if (p.y() - r < _bmin.y()) _bmin.y() = p.y() - r; - if (p.z() - r < _bmin.z()) _bmin.z() = p.z() - r; - if (p.x() + r > _bmax.x()) _bmax.x() = p.x() + r; - if (p.y() + r > _bmax.y()) _bmax.y() = p.y() + r; - if (p.z() + r > _bmax.z()) _bmax.z() = p.z() + r; - } - if (!_bounds_computed) - _bounds_computed = true; - } - - inline Particle& ParticleSystem::getDefaultParticleTemplate() - { - return _def_ptemp; - } - - inline const Particle& ParticleSystem::getDefaultParticleTemplate() const - { - return _def_ptemp; - } - - inline void ParticleSystem::setDefaultParticleTemplate(const Particle& p) - { - _def_ptemp = p; - } - - inline bool ParticleSystem::getFreezeOnCull() const - { - return _freeze_on_cull; - } - - inline void ParticleSystem::setFreezeOnCull(bool v) - { - _freeze_on_cull = v; - } - - inline int ParticleSystem::getLevelOfDetail() const - { - return _detail; - } - - inline void ParticleSystem::setLevelOfDetail(int v) - { - if (v < 1) v = 1; - _detail = v; - } - - inline ParticleSystem::SortMode ParticleSystem::getSortMode() const - { - return _sortMode; - } - - inline void ParticleSystem::setSortMode(SortMode mode) - { - _sortMode = mode; - } - - inline double ParticleSystem::getVisibilityDistance() const - { - return _visibilityDistance; - } - - inline void ParticleSystem::setVisibilityDistance(double distance) - { - _visibilityDistance = distance; - if (_useShaders) _dirty_uniforms = true; - } - - // I'm not sure this function should be inlined... - - inline Particle* ParticleSystem::createParticle(const Particle* ptemplate) - { - // is there any dead particle? - if (!_deadparts.empty()) { - - // retrieve a pointer to the last dead particle - Particle* P = _deadparts.top(); - - // create a new (alive) particle in the same place - *P = ptemplate? *ptemplate: _def_ptemp; - - // remove the pointer from the death stack - _deadparts.pop(); - return P; - - } else { - - // add a new particle to the vector - _particles.push_back(ptemplate? *ptemplate: _def_ptemp); - return &_particles.back(); - } - } - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/ParticleSystemUpdater b/libs/lib/mac32/include/osgParticle/ParticleSystemUpdater deleted file mode 100644 index d80e99861..000000000 --- a/libs/lib/mac32/include/osgParticle/ParticleSystemUpdater +++ /dev/null @@ -1,134 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_PARTICLESYSTEMUPDATER -#define OSGPARTICLE_PARTICLESYSTEMUPDATER 1 - -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -namespace osgParticle -{ - - /** A useful node class for updating particle systems automatically. - When a ParticleSystemUpdater is traversed by a cull visitor, it calls the - update() method on the specified particle systems. You should place this updater - AFTER other nodes like emitters and programs. - */ - class OSGPARTICLE_EXPORT ParticleSystemUpdater: public osg::Node { - public: - ParticleSystemUpdater(); - ParticleSystemUpdater(const ParticleSystemUpdater& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,ParticleSystemUpdater); - - /// Add a particle system to the list. - virtual bool addParticleSystem(ParticleSystem* ps); - - /// Remove a particle system from the list (by pointer). - virtual bool removeParticleSystem(ParticleSystem* ps); - - /// Remove a particle system(s) from the list (by index). - virtual bool removeParticleSystem(unsigned int i, unsigned int numParticleSystemsToRemove=1); - - /// Replace ParticleSystem with another ParticleSystem. - virtual bool replaceParticleSystem(ParticleSystem* origPS, ParticleSystem* newPS); - - /// set a particle system by index. - virtual bool setParticleSystem( unsigned int i, ParticleSystem* ps ); - - /// Return the number of particle systems on the list. - inline unsigned int getNumParticleSystems() const; - - /// Get a particle system from the list. - inline ParticleSystem* getParticleSystem(unsigned int i); - - /// Get a particle system from the list. - inline const ParticleSystem* getParticleSystem(unsigned int i) const; - - /// return true if ParticleSystem is contained within ParticlsSystemUpdater. - inline bool containsParticleSystem( const ParticleSystem* ps ) const; - - /// get index number of ParticleSystem. - inline unsigned int getParticleSystemIndex( const ParticleSystem* ps ) const; - - virtual void traverse(osg::NodeVisitor& nv); - - virtual osg::BoundingSphere computeBound() const; - - protected: - virtual ~ParticleSystemUpdater() {} - ParticleSystemUpdater &operator=(const ParticleSystemUpdater &) { return *this; } - - private: - typedef std::vector > ParticleSystem_Vector; - - ParticleSystem_Vector _psv; - double _t0; - - //added 1/17/06- bgandere@nps.edu - //a var to keep from doing multiple updates per frame - unsigned int _frameNumber; - }; - - // INLINE FUNCTIONS - - inline unsigned int ParticleSystemUpdater::getNumParticleSystems() const - { - return static_cast(_psv.size()); - } - - inline ParticleSystem* ParticleSystemUpdater::getParticleSystem(unsigned int i) - { - return _psv[i].get(); - } - - inline const ParticleSystem* ParticleSystemUpdater::getParticleSystem(unsigned int i) const - { - return _psv[i].get(); - } - - inline bool ParticleSystemUpdater::containsParticleSystem( const ParticleSystem* ps ) const - { - for( ParticleSystem_Vector::const_iterator itr=_psv.begin(); - itr!=_psv.end(); - ++itr ) - { - if( itr->get() == ps ) return true; - } - return false; - } - - inline unsigned int ParticleSystemUpdater::getParticleSystemIndex( const ParticleSystem* ps ) const - { - for( unsigned int particleSystemNum=0; particleSystemNum<_psv.size(); ++particleSystemNum ) - { - if( _psv[particleSystemNum] == ps ) return particleSystemNum; - } - return _psv.size(); // node not found. - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Placer b/libs/lib/mac32/include/osgParticle/Placer deleted file mode 100644 index 662f64667..000000000 --- a/libs/lib/mac32/include/osgParticle/Placer +++ /dev/null @@ -1,68 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_PLACER -#define OSGPARTICLE_PLACER 1 - -#include -#include -#include - -namespace osgParticle -{ - - class Particle; - - /** An abstract base class for implementing particle placers. A placer is an object which take - a particle as input, and places it somewhere by setting its position vector. Placer objects are - used by the ModularEmitter class as part of the particle emission process. - */ - class Placer: public osg::Object { - public: - inline Placer(); - inline Placer(const Placer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "Placer"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - - /// Place a particle. Must be implemented in descendant classes. - virtual void place(Particle* P) const = 0; - - /// Volume of the placer. Can be implemented in descendant classes. - virtual float volume() const { return 1.0f; } - - /// Return the control position of particles that placer will generate. Must be implemented in descendant classes. - virtual osg::Vec3 getControlPosition() const = 0; - - protected: - ~Placer() {} - Placer& operator=(const Placer& ) { return *this; } - }; - - // INLINE FUNCTIONS - - inline Placer::Placer() - : osg::Object() - { - } - - inline Placer::Placer(const Placer& copy, const osg::CopyOp& copyop) - : osg::Object(copy, copyop) - { - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/PointPlacer b/libs/lib/mac32/include/osgParticle/PointPlacer deleted file mode 100644 index 33e30fa90..000000000 --- a/libs/lib/mac32/include/osgParticle/PointPlacer +++ /dev/null @@ -1,78 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_POINT_PLACER -#define OSGPARTICLE_POINT_PLACER 1 - -#include -#include - -#include -#include - -namespace osgParticle -{ - - /** A point-shaped particle placer. - This placer class uses the center point defined in its base class CenteredPlacer - to place there all incoming particles. - */ - class PointPlacer: public CenteredPlacer { - public: - inline PointPlacer(); - inline PointPlacer(const PointPlacer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, PointPlacer); - - /** Place a particle. - This method is called automatically by ModularEmitter and should not be called - manually. - */ - inline void place(Particle* P) const; - - /// return the control position - inline osg::Vec3 getControlPosition() const; - - protected: - virtual ~PointPlacer() {} - PointPlacer& operator=(const PointPlacer&) { return *this; } - }; - - // INLINE FUNCTIONS - - inline PointPlacer::PointPlacer() - : CenteredPlacer() - { - } - - inline PointPlacer::PointPlacer(const PointPlacer& copy, const osg::CopyOp& copyop) - : CenteredPlacer(copy, copyop) - { - } - - inline void PointPlacer::place(Particle* P) const - { - P->setPosition(getCenter()); - } - - - inline osg::Vec3 PointPlacer::getControlPosition() const - { - return getCenter(); - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/PrecipitationEffect b/libs/lib/mac32/include/osgParticle/PrecipitationEffect deleted file mode 100644 index dc698826d..000000000 --- a/libs/lib/mac32/include/osgParticle/PrecipitationEffect +++ /dev/null @@ -1,265 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_PRECIPITATIONEFFECT -#define OSGPARTICLE_PRECIPITATIONEFFECT - -#include -#include -#include -#include - -#include - -#include - -namespace osgParticle -{ - class OSGPARTICLE_EXPORT PrecipitationEffect : public osg::Node - { - public: - - PrecipitationEffect(); - PrecipitationEffect(const PrecipitationEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "PrecipitationEffect"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } } - - virtual void traverse(osg::NodeVisitor& nv); - - - /** Set all the parameters to create an rain effect of specified intensity.*/ - void rain(float intensity); - - /** Set all the parameters to create an snow effect of specified intensity.*/ - void snow(float intensity); - - void setMaximumParticleDensity(float density) { if (_maximumParticleDensity==density) return; _maximumParticleDensity = density; _dirty = true;} - float getMaximumParticleDensity() const { return _maximumParticleDensity; } - - void setWind(const osg::Vec3& wind) { _wind = wind; } - const osg::Vec3& getWind() const { return _wind; } - - void setPosition(const osg::Vec3& position) { _origin = position; } - const osg::Vec3& getPosition() const { return _origin; } - - void setCellSize(const osg::Vec3& cellSize) { if (_cellSize==cellSize) return; _cellSize = cellSize; _dirty = true; } - const osg::Vec3& getCellSize() const { return _cellSize; } - - void setParticleSpeed(float particleSpeed) { if (_particleSpeed==particleSpeed) return; _particleSpeed = particleSpeed; _dirty = true; } - float getParticleSpeed() const { return _particleSpeed; } - - void setParticleSize(float particleSize) { if (_particleSize==particleSize) return; _particleSize = particleSize; _dirty = true;} - float getParticleSize() const { return _particleSize; } - - void setParticleColor(const osg::Vec4& color) { if (_particleColor==color) return; _particleColor = color; _dirty = true;} - const osg::Vec4& getParticleColor() const { return _particleColor; } - - void setNearTransition(float nearTransition) { _nearTransition = nearTransition; } - float getNearTransition() const { return _nearTransition; } - - void setFarTransition(float farTransition) { _farTransition = farTransition; } - float getFarTransition() const { return _farTransition; } - - void setUseFarLineSegments(bool useFarLineSegments) { _useFarLineSegments = useFarLineSegments; } - bool getUseFarLineSegments() const { return _useFarLineSegments; } - - void setFog(osg::Fog* fog) { _fog = fog; } - osg::Fog* getFog() { return _fog.get(); } - const osg::Fog* getFog() const { return _fog.get(); } - - osg::Geometry* getQuadGeometry() { return _quadGeometry.get(); } - osg::StateSet* getQuadStateSet() { return _quadStateSet.get(); } - - osg::Geometry* getLineGeometry() { return _lineGeometry.get(); } - osg::StateSet* getLineStateSet() { return _lineStateSet.get(); } - - osg::Geometry* getPointGeometry() { return _pointGeometry.get(); } - osg::StateSet* getPointStateSet() { return _pointStateSet.get(); } - - /** Internal drawable used to render batches of cells.*/ - class OSGPARTICLE_EXPORT PrecipitationDrawable : public osg::Drawable - { - public: - - PrecipitationDrawable(); - PrecipitationDrawable(const PrecipitationDrawable& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, PrecipitationDrawable); - - virtual bool supports(const osg::PrimitiveFunctor&) const { return false; } - virtual void accept(osg::PrimitiveFunctor&) const {} - virtual bool supports(const osg::PrimitiveIndexFunctor&) const { return false; } - virtual void accept(osg::PrimitiveIndexFunctor&) const {} - - void setRequiresPreviousMatrix(bool flag) { _requiresPreviousMatrix = flag; } - bool getRequiresPreviousMatrix() const { return _requiresPreviousMatrix; } - - void setGeometry(osg::Geometry* geom) { _geometry = geom; } - osg::Geometry* getGeometry() { return _geometry.get(); } - const osg::Geometry* getGeometry() const { return _geometry.get(); } - - void setDrawType(GLenum type) { _drawType = type; } - GLenum getDrawType() const { return _drawType; } - - void setNumberOfVertices(unsigned int numVertices) { _numberOfVertices = numVertices; } - unsigned int getNumberOfVertices() const { return _numberOfVertices; } - - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; - - struct Cell - { - Cell(int in_i, int in_j, int in_k): - i(in_i), j(in_j), k(in_k) {} - - inline bool operator < (const Cell& rhs) const - { - if (irhs.i) return false; - if (jrhs.j) return false; - if (krhs.k) return false; - return false; - } - - int i; - int j; - int k; - }; - - struct DepthMatrixStartTime - { - inline bool operator < (const DepthMatrixStartTime& rhs) const - { - return depth < rhs.depth; - } - - float depth; - float startTime; - osg::Matrix modelview; - }; - - typedef std::map< Cell, DepthMatrixStartTime > CellMatrixMap; - - struct LessFunctor - { - inline bool operator () (const CellMatrixMap::value_type* lhs,const CellMatrixMap::value_type* rhs) const - { - return (*lhs).second<(*rhs).second; - } - }; - - - CellMatrixMap& getCurrentCellMatrixMap() { return _currentCellMatrixMap; } - CellMatrixMap& getPreviousCellMatrixMap() { return _previousCellMatrixMap; } - - inline void newFrame() - { - _previousCellMatrixMap.swap(_currentCellMatrixMap); - _currentCellMatrixMap.clear(); - } - - protected: - - virtual ~PrecipitationDrawable() {} - - bool _requiresPreviousMatrix; - - osg::ref_ptr _geometry; - - mutable CellMatrixMap _currentCellMatrixMap; - mutable CellMatrixMap _previousCellMatrixMap; - - GLenum _drawType; - unsigned int _numberOfVertices; - - }; - - protected: - - virtual ~PrecipitationEffect() {} - - void compileGLObjects(osg::RenderInfo& renderInfo) const; - - void update(); - - void createGeometry(unsigned int numParticles, - osg::Geometry* quad_geometry, - osg::Geometry* line_geometry, - osg::Geometry* point_geometry); - - void setUpGeometries(unsigned int numParticles); - - - struct PrecipitationDrawableSet - { - osg::ref_ptr _quadPrecipitationDrawable; - osg::ref_ptr _linePrecipitationDrawable; - osg::ref_ptr _pointPrecipitationDrawable; - }; - - void cull(PrecipitationDrawableSet& pds, osgUtil::CullVisitor* cv) const; - bool build(const osg::Vec3 eyeLocal, int i, int j, int k, float startTime, PrecipitationDrawableSet& pds, osg::Polytope& frustum, osgUtil::CullVisitor* cv) const; - - // parameters - bool _dirty; - osg::Vec3 _wind; - float _particleSpeed; - float _particleSize; - osg::Vec4 _particleColor; - float _maximumParticleDensity; - osg::Vec3 _cellSize; - float _nearTransition; - float _farTransition; - bool _useFarLineSegments; - osg::ref_ptr _fog; - - osg::ref_ptr _inversePeriodUniform; - osg::ref_ptr _particleSizeUniform; - osg::ref_ptr _particleColorUniform; - - typedef std::pair< osg::NodeVisitor*, osg::NodePath > ViewIdentifier; - typedef std::map< ViewIdentifier, PrecipitationDrawableSet > ViewDrawableMap; - - OpenThreads::Mutex _mutex; - ViewDrawableMap _viewDrawableMap; - - osg::ref_ptr _quadGeometry; - osg::ref_ptr _quadStateSet; - - osg::ref_ptr _lineGeometry; - osg::ref_ptr _lineStateSet; - - osg::ref_ptr _pointGeometry; - osg::ref_ptr _pointStateSet; - - // cache variables. - float _period; - osg::Vec3 _origin; - osg::Vec3 _du; - osg::Vec3 _dv; - osg::Vec3 _dw; - osg::Vec3 _inverse_du; - osg::Vec3 _inverse_dv; - osg::Vec3 _inverse_dw; - - double _previousFrameTime; - - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Program b/libs/lib/mac32/include/osgParticle/Program deleted file mode 100644 index a5bfe267e..000000000 --- a/libs/lib/mac32/include/osgParticle/Program +++ /dev/null @@ -1,68 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_PROGRAM -#define OSGPARTICLE_PROGRAM 1 - -#include -#include - -#include -#include -#include -#include - -namespace osgParticle -{ - - /** An abstract ParticleProcessor descendant for modifying particles "on the fly" - during the cull traversal. - Descendants of this class must implement the execute() method, which should iterate - through all particles in the linked particle system and modify them somehow - (usually updating their velocity vector). - */ - class OSGPARTICLE_EXPORT Program: public ParticleProcessor - { - public: - Program(); - Program(const Program& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "Program"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } } - - protected: - virtual ~Program() {} - Program& operator=(const Program&) { return *this; } - - /// Implementation of ParticleProcessor::process(). Do not call this method by yourself. - inline void process(double dt); - - /// Execute the program on the particle system. Must be overriden in descendant classes. - virtual void execute(double dt) = 0; - - private: - }; - - // INLINE FUNCTIONS - - inline void Program::process(double dt) - { - execute(dt); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/RadialShooter b/libs/lib/mac32/include/osgParticle/RadialShooter deleted file mode 100644 index 8ae1e5011..000000000 --- a/libs/lib/mac32/include/osgParticle/RadialShooter +++ /dev/null @@ -1,196 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_RADIAL_SHOOTER -#define OSGPARTICLE_RADIAL_SHOOTER 1 - -#include -#include -#include - -#include -#include -#include - -namespace osgParticle -{ - - /** A shooter class that shoots particles radially. - This shooter computes the velocity vector of incoming particles by choosing a - random direction and a random speed. Both direction and speed are chosen within - specified ranges. The direction is defined by two angles: theta, which - is the angle between the velocity vector and the Z axis, and phi, which is - the angle between the X axis and the velocity vector projected onto the X-Y plane. - */ - class RadialShooter: public Shooter { - public: - inline RadialShooter(); - inline RadialShooter(const RadialShooter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, RadialShooter); - - /// Get the range of possible values for theta angle. - inline const rangef& getThetaRange() const; - - /// Set the range of possible values for theta angle. - inline void setThetaRange(const rangef& r); - - /// Set the range of possible values for theta angle. - inline void setThetaRange(float r1, float r2); - - /// Get the range of possible values for phi angle. - inline const rangef& getPhiRange() const; - - /// Set the range of possible values for phi angle. - inline void setPhiRange(const rangef& r); - - /// Set the range of possible values for phi angle. - inline void setPhiRange(float r1, float r2); - - /// Get the range of possible values for initial speed of particles. - inline const rangef& getInitialSpeedRange() const; - - /// Set the range of possible values for initial speed of particles. - inline void setInitialSpeedRange(const rangef& r); - - /// Set the range of possible values for initial speed of particles. - inline void setInitialSpeedRange(float r1, float r2); - - /// Get the range of possible values for initial rotational speed of particles. - inline const rangev3& getInitialRotationalSpeedRange() const; - - /// Set the range of possible values for initial rotational speed of particles. - inline void setInitialRotationalSpeedRange(const rangev3& r); - - /// Set the range of possible values for initial rotational speed of particles. - inline void setInitialRotationalSpeedRange(const osg::Vec3& r1, const osg::Vec3& r2); - - /// Shoot a particle. Do not call this method manually. - inline void shoot(Particle* P) const; - - protected: - virtual ~RadialShooter() {} - RadialShooter& operator=(const RadialShooter&) { return *this; } - - private: - rangef _theta_range; - rangef _phi_range; - rangef _speed_range; - rangev3 _rot_speed_range; - }; - - // INLINE FUNCTIONS - - inline RadialShooter::RadialShooter() - : Shooter(), - _theta_range(0, 0.5f*osg::PI_4), - _phi_range(0, 2*osg::PI), - _speed_range(10, 10), - _rot_speed_range(osg::Vec3(0,0,0), osg::Vec3(0,0,0)) - { - } - - inline RadialShooter::RadialShooter(const RadialShooter& copy, const osg::CopyOp& copyop) - : Shooter(copy, copyop), - _theta_range(copy._theta_range), - _phi_range(copy._phi_range), - _speed_range(copy._speed_range), - _rot_speed_range(copy._rot_speed_range) - { - } - - inline const rangef& RadialShooter::getThetaRange() const - { - return _theta_range; - } - - inline const rangef& RadialShooter::getPhiRange() const - { - return _phi_range; - } - - inline const rangef& RadialShooter::getInitialSpeedRange() const - { - return _speed_range; - } - - inline const rangev3& RadialShooter::getInitialRotationalSpeedRange() const - { - return _rot_speed_range; - } - - inline void RadialShooter::setThetaRange(const rangef& r) - { - _theta_range = r; - } - - inline void RadialShooter::setThetaRange(float r1, float r2) - { - _theta_range.minimum = r1; - _theta_range.maximum = r2; - } - - inline void RadialShooter::setPhiRange(const rangef& r) - { - _phi_range = r; - } - - inline void RadialShooter::setPhiRange(float r1, float r2) - { - _phi_range.minimum = r1; - _phi_range.maximum = r2; - } - - inline void RadialShooter::setInitialSpeedRange(const rangef& r) - { - _speed_range = r; - } - - inline void RadialShooter::setInitialSpeedRange(float r1, float r2) - { - _speed_range.minimum = r1; - _speed_range.maximum = r2; - } - - inline void RadialShooter::setInitialRotationalSpeedRange(const rangev3& r) - { - _rot_speed_range = r; - } - - inline void RadialShooter::setInitialRotationalSpeedRange(const osg::Vec3& r1, const osg::Vec3& r2) - { - _rot_speed_range.minimum = r1; - _rot_speed_range.maximum = r2; - } - - inline void RadialShooter::shoot(Particle* P) const - { - float theta = _theta_range.get_random(); - float phi = _phi_range.get_random(); - float speed = _speed_range.get_random(); - osg::Vec3 rot_speed = _rot_speed_range.get_random(); - - P->setVelocity(osg::Vec3( - speed * sinf(theta) * cosf(phi), - speed * sinf(theta) * sinf(phi), - speed * cosf(theta) - )); - - P->setAngularVelocity(rot_speed); - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/RandomRateCounter b/libs/lib/mac32/include/osgParticle/RandomRateCounter deleted file mode 100644 index f4d4d0946..000000000 --- a/libs/lib/mac32/include/osgParticle/RandomRateCounter +++ /dev/null @@ -1,76 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_RANDOMRATE_COUNTER -#define OSGPARTICLE_RANDOMRATE_COUNTER 1 - -#include - -#include -#include - -namespace osgParticle -{ - - class RandomRateCounter: public VariableRateCounter { - public: - inline RandomRateCounter(); - inline RandomRateCounter(const RandomRateCounter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, RandomRateCounter); - - /// Return the number of particles to be created in this frame - inline int numParticlesToCreate(double dt) const; - - protected: - virtual ~RandomRateCounter() {} - - mutable float _np; - }; - - // INLINE FUNCTIONS - - inline RandomRateCounter::RandomRateCounter() - : VariableRateCounter(), _np(0) - { - } - - inline RandomRateCounter::RandomRateCounter(const RandomRateCounter& copy, const osg::CopyOp& copyop) - : VariableRateCounter(copy, copyop), _np(copy._np) - { - } - - inline int RandomRateCounter::numParticlesToCreate(double dt) const - { - // compute the number of new particles, clamping it to 1 second of particles at the maximum rate - float numNewParticles = osg::minimum(static_cast(dt * getRateRange().get_random()), getRateRange().maximum); - - // add the number of new particles to value carried over from the previous call - _np += numNewParticles; - - // round down the number of particles. - int n = static_cast(_np); - - // take away the number of rounded number of particles leaving the decimal place - // this is done so that two frames of 0.5's will results in first frame 0 new particles, second frame 1 - _np -= n; - - // return the rounded number of particles to be created - return n; - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/SectorPlacer b/libs/lib/mac32/include/osgParticle/SectorPlacer deleted file mode 100644 index ae852e784..000000000 --- a/libs/lib/mac32/include/osgParticle/SectorPlacer +++ /dev/null @@ -1,149 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_SECTOR_PLACER -#define OSGPARTICLE_SECTOR_PLACER 1 - -#include -#include -#include - -#include -#include -#include -#include - -namespace osgParticle -{ - - /** A sector-shaped particle placer. - This placer sets the initial position of incoming particle by choosing a random position - within a circular sector; this sector is defined by three parameters: a center point, - which is inherited directly from osgParticle::CenteredPlacer, a range of values - for radius, and a range of values for the central angle (sometimes called phi). - */ - class SectorPlacer: public CenteredPlacer { - public: - inline SectorPlacer(); - inline SectorPlacer(const SectorPlacer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - /// Get the range of possible values for radius. - inline const rangef& getRadiusRange() const; - - /// Set the range of possible values for radius. - inline void setRadiusRange(const rangef& r); - - /// Set the range of possible values for radius. - inline void setRadiusRange(float r1, float r2); - - /// Get the range of possible values for the central angle. - inline const rangef& getPhiRange() const; - - /// Set the range of possible values for the central angle. - inline void setPhiRange(const rangef& r); - - /// Set the range of possible values for the central angle. - inline void setPhiRange(float r1, float r2); - - META_Object(osgParticle, SectorPlacer); - - /// Place a particle. Do not call it manually. - inline void place(Particle* P) const; - - /// return the area of the sector - inline float volume() const; - - /// return the control position - inline osg::Vec3 getControlPosition() const; - - protected: - virtual ~SectorPlacer() {} - SectorPlacer& operator=(const SectorPlacer&) { return *this; } - - private: - rangef _rad_range; - rangef _phi_range; - }; - - // INLINE FUNCTIONS - - inline SectorPlacer::SectorPlacer() - : CenteredPlacer(), _rad_range(0, 1), _phi_range(0, osg::PI*2) - { - } - - inline SectorPlacer::SectorPlacer(const SectorPlacer& copy, const osg::CopyOp& copyop) - : CenteredPlacer(copy, copyop), _rad_range(copy._rad_range), _phi_range(copy._phi_range) - { - } - - inline const rangef& SectorPlacer::getRadiusRange() const - { - return _rad_range; - } - - inline const rangef& SectorPlacer::getPhiRange() const - { - return _phi_range; - } - - inline void SectorPlacer::setRadiusRange(const rangef& r) - { - _rad_range = r; - } - - inline void SectorPlacer::setRadiusRange(float r1, float r2) - { - _rad_range.minimum = r1; - _rad_range.maximum = r2; - } - - inline void SectorPlacer::setPhiRange(const rangef& r) - { - _phi_range = r; - } - - inline void SectorPlacer::setPhiRange(float r1, float r2) - { - _phi_range.minimum = r1; - _phi_range.maximum = r2; - } - - inline void SectorPlacer::place(Particle* P) const - { - float rad = _rad_range.get_random_sqrtf(); - float phi = _phi_range.get_random(); - - osg::Vec3 pos( - getCenter().x() + rad * cosf(phi), - getCenter().y() + rad * sinf(phi), - getCenter().z()); - - P->setPosition(pos); - } - - inline float SectorPlacer::volume() const - { - return 0.5f * (_phi_range.maximum - _phi_range.minimum) * - (_rad_range.maximum*_rad_range.maximum - _rad_range.minimum*_rad_range.minimum); - } - - inline osg::Vec3 SectorPlacer::getControlPosition() const - { - return getCenter(); - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/SegmentPlacer b/libs/lib/mac32/include/osgParticle/SegmentPlacer deleted file mode 100644 index 22a5e1be6..000000000 --- a/libs/lib/mac32/include/osgParticle/SegmentPlacer +++ /dev/null @@ -1,144 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_SEGMENT_PLACER -#define OSGPARTICLE_SEGMENT_PLACER 1 - -#include -#include - -#include -#include -#include - -namespace osgParticle { - - /** A segment-shaped particle placer. - To use this placer you have to define a segment, by setting its two vertices (A and B); - when an emitter requests a SegmentPlacer to place a particle, the position is chosen randomly - within that segment. - */ - class SegmentPlacer: public Placer { - public: - inline SegmentPlacer(); - inline SegmentPlacer(const SegmentPlacer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgParticle, SegmentPlacer); - - /// get vertex A. - inline const osg::Vec3& getVertexA() const; - - /// Set vertex A of the segment as a vector. - inline void setVertexA(const osg::Vec3& v); - - /// Set vertex A of the segment as three floats. - inline void setVertexA(float x, float y, float z); - - /// get vertex B. - inline const osg::Vec3& getVertexB() const; - - /// Set vertex B of the segment as a vector. - inline void setVertexB(const osg::Vec3& v); - - /// Set vertex B of the segment as three floats. - inline void setVertexB(float x, float y, float z); - - /// Set both vertices. - inline void setSegment(const osg::Vec3& A, const osg::Vec3& B); - - /// Place a particle. This method is called by ModularEmitter, do not call it manually. - inline void place(Particle* P) const; - - /// return the length of the segment - inline float volume() const; - - /// return the control position - inline osg::Vec3 getControlPosition() const; - - protected: - virtual ~SegmentPlacer() {} - SegmentPlacer& operator=(const SegmentPlacer&) { return *this; } - - private: - osg::Vec3 _vertexA; - osg::Vec3 _vertexB; - }; - - // INLINE FUNCTIONS - - inline SegmentPlacer::SegmentPlacer() - : Placer(), _vertexA(-1, 0, 0), _vertexB(1, 0, 0) - { - } - - inline SegmentPlacer::SegmentPlacer(const SegmentPlacer& copy, const osg::CopyOp& copyop) - : Placer(copy, copyop), _vertexA(copy._vertexA), _vertexB(copy._vertexB) - { - } - - inline const osg::Vec3& SegmentPlacer::getVertexA() const - { - return _vertexA; - } - - inline const osg::Vec3& SegmentPlacer::getVertexB() const - { - return _vertexB; - } - - inline void SegmentPlacer::setSegment(const osg::Vec3& A, const osg::Vec3& B) - { - _vertexA = A; - _vertexB = B; - } - - inline void SegmentPlacer::place(Particle* P) const - { - P->setPosition(rangev3(_vertexA, _vertexB).get_random()); - } - - inline float SegmentPlacer::volume() const - { - return (_vertexB - _vertexA).length(); - } - - inline void SegmentPlacer::setVertexA(const osg::Vec3& v) - { - _vertexA = v; - } - - inline void SegmentPlacer::setVertexA(float x, float y, float z) - { - _vertexA.set(x, y, z); - } - - inline void SegmentPlacer::setVertexB(const osg::Vec3& v) - { - _vertexB = v; - } - - inline void SegmentPlacer::setVertexB(float x, float y, float z) - { - _vertexB.set(x, y, z); - } - - inline osg::Vec3 SegmentPlacer::getControlPosition() const - { - return (_vertexA+_vertexB)*0.5f; - } - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Shooter b/libs/lib/mac32/include/osgParticle/Shooter deleted file mode 100644 index 47b4f125c..000000000 --- a/libs/lib/mac32/include/osgParticle/Shooter +++ /dev/null @@ -1,64 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_SHOOTER -#define OSGPARTICLE_SHOOTER 1 - -#include -#include - -namespace osgParticle -{ - - class Particle; - - /** An abstract base class used by ModularEmitter to "shoot" the particles after they have been placed. - Descendants of this class must override the shoot() method. - */ - class Shooter: public osg::Object - { - public: - inline Shooter(); - inline Shooter(const Shooter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "Shooter"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - - /** Shoot a particle. Must be overriden by descendants. - This method should only set the velocity vector of particle P, leaving other - attributes unchanged. - */ - virtual void shoot(Particle* P) const = 0; - - protected: - virtual ~Shooter() {} - Shooter &operator=(const Shooter &) { return *this; } - }; - - // INLINE FUNCTIONS - - inline Shooter::Shooter() - : osg::Object() - { - } - - inline Shooter::Shooter(const Shooter& copy, const osg::CopyOp& copyop) - : osg::Object(copy, copyop) - { - } - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/SinkOperator b/libs/lib/mac32/include/osgParticle/SinkOperator deleted file mode 100644 index 21b62ebb7..000000000 --- a/libs/lib/mac32/include/osgParticle/SinkOperator +++ /dev/null @@ -1,100 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -// Written by Wang Rui, (C) 2010 - -#ifndef OSGPARTICLE_SINKOPERATOR -#define OSGPARTICLE_SINKOPERATOR - -#include -#include - -namespace osgParticle -{ - - -/** A sink operator kills particles if positions or velocities inside/outside the specified domain. - Refer to David McAllister's Particle System API (http://www.particlesystems.org) -*/ -class OSGPARTICLE_EXPORT SinkOperator : public DomainOperator -{ -public: - enum SinkTarget { SINK_POSITION, SINK_VELOCITY, SINK_ANGULAR_VELOCITY }; - enum SinkStrategy { SINK_INSIDE, SINK_OUTSIDE }; - - SinkOperator() - : DomainOperator(), _sinkTarget(SINK_POSITION), _sinkStrategy(SINK_INSIDE) - {} - - SinkOperator( const SinkOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) - : DomainOperator(copy, copyop), _sinkTarget(copy._sinkTarget), _sinkStrategy(copy._sinkStrategy) - {} - - META_Object( osgParticle, SinkOperator ); - - /// Set the sink strategy - void setSinkTarget( SinkTarget so ) { _sinkTarget = so; } - - /// Get the sink strategy - SinkTarget getSinkTarget() const { return _sinkTarget; } - - /// Set the sink strategy - void setSinkStrategy( SinkStrategy ss ) { _sinkStrategy = ss; } - - /// Get the sink strategy - SinkStrategy getSinkStrategy() const { return _sinkStrategy; } - - /// Perform some initializations. Do not call this method manually. - void beginOperate( Program* prg ); - -protected: - virtual ~SinkOperator() {} - SinkOperator& operator=( const SinkOperator& ) { return *this; } - - virtual void handlePoint( const Domain& domain, Particle* P, double dt ); - virtual void handleLineSegment( const Domain& domain, Particle* P, double dt ); - virtual void handleTriangle( const Domain& domain, Particle* P, double dt ); - virtual void handleRectangle( const Domain& domain, Particle* P, double dt ); - virtual void handlePlane( const Domain& domain, Particle* P, double dt ); - virtual void handleSphere( const Domain& domain, Particle* P, double dt ); - virtual void handleBox( const Domain& domain, Particle* P, double dt ); - virtual void handleDisk( const Domain& domain, Particle* P, double dt ); - - inline const osg::Vec3& getValue( Particle* P ); - inline void kill( Particle* P, bool insideDomain ); - - SinkTarget _sinkTarget; - SinkStrategy _sinkStrategy; -}; - -// INLINE METHODS - -inline const osg::Vec3& SinkOperator::getValue( Particle* P ) -{ - switch ( _sinkTarget ) - { - case SINK_VELOCITY: return P->getVelocity(); - case SINK_ANGULAR_VELOCITY: return P->getAngularVelocity(); - case SINK_POSITION: default: return P->getPosition(); - } -} - -inline void SinkOperator::kill( Particle* P, bool insideDomain ) -{ - if ( !((_sinkStrategy==SINK_INSIDE) ^ insideDomain) ) - P->kill(); -} - - -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/SmokeEffect b/libs/lib/mac32/include/osgParticle/SmokeEffect deleted file mode 100644 index 5a4ba23a2..000000000 --- a/libs/lib/mac32/include/osgParticle/SmokeEffect +++ /dev/null @@ -1,56 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_SMOKEEFFECT -#define OSGPARTICLE_SMOKEEFFECT - -#include -#include -#include - -namespace osgParticle -{ - - class OSGPARTICLE_EXPORT SmokeEffect : public ParticleEffect - { - public: - - explicit SmokeEffect(bool automaticSetup=true); - - SmokeEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f); - - SmokeEffect(const SmokeEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,SmokeEffect); - - virtual void setDefaults(); - - virtual void setUpEmitterAndProgram(); - - virtual Emitter* getEmitter() { return _emitter.get(); } - virtual const Emitter* getEmitter() const { return _emitter.get(); } - - virtual Program* getProgram() { return _program.get(); } - virtual const Program* getProgram() const { return _program.get(); } - - protected: - - virtual ~SmokeEffect() {} - - osg::ref_ptr _emitter; - osg::ref_ptr _program; - - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/SmokeTrailEffect b/libs/lib/mac32/include/osgParticle/SmokeTrailEffect deleted file mode 100644 index a0f1e7034..000000000 --- a/libs/lib/mac32/include/osgParticle/SmokeTrailEffect +++ /dev/null @@ -1,56 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPARTICLE_SMOKETRAILEFFECT -#define OSGPARTICLE_SMOKETRAILEFFECT - -#include -#include -#include - -namespace osgParticle -{ - - class OSGPARTICLE_EXPORT SmokeTrailEffect : public ParticleEffect - { - public: - - explicit SmokeTrailEffect(bool automaticSetup=true); - - SmokeTrailEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f); - - SmokeTrailEffect(const SmokeTrailEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Node(osgParticle,SmokeTrailEffect); - - virtual void setDefaults(); - - virtual void setUpEmitterAndProgram(); - - virtual Emitter* getEmitter() { return _emitter.get(); } - virtual const Emitter* getEmitter() const { return _emitter.get(); } - - virtual Program* getProgram() { return _program.get(); } - virtual const Program* getProgram() const { return _program.get(); } - - protected: - - virtual ~SmokeTrailEffect() {} - - osg::ref_ptr _emitter; - osg::ref_ptr _program; - - }; -} - -#endif diff --git a/libs/lib/mac32/include/osgParticle/VariableRateCounter b/libs/lib/mac32/include/osgParticle/VariableRateCounter deleted file mode 100644 index 92d59df7a..000000000 --- a/libs/lib/mac32/include/osgParticle/VariableRateCounter +++ /dev/null @@ -1,77 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_VARIABLERATE_COUNTER -#define OSGPARTICLE_VARIABLERATE_COUNTER 1 - -#include -#include - -#include -#include - -namespace osgParticle -{ - - class VariableRateCounter: public Counter { - public: - inline VariableRateCounter(); - inline VariableRateCounter(const VariableRateCounter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - virtual const char* libraryName() const { return "osgParticle"; } - virtual const char* className() const { return "VariableRateCounter"; } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj) != 0; } - - inline const rangef& getRateRange() const; - inline void setRateRange(const rangef& r); - inline void setRateRange(float minrange, float maxrange); - - protected: - virtual ~VariableRateCounter() {} - - private: - rangef _rate_range; - }; - - // INLINE FUNCTIONS - - inline VariableRateCounter::VariableRateCounter() - : Counter(), _rate_range(1, 1) - { - } - - inline VariableRateCounter::VariableRateCounter(const VariableRateCounter& copy, const osg::CopyOp& copyop) - : Counter(copy, copyop), _rate_range(copy._rate_range) - { - } - - inline const rangef &VariableRateCounter::getRateRange() const - { - return _rate_range; - } - - inline void VariableRateCounter::setRateRange(const rangef& r) - { - _rate_range = r; - } - - inline void VariableRateCounter::setRateRange(float minrange, float maxrange) - { - _rate_range.set(minrange, maxrange); - } - -} - - -#endif diff --git a/libs/lib/mac32/include/osgParticle/Version b/libs/lib/mac32/include/osgParticle/Version deleted file mode 100644 index 5fbe4ccee..000000000 --- a/libs/lib/mac32/include/osgParticle/Version +++ /dev/null @@ -1,48 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_VERSION -#define OSGPARTICLE_VERSION 1 - -#include - -extern "C" { - -/** - * osgParticleGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgParticleGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph Particle library - # - AC_CHECK_LIB(osg, osgParticleGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph Particle library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -OSGPARTICLE_EXPORT const char* osgParticleGetVersion(); - -/** - * osgParticleGetLibraryName() returns the library name in human friendly form. -*/ -OSGPARTICLE_EXPORT const char* osgParticleGetLibraryName(); - -} - -#endif - diff --git a/libs/lib/mac32/include/osgParticle/range b/libs/lib/mac32/include/osgParticle/range deleted file mode 100644 index 2984a9abf..000000000 --- a/libs/lib/mac32/include/osgParticle/range +++ /dev/null @@ -1,89 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ -//osgParticle - Copyright (C) 2002 Marco Jez - -#ifndef OSGPARTICLE_RANGE -#define OSGPARTICLE_RANGE 1 - -// include Export simply to disable Visual Studio silly warnings. -#include - -#include - -#include -#include -#include - -namespace osgParticle -{ - - /** - A simple struct template useful to store ranges of values as min/max pairs. - This struct template helps storing min/max ranges for values of any kind; class ValueType is - the type of values to be stored, and it must support operations ValueType + ValueType, ValueType - ValueType, - and ValueType * float, otherwise the geValueTyperandom() method will not compile. - This struct could be extended to customize the random number generator (now it uses only - std::rand()). - */ - template struct range - { - - /// Lower bound. - ValueType minimum; - - /// Higher bound. - ValueType maximum; - - /// Construct the object by calling default constructors for min and max. - range() : minimum(ValueType()), maximum(ValueType()) {} - - /// Construct and initialize min and max directly. - range(const ValueType& mn, const ValueType& mx) : minimum(mn), maximum(mx) {} - - /// Set min and max. - void set(const ValueType& mn, const ValueType& mx) { minimum = mn; maximum = mx; } - - /// Get a random value between min and max. - ValueType get_random() const - { - return minimum + (maximum - minimum) * rand() / RAND_MAX; - } - - /// Get a random square root value between min and max. - ValueType get_random_sqrtf() const - { - return minimum + (maximum - minimum) * sqrtf( static_cast(rand()) / static_cast(RAND_MAX) ); - } - - ValueType mid() const - { - return (minimum+maximum)*0.5f; - } - - }; - - /// Range of floats. - typedef range rangef; - - /// Range of osg::Vec2s. - typedef range rangev2; - - /// Range of osg::Vec3s. - typedef range rangev3; - - /// Range of osg::Vec4s. - typedef range rangev4; - -} - -#endif diff --git a/libs/lib/mac32/include/osgPresentation/AnimationMaterial b/libs/lib/mac32/include/osgPresentation/AnimationMaterial deleted file mode 100644 index b9e44bf7a..000000000 --- a/libs/lib/mac32/include/osgPresentation/AnimationMaterial +++ /dev/null @@ -1,173 +0,0 @@ -/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield - * - * This software is open source and may be redistributed and/or modified under - * the terms of the GNU General Public License (GPL) version 2.0. - * The full license is in LICENSE.txt file included with this distribution,. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * include LICENSE.txt for more details. -*/ - -#ifndef OSG_ANIMATIONMATERIAL -#define OSG_ANIMATIONMATERIAL 1 - -#include -#include - -#include - -#include -#include -#include - -namespace osgPresentation { - -/** AnimationMaterial for specify the time varying transformation pathway to use when update camera and model objects. - * Subclassed from Transform::ComputeTransformCallback allows AnimationMaterial to - * be attached directly to Transform nodes to move subgraphs around the scene. -*/ -class OSGPRESENTATION_EXPORT AnimationMaterial : public virtual osg::Object -{ - public: - - AnimationMaterial():_loopMode(LOOP) {} - - AnimationMaterial(const AnimationMaterial& ap, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - Object(ap,copyop), - _timeControlPointMap(ap._timeControlPointMap), - _loopMode(ap._loopMode) {} - - META_Object(osg,AnimationMaterial); - - - /** get the transformation matrix for a point in time.*/ - bool getMaterial(double time,osg::Material& material) const; - - void insert(double time,osg::Material* material); - - double getFirstTime() const { if (!_timeControlPointMap.empty()) return _timeControlPointMap.begin()->first; else return 0.0;} - double getLastTime() const { if (!_timeControlPointMap.empty()) return _timeControlPointMap.rbegin()->first; else return 0.0;} - double getPeriod() const { return getLastTime()-getFirstTime();} - - enum LoopMode - { - SWING, - LOOP, - NO_LOOPING - }; - - void setLoopMode(LoopMode lm) { _loopMode = lm; } - - LoopMode getLoopMode() const { return _loopMode; } - - - typedef std::map > TimeControlPointMap; - - TimeControlPointMap& getTimeControlPointMap() { return _timeControlPointMap; } - - const TimeControlPointMap& getTimeControlPointMap() const { return _timeControlPointMap; } - - /** read the anumation path from a flat ascii file stream.*/ - void read(std::istream& in); - - /** write the anumation path to a flat ascii file stream.*/ - void write(std::ostream& out) const; - - bool requiresBlending() const; - - protected: - - virtual ~AnimationMaterial() {} - - void interpolate(osg::Material& material, float r, const osg::Material& lhs,const osg::Material& rhs) const; - - TimeControlPointMap _timeControlPointMap; - LoopMode _loopMode; - -}; - - -class OSGPRESENTATION_EXPORT AnimationMaterialCallback : public osg::NodeCallback -{ - public: - - AnimationMaterialCallback(): - _timeOffset(0.0), - _timeMultiplier(1.0), - _firstTime(DBL_MAX), - _latestTime(0.0), - _pause(false), - _pauseTime(0.0) {} - - - AnimationMaterialCallback(const AnimationMaterialCallback& apc,const osg::CopyOp& copyop): - osg::NodeCallback(apc,copyop), - _animationMaterial(apc._animationMaterial), - _useInverseMatrix(apc._useInverseMatrix), - _timeOffset(apc._timeOffset), - _timeMultiplier(apc._timeMultiplier), - _firstTime(apc._firstTime), - _latestTime(apc._latestTime), - _pause(apc._pause), - _pauseTime(apc._pauseTime) {} - - - META_Object(osg,AnimationMaterialCallback); - - AnimationMaterialCallback(AnimationMaterial* ap,double timeOffset=0.0f,double timeMultiplier=1.0f): - _animationMaterial(ap), - _useInverseMatrix(false), - _timeOffset(timeOffset), - _timeMultiplier(timeMultiplier), - _firstTime(DBL_MAX), - _latestTime(0.0), - _pause(false), - _pauseTime(0.0) {} - - void setAnimationMaterial(AnimationMaterial* path) { _animationMaterial = path; } - - AnimationMaterial* getAnimationMaterial() { return _animationMaterial.get(); } - - const AnimationMaterial* getAnimationMaterial() const { return _animationMaterial.get(); } - - void setTimeOffset(double offset) { _timeOffset = offset; } - double getTimeOffset() const { return _timeOffset; } - - void setTimeMultiplier(double multiplier) { _timeMultiplier = multiplier; } - double getTimeMultiplier() const { return _timeMultiplier; } - - void reset(); - - void setPause(bool pause); - - /** get the animation time that is used to specify the position along the AnimationMaterial. - * Animation time is computed from the formula ((_latestTime-_firstTime)-_timeOffset)*_timeMultiplier.*/ - double getAnimationTime() const; - - /** implements the callback*/ - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); - - void update(osg::Node& node); - - public: - - osg::ref_ptr _animationMaterial; - bool _useInverseMatrix; - double _timeOffset; - double _timeMultiplier; - double _firstTime; - double _latestTime; - bool _pause; - double _pauseTime; - - protected: - - ~AnimationMaterialCallback(){} - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgPresentation/CompileSlideCallback b/libs/lib/mac32/include/osgPresentation/CompileSlideCallback deleted file mode 100644 index 707b0b0f2..000000000 --- a/libs/lib/mac32/include/osgPresentation/CompileSlideCallback +++ /dev/null @@ -1,45 +0,0 @@ -/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield - * - * This software is open source and may be redistributed and/or modified under - * the terms of the GNU General Public License (GPL) version 2.0. - * The full license is in LICENSE.txt file included with this distribution,. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * include LICENSE.txt for more details. -*/ - -#ifndef OSG_COMPILESLIDECALLBACK -#define OSG_COMPILESLIDECALLBACK 1 - -#include -#include - -namespace osgPresentation { - -class OSGPRESENTATION_EXPORT CompileSlideCallback : public osg::Camera::DrawCallback -{ - public: - - CompileSlideCallback(): - _needCompile(false), - _frameNumber(0) {} - - virtual void operator()(const osg::Camera& camera) const; - - void needCompile(osg::Node* node) { _needCompile=true; _sceneToCompile = node; } - - protected: - - virtual ~CompileSlideCallback() {} - - mutable bool _needCompile; - mutable unsigned int _frameNumber; - osg::ref_ptr _sceneToCompile; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgPresentation/Export b/libs/lib/mac32/include/osgPresentation/Export deleted file mode 100644 index 2e2d5910c..000000000 --- a/libs/lib/mac32/include/osgPresentation/Export +++ /dev/null @@ -1,49 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGPRESENTATION_EXPORT_ -#define OSGPRESENTATION_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGPRESENTATION_EXPORT - # elif defined( OSGPRESENTATION_LIBRARY ) - # define OSGPRESENTATION_EXPORT __declspec(dllexport) - # else - # define OSGPRESENTATION_EXPORT __declspec(dllimport) - # endif -#else - # define OSGPRESENTATION_EXPORT -#endif - - -/** - -\namespace osgPresentation - -The osgPresentation library is a NodeKit that extends the core scene graph to support 3D scene graph based presentations. -*/ - -#endif diff --git a/libs/lib/mac32/include/osgPresentation/PickEventHandler b/libs/lib/mac32/include/osgPresentation/PickEventHandler deleted file mode 100644 index 028ab9ee2..000000000 --- a/libs/lib/mac32/include/osgPresentation/PickEventHandler +++ /dev/null @@ -1,71 +0,0 @@ -/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield - * - * This software is open source and may be redistributed and/or modified under - * the terms of the GNU General Public License (GPL) version 2.0. - * The full license is in LICENSE.txt file included with this distribution,. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * include LICENSE.txt for more details. -*/ - -#ifndef PICKEVENTHANDLER -#define PICKEVENTHANDLER 1 - -#include -#include - -#include - -#include - -namespace osgPresentation -{ - -class OSGPRESENTATION_EXPORT PickEventHandler : public osgGA::GUIEventHandler -{ - public: - - PickEventHandler(osgPresentation::Operation operation, bool relativeJump=true, int slideNum=0, int layerNum=0); - PickEventHandler(const std::string& str, osgPresentation::Operation operation, bool relativeJump=true, int slideNum=0, int layerNum=0); - PickEventHandler(const osgPresentation::KeyPosition& keyPos, bool relativeJump=true, int slideNum=0, int layerNum=0); - - void setOperation(osgPresentation::Operation operation) { _operation = operation; } - osgPresentation::Operation getOperation() const { return _operation; } - - void setCommand(const std::string& str) { _command = str; } - const std::string& getCommand() const { return _command; } - - void setKeyPosition(const osgPresentation::KeyPosition& keyPos) { _keyPos = keyPos; } - const osgPresentation::KeyPosition& getKeyPosition() const { return _keyPos; } - - void setRelativeJump(int slideDelta, int layerDelta); - void setAbsoluteJump(int slideNum, int layerNum); - - bool getRelativeJump() const { return _relativeJump; } - int getSlideNum() const { return _slideNum; } - int getLayerNum() const { return _layerNum; } - - bool requiresJump() const { return _relativeJump ? (_slideNum!=0 || _layerNum!=0) : true; } - - virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv); - - virtual void accept(osgGA::GUIEventHandlerVisitor& v); - - virtual void getUsage(osg::ApplicationUsage& usage) const; - - void doOperation(); - - std::string _command; - osgPresentation::KeyPosition _keyPos; - osgPresentation::Operation _operation; - - bool _relativeJump; - int _slideNum; - int _layerNum; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgPresentation/SlideEventHandler b/libs/lib/mac32/include/osgPresentation/SlideEventHandler deleted file mode 100644 index ac0a5778d..000000000 --- a/libs/lib/mac32/include/osgPresentation/SlideEventHandler +++ /dev/null @@ -1,323 +0,0 @@ -/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield - * - * This software is open source and may be redistributed and/or modified under - * the terms of the GNU General Public License (GPL) version 2.0. - * The full license is in LICENSE.txt file included with this distribution,. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * include LICENSE.txt for more details. -*/ - -#ifndef SLIDEEVENTHANDLER -#define SLIDEEVENTHANDLER 1 - -#include -#include - -#include -#include - -#include - -namespace osgPresentation -{ - -/// Operations related to click to run/load/key events. -enum Operation -{ - RUN, - LOAD, - EVENT, - JUMP -}; - -struct HomePosition : public virtual osg::Referenced -{ - HomePosition() {} - - HomePosition(const osg::Vec3& in_eye, const osg::Vec3& in_center, const osg::Vec3& in_up): - eye(in_eye), - center(in_center), - up(in_up) {} - - osg::Vec3 eye; - osg::Vec3 center; - osg::Vec3 up; -}; - -struct KeyPosition -{ - KeyPosition(unsigned int key=0, float x=FLT_MAX, float y=FLT_MAX): - _key((osgGA::GUIEventAdapter::KeySymbol)key), - _x(x), - _y(y) {} - - - void set(unsigned int key=0, float x=FLT_MAX, float y=FLT_MAX) - { - _key = (osgGA::GUIEventAdapter::KeySymbol)key; - _x = x; - _y = y; - } - - osgGA::GUIEventAdapter::KeySymbol _key; - float _x; - float _y; -}; - -struct LayerCallback : public virtual osg::Referenced -{ - virtual void operator() (osg::Node* node) const = 0; -}; - -struct OSGPRESENTATION_EXPORT LayerAttributes : public virtual osg::Referenced -{ - LayerAttributes():_duration(0),_relativeJump(true),_slideNum(0),_layerNum(0) {} - LayerAttributes(double in_duration):_duration(in_duration),_relativeJump(true),_slideNum(0),_layerNum(0) {} - - void setDuration(double duration) { _duration = duration; } - double getDuration() const { return _duration; } - - typedef std::vector Keys; - typedef std::vector RunStrings; - - void setKeys(const Keys& keys) { _keys = keys; } - const Keys& getKeys() const { return _keys; } - - void addKey(const KeyPosition& kp) { _keys.push_back(kp); } - - void setRunStrings(const RunStrings& runStrings) { _runStrings = runStrings; } - const RunStrings& getRunStrings() const { return _runStrings; } - - void addRunString(const std::string& runString) { _runStrings.push_back(runString); } - - void setJump(bool relativeJump, int slideNum, int layerNum) - { - _relativeJump = relativeJump; - _slideNum = slideNum; - _layerNum = layerNum; - } - - bool getRelativeJump() const { return _relativeJump; } - int getSlideNum() const { return _slideNum; } - int getLayerNum() const { return _layerNum; } - - bool requiresJump() const { return _relativeJump ? (_slideNum!=0 || _layerNum!=0) : true; } - - double _duration; - Keys _keys; - RunStrings _runStrings; - - bool _relativeJump; - int _slideNum; - int _layerNum; - - void addEnterCallback(LayerCallback* lc) { _enterLayerCallbacks.push_back(lc); } - void addLeaveCallback(LayerCallback* lc) { _leaveLayerCallbacks.push_back(lc); } - - void callEnterCallbacks(osg::Node* node); - void callLeaveCallbacks(osg::Node* node); - - typedef std::list< osg::ref_ptr > LayerCallbacks; - LayerCallbacks _enterLayerCallbacks; - LayerCallbacks _leaveLayerCallbacks; -}; - -struct FilePathData : public virtual osg::Referenced -{ - FilePathData(const osgDB::FilePathList& fpl):filePathList(fpl) {} - - osgDB::FilePathList filePathList; -}; - - -struct dereference_less -{ - template - inline bool operator() (const T& lhs,const U& rhs) const - { - return *lhs < *rhs; - } -}; - -struct ObjectOperator : public osg::Referenced -{ - inline bool operator < (const ObjectOperator& rhs) const { return ptr() < rhs.ptr(); } - - virtual void* ptr() const = 0; - - virtual void enter() = 0; - virtual void maintain() = 0; - virtual void leave() = 0; - virtual void setPause(bool pause) = 0; - virtual void reset() = 0; - - virtual ~ObjectOperator() {} -}; - -class OSGPRESENTATION_EXPORT ActiveOperators -{ -public: - ActiveOperators(); - ~ActiveOperators(); - - void collect(osg::Node* incommingNode, osg::NodeVisitor::TraversalMode tm = osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN); - - void process(); - - void setPause(bool pause); - bool getPause() const { return _pause; } - - void reset(); - - typedef std::set< osg::ref_ptr, dereference_less > OperatorList; - -protected: - - void processOutgoing(); - void processIncomming(); - void processMaintained(); - - bool _pause; - - OperatorList _previous; - OperatorList _current; - - OperatorList _outgoing; - OperatorList _incomming; - OperatorList _maintained; - -}; - -class OSGPRESENTATION_EXPORT SlideEventHandler : public osgGA::GUIEventHandler -{ -public: - - SlideEventHandler(osgViewer::Viewer* viewer=0); - - static SlideEventHandler* instance(); - - META_Object(osgslideshowApp,SlideEventHandler); - - void set(osg::Node* model); - - virtual void accept(osgGA::GUIEventHandlerVisitor& v) { v.visit(*this); } - - /** Event traversal node callback method.*/ - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); - - virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&); - - virtual void getUsage(osg::ApplicationUsage& usage) const; - - osgViewer::Viewer* getViewer() { return _viewer.get(); } - - enum WhichPosition - { - FIRST_POSITION = 0, - LAST_POSITION = -1 - }; - - void compileSlide(unsigned int slideNum); - void releaseSlide(unsigned int slideNum); - - unsigned int getNumSlides(); - - int getActiveSlide() const { return _activeSlide; } - int getActiveLayer() const { return _activeLayer; } - - bool selectSlide(int slideNum,int layerNum=FIRST_POSITION); - bool selectLayer(int layerNum); - - bool nextLayerOrSlide(); - bool previousLayerOrSlide(); - - bool nextSlide(); - bool previousSlide(); - - bool nextLayer(); - bool previousLayer(); - - bool home(); - - void setAutoSteppingActive(bool flag = true) { _autoSteppingActive = flag; } - bool getAutoSteppingActive() const { return _autoSteppingActive; } - - void setTimeDelayBetweenSlides(double dt) { _timePerSlide = dt; } - double getTimeDelayBetweenSlides() const { return _timePerSlide; } - - double getDuration(const osg::Node* node) const; - - double getCurrentTimeDelayBetweenSlides() const; - - void setReleaseAndCompileOnEachNewSlide(bool flag) { _releaseAndCompileOnEachNewSlide = flag; } - bool getReleaseAndCompileOnEachNewSlide() const { return _releaseAndCompileOnEachNewSlide; } - - void setTimeDelayOnNewSlideWithMovies(float t) { _timeDelayOnNewSlideWithMovies = t; } - float getTimeDelayOnNewSlideWithMovies() const { return _timeDelayOnNewSlideWithMovies; } - - void setLoopPresentation(bool loop) { _loopPresentation = loop; } - bool getLoopPresentation() const { return _loopPresentation; } - - void dispatchEvent(const KeyPosition& keyPosition); - -protected: - - ~SlideEventHandler() {} - SlideEventHandler(const SlideEventHandler&,const osg::CopyOp&) {} - - bool home(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa); - - void updateAlpha(bool, bool, float x, float y); - void updateLight(float x, float y); - - - osg::observer_ptr _viewer; - - osg::observer_ptr _showSwitch; - int _activePresentation; - - osg::observer_ptr _presentationSwitch; - int _activeSlide; - - osg::observer_ptr _slideSwitch; - int _activeLayer; - - bool _firstTraversal; - double _previousTime; - double _timePerSlide; - bool _autoSteppingActive; - bool _loopPresentation; - bool _pause; - bool _hold; - - bool _updateLightActive; - bool _updateOpacityActive; - float _previousX, _previousY; - - bool _cursorOn; - - bool _releaseAndCompileOnEachNewSlide; - - bool _firstSlideOrLayerChange; - osg::Timer_t _tickAtFirstSlideOrLayerChange; - osg::Timer_t _tickAtLastSlideOrLayerChange; - - float _timeDelayOnNewSlideWithMovies; - - double _minimumTimeBetweenKeyPresses; - double _timeLastKeyPresses; - - ActiveOperators _activeOperators; - - osg::ref_ptr _compileSlideCallback; - - void updateOperators(); - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgPresentation/SlideShowConstructor b/libs/lib/mac32/include/osgPresentation/SlideShowConstructor deleted file mode 100644 index 5fd82b52a..000000000 --- a/libs/lib/mac32/include/osgPresentation/SlideShowConstructor +++ /dev/null @@ -1,520 +0,0 @@ -/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield - * - * This software is open source and may be redistributed and/or modified under - * the terms of the GNU General Public License (GPL) version 2.0. - * The full license is in LICENSE.txt file included with this distribution,. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * include LICENSE.txt for more details. -*/ - -#ifndef SLIDESHOWCONSTRUCTOR -#define SLIDESHOWCONSTRUCTOR - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace osgPresentation -{ - -class OSGPRESENTATION_EXPORT HUDSettings : public osg::Referenced -{ - public: - HUDSettings(double slideDistance, float eyeOffset, unsigned int leftMask, unsigned int rightMask); - - virtual bool getModelViewMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv) const; - - virtual bool getInverseModelViewMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv) const; - - double _slideDistance; - double _eyeOffset; - unsigned int _leftMask; - unsigned int _rightMask; - -protected: - - virtual ~HUDSettings(); -}; - - -class OSGPRESENTATION_EXPORT HUDTransform : public osg::Transform -{ - public: - - HUDTransform(HUDSettings* hudSettings); - - virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const; - - virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor*) const; - -protected: - - virtual ~HUDTransform(); - - osg::ref_ptr _hudSettings; - -}; - -class OSGPRESENTATION_EXPORT SlideShowConstructor -{ -public: - - - enum CoordinateFrame { SLIDE, MODEL }; - - - LayerAttributes* getOrCreateLayerAttributes(osg::Node* node); - - void setDuration(osg::Node* node,double duration) - { - getOrCreateLayerAttributes(node)->setDuration(duration); - } - - void addKey(osg::Node* node,const KeyPosition& kp) - { - getOrCreateLayerAttributes(node)->addKey(kp); - } - - void addRunString(osg::Node* node, const std::string& runString) - { - getOrCreateLayerAttributes(node)->addRunString(runString); - } - - void setJump(osg::Node* node, bool relativeJump, int slideNum, int layerNum) - { - getOrCreateLayerAttributes(node)->setJump(relativeJump, slideNum, layerNum); - } - - void addPresentationKey(const KeyPosition& kp) - { - if (!_presentationSwitch) createPresentation(); - if (_presentationSwitch.valid()) addKey( _presentationSwitch.get(), kp); - } - - void addPresentationRunString(const std::string& runString) - { - if (!_presentationSwitch) createPresentation(); - if (_presentationSwitch.valid()) addRunString( _presentationSwitch.get(),runString); - } - - void addSlideKey(const KeyPosition& kp) - { - if (!_slide) addSlide(); - if (_slide.valid()) addKey(_slide.get(),kp); - } - - void addSlideRunString(const std::string& runString) - { - if (!_slide) addSlide(); - if (_slide.valid()) addRunString(_slide.get(),runString); - } - - void setSlideJump(bool relativeJump, int switchNum, int layerNum) - { - if (!_slide) addSlide(); - if (_slide.valid()) setJump(_slide.get(),relativeJump, switchNum, layerNum); - } - - void addLayerKey(const KeyPosition& kp) - { - if (!_currentLayer) addLayer(); - if (_currentLayer.valid()) addKey(_currentLayer.get(),kp); - } - - void addLayerRunString(const std::string& runString) - { - if (!_currentLayer) addLayer(); - if (_currentLayer.valid()) addRunString(_currentLayer.get(),runString); - } - - - void setLayerJump(bool relativeJump, int switchNum, int layerNum) - { - if (!_currentLayer) addLayer(); - if (_currentLayer.valid()) setJump(_currentLayer.get(),relativeJump, switchNum, layerNum); - } - - - - struct PositionData - { - PositionData(): - frame(SlideShowConstructor::SLIDE), - position(0.0f,1.0f,0.0f), - //position(0.5f,0.5f,0.0f), - scale(1.0f,1.0f,1.0f), - rotate(0.0f,0.0f,0.0f,1.0f), - rotation(0.0f,0.0f,1.0f,0.0f), - absolute_path(false), - inverse_path(false), - path_time_offset(0.0), - path_time_multiplier(1.0f), - path_loop_mode(osg::AnimationPath::NO_LOOPING), - animation_material_time_offset(0.0), - animation_material_time_multiplier(1.0), - animation_material_loop_mode(AnimationMaterial::NO_LOOPING), - autoRotate(false), - autoScale(false), - hud(false) {} - - - bool requiresPosition() const - { - return (position[0]!=0.0f || position[1]!=1.0f || position[2]!=1.0f); - } - - bool requiresScale() const - { - return (scale[0]!=1.0f || scale[1]!=1.0f || scale[2]!=1.0f); - } - - bool requiresRotate() const - { - return rotate[0]!=0.0f; - } - - bool requiresAnimation() const - { - return (rotation[0]!=0.0f || !path.empty()); - } - - bool requiresMaterialAnimation() const - { - return !animation_material_filename.empty() || !fade.empty(); - } - - CoordinateFrame frame; - osg::Vec3 position; - osg::Vec3 scale; - osg::Vec4 rotate; - osg::Vec4 rotation; - std::string animation_name; - bool absolute_path; - bool inverse_path; - double path_time_offset; - double path_time_multiplier; - osg::AnimationPath::LoopMode path_loop_mode; - std::string path; - double animation_material_time_offset; - double animation_material_time_multiplier; - AnimationMaterial::LoopMode animation_material_loop_mode; - std::string animation_material_filename; - std::string fade; - bool autoRotate; - bool autoScale; - bool hud; - }; - - struct ModelData - { - ModelData(): - effect("") {} - - std::string effect; - }; - - struct ImageData - { - ImageData(): - width(1.0f), - height(1.0f), - region(0.0f,0.0f,1.0f,1.0f), - region_in_pixel_coords(false), - texcoord_rotate(0.0f), - loopingMode(osg::ImageStream::NO_LOOPING), - page(-1), - backgroundColor(1.0f,1.0f,1.0f,1.0f) {} - - float width; - float height; - osg::Vec4 region; - bool region_in_pixel_coords; - float texcoord_rotate; - osg::ImageStream::LoopingMode loopingMode; - int page; - osg::Vec4 backgroundColor; - }; - - struct VolumeData - { - enum ShadingModel - { - Standard, - Light, - Isosurface, - MaximumIntensityProjection - }; - - VolumeData(): - shadingModel(Standard), - useTabbedDragger(false), - useTrackballDragger(false), - region_in_pixel_coords(false), - alphaValue(1.0), - cutoffValue(0.1), - sampleDensityValue(0.005), - sampleDensityWhenMovingValue(0.0) - { - region[0] = region[1] = region[2] = 0.0f; - region[3] = region[4] = region[5] = 1.0f; - } - - ShadingModel shadingModel; - osg::ref_ptr transferFunction; - bool useTabbedDragger; - bool useTrackballDragger; - float region[6]; - bool region_in_pixel_coords; - float alphaValue; - float cutoffValue; - float sampleDensityValue; - float sampleDensityWhenMovingValue; - }; - - - struct FontData - { - FontData(): - font("fonts/arial.ttf"), - layout(osgText::Text::LEFT_TO_RIGHT), - alignment(osgText::Text::LEFT_BASE_LINE), - axisAlignment(osgText::Text::XZ_PLANE), - characterSizeMode(osgText::Text::OBJECT_COORDS), - characterSize(0.04f), - maximumHeight(1.0f), - maximumWidth(1.0f), - color(1.0f,1.0f,1.0f,1.0f) {} - - std::string font; - osgText::Text::Layout layout; - osgText::Text::AlignmentType alignment; - osgText::Text::AxisAlignment axisAlignment; - osgText::Text::CharacterSizeMode characterSizeMode; - float characterSize; - float maximumHeight; - float maximumWidth; - osg::Vec4 color; - }; - - - SlideShowConstructor(osgDB::Options* options); - - void createPresentation(); - - void setBackgroundColor(const osg::Vec4& color, bool updateClearNode); - const osg::Vec4& getBackgroundColor() const { return _backgroundColor; } - - void setTextColor(const osg::Vec4& color); - const osg::Vec4& getTextColor() const { return _textFontDataDefault.color; } - - void setPresentationName(const std::string& name); - - void setPresentationAspectRatio(float aspectRatio); - - void setPresentationAspectRatio(const std::string& str); - - void setPresentationDuration(double duration); - - - void addSlide(); - - void selectSlide(int slideNum); - - - void setSlideTitle(const std::string& name, PositionData& positionData, FontData& fontData) - { - _titlePositionData = positionData; - _titleFontData = fontData; - _slideTitle = name; - } - - void setSlideBackgrondHUD(bool hud) { _slideBackgroundAsHUD = hud; } - void setSlideBackground(const std::string& name) { _slideBackgroundImageFileName = name; } - - void setSlideDuration(double duration); - - - void addLayer(bool inheritPreviousLayers=true, bool defineAsBaseLayer=false); - - void selectLayer(int layerNum); - - void setLayerDuration(double duration); - - - // title settings - FontData& getTitleFontData() { return _titleFontData; } - FontData& getTitleFontDataDefault() { return _titleFontDataDefault; } - - PositionData& getTitlePositionData() { return _titlePositionData; } - PositionData& getTitlePositionDataDefault() { return _titlePositionDataDefault; } - - // text settings - FontData& getTextFontData() { return _textFontData; } - FontData& getTextFontDataDefault() { return _textFontDataDefault; } - - PositionData& getTextPositionData() { return _textPositionData; } - PositionData& getTextPositionDataDefault() { return _textPositionDataDefault; } - - void translateTextCursor(const osg::Vec3& delta) { _textPositionData.position += delta; } - - // image settings - PositionData& getImagePositionData() { return _imagePositionData; } - PositionData& getImagePositionDataDefault() { return _imagePositionDataDefault; } - - // model settings - PositionData& getModelPositionData() { return _modelPositionData; } - PositionData& getModelPositionDataDefault() { return _modelPositionDataDefault; } - - - void layerClickToDoOperation(Operation operation, bool relativeJump=true, int slideNum=0, int layerNum=0); - void layerClickToDoOperation(const std::string& command, Operation operation, bool relativeJump=true, int slideNum=0, int layerNum=0); - void layerClickEventOperation(const KeyPosition& keyPos, bool relativeJump=true, int slideNum=0, int layerNum=0); - - void addBullet(const std::string& bullet, PositionData& positionData, FontData& fontData); - - void addParagraph(const std::string& paragraph, PositionData& positionData, FontData& fontData); - - void addImage(const std::string& filename,const PositionData& positionData, const ImageData& imageData); - - void addStereoImagePair(const std::string& filenameLeft, const ImageData& imageDataLeft, const std::string& filenameRight,const ImageData& imageDataRight, const PositionData& positionData); - - void addGraph(const std::string& filename,const std::string& options,const PositionData& positionData, const ImageData& imageData); - void addVNC(const std::string& filename,const PositionData& positionData, const ImageData& imageData); - void addBrowser(const std::string& filename,const PositionData& positionData, const ImageData& imageData); - void addPDF(const std::string& filename,const PositionData& positionData, const ImageData& imageData); - osg::Image* addInteractiveImage(const std::string& filename,const PositionData& positionData, const ImageData& imageData); - - void addModel(osg::Node* subgraph, const PositionData& positionData, const ModelData& modelData); - - void addModel(const std::string& filename, const PositionData& positionData, const ModelData& modelData); - - void addVolume(const std::string& filename, const PositionData& positionData, const VolumeData& volumeData); - - osg::Group* takePresentation() { return _root.release(); } - - osg::Group* getPresentation() { return _root.get(); } - - osg::Switch* getPresentationSwitch() { return _presentationSwitch.get(); } - - osg::Switch* getCurrentSlide() { return _slide.get(); } - - osg::Group* getCurrentLayer() { return _currentLayer.get(); } - - void setLoopPresentation(bool loop) { _loopPresentation = loop; } - bool getLoopPresentation() const { return _loopPresentation; } - - void setAutoSteppingActive(bool flag = true) { _autoSteppingActive = flag; } - bool getAutoSteppingActive() const { return _autoSteppingActive; } - - void setHUDSettings(HUDSettings* hudSettings) { _hudSettings = hudSettings; } - HUDSettings* getHUDSettings() { return _hudSettings.get(); } - const HUDSettings* getHUDSettings() const { return _hudSettings.get(); } - - -protected: - - void findImageStreamsAndAddCallbacks(osg::Node* node); - - osg::Geometry* createTexturedQuadGeometry(const osg::Vec3& pos, const osg::Vec4& rotation, float width,float height, osg::Image* image, bool& usedTextureRectangle); - - osg::Vec3 computePositionInModelCoords(const PositionData& positionData) const; - void updatePositionFromInModelCoords(const osg::Vec3& vertex, PositionData& positionData) const; - - osg::Vec3 convertSlideToModel(const osg::Vec3& position) const; - osg::Vec3 convertModelToSlide(const osg::Vec3& position) const; - - osg::AnimationPathCallback* getAnimationPathCallback(const PositionData& positionData); - - osg::Node* attachMaterialAnimation(osg::Node* model, const PositionData& positionData); - bool attachTexMat(osg::StateSet* stateset, const ImageData& imageData, float s, float t, bool textureRectangle); - - osg::StateSet* createTransformStateSet() - { - osg::StateSet* stateset = new osg::StateSet; - #if !defined(OSG_GLES2_AVAILABLE) - stateset->setMode(GL_NORMALIZE,osg::StateAttribute::ON); - #endif - return stateset; - } - - osg::Node* decorateSubgraphForPosition(osg::Node* node, PositionData& positionData); - - osg::ref_ptr _options; - - osg::Vec3 _slideOrigin; - osg::Vec3 _eyeOrigin; - double _slideWidth; - double _slideHeight; - double _slideDistance; - unsigned int _leftEyeMask; - unsigned int _rightEyeMask; - - osg::ref_ptr _hudSettings; - - // title settings - FontData _titleFontData; - FontData _titleFontDataDefault; - - PositionData _titlePositionData; - PositionData _titlePositionDataDefault; - - // text settings - FontData _textFontData; - FontData _textFontDataDefault; - - PositionData _textPositionData; - PositionData _textPositionDataDefault; - - // image settings - PositionData _imagePositionData; - PositionData _imagePositionDataDefault; - - // model settings - PositionData _modelPositionData; - PositionData _modelPositionDataDefault; - - - bool _loopPresentation; - bool _autoSteppingActive; - osg::Vec4 _backgroundColor; - std::string _presentationName; - double _presentationDuration; - - osg::ref_ptr _root; - osg::ref_ptr _presentationSwitch; - - osg::ref_ptr _slideClearNode; - osg::ref_ptr _slide; - std::string _slideTitle; - std::string _slideBackgroundImageFileName; - bool _slideBackgroundAsHUD; - - osg::ref_ptr _previousLayer; - osg::ref_ptr _currentLayer; - - osg::ref_ptr _filePathData; - - std::string findFileAndRecordPath(const std::string& filename); - - void recordOptionsFilePath(const osgDB::Options* options); - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/ConvexPolyhedron b/libs/lib/mac32/include/osgShadow/ConvexPolyhedron deleted file mode 100644 index 5e0ebf129..000000000 --- a/libs/lib/mac32/include/osgShadow/ConvexPolyhedron +++ /dev/null @@ -1,123 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - -#ifndef OSGSHADOW_CONVEXPOLYHEDRON -#define OSGSHADOW_CONVEXPOLYHEDRON 1 - -#include -#include -#include - -//////////////////////////////////////////////////////////////////////////////// -// Class based on CustomPolytope defined and used in osgSim::OverlayNode.cpp. -// Honors should go to Robert Osfield for writing such useful piece of code. -// First incarnations of my ConvexPolyhedron were derived from CustomPolytope. -// Later I made a number of modifications aimed at improving convex hull -// precision of intersection & extrusion operations and ended up with code -// so mixed that I decided to rewrite it as separate class. -//////////////////////////////////////////////////////////////////////////////// - -namespace osgShadow { - -class OSGSHADOW_EXPORT ConvexPolyhedron -{ - public: - typedef std::vector Vertices; - - static const osg::Matrix & defaultMatrix; - - struct Face - { - std::string name; - osg::Plane plane; - Vertices vertices; - }; - - typedef std::list Faces; - Faces _faces; - - ConvexPolyhedron( void ) { } - - ConvexPolyhedron( const osg::Matrix& matrix, const osg::Matrix& inverse, - const osg::BoundingBox& bb = osg::BoundingBox(-1,-1,-1,1,1,1)); - - Face& createFace() { _faces.push_back(Face()); return _faces.back(); } - void clear() { _faces.clear(); } - - - void setToUnitFrustum(bool withNear=true, bool withFar=true); - void setToBoundingBox(const osg::BoundingBox& bb); - void transform(const osg::Matrix& matrix, const osg::Matrix& inverse); - void transformClip(const osg::Matrix& matrix, const osg::Matrix& inverse); - - - bool mergeFaces - ( const Face & face0, const Face & face1, Face & face ); - - void mergeCoplanarFaces( const double & plane_normal_dot_tolerance = 0.0, - const double & plane_distance_tolerance = 0.0 ); - - void removeDuplicateVertices( void ); - - - static int pointsColinear - ( const osg::Vec3d & va, const osg::Vec3d & vb, const osg::Vec3d & vc, - const double & edge_normal_dot_tolerance = 0.0, - const double & null_edge_length_tolerance = 0.0 ); - - static int isFacePolygonConvex( Face & face, bool ignoreCollinearVertices = true ); - - bool checkCoherency - ( bool checkForNonConvexPolys = false, const char * errorPrefix = NULL ); - - - void cut(const osg::Polytope& polytope); - - void cut(const ConvexPolyhedron& polytope); - - void cut(const osg::Plane& plane, const std::string& name=std::string()); - - void extrude( const osg::Vec3d & offset ); - - void translate( const osg::Vec3d & offset ); - - - void getPolytope(osg::Polytope& polytope) const; - void getPoints(Vertices& vertices) const; - osg::BoundingBox computeBoundingBox( const osg::Matrix & m = osgShadow::ConvexPolyhedron::defaultMatrix ) const; - - osg::Geometry* buildGeometry( const osg::Vec4d& colorOutline, - const osg::Vec4d& colorInside, - osg::Geometry* useGeometry = NULL ) const; - - - bool dumpGeometry( const Face * face = NULL, - const osg::Plane * plane = NULL, - ConvexPolyhedron * basehull = NULL, - const char * filename = "convexpolyhedron.osg", - const osg::Vec4d& colorOutline = osg::Vec4( 0,1,0,0.5 ), - const osg::Vec4d& colorInside = osg::Vec4( 0,1,0,0.25 ), - const osg::Vec4d& faceColorOutline = osg::Vec4( 0,0,1,0.5 ), - const osg::Vec4d& faceColorInside = osg::Vec4( 0,0,1,0.25 ), - const osg::Vec4d& planeColorOutline = osg::Vec4( 1,0,0,0.5 ), - const osg::Vec4d& planeColorInside = osg::Vec4( 1,0,0,0.25 ), - const osg::Vec4d& baseColorOutline = osg::Vec4( 0,0,0,0.5 ), - const osg::Vec4d& baseColorInside = osg::Vec4( 0,0,0,0.25 ) ) const; -}; - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgShadow/DebugShadowMap b/libs/lib/mac32/include/osgShadow/DebugShadowMap deleted file mode 100644 index 992de2be6..000000000 --- a/libs/lib/mac32/include/osgShadow/DebugShadowMap +++ /dev/null @@ -1,192 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - -#ifndef OSGSHADOW_DEBUGSHADOWMAP -#define OSGSHADOW_DEBUGSHADOWMAP 1 - -#include -#include -#include -#include -#include -#include -#include - -namespace osgShadow { - -/** -Class used as a layer for debuging resources used by derived xxxShadowMap classes. -As designed by its base ViewDepndentShadowTechnique, DebugShadowMap serves mainly as container of -DebugShadowMap::ViewData objects. Most of the debuging support work is done by these objects. -DebugShadowMap technique only initializes them in initViewDependentData method. - -Debuging outputs present: - Shadow maps (pseudo colored to improve readability) - Shadow and related volumes (represented as convex polyhedra) -*/ - -class OSGSHADOW_EXPORT DebugShadowMap : public ViewDependentShadowTechnique -{ - public : - - /* - All classes stemming from ViewDependentShadowTechnique follow the same pattern. - - They are always based on some underlying level base Technique and they always - derive their ViewData from ViewData structure defined in underlying base Technique. - - I use some typedefs to make these inheritance patterns easier to declare/define. - */ - - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef DebugShadowMap ThisClass; - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef ViewDependentShadowTechnique BaseClass; - - /** Classic OSG constructor */ - DebugShadowMap(); - - /** Classic OSG cloning constructor */ - DebugShadowMap(const DebugShadowMap& dsm, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, DebugShadowMap ); - - /** Turn on/off debuging hud & rendering of debug volumes in main view */ - void setDebugDraw( bool draw ) { _doDebugDraw = draw; } - - /** Tell if debuging hud & rendering of debug volumes is active */ - bool getDebugDraw( void ) const { return _doDebugDraw; } - - /** Get the file name of debuging dump */ - std::string getDebugDump( void ) const { return _debugDump; } - - /** Set the file name of debuging dump */ - void setDebugDump( const std::string & debugDumpFile ) { _debugDump = debugDumpFile; } - - protected: - /** Classic protected OSG destructor */ - virtual ~DebugShadowMap(); - - // forward declare, interface and implementation provided in DebugShadowMap.cpp - class DrawableDrawWithDepthShadowComparisonOffCallback; - - osg::Vec2s _hudSize; - osg::Vec2s _hudOrigin; - osg::Vec2s _viewportSize; - osg::Vec2s _viewportOrigin; - osg::Vec2s _orthoSize; - osg::Vec2s _orthoOrigin; - - bool _doDebugDraw; - std::string _debugDump; - - osg::ref_ptr< osg::Shader > _depthColorFragmentShader; - - struct OSGSHADOW_EXPORT ViewData: public BaseClass::ViewData - { - /** - Texture used as ShadowMap - initialized by derived classes. - But it has to be defined now since DebugShadowMap::ViewData methods use it - */ - osg::ref_ptr< osg::Texture > _texture; - /** - Camera used to render ShadowMap - initialized by derived classes. - But it has to be defined now since DebugShadowMap::ViewData methods use it - */ - osg::ref_ptr< osg::Camera > _camera; - - osg::Matrixd _viewProjection; - osg::observer_ptr _viewCamera; - - // Debug hud variables - - /** Coloring Shader used to present shadow depth map contents */ - osg::ref_ptr< osg::Shader > _depthColorFragmentShader; - - struct PolytopeGeometry { - - ConvexPolyhedron _polytope; - osg::ref_ptr< osg::Geometry > _geometry[2]; - osg::Vec4 _colorOutline; - osg::Vec4 _colorInside; - }; - - typedef std::map< std::string, PolytopeGeometry > PolytopeGeometryMap; - - osg::Vec2s _hudSize; - osg::Vec2s _hudOrigin; - osg::Vec2s _viewportSize; - osg::Vec2s _viewportOrigin; - osg::Vec2s _orthoSize; - osg::Vec2s _orthoOrigin; - - bool *_doDebugDrawPtr; - std::string *_debugDumpPtr; - - PolytopeGeometryMap _polytopeGeometryMap; - osg::ref_ptr< osg::Geode > _geode[2]; - osg::ref_ptr< osg::MatrixTransform > _transform[2]; - - std::map< std::string, osg::Matrix > _matrixMap; - std::map< std::string, osg::Polytope > _polytopeMap; - std::map< std::string, osg::BoundingBox > _boundingBoxMap; - - osg::ref_ptr _cameraDebugHUD; - - bool getDebugDraw() { return *_doDebugDrawPtr; } - std::string * getDebugDump() { return _debugDumpPtr; } - - virtual void init( ThisClass * st, osgUtil::CullVisitor * cv ); - - virtual void cull( ); - - virtual void createDebugHUD( void ); - - virtual void cullDebugGeometry( ); - - virtual void updateDebugGeometry( const osg::Camera * screenCam, - const osg::Camera * shadowCam ); - - void setDebugPolytope( const char * name, - const ConvexPolyhedron & polytope = *(ConvexPolyhedron*)( NULL ), - osg::Vec4 colorOutline = osg::Vec4(0,0,0,0), - osg::Vec4 colorInside = osg::Vec4(0,0,0,0) ); - - bool DebugBoundingBox( const osg::BoundingBox & bb, const char * name = "" ); - bool DebugPolytope( const osg::Polytope & p, const char * name = "" ); - bool DebugMatrix( const osg::Matrix & m, const char * name = "" ); - - static osg::Vec3d computeShadowTexelToPixelError - ( const osg::Matrix & mvpwView, - const osg::Matrix & mvpwShadow, - const osg::Vec3d & vWorld, - const osg::Vec3d & vDelta = osg::Vec3d( 0.01,0.01,0.01 ) ); - - static void displayShadowTexelToPixelErrors - ( const osg::Camera * viewCam, - const osg::Camera * shadowCam, - const ConvexPolyhedron * hull ); - - void dump( const std::string & filename ); - }; - - META_ViewDependentShadowTechniqueData( ThisClass, ViewData ) -}; - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgShadow/Export b/libs/lib/mac32/include/osgShadow/Export deleted file mode 100644 index 7e1175dbb..000000000 --- a/libs/lib/mac32/include/osgShadow/Export +++ /dev/null @@ -1,49 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_EXPORT_ -#define OSGSHADOW_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4267 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGSHADOW_EXPORT - # elif defined( OSGSHADOW_LIBRARY ) - # define OSGSHADOW_EXPORT __declspec(dllexport) - # else - # define OSGSHADOW_EXPORT __declspec(dllimport) - # endif -#else - # define OSGSHADOW_EXPORT -#endif - -/** - -\namespace osgShadow - -The osgShadow library is a NodeKit that extends the core scene graph to add support for a range of shadow techniques. -*/ - -#endif diff --git a/libs/lib/mac32/include/osgShadow/LightSpacePerspectiveShadowMap b/libs/lib/mac32/include/osgShadow/LightSpacePerspectiveShadowMap deleted file mode 100644 index 4b6fc7d56..000000000 --- a/libs/lib/mac32/include/osgShadow/LightSpacePerspectiveShadowMap +++ /dev/null @@ -1,122 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - - -#ifndef OSGSHADOW_LIGHTSPACEPERSPECTIVESHADOWMAP -#define OSGSHADOW_LIGHTSPACEPERSPECTIVESHADOWMAP 1 - -#include -#include -#include - -namespace osgShadow { - -// Class implements -// "Light Space Perspective Shadow Maps" algorithm by -// Michael Wimmer, Daniel Scherzer, Werner Purgathofer -// http://www.cg.tuwien.ac.at/research/vr/lispsm/ - -class LispSM; - -class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapAlgorithm -{ - public: - LightSpacePerspectiveShadowMapAlgorithm(); - ~LightSpacePerspectiveShadowMapAlgorithm(); - - void operator() ( - const osgShadow::ConvexPolyhedron* hullShadowedView, - const osg::Camera* cameraMain, - osg::Camera* cameraShadow ) const; - - protected: - LispSM * lispsm; -}; - -// Optimized for draw traversal shadow bounds -class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapDB: public ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > -{ - public: - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass; - - /** Classic OSG constructor */ - LightSpacePerspectiveShadowMapDB() - { - } - - /** Classic OSG cloning constructor */ - LightSpacePerspectiveShadowMapDB( - const LightSpacePerspectiveShadowMapDB& copy, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop) - { - } - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, LightSpacePerspectiveShadowMapDB ); -}; - -// Optimized for cull traversal shadow bounds -class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapCB: public ProjectionShadowMap< MinimalCullBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > -{ - public: - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef ProjectionShadowMap< MinimalCullBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass; - - /** Classic OSG constructor */ - LightSpacePerspectiveShadowMapCB() - { - } - - /** Classic OSG cloning constructor */ - LightSpacePerspectiveShadowMapCB( - const LightSpacePerspectiveShadowMapCB& copy, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop) - { - } - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, LightSpacePerspectiveShadowMapCB ); -}; - -// Optimized for view frustum bounds -class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapVB: public ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm > -{ - public: - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass; - - /** Classic OSG constructor */ - LightSpacePerspectiveShadowMapVB() - { - } - - /** Classic OSG cloning constructor */ - LightSpacePerspectiveShadowMapVB( - const LightSpacePerspectiveShadowMapVB& copy, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop) - { - } - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, LightSpacePerspectiveShadowMapVB ); -}; - -typedef LightSpacePerspectiveShadowMapDB LightSpacePerspectiveShadowMap; - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgShadow/MinimalCullBoundsShadowMap b/libs/lib/mac32/include/osgShadow/MinimalCullBoundsShadowMap deleted file mode 100644 index a00ad756f..000000000 --- a/libs/lib/mac32/include/osgShadow/MinimalCullBoundsShadowMap +++ /dev/null @@ -1,82 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - -#ifndef OSGSHADOW_MINIMALCULLBOUNDSSHADOWMAP -#define OSGSHADOW_MINIMALCULLBOUNDSSHADOWMAP 1 - -#include - -namespace osgShadow { - -class OSGSHADOW_EXPORT MinimalCullBoundsShadowMap - : public MinimalShadowMap -{ - public : - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef MinimalCullBoundsShadowMap ThisClass; - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef MinimalShadowMap BaseClass; - - /** Classic OSG constructor */ - MinimalCullBoundsShadowMap(); - - /** Classic OSG cloning constructor */ - MinimalCullBoundsShadowMap( - const MinimalCullBoundsShadowMap& mcbsm, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, MinimalCullBoundsShadowMap ); - - protected: - /** Classic protected OSG destructor */ - virtual ~MinimalCullBoundsShadowMap(void); - - struct OSGSHADOW_EXPORT ViewData: public MinimalShadowMap::ViewData - { - virtual void init( ThisClass * st, osgUtil::CullVisitor * cv ); - - virtual void cullShadowReceivingScene( ); - - virtual void aimShadowCastingCamera( const osg::Light *light, - const osg::Vec4 &worldLightPos, - const osg::Vec3 &worldLightDir, - const osg::Vec3 &worldLightUp - = osg::Vec3(0,1,0) ); - - typedef std::vector< osgUtil::RenderLeaf* > RenderLeafList; - - static unsigned RemoveOldRenderLeaves - ( RenderLeafList &rllNew, RenderLeafList &rllOld ); - - static unsigned RemoveIgnoredRenderLeaves( RenderLeafList &rll ); - - static osg::BoundingBox ComputeRenderLeavesBounds - ( RenderLeafList &rll, osg::Matrix & projectionToWorld ); - - static osg::BoundingBox ComputeRenderLeavesBounds - ( RenderLeafList &rll, osg::Matrix & projectionToWorld, osg::Polytope & polytope ); - - static void GetRenderLeaves - ( osgUtil::RenderBin *rb, RenderLeafList &rll ); - }; - - META_ViewDependentShadowTechniqueData( ThisClass, ThisClass::ViewData ) -}; - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgShadow/MinimalDrawBoundsShadowMap b/libs/lib/mac32/include/osgShadow/MinimalDrawBoundsShadowMap deleted file mode 100644 index b889729fb..000000000 --- a/libs/lib/mac32/include/osgShadow/MinimalDrawBoundsShadowMap +++ /dev/null @@ -1,128 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - - -#ifndef OSGSHADOW_MINIMALDRAWBOUNDSSHADOWMAP -#define OSGSHADOW_MINIMALDRAWBOUNDSSHADOWMAP 1 - -#include - -namespace osgShadow { - -class OSGSHADOW_EXPORT MinimalDrawBoundsShadowMap - : public MinimalShadowMap -{ - public : - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef MinimalDrawBoundsShadowMap ThisClass; - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef MinimalShadowMap BaseClass; - - /** Classic OSG constructor */ - MinimalDrawBoundsShadowMap(); - - /** Classic OSG cloning constructor */ - MinimalDrawBoundsShadowMap( - const MinimalDrawBoundsShadowMap& mdbsm, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, MinimalDrawBoundsShadowMap ); - - protected: - /** Classic protected OSG destructor */ - virtual ~MinimalDrawBoundsShadowMap(void); - - struct OSGSHADOW_EXPORT ViewData: public BaseClass::ViewData - { - osg::ref_ptr< osg::RefMatrix > _projection; - osg::Vec2s _boundAnalysisSize; - osg::ref_ptr< osg::Image > _boundAnalysisImage; - osg::ref_ptr< osg::Texture2D > _boundAnalysisTexture; - osg::ref_ptr< osg::Camera > _boundAnalysisCamera; - osg::observer_ptr< osg::Camera > _mainCamera; - - void setShadowCameraProjectionMatrixPtr( osg::RefMatrix * projection ) - { _projection = projection; } - - osg::RefMatrix * getShadowCameraProjectionMatrixPtr( void ) - { return _projection.get(); } - - virtual void init( ThisClass * st, osgUtil::CullVisitor * cv ); - - virtual void cullShadowReceivingScene( ); - - virtual void createDebugHUD( ); - - virtual void recordShadowMapParams( ); - - virtual void cullBoundAnalysisScene( ); - - static osg::BoundingBox scanImage( const osg::Image * image, osg::Matrix m ); - - virtual void performBoundAnalysis( const osg::Camera& camera ); - - ViewData( void ): _boundAnalysisSize( 64, 64 ) {} - }; - - friend struct ViewData; - - META_ViewDependentShadowTechniqueData( ThisClass, ThisClass::ViewData ) - - - struct CameraPostDrawCallback : public osg::Camera::DrawCallback { - - CameraPostDrawCallback( ViewData * vd ): _vd( vd ) - { - } - - virtual void operator ()( const osg::Camera& camera ) const - { - if( _vd.valid() ) - _vd->performBoundAnalysis( camera ); - } - - osg::observer_ptr< ViewData > _vd; - }; - - struct CameraCullCallback: public osg::NodeCallback { - - CameraCullCallback(ViewData * vd, osg::NodeCallback * nc): _vd(vd), _nc(nc) - { - } - - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) - { - osgUtil::CullVisitor *cv = dynamic_cast< osgUtil::CullVisitor *>( nv ); - - if( _nc.valid() ) - _nc->operator()(node,nv); - else - traverse(node,nv); - - if( cv ) - _vd->recordShadowMapParams( ); - } - - protected: - osg::observer_ptr< ViewData > _vd; - osg::ref_ptr< osg::NodeCallback > _nc; - }; -}; - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgShadow/MinimalShadowMap b/libs/lib/mac32/include/osgShadow/MinimalShadowMap deleted file mode 100644 index fe43de129..000000000 --- a/libs/lib/mac32/include/osgShadow/MinimalShadowMap +++ /dev/null @@ -1,164 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - -#ifndef OSGSHADOW_MINIMALSHADOWMAP -#define OSGSHADOW_MINIMALSHADOWMAP 1 - -#include - -namespace osgShadow { - -class OSGSHADOW_EXPORT MinimalShadowMap : public StandardShadowMap -{ - public : - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef MinimalShadowMap ThisClass; - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef StandardShadowMap BaseClass; - - /** Classic OSG constructor */ - MinimalShadowMap(); - - /** Classic OSG cloning constructor */ - MinimalShadowMap( - const MinimalShadowMap& msm, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, MinimalShadowMap ); - - void setModellingSpaceToWorldTransform( const osg::Matrix & modellingSpaceToWorld ) - { _modellingSpaceToWorld = modellingSpaceToWorld; } - - const osg::Matrix & getModellingSpaceToWorldTransform( void ) const - { return _modellingSpaceToWorld; } - - float getMaxFarPlane( ) const - { return _maxFarPlane; } - - void setMaxFarPlane( float maxFarPlane ) - { _maxFarPlane = maxFarPlane; } - - float getMinLightMargin( ) const - { return _minLightMargin; } - - void setMinLightMargin( float minLightMargin ) - { _minLightMargin = minLightMargin; } - - enum ShadowReceivingCoarseBoundAccuracy { - EMPTY_BOX, - BOUNDING_SPHERE, - BOUNDING_BOX, - DEFAULT_ACCURACY = BOUNDING_BOX - }; - - void setShadowReceivingCoarseBoundAccuracy - ( ShadowReceivingCoarseBoundAccuracy accuracy ) - { _shadowReceivingCoarseBoundAccuracy = accuracy; } - - ShadowReceivingCoarseBoundAccuracy - getShadowReceivingCoarseBoundAccuracy() const - { return _shadowReceivingCoarseBoundAccuracy; } - - protected: - /** Classic protected OSG destructor */ - virtual ~MinimalShadowMap(void); - - protected: - // Matrix modellingSpaceToWorld and its inverse - // are used to define Modelling Space where shadowed scene drawables - // have minimal (smallest possible extent) bounding boxes. - - // Computing visible shadow range in this space - // allows for optimal use of ShadowMap resolution. - - // By default it is set to identity ie computations are in world space. - // But it should be set to ElipsoidModel::localToWorld - // when scene objects are put on earth ellipsoid surface. - - // Other scenarios are also possible for example when models are - // built in XZY space which would require identity matrix with swapped colums - - osg::Matrix _modellingSpaceToWorld; - float _maxFarPlane; - float _minLightMargin; - ShadowReceivingCoarseBoundAccuracy _shadowReceivingCoarseBoundAccuracy; - - struct OSGSHADOW_EXPORT ViewData: public BaseClass::ViewData - { - osg::Matrix *_modellingSpaceToWorldPtr; - float *_maxFarPlanePtr; - float *_minLightMarginPtr; - int _frameShadowCastingCameraPasses; - - ConvexPolyhedron _sceneReceivingShadowPolytope; - std::vector< osg::Vec3d > _sceneReceivingShadowPolytopePoints; - - osg::Matrixd _clampedProjection; - - virtual void init( ThisClass * st, osgUtil::CullVisitor * cv ); - - virtual osg::BoundingBox computeShadowReceivingCoarseBounds( ); - - virtual void cullShadowReceivingScene( ); - - virtual void aimShadowCastingCamera( - const osg::BoundingSphere &bounds, - const osg::Light *light, - const osg::Vec4 &worldLightPos, - const osg::Vec3 &worldLightDir, - const osg::Vec3 &worldLightUp = osg::Vec3(0,1,0) ); - - virtual void aimShadowCastingCamera( const osg::Light *light, - const osg::Vec4 &worldLightPos, - const osg::Vec3 &worldLightDir, - const osg::Vec3 &worldLightUp - = osg::Vec3(0,1,0) ); - - virtual void frameShadowCastingCamera - ( const osg::Camera* cameraMain, osg::Camera* cameraShadow, int pass = 1 ); - - void cutScenePolytope( const osg::Matrix & matrix, - const osg::Matrix & inverse, - const osg::BoundingBox &bb = - osg::BoundingBox(-1,-1,-1,1,1,1) ); - - osg::BoundingBox computeScenePolytopeBounds - ( const osg::Matrix & m = *(osg::Matrix*)(NULL) ); - - // Utility methods for adjusting projection matrices - - // Modify projection matrix so that some output subrange - // is remapped to whole clip space (-1..1,-1..1,-1..1). - // Bit mask can be used to limit remaping to selected bounds only. - static void trimProjection - ( osg::Matrixd & projection, osg::BoundingBox subrange, - unsigned int trimMask = (1|2|4|8|16|32) - /*1=left|2=right|4=bottom|8=top|16=near|32=far*/); - - static void clampProjection - ( osg::Matrixd & projection, float n = 0, float f = FLT_MAX ); - - static void extendProjection - ( osg::Matrixd & projection, osg::Viewport * viewport, const osg::Vec2& margin ); - }; - - META_ViewDependentShadowTechniqueData( ThisClass, ThisClass::ViewData ) -}; - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgShadow/OccluderGeometry b/libs/lib/mac32/include/osgShadow/OccluderGeometry deleted file mode 100644 index 4d308a90a..000000000 --- a/libs/lib/mac32/include/osgShadow/OccluderGeometry +++ /dev/null @@ -1,259 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_OCCLUDERGEOMETRY -#define OSGSHADOW_OCCLUDERGEOMETRY 1 - -#include -#include -#include -#include - -#include - - -namespace osgShadow { - -class ShadowVolumeGeometry; - -/** OccluderGeometry provides a sepecialised geometry representation of objects in scene that occlude light and therefore cast shadows. - * OccluderGeometry supports the computation of silhouette edges and shadow volume geometries, as well as use as geometry that one can rendering - * into a shadow map or end caps for the ZP+ algorithm. OccluderGeometry may be of the same resolution as an underlying geometry that it - * represents, or can be of lower resolution and combine manager seperate geometries together into a single shadow casting object. - * OccluderGeometry may be attached as UserData to Nodes or to Drawables. */ -class OSGSHADOW_EXPORT OccluderGeometry : public osg::Drawable -{ - public : - OccluderGeometry(); - - OccluderGeometry(const OccluderGeometry& oc, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new OccluderGeometry(); } - virtual Object* clone(const osg::CopyOp& copyop) const { return new OccluderGeometry(*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osgShadow"; } - virtual const char* className() const { return "OccluderGeometry"; } - - /** Compute an occluder geometry containing all the geometry in specified subgraph.*/ - void computeOccluderGeometry(osg::Node* subgraph, osg::Matrix* matrix=0, float sampleRatio=1.0f); - - /** Compute an occluder geometry containing the geometry in specified drawable.*/ - void computeOccluderGeometry(osg::Drawable* drawable, osg::Matrix* matrix=0, float sampleRatio=1.0f); - - - /** Compute ShadowVolumeGeometry. */ - void computeShadowVolumeGeometry(const osg::Vec4& lightpos, ShadowVolumeGeometry& svg) const; - - - /** Set the bounding polytope of the OccluderGeometry.*/ - void setBoundingPolytope(const osg::Polytope& polytope) { _boundingPolytope = polytope; } - - /** Get the bounding polytope of the OccluderGeometry.*/ - osg::Polytope& getBoundingPolytope() { return _boundingPolytope; } - - /** Get the const bounding polytope of the OccluderGeometry.*/ - const osg::Polytope& getBoundingPolytope() const { return _boundingPolytope; } - - - /** Render the occluder geometry. */ - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; - - /** Compute the bounding box around occluder geometry.*/ - virtual osg::BoundingBox computeBound() const; - - typedef std::vector Vec3List; - typedef std::vector UIntList; - - public: - - void processGeometry(osg::Drawable* drawable, osg::Matrix* matrix=0, float sampleRatio=1.0f); - - protected : - - virtual ~OccluderGeometry() {} - - struct Edge - { - Edge(): - _p1(0), - _p2(0), - _t1(-1), - _t2(-1) {} - - Edge(unsigned int p1, unsigned int p2): - _p1(p1), - _p2(p2), - _t1(-1), - _t2(-1) - { - if (p1>p2) - { - // swap ordering so p1 is less than or equal to p2 - _p1 = p2; - _p2 = p1; - } - } - - inline bool operator < (const Edge& rhs) const - { - if (_p1 < rhs._p1) return true; - if (_p1 > rhs._p1) return false; - return (_p2 < rhs._p2); - } - - bool addTriangle(unsigned int tri) const - { - if (_t1<0) - { - _t1 = tri; - return true; - } - else if (_t2<0) - { - _t2 = tri; - return true; - } - // argg more than two triangles assigned - return false; - } - - bool boundaryEdge() const { return _t2<0; } - - unsigned int _p1; - unsigned int _p2; - - mutable int _t1; - mutable int _t2; - - mutable osg::Vec3 _normal; - }; - - typedef std::vector EdgeList; - - inline bool isLightPointSilhouetteEdge(const osg::Vec3& lightpos, const Edge& edge) const - { - if (edge.boundaryEdge()) return true; - - float offset = 0.0f; - - osg::Vec3 delta(lightpos-_vertices[edge._p1]); - delta.normalize(); - - float n1 = delta * _triangleNormals[edge._t1] + offset; - float n2 = delta * _triangleNormals[edge._t2] + offset; - - float angle_offset = 0.0f; - - n1 = cos(acosf(n1) + angle_offset); - n2 = cos(acosf(n2) + angle_offset); - - if (n1==0.0f && n2==0.0f) return false; - - return n1*n2 <= 0.0f; - } - - inline bool isLightDirectionSilhouetteEdge(const osg::Vec3& lightdirection, const Edge& edge) const - { - if (edge.boundaryEdge()) return true; - - float offset = 0.0f; - - float n1 = lightdirection * _triangleNormals[edge._t1] + offset; - float n2 = lightdirection * _triangleNormals[edge._t2] + offset; - - float angle_offset = 0.0f; - - n1 = cos(acosf(n1) + angle_offset); - n2 = cos(acosf(n2) + angle_offset); - - if (n1==0.0f && n2==0.0f) return false; - - return n1*n2 <= 0.0f; - } - - void setUpInternalStructures(); - - void removeDuplicateVertices(); - void removeNullTriangles(); - void computeNormals(); - void buildEdgeMaps(); - - void computeLightDirectionSilhouetteEdges(const osg::Vec3& lightdirection, UIntList& silhouetteIndices) const; - void computeLightPositionSilhouetteEdges(const osg::Vec3& lightpos, UIntList& silhouetteIndices) const; - - osg::Polytope _boundingPolytope; - - Vec3List _vertices; - Vec3List _normals; - Vec3List _triangleNormals; - UIntList _triangleIndices; - - EdgeList _edges; -}; - -class OSGSHADOW_EXPORT ShadowVolumeGeometry : public osg::Drawable -{ - public : - ShadowVolumeGeometry(); - - ShadowVolumeGeometry(const ShadowVolumeGeometry& oc, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - virtual Object* cloneType() const { return new ShadowVolumeGeometry(); } - virtual Object* clone(const osg::CopyOp& copyop) const { return new ShadowVolumeGeometry(*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osgShadow"; } - virtual const char* className() const { return "ShadowVolumeGeometry"; } - - enum DrawMode - { - GEOMETRY, - STENCIL_TWO_PASS, - STENCIL_TWO_SIDED - }; - - void setDrawMode(DrawMode mode) { _drawMode = mode; } - DrawMode getDrawMode() const { return _drawMode; } - - typedef std::vector Vec3List; - typedef std::vector UIntList; - - void setVertices(const Vec3List& vertices) { _vertices = vertices; } - Vec3List& getVertices() { return _vertices; } - const Vec3List& getVertices() const { return _vertices; } - - void setNormals(const Vec3List& normals) { _normals = normals; } - Vec3List& getNormals() { return _normals; } - const Vec3List& getNormals() const { return _normals; } - - - /** Render the occluder geometry. */ - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; - - /** Compute the bounding box around occluder geometry.*/ - virtual osg::BoundingBox computeBound() const; - - public: - - protected : - - virtual ~ShadowVolumeGeometry() {} - - DrawMode _drawMode; - Vec3List _vertices; - Vec3List _normals; - UIntList _indices; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/ParallelSplitShadowMap b/libs/lib/mac32/include/osgShadow/ParallelSplitShadowMap deleted file mode 100644 index accde8789..000000000 --- a/libs/lib/mac32/include/osgShadow/ParallelSplitShadowMap +++ /dev/null @@ -1,216 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -/* ParallelSplitShadowMap written by Adrian Egli - * - * this version has still a bug in mutli-thread application (flickering problem) - * to avoid the flickering problem try osgShadow --pssm --SingleThreaded your_scene.ive - * - * The Parallel Split Shadow Map only supports directional light for simulating the shadow. - * It's one of the most robust algorithm for huge terrain sun light's shadow simulation, if - * you need to shadow a terrain, or another huge scene, you should use Parallel Split Shadow Map - * or at least test it against your scene. Have fun. - * - */ - -#ifndef OSGSHADOW_ParallelSplitShadowMap -#define OSGSHADOW_ParallelSplitShadowMap 1 - -#include -#include -#include -#include - -#include - -namespace osgShadow { - -class OSGSHADOW_EXPORT ParallelSplitShadowMap : public ShadowTechnique -{ - public: - ParallelSplitShadowMap(osg::Geode** debugGroup=NULL, int icountplanes=3); - - ParallelSplitShadowMap(const ParallelSplitShadowMap& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgShadow, ParallelSplitShadowMap); - - - /** Initialize the ShadowedScene and local cached data structures.*/ - virtual void init(); - - /** Run the update traversal of the ShadowedScene and update any loca chached data structures.*/ - virtual void update(osg::NodeVisitor& nv); - - /** Run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.*/ - virtual void cull(osgUtil::CullVisitor& cv); - - /** Clean scene graph from any shadow technique specific nodes, state and drawables.*/ - virtual void cleanSceneGraph(); - - /** Switch on the debug coloring in GLSL (only the first 3 texture/splits showed for visualisation */ - inline void setDebugColorOn() { _debug_color_in_GLSL = true; } - - /** Set the polygon offset osg::Vec2f(factor,unit) */ - inline void setPolygonOffset(const osg::Vec2f& p) { _polgyonOffset = p;_user_polgyonOffset_set=true;} - - /** Get the polygon offset osg::Vec2f(factor,unit) */ - inline const osg::Vec2f& getPolygonOffset() const { return _polgyonOffset;} - - /** Set the texture resolution */ - inline void setTextureResolution(unsigned int resolution) { _resolution = resolution; } - - /** Get the texture resolution */ - inline unsigned int getTextureResolution() const { return _resolution; } - - /** Set the max far distance */ - inline void setMaxFarDistance(double farDist) { _setMaxFarDistance = farDist; _isSetMaxFarDistance = true; } - - /** Get the max far distance */ - inline double getMaxFarDistance() const { return _setMaxFarDistance; } - - /** Set the factor for moving the virtual camera behind the real camera*/ - inline void setMoveVCamBehindRCamFactor(double distFactor ) { _move_vcam_behind_rcam_factor = distFactor; } - - /** Get the factor for moving the virtual camera behind the real camera*/ - inline double getMoveVCamBehindRCamFactor() const { return _move_vcam_behind_rcam_factor; } - - /** Set min near distance for splits */ - inline void setMinNearDistanceForSplits(double nd){ _split_min_near_dist=nd; } - - /** Get min near distance for splits */ - inline double getMinNearDistanceForSplits() const { return _split_min_near_dist; } - - /** set a user defined light for shadow simulation (sun light, ... ) - * when this light get passed to pssm, the scene's light are no longer collected - * and simulated. just this user passed light, it needs to be a directional light. - */ - inline void setUserLight(osg::Light* light) { _userLight = light; } - - /** get the user defined light for shadow simulation */ - inline const osg::Light* getUserLight() const { return _userLight.get(); } - - /** Set the values for the ambient bias the shader will use.*/ - void setAmbientBias(const osg::Vec2& ambientBias ); - - /** Get the values for the ambient bias the shader will use.*/ - const osg::Vec2& getAmbientBias() const { return _ambientBias; } - - /** - * you can overwrite the fragment shader if you like to modify it yourself, own fragment shader can be used - */ - class OSGSHADOW_EXPORT FragmentShaderGenerator : public osg::Referenced { - public: - /** - * generate the GLSL fragement shader - */ - virtual std::string generateGLSL_FragmentShader_BaseTex(bool debug, unsigned int splitCount,double textureRes, bool filtered, unsigned int nbrSplits,unsigned int textureOffset); - }; - - /** set fragment shader generator */ - inline void setFragmentShaderGenerator(FragmentShaderGenerator* fsw) { _FragmentShaderGenerator = fsw;} - - /** enable / disable shadow filtering */ - inline void enableShadowGLSLFiltering(bool filtering = true) { _GLSL_shadow_filtered = filtering; } - - enum SplitCalcMode { - SPLIT_LINEAR, - SPLIT_EXP - }; - - /** set split calculation mode */ - inline void setSplitCalculationMode(SplitCalcMode scm=SPLIT_EXP) { _SplitCalcMode = scm; } - - /** get split calculation mode */ - inline SplitCalcMode getSplitCalculationMode() const { return _SplitCalcMode; } - - - protected : - - virtual ~ParallelSplitShadowMap() {} - - - struct PSSMShadowSplitTexture { - // RTT - osg::ref_ptr _camera; - osg::ref_ptr _texgen; - osg::ref_ptr _texture; - osg::ref_ptr _stateset; - unsigned int _textureUnit; - - - double _split_far; - - osg::ref_ptr _debug_camera; - osg::ref_ptr _debug_texture; - osg::ref_ptr _debug_stateset; - unsigned int _debug_textureUnit; - - // Light (SUN) - osg::Vec3d _lightCameraSource; - osg::Vec3d _lightCameraTarget; - osg::Vec3d _frustumSplitCenter; - osg::Vec3d _lightDirection; - double _lightNear; - double _lightFar; - - osg::Matrix _cameraView; - osg::Matrix _cameraProj; - - unsigned int _splitID; - unsigned int _resolution; - - osg::Uniform* _farDistanceSplit; - }; - - typedef std::map PSSMShadowSplitTextureMap; - PSSMShadowSplitTextureMap _PSSMShadowSplitTextureMap; - - - private: - void calculateFrustumCorners(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners); - void calculateLightInitialPosition(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners); - void calculateLightNearFarFormFrustum(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners); - void calculateLightViewProjectionFormFrustum(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners); - - osg::Geode** _displayTexturesGroupingNode; - - unsigned int _textureUnitOffset; - - unsigned int _number_of_splits; - - bool _debug_color_in_GLSL; - - osg::Vec2 _polgyonOffset; - bool _user_polgyonOffset_set; - - unsigned int _resolution; - - double _setMaxFarDistance; - bool _isSetMaxFarDistance; - - double _split_min_near_dist; - - double _move_vcam_behind_rcam_factor; - - osg::ref_ptr _userLight; - osg::ref_ptr _FragmentShaderGenerator; - - bool _GLSL_shadow_filtered; - SplitCalcMode _SplitCalcMode; - - osg::Uniform* _ambientBiasUniform; - osg::Vec2 _ambientBias; - -}; -} -#endif diff --git a/libs/lib/mac32/include/osgShadow/ProjectionShadowMap b/libs/lib/mac32/include/osgShadow/ProjectionShadowMap deleted file mode 100644 index 612a8a431..000000000 --- a/libs/lib/mac32/include/osgShadow/ProjectionShadowMap +++ /dev/null @@ -1,85 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - -#ifndef OSGSHADOW_PROJECTIONSHADOWMAP -#define OSGSHADOW_PROJECTIONSHADOWMAP 1 - -#include - -namespace osgShadow { - -template< typename MinimalBoundsBaseClass, typename ShadowProjectionAlgorithmClass > -class OSGSHADOW_EXPORT ProjectionShadowMap : public MinimalBoundsBaseClass -{ - public : - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef MinimalBoundsBaseClass BaseClass; - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef ProjectionShadowMap ThisClass; - - /** Classic OSG constructor */ - ProjectionShadowMap() : BaseClass() - { - } - - /** Classic OSG cloning constructor */ - ProjectionShadowMap( - const ProjectionShadowMap& copy, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop) - { - } - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, ProjectionShadowMap ); - - protected: - - /** Classic protected OSG destructor */ - virtual ~ProjectionShadowMap(void) - { - } - - struct OSGSHADOW_EXPORT ViewData: public BaseClass::ViewData, - public ShadowProjectionAlgorithmClass - { - #if 0 - virtual void init( ThisClass * st, osgUtil::CullVisitor * cv ); - { - BaseClass::ViewData::init( st, cv ); - } - #endif - - virtual void frameShadowCastingCamera - ( const osg::Camera* cameraMain, osg::Camera* cameraShadow, int pass = 1 ) - { - if( pass == BaseClass::ViewData::_frameShadowCastingCameraPasses - 1 ) - { - // Force dependent name lookup - ShadowProjectionAlgorithmClass::operator() - ( &this->_sceneReceivingShadowPolytope, cameraMain, cameraShadow ); - } - - // DebugBoundingBox( computeScenePolytopeBounds(), "ProjectionShadowMap" ); - BaseClass::ViewData::frameShadowCastingCamera( cameraMain, cameraShadow, pass ); - } - }; - - META_ViewDependentShadowTechniqueData( ThisClass, typename ThisClass::ViewData ) -}; - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgShadow/ShadowMap b/libs/lib/mac32/include/osgShadow/ShadowMap deleted file mode 100644 index 5b809ff3e..000000000 --- a/libs/lib/mac32/include/osgShadow/ShadowMap +++ /dev/null @@ -1,123 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_SHADOWEMAP -#define OSGSHADOW_SHADOWEMAP 1 - -#include -#include -#include -#include - -#include - -namespace osgShadow { - -/** ShadowedTexture provides an implementation of shadow textures.*/ -class OSGSHADOW_EXPORT ShadowMap : public ShadowTechnique -{ - public : - ShadowMap(); - - ShadowMap(const ShadowMap& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgShadow, ShadowMap); - - /** Set the texture unit that the shadow texture will be applied on.*/ - void setTextureUnit(unsigned int unit); - - /** Get the texture unit that the shadow texture will be applied on.*/ - unsigned int getTextureUnit() const { return _shadowTextureUnit; } - - /** set the polygon offset used initially */ - void setPolygonOffset(const osg::Vec2& polyOffset); - - /** get the used polygon offset */ - const osg::Vec2& getPolygonOffset() const { return _polyOffset; } - - /** Set the values for the ambient bias the shader will use.*/ - void setAmbientBias(const osg::Vec2& ambientBias ); - - /** Get the values that are used for the ambient bias in the shader.*/ - const osg::Vec2& getAmbientBias() const { return _ambientBias; } - - /** set the size in pixels x / y for the shadow texture.*/ - void setTextureSize(const osg::Vec2s& textureSize); - - /** Get the values that are used for the ambient bias in the shader.*/ - const osg::Vec2s& getTextureSize() const { return _textureSize; } - - /** Set the Light that will cast shadows */ - void setLight(osg::Light* light); - void setLight(osg::LightSource* ls); - - typedef std::vector< osg::ref_ptr > UniformList; - - typedef std::vector< osg::ref_ptr > ShaderList; - - /** Add a shader to internal list, will be used instead of the default ones */ - inline void addShader(osg::Shader* shader) { _shaderList.push_back(shader); } - - /** Reset internal shader list */ - inline void clearShaderList() { _shaderList.clear(); } - - /** initialize the ShadowedScene and local cached data structures.*/ - virtual void init(); - - /** run the update traversal of the ShadowedScene and update any loca chached data structures.*/ - virtual void update(osg::NodeVisitor& nv); - - /** run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.*/ - virtual void cull(osgUtil::CullVisitor& cv); - - /** Clean scene graph from any shadow technique specific nodes, state and drawables.*/ - virtual void cleanSceneGraph(); - - // debug methods - - osg::ref_ptr makeDebugHUD(); - - protected: - virtual ~ShadowMap(void) {}; - - /** Create the managed Uniforms */ - virtual void createUniforms(); - - virtual void createShaders(); - - // forward declare, interface and implementation provided in ShadowMap.cpp - class DrawableDrawWithDepthShadowComparisonOffCallback; - - osg::ref_ptr _camera; - osg::ref_ptr _texgen; - osg::ref_ptr _texture; - osg::ref_ptr _stateset; - osg::ref_ptr _program; - osg::ref_ptr _light; - - osg::ref_ptr _ls; - - osg::ref_ptr _ambientBiasUniform; - UniformList _uniformList; - ShaderList _shaderList; - unsigned int _baseTextureUnit; - unsigned int _shadowTextureUnit; - osg::Vec2 _polyOffset; - osg::Vec2 _ambientBias; - osg::Vec2s _textureSize; - - }; - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/ShadowTechnique b/libs/lib/mac32/include/osgShadow/ShadowTechnique deleted file mode 100644 index b67bc6e94..000000000 --- a/libs/lib/mac32/include/osgShadow/ShadowTechnique +++ /dev/null @@ -1,87 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_SHADOWEDTECHNIQUE -#define OSGSHADOW_SHADOWEDTECHNIQUE 1 - -#include -#include -#include -#include -#include - -#include - -namespace osgShadow { - -// forward declare ShadowedScene -class ShadowedScene; - -/** ShadowedScene provides a mechanism for decorating a scene that the needs to have shadows cast upon it.*/ -class OSGSHADOW_EXPORT ShadowTechnique : public osg::Object -{ - public : - ShadowTechnique(); - - ShadowTechnique(const ShadowTechnique& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgShadow, ShadowTechnique); - - ShadowedScene* getShadowedScene() { return _shadowedScene; } - - /** initialize the ShadowedScene and local cached data structures.*/ - virtual void init(); - - /** run the update traversal of the ShadowedScene and update any local cached data structures.*/ - virtual void update(osg::NodeVisitor& nv); - - /** run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.*/ - virtual void cull(osgUtil::CullVisitor& cv); - - /** Clean scene graph from any shadow technique specific nodes, state and drawables.*/ - virtual void cleanSceneGraph(); - - virtual void traverse(osg::NodeVisitor& nv); - - /** Dirty so that cached data structures are updated.*/ - virtual void dirty() { _dirty = true; } - - protected : - - class OSGSHADOW_EXPORT CameraCullCallback : public osg::NodeCallback - { - public: - - CameraCullCallback(ShadowTechnique* st); - - virtual void operator()(osg::Node*, osg::NodeVisitor* nv); - - protected: - - ShadowTechnique* _shadowTechnique; - }; - - osg::Vec3 computeOrthogonalVector(const osg::Vec3& direction) const; - - virtual ~ShadowTechnique(); - - friend class ShadowedScene; - - ShadowedScene* _shadowedScene; - bool _dirty; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/ShadowTexture b/libs/lib/mac32/include/osgShadow/ShadowTexture deleted file mode 100644 index 2588a29fa..000000000 --- a/libs/lib/mac32/include/osgShadow/ShadowTexture +++ /dev/null @@ -1,68 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_SHADOWETEXTURE -#define OSGSHADOW_SHADOWETEXTURE 1 - -#include -#include - -#include - -namespace osgShadow { - -/** ShadowedTexture provides an implementation of shadow textures.*/ -class OSGSHADOW_EXPORT ShadowTexture : public ShadowTechnique -{ - public : - ShadowTexture(); - - ShadowTexture(const ShadowTexture& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgShadow, ShadowTexture); - - /** Set the texture unit that the shadow texture will be applied on.*/ - void setTextureUnit(unsigned int unit); - - /** Get the texture unit that the shadow texture will be applied on.*/ - unsigned int getTextureUnit() const { return _textureUnit; } - - - /** initialize the ShadowedScene and local cached data structures.*/ - virtual void init(); - - /** run the update traversal of the ShadowedScene and update any loca chached data structures.*/ - virtual void update(osg::NodeVisitor& nv); - - /** run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.*/ - virtual void cull(osgUtil::CullVisitor& cv); - - /** Clean scene graph from any shadow technique specific nodes, state and drawables.*/ - virtual void cleanSceneGraph(); - - - protected : - - virtual ~ShadowTexture() {} - - osg::ref_ptr _camera; - osg::ref_ptr _texgen; - osg::ref_ptr _texture; - osg::ref_ptr _stateset; - osg::ref_ptr _material; - unsigned int _textureUnit; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/ShadowVolume b/libs/lib/mac32/include/osgShadow/ShadowVolume deleted file mode 100644 index d6c7ed779..000000000 --- a/libs/lib/mac32/include/osgShadow/ShadowVolume +++ /dev/null @@ -1,83 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_SHADOWVOLUME -#define OSGSHADOW_SHADOWVOLUME 1 - -#include -#include -#include - -#include -#include - -namespace osgShadow { - -/** ShadowedTexture provides an implementation of shadow textures.*/ -class OSGSHADOW_EXPORT ShadowVolume : public ShadowTechnique -{ - public : - ShadowVolume(); - - ShadowVolume(const ShadowVolume& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgShadow, ShadowVolume); - - - void setDrawMode(osgShadow::ShadowVolumeGeometry::DrawMode drawMode); - osgShadow::ShadowVolumeGeometry::DrawMode getDrawMode() const { return _drawMode; } - - void setDynamicShadowVolumes(bool dynamicShadowVolumes); - bool getDynamicShadowVolumes() const { return _dynamicShadowVolumes; } - - /** initialize the ShadowedScene and local cached data structures.*/ - virtual void init(); - - /** run the update traversal of the ShadowedScene and update any loca chached data structures.*/ - virtual void update(osg::NodeVisitor& nv); - - /** run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.*/ - virtual void cull(osgUtil::CullVisitor& cv); - - /** Clean scene graph from any shadow technique specific nodes, state and drawables.*/ - virtual void cleanSceneGraph(); - - - protected : - - virtual ~ShadowVolume(); - - osgShadow::ShadowVolumeGeometry::DrawMode _drawMode; - bool _dynamicShadowVolumes; - - osg::ref_ptr _occluder; - - OpenThreads::Mutex _shadowVolumeMutex; - osg::ref_ptr _shadowVolume; - - osg::Vec4 _lightpos; - - osg::ref_ptr _ambientLight; - osg::ref_ptr _diffuseLight; - - osg::ref_ptr _ss1; - osg::ref_ptr _mainShadowStateSet; - osg::ref_ptr _shadowVolumeStateSet; - osg::ref_ptr _shadowedSceneStateSet; - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/ShadowedScene b/libs/lib/mac32/include/osgShadow/ShadowedScene deleted file mode 100644 index 9194131f8..000000000 --- a/libs/lib/mac32/include/osgShadow/ShadowedScene +++ /dev/null @@ -1,68 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_SHADOWEDSCENE -#define OSGSHADOW_SHADOWEDSCENE 1 - -#include -#include -#include -#include - -#include - -namespace osgShadow { - -/** ShadowedScene provides a mechansim for decorating a scene that the needs to have shadows cast upon it.*/ -class OSGSHADOW_EXPORT ShadowedScene : public osg::Group -{ - public: - - ShadowedScene(ShadowTechnique* st=0); - - ShadowedScene(const ShadowedScene& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osgShadow, ShadowedScene); - - virtual void traverse(osg::NodeVisitor& nv); - - void setReceivesShadowTraversalMask(unsigned int mask) { _receivesShadowTraversalMask = mask; } - unsigned int getReceivesShadowTraversalMask() const { return _receivesShadowTraversalMask; } - - void setCastsShadowTraversalMask(unsigned int mask) { _castsShadowTraversalMask = mask; } - unsigned int getCastsShadowTraversalMask() const { return _castsShadowTraversalMask; } - - void setShadowTechnique(ShadowTechnique* technique); - ShadowTechnique* getShadowTechnique() { return _shadowTechnique.get(); } - const ShadowTechnique* getShadowTechnique() const { return _shadowTechnique.get(); } - - /** Clean scene graph from any shadow technique specific nodes, state and drawables.*/ - void cleanSceneGraph(); - - /** Dirty any cache data structures held in the attached ShadowTechnqiue.*/ - void dirty(); - - protected: - - virtual ~ShadowedScene(); - - unsigned int _receivesShadowTraversalMask; - unsigned int _castsShadowTraversalMask; - - osg::ref_ptr _shadowTechnique; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/SoftShadowMap b/libs/lib/mac32/include/osgShadow/SoftShadowMap deleted file mode 100644 index cbceb915f..000000000 --- a/libs/lib/mac32/include/osgShadow/SoftShadowMap +++ /dev/null @@ -1,92 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_SOFTSHADOWMAP -#define OSGSHADOW_SOFTSHADOWMAP 1 - -#include -#include -#include -#include - -#include - -namespace osgShadow { - -/** SoftShadowMap provides an implementation of soft shadows with shadow maps.*/ -class OSGSHADOW_EXPORT SoftShadowMap : public ShadowMap -{ - public : - SoftShadowMap(); - - SoftShadowMap(const SoftShadowMap& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgShadow, SoftShadowMap); - - /** Set the values for width of the soft penumbra the shader will use. - * Zero is for hard shadow (no penumbra). 0.01 is already very soft penumbra. - * Default is 0.005.*/ - void setSoftnessWidth(float softnessWidth); - - /** Get the value used for width of the soft penumbra in the shader.*/ - float getSoftnessWidth() const { return _softnessWidth; } - - /** Set the values for jittering scale the shader will use. - * Zero is no jittering (i.e. see the banding in penumbra) - * High values (>64) cause 'pixelization' of the penumbra. - * Usually but not necessarily power of two number. - * Default is 32. */ - void setJitteringScale(float jitteringScale); - - /** Get the value used for jittering scale in the shader.*/ - float getJitteringScale() const { return _jitteringScale; } - - /** Set the texture unit that the jitter texture will be applied on.*/ - void setJitterTextureUnit(unsigned int jitterTextureUnit); - - /** Get the texture unit that the jitter texture will be applied on.*/ - unsigned int getJitterTextureUnit() const { return _jitterTextureUnit; } - - - /** Add a small bias to the z-value, this can reduce - * shadow acne problem. - * This is the same as calling setPolygonOffset(osg::Vec2(bias,0)); - * Suitable values are 0-0.005 - * Default is 0. */ - void setBias(float bias) { setPolygonOffset(osg::Vec2(bias,0)); } - - /** Return the bias value */ - float getBias() const { return getPolygonOffset().x(); } - - - protected: - virtual ~SoftShadowMap(void) {}; - - /** Create the managed Uniforms */ - void createUniforms(); - void createShaders(); - void initJittering(osg::StateSet *ss); - - osg::ref_ptr _softnessWidthUniform; - osg::ref_ptr _jitteringScaleUniform; - float _softnessWidth; - float _jitteringScale; - unsigned int _jitterTextureUnit; - - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/StandardShadowMap b/libs/lib/mac32/include/osgShadow/StandardShadowMap deleted file mode 100644 index 336472de2..000000000 --- a/libs/lib/mac32/include/osgShadow/StandardShadowMap +++ /dev/null @@ -1,200 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - -#ifndef OSGSHADOW_STANDARDSHADOWMAP -#define OSGSHADOW_STANDARDSHADOWMAP 1 - -#include - -namespace osgShadow { - -class OSGSHADOW_EXPORT StandardShadowMap : public DebugShadowMap -{ - public : - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef StandardShadowMap ThisClass; - /** Convenient typedef used in definition of ViewData struct and methods */ - typedef DebugShadowMap BaseClass; - - /** Classic OSG constructor */ - StandardShadowMap(); - - /** Classic OSG cloning constructor */ - StandardShadowMap(const StandardShadowMap& ssm, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, StandardShadowMap ); - - void setBaseTextureUnit( unsigned int unit ) - { _baseTextureUnit = unit; dirty(); } - - unsigned int getBaseTextureUnit( void ) const - { return _baseTextureUnit; } - - void setShadowTextureUnit( unsigned int unit ) - { _shadowTextureUnit = unit; dirty(); } - - unsigned int getShadowTextureUnit( void ) const - { return _shadowTextureUnit; } - - // Texture Indices are changed by search and replace on shader source - // Carefully order these calls when changing both base and shadow indices - // In worst case when intend to swap indices - // one will have to call these methods more than once - // with one extra pass to change index to unused value to avoid - // unwanted superfluous replace: - // - // Example: Imagine we want to swap base(0) and shadow(1) indices: - // We have to do an extra step to make sure both do not end up as 1 - // - // // initialy change base to something else than 1 - // setBaseTextureCoordIndex( 100 ); - // // now search and replace all gl_TexCord[1] to gl_TexCord[0] - // setShadowTextureCoordIndex( 0 ); - // // finally change base from 100 to 0 - // setBaseTextureCoordIndex( 1 ); - - void setBaseTextureCoordIndex( unsigned int index ) - { updateTextureCoordIndices( _baseTextureCoordIndex, index ); - _baseTextureCoordIndex = index; } - - unsigned int getBaseTextureCoordIndex( void ) const - { return _baseTextureCoordIndex; } - - // Texture Indices are changed by search and replace on shader source - // Look at the comment above setBaseTextureCoordIndex - - void setShadowTextureCoordIndex( unsigned int index ) - { updateTextureCoordIndices( _shadowTextureCoordIndex, index ); - _shadowTextureCoordIndex = index; } - - unsigned int getShadowTextureCoordIndex( void ) const - { return _shadowTextureCoordIndex; } - - void setTextureSize( const osg::Vec2s& textureSize ) - { _textureSize = textureSize; dirty(); } - - const osg::Vec2s& getTextureSize() const - { return _textureSize; } - - void setLight( osg::Light* light ) - { _light = light; } - - osg::Light* getLight( void ) - { return _light.get(); } - - const osg::Light* getLight( void ) const - { return _light.get(); } - - osg::Shader * getShadowVertexShader() - { return _shadowVertexShader.get(); } - - osg::Shader * getShadowFragmentShader() - { return _shadowFragmentShader.get(); } - - osg::Shader * getMainVertexShader( ) - { return _mainVertexShader.get(); } - - osg::Shader * getMainFragmentShader( ) - { return _mainFragmentShader.get(); } - - void setShadowVertexShader( osg::Shader * shader ) - { _shadowVertexShader = shader; } - - void setShadowFragmentShader( osg::Shader * shader ) - { _shadowFragmentShader = shader; } - - void setMainVertexShader( osg::Shader * shader ) - { _mainVertexShader = shader; } - - void setMainFragmentShader( osg::Shader * shader ) - { _mainFragmentShader = shader; } - - protected: - /** Classic protected OSG destructor */ - virtual ~StandardShadowMap(void); - - virtual void updateTextureCoordIndices - ( unsigned int baseTexCoordIndex, unsigned int shadowTexCoordIndex ); - - virtual void searchAndReplaceShaderSource - ( osg::Shader*, std::string fromString, std::string toString ); - - osg::ref_ptr< osg::Shader > _mainVertexShader; - osg::ref_ptr< osg::Shader > _mainFragmentShader; - osg::ref_ptr< osg::Shader > _shadowVertexShader; - osg::ref_ptr< osg::Shader > _shadowFragmentShader; - - osg::ref_ptr< osg::Light > _light; - float _polygonOffsetFactor; - float _polygonOffsetUnits; - osg::Vec2s _textureSize; - unsigned int _baseTextureUnit; - unsigned int _shadowTextureUnit; - unsigned int _baseTextureCoordIndex; - unsigned int _shadowTextureCoordIndex; - - struct OSGSHADOW_EXPORT ViewData: public BaseClass::ViewData - { - osg::ref_ptr< osg::Light > * _lightPtr; - unsigned int * _baseTextureUnitPtr; - unsigned int * _shadowTextureUnitPtr; - - // ShadowMap texture is defined by base DebugShadowMap - // osg::ref_ptr _texture; - - // ShadowMap camera is defined by base DebugShadowMap - // osg::ref_ptr _camera; - - osg::ref_ptr _texgen; - osg::ref_ptr _stateset; - - virtual void init( ThisClass * st, osgUtil::CullVisitor * cv ); - - virtual void cull( ); - - virtual void aimShadowCastingCamera( - const osg::BoundingSphere &bounds, - const osg::Light *light, - const osg::Vec4 &worldLightPos, - const osg::Vec3 &worldLightDir, - const osg::Vec3 &worldLightUp = osg::Vec3(0,1,0) ); - - virtual void cullShadowReceivingScene( ); - - virtual void cullShadowCastingScene( ); - - virtual void addShadowReceivingTexGen( ); - - virtual const osg::Light* selectLight( osg::Vec4 &viewLightPos, - osg::Vec3 &viewLightDir ); - - virtual void aimShadowCastingCamera( const osg::Light *light, - const osg::Vec4 &worldLightPos, - const osg::Vec3 &worldLightDir, - const osg::Vec3 &worldLightUp - = osg::Vec3(0,1,0) ); - }; - - friend struct ViewData; - - META_ViewDependentShadowTechniqueData( ThisClass, ThisClass::ViewData ) -}; - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgShadow/Version b/libs/lib/mac32/include/osgShadow/Version deleted file mode 100644 index bf39078dc..000000000 --- a/libs/lib/mac32/include/osgShadow/Version +++ /dev/null @@ -1,46 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSHADOW_VERSION -#define OSGSHADOW_VERSION 1 - -#include - -extern "C" { - -/** - * osgShadowGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgShadowGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph (OSG) Shadow library - # - AC_CHECK_LIB(osg, osgShadowGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph Shadow library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -extern OSGSHADOW_EXPORT const char* osgShadowGetVersion(); - -/** - * osgShadowGetLibraryName() returns the library name in human friendly form. -*/ -extern OSGSHADOW_EXPORT const char* osgShadowGetLibraryName(); - -} - -#endif diff --git a/libs/lib/mac32/include/osgShadow/ViewDependentShadowTechnique b/libs/lib/mac32/include/osgShadow/ViewDependentShadowTechnique deleted file mode 100644 index 8c7b86960..000000000 --- a/libs/lib/mac32/include/osgShadow/ViewDependentShadowTechnique +++ /dev/null @@ -1,232 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. - * - * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski - * Thanks to to my company http://www.ai.com.pl for allowing me free this work. -*/ - -#ifndef OSGSHADOW_VIEWDEPENDENTSHADOWTECHINIQUE -#define OSGSHADOW_VIEWDEPENDENTSHADOWTECHINIQUE 1 - -#include -#include -#include - -namespace osgShadow { -/** - META_ViewDependentShadowTechniqueData macro defines initViewDependentData - method used by derived shadow techniques to initialize their specific - ViewData objects. initViewDependentData will be called from - ViewDependentShadowTechnique base class to init derived class -*/ -#define META_ViewDependentShadowTechniqueData( ShadowTechnique, TechniqueData )\ -virtual ViewDependentShadowTechnique::ViewData * initViewDependentData \ -( osgUtil::CullVisitor *cv, ViewDependentShadowTechnique::ViewData * vd ) \ -{ \ - TechniqueData* td = dynamic_cast( vd ); \ - if ( !td ) td = new TechniqueData; \ - td->init( this, cv ); \ - return td; \ -} - -/** - ViewDependentShadowTechnique is a base class for all - View Dependent Shadow techniques. It defines fundamental object structure - and methods to manage separate shadow resources for each view of the scene. - By view we understand osg::View or SceneView instance and their associated - Camera. Typical osg application has one or more such views. View Dependent - Shadow techniques manage shadow generation for them. - - View Dependent Shadow techniques are used to optimize shadow algorithms for - part of the scene seen on the view. If rest of the scene is behind view - frustum, there is no sense in computing shadows for it. Since in practice we - often use 3d databases extending far beyond current camera frustum View - Dependent Shadow approach may produce much better shadows. - - The other goal is to provide framework for thread safe rendering of - the shadows. It allows to use shadows with different OSG threading models. - - Conceptually ViewDependentShadowTechnique is similar to osgSim::OverlayNode. - Its a container class for number of ViewData (or ViewData derived) objects - doing actual shadow work for each of the scene views. - - But ViewDependentShadowTechnique is intended as foundation layer for all - derived classes so in some way it extends osgSim::OverlayNode approach a bit. - - HOW IT WORKS: - - ViewDependendentShadowTechnique is derived from osgShadow::ShadowTechnique - and as such overrides virtual methods of osgShadow::ShadowTechnique. - But most of the shadow dirty work is done by ViewData objects, - ViewDependendentShadowTechnique::cull is the only osgShadow::ShadowTechnique - method where ViewDependendentShadowTechnique does something significant: - - What ViewDependentShadowTechnique::cull( CullVisitor & cv ) does ? - It identifies View. CullVisitor ptr is used as View identificator. - In practice we do not check and interpret what are actual Views and SceneViews - set up by application. We focus on Camera and CullVisitors as a identificators - of views. We can safely do this because each such view will have associated - unique CullVisitor used to cull the scene in every frame. - - Based on CullVisitor ptr passed to cull method, associated Technique::ViewData - object is created (if neccessary) and then seleced. Then control is passed to - this ViewData object. So, each view has its associated unique ViewData - (or derived) object performing dirty work of shadow resources management and - shadow generation for the view. - - To support creation of classes derived from ViewDependentShadowTechnique it - was neccessary to provide mechanism to override ViewData and allow for - initialization of new derived ViewData objects. Creation and initialization - is performed when ViewDependendentShadowTechnique::cull gets called with - CullVistor ptr which does not yet have associated ViewData object. When it - happens, virtual initViewDependentData method is called to give - derived techniques a chance to allocate and iniitalize its specific - resources as new ViewData derived instance. In practice initViewDependentData - in derived techniques should look the same as in base class so as a convenience - it was defined as META_ViewDependentShadowTechnique macro. Derived techniques - use this macro to override initViewDependentData method for their usage. - - After ViewData derived object is construted and selected, control is passed - to this object by call to virtual ViewData::cull method. The rest of work - is the done by this object. ViewDependentShadowTechnique::ViewData is intended - as a base class so it does nothing. In practice the rest of dirty work will - do new ViewData classes implemented in derived techniques. -*/ -class OSGSHADOW_EXPORT ViewDependentShadowTechnique - : public osgShadow::ShadowTechnique -{ - public: - /** - osgShadow::ShadowTechnique equivalent methods for view dependent techniques - */ - - /** Classic OSG constructor */ - ViewDependentShadowTechnique( void ); - - /** Classic OSG cloning constructor */ - ViewDependentShadowTechnique( - const ViewDependentShadowTechnique& vdst, - const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY ); - - - /** Declaration of standard OSG object methods */ - META_Object( osgShadow, ViewDependentShadowTechnique ); - - /** Dirty view data bits and force update of view data resources */ - virtual void dirty(); - - /** Initialize the ShadowedScene and some data structures.*/ - virtual void init(); - - /** Run the update traversal of the ShadowedScene and update any local cached data structures.*/ - virtual void update(osg::NodeVisitor& nv); - - /** Run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.*/ - virtual void cull(osgUtil::CullVisitor& cv); - - /** Clean scene graph from any shadow technique specific nodes, state and drawables.*/ - virtual void cleanSceneGraph(); - - /** Traverse shadow scene graph.*/ - virtual void traverse(osg::NodeVisitor& nv); - - protected: - /** Classic protected OSG destructor */ - ~ViewDependentShadowTechnique( void ); - - /** - Base container class for view dependent shadow resources. - Techniques based on ViewDependentShadowTechnique will usually define - similar struct and derive it from ViewData to contain their specufic resources. - */ - struct OSGSHADOW_EXPORT ViewData: public osg::Referenced - { - virtual const char* className() const { return "ViewData"; } - - /** - Method called upon ViewData instance to initialize internal variables - */ - virtual void init - ( ViewDependentShadowTechnique *st, osgUtil::CullVisitor *cv ); - - /** - Method called by ViewDependentShadowTechnique to allow ViewData - do the hard work computing shadows for its associated view - */ - virtual void cull(); - - /** - Dirty is called by parent ViewDependentShadowTechnique to force - update of resources after some of them were modified in parent technique - */ - virtual void dirty( bool flag ); - - /** - Simple constructor zeroing all variables. - */ - ViewData(): _dirty( true ), _cv( NULL ), _st( NULL ) { }; - - /** - Mutex used to guard _dirty flag from override in case when parent technique calls - dirty() simultaneously with ViewData while it is updating resources inside init method. - */ - OpenThreads::Mutex _mutex; - - /** - Dirty flag tells this instance to update its resources - */ - bool _dirty; - - /** - View's CullVisitor associated with this ViewData instance - */ - osg::observer_ptr< osgUtil::CullVisitor > _cv; - - /** - Parent ViewDependentShadowTechnique - */ - osg::observer_ptr< ViewDependentShadowTechnique > _st; - - }; - - /** - Map of view dependent data per view cull visitor (CVs are used as indices) - ViewDependentShadowTechnique uses this map to find VieData for each cull vitior - */ - - typedef std::map< osg::ref_ptr< osgUtil::CullVisitor >, - osg::ref_ptr< ViewData > > ViewDataMap; - - ViewDataMap _viewDataMap; - - - /** - Mutex used to serialize accesses to ViewDataMap - */ - OpenThreads::Mutex _viewDataMapMutex; - - /** Return view dependent data for the cull visitor */ - virtual ViewDependentShadowTechnique::ViewData * getViewDependentData( osgUtil::CullVisitor * cv ); - - /** Define view dependent data for the cull visitor */ - virtual void setViewDependentData( osgUtil::CullVisitor * cv, ViewDependentShadowTechnique::ViewData * data ); - - /** - Declare standard initViewDependentData method. - */ - META_ViewDependentShadowTechniqueData( ViewDependentShadowTechnique, ViewData ) -}; - - -} // namespace osgShadow - -#endif diff --git a/libs/lib/mac32/include/osgSim/BlinkSequence b/libs/lib/mac32/include/osgSim/BlinkSequence deleted file mode 100644 index 6cf75ab51..000000000 --- a/libs/lib/mac32/include/osgSim/BlinkSequence +++ /dev/null @@ -1,185 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_BLINKSQUENCE -#define OSGSIM_BLINKSQUENCE 1 - -#include - -#include -#include -#include -#include -#include - -#include - -namespace osgSim { - -/** sequence group which can be used to synchronize related blink sequences.*/ -class OSGSIM_EXPORT SequenceGroup : public osg::Object -{ - public: - - SequenceGroup(); - SequenceGroup(const SequenceGroup& bs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - SequenceGroup(double baseTime); - - META_Object(osgSim,SequenceGroup); - - inline void setBaseTime( double t ) { _baseTime = t; } - inline double getBaseTime() const { return _baseTime; } - - double _baseTime; -}; - -class OSGSIM_EXPORT BlinkSequence : public osg::Object -{ - public: - - BlinkSequence(); - - BlinkSequence(const BlinkSequence& bs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); - - META_Object(osgSim,BlinkSequence); - - /** add a pulse of specified color and duration to the BlinkSequence.*/ - inline void addPulse(double length,const osg::Vec4& color); - - /** return the number of pulses. */ - inline int getNumPulses() const { return _pulseData.size(); } - - /** return the pulse data at position i. */ - inline void getPulse(unsigned int i, double& length,osg::Vec4& color) const; - - /** set pulse of specified color and duration to the BlinkSequence.*/ - inline void setPulse(unsigned int i,double length,const osg::Vec4& color); - - /** get the total pulse period of the blink sequence, which is equal to the sum of all the pulse periods.*/ - inline double getPulsePeriod() const { return _pulsePeriod; } - - /** set the sequence group which can be used to synchronize related blink sequences.*/ - inline void setSequenceGroup(SequenceGroup* sg) { _sequenceGroup = sg; } - - /** get the non const sequence group.*/ - inline SequenceGroup* getSequenceGroup() { return _sequenceGroup.get(); } - - /** get the const sequence group.*/ - inline const SequenceGroup* getSequenceGroup() const { return _sequenceGroup.get(); } - - /** set the phase shift of the blink sequence, this would be used to shift a sequence within a sequence group.*/ - inline void setPhaseShift(double ps) { _phaseShift = ps; } - - /** get the pahse shift.*/ - inline double getPhaseShift() const { return _phaseShift; } - - /** compute the local time clamped to this BlinkSequences period, and accounting for the phase shift and sequence group.*/ - inline double localTime(double time) const; - - /** compute the color for the time interval sepecifed. Averages the colors if the length is greater than the current pulse.*/ - inline osg::Vec4 color(double time,double length) const; - - - protected: - - - typedef std::pair IntervalColor; - typedef std::vector PulseData; - - double _pulsePeriod; - double _phaseShift; - PulseData _pulseData; - osg::ref_ptr _sequenceGroup; -}; - - -inline double BlinkSequence::localTime(double time) const -{ - if (_sequenceGroup.valid()) time -= _sequenceGroup->_baseTime; - time -= _phaseShift; - return time - floor(time/_pulsePeriod)*_pulsePeriod; -} - -inline void BlinkSequence::addPulse(double length,const osg::Vec4& color) -{ - _pulseData.push_back(IntervalColor(length,color)); - _pulsePeriod += length; -} - -inline void BlinkSequence::getPulse(unsigned int i, double& length, osg::Vec4& color) const -{ - const IntervalColor& ic = _pulseData[i]; - length = ic.first; - color = ic.second; -} - -inline void BlinkSequence::setPulse(unsigned int i,double length,const osg::Vec4& color) -{ - if( i >= _pulseData.size() ) return; - IntervalColor& ic = _pulseData[i]; - ic.first = length; - ic.second = color; -} - -inline osg::Vec4 BlinkSequence::color(double time,double length) const -{ - if (_pulseData.empty()) return osg::Vec4(1.0f,1.0f,1.0f,1.0f); - double lt = localTime(time); - PulseData::const_iterator itr = _pulseData.begin(); - - // find the first sample at this time point. - while (lt>itr->first) - { - lt -= itr->first; - ++itr; - if (itr==_pulseData.end()) itr = _pulseData.begin(); - } - - // if time interval fits inside the current pulse - // then simply return this pulses color value. - if (lt+length<=itr->first) - { - return itr->second; - } - - // time length exceeds the current pulse therefore - // we have to average out the pules to get the correct - // results... - - // accumulate final part of the first active pulses. - osg::Vec4 color(itr->second*(itr->first-lt)); - double len = length-(itr->first-lt); - ++itr; - if (itr==_pulseData.end()) itr = _pulseData.begin(); - - // accumulate all the whole pluses pulses. - while (len>itr->first) - { - len -= itr->first; - color += itr->second*itr->first; - ++itr; - if (itr==_pulseData.end()) itr = _pulseData.begin(); - } - - // add remaining part of the final pulse. - color += itr->second*len; - - // normalise the time waited color. - color /= length; - - return color; -} - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/ColorRange b/libs/lib/mac32/include/osgSim/ColorRange deleted file mode 100644 index b1e8c5ca9..000000000 --- a/libs/lib/mac32/include/osgSim/ColorRange +++ /dev/null @@ -1,66 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_COLORRANGE -#define OSGSIM_COLORRANGE 1 - -#include - -#include -#include - -namespace osgSim -{ -/** -ColorRange is a ScalarsToColors object to define a color spectrum -for a scalar range. An optional vector of colors may be passed in at -construction time. The range of colors will be mapped to the scalar range, -and interpolation between the colors will be performed as necessary. -By default, the color range will run Red-Yellow-Green-Cyan-Blue. -*/ -class OSGSIM_EXPORT ColorRange: public ScalarsToColors -{ -public: - - /** Constructor for a ColorRange with a default list of colors set to Red-Yellow-Green-Blue-Cyan - @param min minimum scalar value - @param max maximum scalar value - */ - ColorRange(float min, float max); - - /** Constructor for a ColorRange - @param min minimum scalar value - @param max maximum scalar value - @param colors optional range of colors, - */ - ColorRange(float min, float max, const std::vector& colors); - - /** Set the range of colors. */ - void setColors(const std::vector& colors); - - /** Get the range of colors */ - const std::vector& getColors() const { return _colors; } - - /** Get the color for a given scalar value. */ - osg::Vec4 getColor(float scalar) const; - -private: - - // Default assignment and copy construction are OK. - - std::vector _colors; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/DOFTransform b/libs/lib/mac32/include/osgSim/DOFTransform deleted file mode 100644 index 6f4cb3e8f..000000000 --- a/libs/lib/mac32/include/osgSim/DOFTransform +++ /dev/null @@ -1,175 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_DOFTRANSFORM -#define OSGSIM_DOFTRANSFORM 1 - -//base class: -#include - -#include - -namespace osgSim { - -/** DOFTransform - encapsulates Multigen DOF behavior*/ -class OSGSIM_EXPORT DOFTransform : public osg::Transform -{ - public: - /** constructor*/ - DOFTransform(); - - /**copy constructor*/ - DOFTransform(const DOFTransform& dof, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osgSim, DOFTransform); - - virtual void traverse(osg::NodeVisitor& nv); - - - void setMinHPR(const osg::Vec3& hpr) { _minHPR = hpr;} - const osg::Vec3& getMinHPR() const { return _minHPR;} - - void setMaxHPR(const osg::Vec3& hpr) {_maxHPR = hpr;} - const osg::Vec3& getMaxHPR() const { return _maxHPR;} - - void setIncrementHPR(const osg::Vec3& hpr) {_incrementHPR = hpr;} - const osg::Vec3& getIncrementHPR() const { return _incrementHPR;} - - void setCurrentHPR(const osg::Vec3& hpr) {_currentHPR = hpr; dirtyBound(); } - const osg::Vec3& getCurrentHPR() const {return _currentHPR;} - - void updateCurrentHPR(const osg::Vec3& hpr); - - - void setMinTranslate(const osg::Vec3& translate) {_minTranslate = translate; } - const osg::Vec3& getMinTranslate() const { return _minTranslate;} - - void setMaxTranslate(const osg::Vec3& translate) {_maxTranslate = translate; } - const osg::Vec3& getMaxTranslate() const { return _maxTranslate;} - - void setIncrementTranslate(const osg::Vec3& translate) { _incrementTranslate = translate; } - const osg::Vec3& getIncrementTranslate() const { return _incrementTranslate;} - - void setCurrentTranslate(const osg::Vec3& translate){ _currentTranslate = translate; dirtyBound(); } - inline const osg::Vec3& getCurrentTranslate() const { return _currentTranslate;} - - void updateCurrentTranslate(const osg::Vec3& translate); - - - void setMinScale(const osg::Vec3& scale) { _minScale = scale;} - const osg::Vec3& getMinScale() const { return _minScale;} - - void setMaxScale(const osg::Vec3& scale) { _maxScale = scale;} - const osg::Vec3& getMaxScale() const { return _maxScale;} - - void setIncrementScale(const osg::Vec3& scale) { _incrementScale = scale;} - const osg::Vec3& getIncrementScale() const { return _incrementScale;} - - void setCurrentScale(const osg::Vec3& scale) { _currentScale = scale; dirtyBound(); } - inline const osg::Vec3& getCurrentScale() const { return _currentScale;} - - void updateCurrentScale(const osg::Vec3& scale); - - - void setPutMatrix(const osg::Matrix& put) { _Put = put; dirtyBound(); } - inline const osg::Matrix& getPutMatrix() const {return _Put;} - - void setInversePutMatrix(const osg::Matrix& inversePut) { _inversePut = inversePut; dirtyBound(); } - inline const osg::Matrix& getInversePutMatrix() const {return _inversePut;} - - void setLimitationFlags(unsigned long flags) { _limitationFlags = flags;} - inline unsigned long getLimitationFlags() const {return _limitationFlags;} - - enum MultOrder - { - PRH, - PHR, - HPR, - HRP, - RPH, - RHP - }; - - void setHPRMultOrder(MultOrder order) { _multOrder = order; } - inline MultOrder getHPRMultOrder() const { return _multOrder;} - - void setAnimationOn(bool do_animate); - inline bool getAnimationOn() const { return _animationOn; } - - void animate(float deltaTime); - - virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const; - - virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const; - - protected: - - virtual ~DOFTransform() {} - - unsigned int _previousTraversalNumber; - double _previousTime; - - osg::Vec3 _minHPR; - osg::Vec3 _maxHPR; - osg::Vec3 _currentHPR; - osg::Vec3 _incrementHPR; - - osg::Vec3 _minTranslate; - osg::Vec3 _maxTranslate; - osg::Vec3 _currentTranslate; - osg::Vec3 _incrementTranslate; - - osg::Vec3 _minScale; - osg::Vec3 _maxScale; - osg::Vec3 _currentScale; - osg::Vec3 _incrementScale; - - osg::Matrix _Put; - osg::Matrix _inversePut; - - unsigned long _limitationFlags; - /* bits from left to right - 0 = x translation limited (2^31) - 1 = y translation limited (2^30) - 2 = z translation limited (2^29) - 3 = pitch limited (2^28) - 4 = roll limited (2^27) - 5 = yaw limited (2^26) - 6 = x scale limited (2^25) - 7 = y scale limited (2^24) - 8 = z scale limited (2^23) - - else reserved - */ - - bool _animationOn; - /** flags indicating whether value is incerasing or decreasing in animation - bits form right to left, 1 means increasing while 0 is decreasing - 0 = x translation - 1 = y translation - 2 = z translation - 3 = pitch - 4 = roll - 5 = yaw - 6 = x scale - 7 = y scale - 8 = z scale - */ - unsigned short _increasingFlags; - - MultOrder _multOrder; - - }; - -} -#endif diff --git a/libs/lib/mac32/include/osgSim/ElevationSlice b/libs/lib/mac32/include/osgSim/ElevationSlice deleted file mode 100644 index d433e6a7c..000000000 --- a/libs/lib/mac32/include/osgSim/ElevationSlice +++ /dev/null @@ -1,101 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_ELEVATIONSLICE -#define OSGSIM_ELEVATIONSLICE 1 - -#include - -// include so we can get access to the DatabaseCacheReadCallback -#include - -namespace osgSim { - -/** Helper class for setting up and acquiring height above terrain intersections with terrain. - * By default assigns a osgSim::DatabaseCacheReadCallback that enables automatic loading - * of external PagedLOD tiles to ensure that the highest level of detail is used in intersections. - * This automatic loading of tiles is done by the intersection traversal that is done within - * the computeIntersections(..) method, so can result in long intersection times when external - * tiles have to be loaded. - * The external loading of tiles can be disabled by removing the read callback, this is done by - * calling the setDatabaseCacheReadCallback(DatabaseCacheReadCallback*) method with a value of 0.*/ -class OSGSIM_EXPORT ElevationSlice -{ - public : - - - ElevationSlice(); - - /** Set the start point of the slice.*/ - void setStartPoint(const osg::Vec3d& startPoint) { _startPoint = startPoint; } - - /** Get the start point of the slice.*/ - const osg::Vec3d& getStartPoint() const { return _startPoint; } - - /** Set the end point of the slice.*/ - void setEndPoint(const osg::Vec3d& endPoint) { _endPoint = endPoint; } - - /** Get the end point of the slice.*/ - const osg::Vec3d& getEndPoint() const { return _endPoint; } - - - typedef std::vector Vec3dList; - - /** Get the intersections in the form of a vector of Vec3d. */ - const Vec3dList& getIntersections() const { return _intersections; } - - typedef std::pair DistanceHeight; - typedef std::vector DistanceHeightList; - - /** Get the intersections in the form a vector of pair representing distance along the slice and height. */ - const DistanceHeightList& getDistanceHeightIntersections() const { return _distanceHeightIntersections; } - - - /** Compute the intersections with the specified scene graph, the results are stored in vectors of Vec3d. - * Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric, - * with the up vector defined by the EllipsoidModel attached to the CoordinateSystemNode. - * If the topmost node is not a CoordinateSystemNode then a local coordinates frame is assumed, with a local up vector. */ - void computeIntersections(osg::Node* scene, osg::Node::NodeMask traversalMask=0xffffffff); - - /** Compute the vertical distance between the specified scene graph and a single HAT point.*/ - static Vec3dList computeElevationSlice(osg::Node* scene, const osg::Vec3d& startPoint, const osg::Vec3d& endPoint, osg::Node::NodeMask traversalMask=0xffffffff); - - - /** Clear the database cache.*/ - void clearDatabaseCache() { if (_dcrc.valid()) _dcrc->clearDatabaseCache(); } - - /** Set the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs. - * Note, if you have multiple LineOfSight or ElevationSlice objects in use at one time then you should share a single - * DatabaseCacheReadCallback between all of them. */ - void setDatabaseCacheReadCallback(DatabaseCacheReadCallback* dcrc); - - /** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/ - DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); } - - protected : - - - osg::Vec3d _startPoint; - osg::Vec3d _endPoint; - Vec3dList _intersections; - DistanceHeightList _distanceHeightIntersections; - - osg::ref_ptr _dcrc; - osgUtil::IntersectionVisitor _intersectionVisitor; - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/Export b/libs/lib/mac32/include/osgSim/Export deleted file mode 100644 index a6e8e967c..000000000 --- a/libs/lib/mac32/include/osgSim/Export +++ /dev/null @@ -1,59 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_EXPORT_ -#define OSGSIM_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGSIM_EXPORT - # elif defined( OSGSIM_LIBRARY ) - # define OSGSIM_EXPORT __declspec(dllexport) - # else - # define OSGSIM_EXPORT __declspec(dllimport) - # endif -#else - # define OSGSIM_EXPORT -#endif - -/* Define NULL pointer value */ - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -/** - -\namespace osgSim - -The osgSim library is a NodeKit that extends the core scene graph to support nodes and drawables that specific to the visual simulation, such -a navigational light point support and OpenFlight style degrees of freedom transform. -*/ - -#endif diff --git a/libs/lib/mac32/include/osgSim/GeographicLocation b/libs/lib/mac32/include/osgSim/GeographicLocation deleted file mode 100644 index e0b9c5269..000000000 --- a/libs/lib/mac32/include/osgSim/GeographicLocation +++ /dev/null @@ -1,87 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_GEOGRAPHICLOCATION -#define OSGSIM_GEOGRAPHICLOCATION 1 - -#include -#include - -#include - -namespace osgSim { - -/** Stores a double precision geographic location, latitude and longitude. - Derived from Referenced so it can be used as an osg::Object userData. -*/ - -class GeographicLocation : public osg::Referenced -{ - public: - - GeographicLocation() { _v[0]=0.; _v[1]=0.; } - GeographicLocation( double lat, double lon ) { _v[0]=lat; _v[1]=lon; } - - inline bool operator == ( const GeographicLocation& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1]; } - inline bool operator != ( const GeographicLocation& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1]; } - inline bool operator < ( const GeographicLocation& v) const - { - if (_v[0]v._v[0]) return false; - else if (_v[1] - -// include so we can get access to the DatabaseCacheReadCallback -#include - -namespace osgSim { - -/** Helper class for setting up and acquiring height above terrain intersections with terrain. - * By default assigns a osgSim::DatabaseCacheReadCallback that enables automatic loading - * of external PagedLOD tiles to ensure that the highest level of detail is used in intersections. - * This automatic loading of tiles is done by the intersection traversal that is done within - * the computeIntersections(..) method, so can result in long intersection times when external - * tiles have to be loaded. - * The external loading of tiles can be disabled by removing the read callback, this is done by - * calling the setDatabaseCacheReadCallback(DatabaseCacheReadCallback*) method with a value of 0.*/ -class OSGSIM_EXPORT HeightAboveTerrain -{ - public : - - - HeightAboveTerrain(); - - - /** Clear the internal HAT List so it contains no height above terrain tests.*/ - void clear(); - - /** Add a height above terrain test point in the CoordinateFrame.*/ - unsigned int addPoint(const osg::Vec3d& point); - - /** Get the number of height above terrain tests.*/ - unsigned int getNumPoints() const { return _HATList.size(); } - - /** Set the source point of single height above terrain test.*/ - void setPoint(unsigned int i, const osg::Vec3d& point) { _HATList[i]._point = point; } - - /** Get the source point of single height above terrain test.*/ - const osg::Vec3d& getPoint(unsigned int i) const { return _HATList[i]._point; } - - /** Get the intersection height for a single height above terrain test. - * Note, you must call computeIntersections(..) before you can query the HeightAboveTerrain. - * If no intersections are found then height returned will be the height above mean sea level. */ - double getHeightAboveTerrain(unsigned int i) const { return _HATList[i]._hat; } - - /** Set the lowest height that the should be tested for. - * Defaults to -1000, i.e. 1000m below mean sea level. */ - void setLowestHeight(double lowestHeight) { _lowestHeight = lowestHeight; } - - /** Get the lowest height that the should be tested for.*/ - double getLowestHeight() const { return _lowestHeight; } - - /** Compute the HAT intersections with the specified scene graph. - * The results are all stored in the form of a single height above terrain value per HAT test. - * Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric, - * with the up vector defined by the EllipsoidModel attached to the CoordinateSystemNode. - * If the topmost node is not a CoordinateSystemNode then a local coordinates frame is assumed, with a local up vector. */ - void computeIntersections(osg::Node* scene, osg::Node::NodeMask traversalMask=0xffffffff); - - /** Compute the vertical distance between the specified scene graph and a single HAT point. */ - static double computeHeightAboveTerrain(osg::Node* scene, const osg::Vec3d& point, osg::Node::NodeMask traversalMask=0xffffffff); - - - /** Clear the database cache.*/ - void clearDatabaseCache() { if (_dcrc.valid()) _dcrc->clearDatabaseCache(); } - - /** Set the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs. - * Note, if you have multiple LineOfSight or HeightAboveTerrain objects in use at one time then you should share a single - * DatabaseCacheReadCallback between all of them. */ - void setDatabaseCacheReadCallback(DatabaseCacheReadCallback* dcrc); - - /** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/ - DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); } - - protected : - - struct HAT - { - HAT(const osg::Vec3d& point): - _point(point), - _hat(0.0) {} - - osg::Vec3d _point; - double _hat; - }; - - typedef std::vector HATList; - - - double _lowestHeight; - HATList _HATList; - - - osg::ref_ptr _dcrc; - osgUtil::IntersectionVisitor _intersectionVisitor; - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/Impostor b/libs/lib/mac32/include/osgSim/Impostor deleted file mode 100644 index 854500f14..000000000 --- a/libs/lib/mac32/include/osgSim/Impostor +++ /dev/null @@ -1,121 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_IMPOSTOR -#define OSGSIM_IMPOSTOR 1 - -#include -#include - -#include - -#include - -namespace osgSim { - -/** Impostor - is a form of Level Of Detail group node which allows both switching - * between children depending on distance from eye point and image caching. - * - * The principle behind Imposters is that they cache an image of real geometry and then the image is drawn - * in subsequent frames instead of the real geometry. It's a bit like a - * Billboard *but* is updated at runtime and w.r.t view point. By drawing - * just the texture mapped quad you can cut down scene complexity and - * improve performance. - * - * For more details have a look at: - * - * http://grail.cs.washington.edu/projects/hic/ - * - * The OSG doesn't implement exactly the same technique as above, but its - * should be a good starting place. The OSG's impostors are much less - * intrusive since you don't need to restructure your whole scene to use - * them. - * - * All you need to do to use Impostors is to set up the visible - * range values for each LOD child of the Impostor, as per osg::LOD, - * and set an Impostor threshold to tell the renderer at what distance - * the Impostor's image caching should cut in. The osg::CullVisitor - * automatically handles all the setting of pre-rendering stages to - * calculate the required ImpostorSprites (which encapsulates the image - * cache and quad), and updates them as the view point changes. If you - * use osg::SceneView/CullVisitor all the complexity of supporting - * Impostor will be nicely hidden away. - * - * TODO: - * Various improvements are planned for the Impostor- - * 1) Estimation of how many frames an ImpostorSprite will be reused, if - * it won't be used more often than a minimum threshold then do not create - * ImpostorSprite - use the real geometry. - * 2) Sharing of texture memory between ImpostorSprites. - * 3) Simple 3D geometry for ImpostorSprite's rather than Billboarding. - * 4) Shrinking of the ImpostorSprite size to more closely fit the underlying - * geometry. - */ -class OSGSIM_EXPORT Impostor : public osg::LOD -{ - public : - Impostor(); - - Impostor(const Impostor& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - osg::LOD(es,copyop), - _impostorThreshold(es._impostorThreshold) {} - - META_Node(osgSim, Impostor); - - virtual void traverse(osg::NodeVisitor& nv); - - typedef std::vector< osg::ref_ptr > ImpostorSpriteList; - - /** Set the Impostor threshold distance. - * For eye points further than this threshold the Imposter is used if appropriate, - * otherwise the LOD children as chosen as per a standard LOD node. - */ - inline void setImpostorThreshold(float distance) { _impostorThreshold = distance; } - - /* Get the Impostor threshold distance. */ - inline float getImpostorThreshold() const { return _impostorThreshold; } - - /** Set the Impostor threshold distance relative to the node's bounding - * sphere's radius. - */ - inline void setImpostorThresholdToBound(float ratio=1.0f) { _impostorThreshold = getBound().radius()*ratio; } - - /** Find the ImposterSprite which fits the current eye point best. */ - ImpostorSprite* findBestImpostorSprite(unsigned int contextID, const osg::Vec3& currLocalEyePoint) const; - - /** Add an ImpostorSprite to the Impostor. */ - void addImpostorSprite(unsigned int contextID, ImpostorSprite* is); - - /** Get the list of ImpostorSprites attached to this Impostor. */ - inline ImpostorSpriteList& getImpostorSpriteList(unsigned int contexID) { return _impostorSpriteListBuffer[contexID]; } - - /** Get a const list of ImpostorSprites attached to this const Impostor. */ - inline const ImpostorSpriteList& getImpostorSpriteList(unsigned int contexID) const { return _impostorSpriteListBuffer[contexID]; } - - virtual osg::BoundingSphere computeBound() const; - - protected : - - virtual ~Impostor() {} - - mutable osg::buffered_object _impostorSpriteListBuffer; - - ImpostorSprite* createImpostorSprite(osgUtil::CullVisitor* cv); - - float _impostorThreshold; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/ImpostorSprite b/libs/lib/mac32/include/osgSim/ImpostorSprite deleted file mode 100644 index 03f3426bc..000000000 --- a/libs/lib/mac32/include/osgSim/ImpostorSprite +++ /dev/null @@ -1,241 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_ImpostorSprite -#define OSG_ImpostorSprite 1 - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace osgSim { - -class Impostor; -class ImpostorSpriteManager; - -/** An ImposterSprite is a textured quad which is rendered in place of - * 3D geometry. The ImposterSprite is generated by rendering the original - * 3D geometry to a texture as an image cache. The ImpostorSprite is - * automatically generated by the osgUtil::CullVisitor so it not - * necessary to deal with it directly. -*/ -class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable -{ - public: - - ImpostorSprite(); - - /** Clone an object of the same type as an ImpostorSprite. */ - virtual osg::Object* cloneType() const { return new ImpostorSprite(); } - - /** Clone on ImpostorSprite just returns a clone of type, - * since it is not appropriate to share data of an ImpostorSprite. - */ - virtual osg::Object* clone(const osg::CopyOp&) const { return new ImpostorSprite(); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* libraryName() const { return "osgSim"; } - virtual const char* className() const { return "ImpostorSprite"; } - - /** Set the parent, which must be an Impostor. - * Unlike conventional Drawables, ImpostorSprites can only ever have - * one parent. - */ - void setParent(Impostor* parent) { _parent = parent; } - - /** Get the parent, which is an Impostor. */ - Impostor* getParent() { return _parent; } - - /** Get the const parent, which is an Impostor. */ - const Impostor* getParent() const { return _parent; } - - /** Set the eye point for when the ImpostorSprite was snapped. */ - inline void setStoredLocalEyePoint(const osg::Vec3& v) { _storedLocalEyePoint=v; } - - /** Get the eye point for when the ImpostorSprite was snapped. */ - inline const osg::Vec3& getStoredLocalEyePoint() const { return _storedLocalEyePoint; } - - /** Set the frame number for when the ImpostorSprite was last used in rendering. */ - inline void setLastFrameUsed(unsigned int frameNumber) { _lastFrameUsed = frameNumber; } - - /** Get the frame number for when the ImpostorSprite was last used in rendering. */ - inline unsigned int getLastFrameUsed() const { return _lastFrameUsed; } - - - /** Get the coordinates of the corners of the quad. - * Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left. - */ - inline osg::Vec3* getCoords() { return _coords; } - - /** Get the const coordinates of the corners of the quad. */ - inline const osg::Vec3* getCoords() const { return _coords; } - - - - /** Get the texture coordinates of the corners of the quad. - * Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left. - */ - inline osg::Vec2* getTexCoords() { return _texcoords; } - - /** Get the const texture coordinates of the corners of the quad. */ - inline const osg::Vec2* getTexCoords() const { return _texcoords; } - - /** Get the control coordinates of the corners of the quad. - * The control coordinates are the corners of the quad projected - * out onto the front face of bounding box which enclosed the impostor - * geometry when it was pre-rendered into the impostor sprite's texture. - * At the point of creation/or update of the impostor sprite the control - * coords will lie on top of the corners of the quad in screen space - with a pixel error - * of zero. Once the camera moves relative to the impostor sprite the - * control coords will no longer lie on top of the corners of the quad in - * screen space - a pixel error will have accumulated. This pixel error - * can then be used to determine whether the impostor needs to be updated. - * Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left. - */ - inline osg::Vec3* getControlCoords() { return _controlcoords; } - - /** Get the const control coordinates of the corners of the quad. */ - inline const osg::Vec3* getControlCoords() const { return _controlcoords; } - - - /** Calculate the pixel error value for passing in the ModelViewProjectionWindow transform, - * which transform local coords into screen space. - */ - float calcPixelError(const osg::Matrix& MVPW) const; - - void setTexture(osg::Texture2D* tex,int s,int t); - osg::Texture2D* getTexture() { return _texture; } - const osg::Texture2D* getTexture() const { return _texture; } - - int s() const { return _s; } - int t() const { return _t; } - - /** Draw ImpostorSprite directly. */ - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; - - /** Return true, osg::ImpostorSprite does support accept(Drawable::AttributeFunctor&). */ - virtual bool supports(const Drawable::AttributeFunctor&) const { return true; } - - /** Accept an Drawable::AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. */ - virtual void accept(Drawable::AttributeFunctor& af); - - /** Return true, osg::ImpostorSprite does support accept(Drawable::ConstAttributeFunctor&). */ - virtual bool supports(const Drawable::ConstAttributeFunctor&) const { return true; } - - /** Accept a Drawable::ConstAttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. */ - virtual void accept(Drawable::ConstAttributeFunctor& af) const; - - /** Return true, osg::ImpostorSprite does support accept(PrimitiveFunctor&). */ - virtual bool supports(const osg::PrimitiveFunctor&) const { return true; } - - /** Accept a PrimtiveFunctor and call its methods to tell it about the internal primitives that this Drawable has. */ - virtual void accept(osg::PrimitiveFunctor& pf) const; - - // for debugging purposes. - osg::Vec4 _color; - - virtual osg::BoundingBox computeBound() const; - - /** Set the camera node to use for pre rendering the impostor sprite's texture.*/ - void setCamera(osg::Camera* camera) { _camera = camera; } - - /** Get the camera node to use for pre rendering the impostor sprite's texture.*/ - osg::Camera* getCamera() { return _camera.get(); } - - /** Get the const camera node to use for pre rendering the impostor sprite's texture.*/ - const osg::Camera* getCamera() const { return _camera.get(); } - - protected: - - ImpostorSprite(const ImpostorSprite&); - ImpostorSprite& operator = (const ImpostorSprite&) { return *this;} - - virtual ~ImpostorSprite(); - - Impostor* _parent; - - friend class osgSim::ImpostorSpriteManager; - - // camera node for doing the pre rendering. - osg::ref_ptr _camera; - - // support for a double linked list managed by the - // ImposotorSpriteManager. - ImpostorSpriteManager* _ism; - ImpostorSprite* _previous; - ImpostorSprite* _next; - - unsigned int _lastFrameUsed; - - osg::Vec3 _storedLocalEyePoint; - - osg::Vec3 _coords[4]; - osg::Vec2 _texcoords[4]; - osg::Vec3 _controlcoords[4]; - - osg::Texture2D* _texture; - int _s; - int _t; - - -}; - -/** Helper class for managing the reuse of ImpostorSprite resources. */ -class OSGSIM_EXPORT ImpostorSpriteManager : public osg::Referenced -{ - public: - - ImpostorSpriteManager(); - - bool empty() const { return _first==0; } - - ImpostorSprite* first() { return _first; } - - ImpostorSprite* last() { return _last; } - - void push_back(ImpostorSprite* is); - - void remove(ImpostorSprite* is); - - ImpostorSprite* createOrReuseImpostorSprite(int s,int t,unsigned int frameNumber); - - osg::StateSet* createOrReuseStateSet(); - - void reset(); - - protected: - - - ~ImpostorSpriteManager(); - - osg::ref_ptr _texenv; - osg::ref_ptr _alphafunc; - - ImpostorSprite* _first; - ImpostorSprite* _last; - - typedef std::vector< osg::ref_ptr > StateSetList; - StateSetList _stateSetList; - unsigned int _reuseStateSetIndex; - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/InsertImpostorsVisitor b/libs/lib/mac32/include/osgSim/InsertImpostorsVisitor deleted file mode 100644 index 2fb4c5c5a..000000000 --- a/libs/lib/mac32/include/osgSim/InsertImpostorsVisitor +++ /dev/null @@ -1,68 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_INSERTIMPOSTORSVISITOR -#define OSGSIM_INSERTIMPOSTORSVISITOR - -#include -#include - -namespace osgSim { - -/** Insert impostor nodes into scene graph. - * For example of usage see examples/osgimpostor. - */ -class OSGSIM_EXPORT InsertImpostorsVisitor : public osg::NodeVisitor -{ - public: - - /** Default to traversing all children. */ - InsertImpostorsVisitor(); - - META_NodeVisitor("osgSim","InsertImpostorsVisitor") - - void setImpostorThresholdRatio(float ratio) { _impostorThresholdRatio = ratio; } - float getImpostorThresholdRatio() const { return _impostorThresholdRatio; } - - void setMaximumNumberOfNestedImpostors(unsigned int num) { _maximumNumNestedImpostors = num; } - unsigned int getMaximumNumberOfNestedImpostors() const { return _maximumNumNestedImpostors; } - - /** Empty visitor, make it ready for next traversal. */ - void reset(); - - virtual void apply(osg::Node& node); - - virtual void apply(osg::Group& node); - - virtual void apply(osg::LOD& node); - - /* Insert the required impostors into the scene graph. */ - void insertImpostors(); - - protected: - - typedef std::vector< osg::Group* > GroupList; - typedef std::vector< osg::LOD* > LODList; - - GroupList _groupList; - LODList _lodList; - - float _impostorThresholdRatio; - unsigned int _maximumNumNestedImpostors; - unsigned int _numNestedImpostors; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/LightPoint b/libs/lib/mac32/include/osgSim/LightPoint deleted file mode 100644 index a140e8c9e..000000000 --- a/libs/lib/mac32/include/osgSim/LightPoint +++ /dev/null @@ -1,72 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_LIGHTPOINT -#define OSGSIM_LIGHTPOINT 1 - -#include -#include -#include - -#include -#include -#include - -namespace osgSim { - - -class OSGSIM_EXPORT LightPoint -{ - public: - - enum BlendingMode - { - ADDITIVE, - BLENDED - }; - - LightPoint(); - - LightPoint(const osg::Vec3& position, - const osg::Vec4& color); - - LightPoint(bool on, - const osg::Vec3& position, - const osg::Vec4& color, - float intensity=1.0f, - float radius=1.0f, - Sector* sector=0, - BlinkSequence* blinkSequence=0, - BlendingMode blendingMode=BLENDED); - - - LightPoint(const LightPoint& lp); - - LightPoint& operator = (const LightPoint& lp); - - - bool _on; - osg::Vec3 _position; - osg::Vec4 _color; - float _intensity; - float _radius; - - osg::ref_ptr _sector; - osg::ref_ptr _blinkSequence; - - BlendingMode _blendingMode; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/LightPointNode b/libs/lib/mac32/include/osgSim/LightPointNode deleted file mode 100644 index f4f59f089..000000000 --- a/libs/lib/mac32/include/osgSim/LightPointNode +++ /dev/null @@ -1,114 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_LIGHTPOINTNODE -#define OSGSIM_LIGHTPOINTNODE 1 - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -namespace osgSim { - - -class OSGSIM_EXPORT LightPointNode : public osg::Node -{ - public : - - typedef std::vector< LightPoint > LightPointList; - - LightPointNode(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - LightPointNode(const LightPointNode&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osgSim,LightPointNode); - - virtual void traverse(osg::NodeVisitor& nv); - - - unsigned int getNumLightPoints() const { return _lightPointList.size(); } - - - unsigned int addLightPoint(const LightPoint& lp); - - void removeLightPoint(unsigned int pos); - - - LightPoint& getLightPoint(unsigned int pos) { return _lightPointList[pos]; } - - const LightPoint& getLightPoint(unsigned int pos) const { return _lightPointList[pos]; } - - - void setLightPointList(const LightPointList& lpl) { _lightPointList=lpl; } - - LightPointList& getLightPointList() { return _lightPointList; } - - const LightPointList& getLightPointList() const { return _lightPointList; } - - - void setMinPixelSize(float minPixelSize) { _minPixelSize = minPixelSize; } - - float getMinPixelSize() const { return _minPixelSize; } - - void setMaxPixelSize(float maxPixelSize) { _maxPixelSize = maxPixelSize; } - - float getMaxPixelSize() const { return _maxPixelSize; } - - void setMaxVisibleDistance2(float maxVisibleDistance2) { _maxVisibleDistance2 = maxVisibleDistance2; } - - float getMaxVisibleDistance2() const { return _maxVisibleDistance2; } - - void setLightPointSystem( osgSim::LightPointSystem* lps) { _lightSystem = lps; } - - osgSim::LightPointSystem* getLightPointSystem() { return _lightSystem.get(); } - const osgSim::LightPointSystem* getLightPointSystem() const { return _lightSystem.get(); } - - void setPointSprite(bool enable=true) { _pointSprites = enable; } - - bool getPointSprite() const { return _pointSprites; } - - virtual osg::BoundingSphere computeBound() const; - - protected: - - ~LightPointNode() {} - - // used to cache the bouding box of the lightpoints as a tighter - // view frustum check. - mutable osg::BoundingBox _bbox; - - LightPointList _lightPointList; - - float _minPixelSize; - float _maxPixelSize; - float _maxVisibleDistance2; - - osg::ref_ptr _lightSystem; - - bool _pointSprites; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/LightPointSystem b/libs/lib/mac32/include/osgSim/LightPointSystem deleted file mode 100644 index 32c2b499c..000000000 --- a/libs/lib/mac32/include/osgSim/LightPointSystem +++ /dev/null @@ -1,63 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_LIGHTPOINTSYSTEM -#define OSGSIM_LIGHTPOINTSYSTEM 1 - -#include - - -namespace osgSim { - - -/* - * LightPointSYSTEM encapsulates animation and intensity state in a single object - * that can be shared by several osgSim::LightPointNodes, thereby allowing an - * application to efficiently control the animation/intensity state of - * several LightPointNodes. - */ -class LightPointSystem : public osg::Object -{ - public : - LightPointSystem() : _intensity( 1.f ), _animationState( ANIMATION_ON ) - { } - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - LightPointSystem( const LightPointSystem& lps, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY ) : - osg::Object( lps, copyop ), _intensity( lps._intensity ), _animationState( lps._animationState ) - { } - - META_Object( osgSim, LightPointSystem ); - - typedef enum { - ANIMATION_ON, - ANIMATION_OFF, - ANIMATION_RANDOM - } AnimationState; - - void setIntensity( float intensity ) { _intensity = intensity; } - float getIntensity() const { return _intensity; } - - void setAnimationState( LightPointSystem::AnimationState state ) { _animationState = state; } - LightPointSystem::AnimationState getAnimationState() const { return _animationState; } - - protected: - ~LightPointSystem() {} - - float _intensity; - AnimationState _animationState; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/LineOfSight b/libs/lib/mac32/include/osgSim/LineOfSight deleted file mode 100644 index 5f4f5e319..000000000 --- a/libs/lib/mac32/include/osgSim/LineOfSight +++ /dev/null @@ -1,129 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_LINEOFSIGHT -#define OSGSIM_LINEOFSIGHT 1 - -#include - -#include - -namespace osgSim { - -class OSGSIM_EXPORT DatabaseCacheReadCallback : public osgUtil::IntersectionVisitor::ReadCallback -{ - public: - DatabaseCacheReadCallback(); - - void setMaximumNumOfFilesToCache(unsigned int maxNumFilesToCache) { _maxNumFilesToCache = maxNumFilesToCache; } - unsigned int getMaximumNumOfFilesToCache() const { return _maxNumFilesToCache; } - - void clearDatabaseCache(); - - void pruneUnusedDatabaseCache(); - - virtual osg::Node* readNodeFile(const std::string& filename); - - protected: - - typedef std::map > FileNameSceneMap; - - unsigned int _maxNumFilesToCache; - OpenThreads::Mutex _mutex; - FileNameSceneMap _filenameSceneMap; -}; - -/** Helper class for setting up and acquiring line of sight intersections with terrain. - * By default assigns a osgSim::DatabaseCacheReadCallback that enables automatic loading - * of external PagedLOD tiles to ensure that the highest level of detail is used in intersections. - * This automatic loading of tiles is done by the intersection traversal that is done within - * the computeIntersections(..) method, so can result in long intersection times when external - * tiles have to be loaded. - * The external loading of tiles can be disabled by removing the read callback, this is done by - * calling the setDatabaseCacheReadCallback(DatabaseCacheReadCallback*) method with a value of 0.*/ -class OSGSIM_EXPORT LineOfSight -{ - public : - - LineOfSight(); - - /** Clear the internal LOS List so it contains no line of sight tests.*/ - void clear(); - - /** Add a line of sight test, consisting of start and end point. Returns the index number of the newly adding LOS test.*/ - unsigned int addLOS(const osg::Vec3d& start, const osg::Vec3d& end); - - /** Get the number of line of sight tests.*/ - unsigned int getNumLOS() const { return _LOSList.size(); } - - /** Set the start point of single line of sight test.*/ - void setStartPoint(unsigned int i, const osg::Vec3d& start) { _LOSList[i]._start = start; } - - /** Get the start point of single line of sight test.*/ - const osg::Vec3d& getStartPoint(unsigned int i) const { return _LOSList[i]._start; } - - /** Set the end point of single line of sight test.*/ - void setEndPoint(unsigned int i, const osg::Vec3d& end) { _LOSList[i]._end = end; } - - /** Get the end point of single line of sight test.*/ - const osg::Vec3d& getEndPoint(unsigned int i) const { return _LOSList[i]._end; } - - typedef std::vector Intersections; - - /** Get the intersection points for a single line of sight test.*/ - const Intersections& getIntersections(unsigned int i) const { return _LOSList[i]._intersections; } - - /** Compute the LOS intersections with the specified scene graph. - * The results are all stored in the form of Intersections list, one per LOS test.*/ - void computeIntersections(osg::Node* scene, osg::Node::NodeMask traversalMask=0xffffffff); - - /** Compute the intersection between the specified scene graph and a single LOS start,end pair. Returns an IntersectionList, of all the points intersected.*/ - static Intersections computeIntersections(osg::Node* scene, const osg::Vec3d& start, const osg::Vec3d& end, osg::Node::NodeMask traversalMask=0xffffffff); - - - /** Clear the database cache.*/ - void clearDatabaseCache() { if (_dcrc.valid()) _dcrc->clearDatabaseCache(); } - - /** Set the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs. - * Note, if you have multiple LineOfSight or HeightAboveTerrain objects in use at one time then you should share a single - * DatabaseCacheReadCallback between all of them. */ - void setDatabaseCacheReadCallback(DatabaseCacheReadCallback* dcrc); - - /** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/ - DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); } - - protected : - - struct LOS - { - LOS(const osg::Vec3d& start, const osg::Vec3d& end): - _start(start), - _end(end) {} - - - osg::Vec3d _start; - osg::Vec3d _end; - Intersections _intersections; - }; - - typedef std::vector LOSList; - LOSList _LOSList; - - osg::ref_ptr _dcrc; - osgUtil::IntersectionVisitor _intersectionVisitor; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/MultiSwitch b/libs/lib/mac32/include/osgSim/MultiSwitch deleted file mode 100644 index 7501e5d75..000000000 --- a/libs/lib/mac32/include/osgSim/MultiSwitch +++ /dev/null @@ -1,107 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSG_MULTISWITCH -#define OSG_MULTISWITCH 1 - -#include -#include - -namespace osgSim { - -/** MultiSwitch is a Group node which allows switching between sets of selected children. - MultiSwtich is based on the OpenFlight switch behaviour. -*/ -class OSGSIM_EXPORT MultiSwitch : public osg::Group -{ - public : - - - MultiSwitch(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - MultiSwitch(const MultiSwitch&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osgSim, MultiSwitch); - - virtual void traverse(osg::NodeVisitor& nv); - - void setNewChildDefaultValue(bool value) { _newChildDefaultValue = value; } - - bool getNewChildDefaultValue() const { return _newChildDefaultValue; } - - virtual bool addChild( osg::Node *child ); - - virtual bool insertChild( unsigned int index, osg::Node *child ); - - virtual bool removeChild( osg::Node *child ); - - void setValue(unsigned int switchSet, unsigned int pos,bool value); - - bool getValue(unsigned int switchSet, unsigned int pos) const; - - void setChildValue(const osg::Node* child,unsigned int switchSet, bool value); - - bool getChildValue(const osg::Node* child,unsigned int switchSet) const; - - /** Set all the children off (false), and set the new default child value to off (false).*/ - bool setAllChildrenOff(unsigned int switchSet); - - /** Set all the children on (true), and set the new default child value to on (true).*/ - bool setAllChildrenOn(unsigned int switchSet); - - /** Set a single child to be on, MultiSwitch off all other children.*/ - bool setSingleChildOn(unsigned int switchSet, unsigned int pos); - - /** Set which of the available switch set lists to use.*/ - void setActiveSwitchSet(unsigned int switchSet) { _activeSwitchSet = switchSet; } - - /** Get which of the available switch set lists to use.*/ - unsigned int getActiveSwitchSet() const { return _activeSwitchSet; } - - typedef std::vector ValueList; - typedef std::vector SwitchSetList; - typedef std::vector SwitchSetNameList; - - /** Set the compile set of different values.*/ - void setSwitchSetList(const SwitchSetList& switchSetList); - - /** Get the compile set of different values.*/ - const SwitchSetList& getSwitchSetList() const { return _values; } - - /** Set the a single set of different values for a particular switch set.*/ - void setValueList(unsigned int switchSet, const ValueList& values); - - /** Get the a single set of different values for a particular switch set.*/ - const ValueList& getValueList(unsigned int switchSet) const { return _values[switchSet]; } - - void setValueName(unsigned int switchSet, const std::string& name); - - const std::string& getValueName(unsigned int switchSet) const { return _valueNames[switchSet]; } - - protected : - - virtual ~MultiSwitch() {} - - void expandToEncompassSwitchSet(unsigned int switchSet); - - // this is effectively a list of bit mask. - bool _newChildDefaultValue; - unsigned int _activeSwitchSet; - SwitchSetList _values; - SwitchSetNameList _valueNames; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/ObjectRecordData b/libs/lib/mac32/include/osgSim/ObjectRecordData deleted file mode 100644 index c28e3b663..000000000 --- a/libs/lib/mac32/include/osgSim/ObjectRecordData +++ /dev/null @@ -1,73 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_OBJECTRECORDDATA -#define OSGSIM_OBJECTRECORDDATA 1 - -#include - -#include - -namespace osgSim { - -/** When the OpenFlight importer encounters an Object record, it stores - the data in one of these classes, and attaches the instance of the - class as UserData to the corresponding osgLLGroup node. -*/ - -class ObjectRecordData : public osg::Object -{ - public: - - ObjectRecordData() - : _flags( 0 ), - _relativePriority( 0 ), - _transparency( 0 ), - _effectID1( 0 ), - _effectID2( 0 ), - - _significance( 0 ) - {} - - ObjectRecordData( const ObjectRecordData& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ): - osg::Object(copy, copyop) - { - _flags = copy._flags; - _relativePriority = copy._relativePriority; - _transparency = copy._transparency; - _effectID1 = copy._effectID1; - _effectID2 = copy._effectID2; - _significance = copy._significance; - } - - META_Object( osgSim, ObjectRecordData ); - - static const unsigned int DONT_DISPLAY_IN_DAYLIGHT = 0x80000000u >> 0; - static const unsigned int DONT_DISPLAY_AT_DUSK = 0x80000000u >> 1; - static const unsigned int DONT_DISPLAY_AT_NIGHT = 0x80000000u >> 2; - static const unsigned int DONT_ILLUMINATE = 0x80000000u >> 3; - static const unsigned int FLAT_SHADED = 0x80000000u >> 4; - static const unsigned int GROUPS_SHADOW_OBJECT = 0x80000000u >> 5; - - unsigned int _flags; - short _relativePriority; - unsigned short _transparency; // 0=opaque, 65535=totally clear - short _effectID1; - short _effectID2; - short _significance; - -}; // end of class ObjectRecordData - -} // end of namespace osgSim - -#endif diff --git a/libs/lib/mac32/include/osgSim/OverlayNode b/libs/lib/mac32/include/osgSim/OverlayNode deleted file mode 100644 index a133795dc..000000000 --- a/libs/lib/mac32/include/osgSim/OverlayNode +++ /dev/null @@ -1,195 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_OVERLAYNODE -#define OSGSIM_OVERLAYNODE 1 - -#include -#include -#include -#include -#include - -#include - -#include - -namespace osgSim { - -/** OverlayNode is for creating texture overlays on scenes, with the overlay texture being generated - * by pre rendering an Overlay Subgraph to a texture, then projecting this resulting texture on the scene.*/ -class OSGSIM_EXPORT OverlayNode : public osg::Group -{ - public : - - enum OverlayTechnique - { - OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY, - VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY, - VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY - }; - - OverlayNode(OverlayTechnique technique=OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY); - - OverlayNode(const OverlayNode& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osgSim, OverlayNode); - - virtual void traverse(osg::NodeVisitor& nv); - - - void setOverlayTechnique(OverlayTechnique technique); - OverlayTechnique getOverlayTechnique() const { return _overlayTechnique; } - - /** Set the implementation to be used when creating the overlay texture. */ - void setRenderTargetImplementation(osg::Camera::RenderTargetImplementation impl); - - /** Set the overlay subgraph which will be rendered to texture.*/ - void setOverlaySubgraph(osg::Node* node); - - /** Get the overlay subgraph which will be rendered to texture.*/ - osg::Node* getOverlaySubgraph() { return _overlaySubgraph.get(); } - - /** Get the const overlay subgraph which will be render to texture.*/ - const osg::Node* getOverlaySubgraph() const { return _overlaySubgraph.get(); } - - - /** Inform the OverlayNode that the overlay texture needs to be updated.*/ - void dirtyOverlayTexture(); - - /** Set whether the OverlayNode should update the overlay texture on every frame.*/ - void setContinuousUpdate(bool update) { _continuousUpdate = update; } - - /** Get whether the OverlayNode should update the overlay texture on every frame.*/ - bool getContinuousUpdate() const { return _continuousUpdate; } - - /** Set the base height that the overlay subgraph will be projected down to. - * Normally you'll set this to just below ground level, if you set it too high - * then the overlay texture can end up being clipped in certain viewing directions, - * while if its too low then there will be a limit to how close you can get to the - * terrain before pixaltion becomes an issue.*/ - void setOverlayBaseHeight(double baseHeight) { _overlayBaseHeight = baseHeight; } - - /** Get the base height that the overlay subgraph will be projected down to.*/ - double getOverlayBaseHeight() const { return _overlayBaseHeight; } - - /** Set the clear color to use when rendering the overlay subgraph.*/ - void setOverlayClearColor(const osg::Vec4& color) { _overlayClearColor = color; } - - /** Get the clear color to use when rendering the overlay subgraph.*/ - const osg::Vec4& getOverlayClearColor() const { return _overlayClearColor; } - - /** Set the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.*/ - void setTexEnvMode(GLenum mode); - - /** Get the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.*/ - GLenum getTexEnvMode() const { return _texEnvMode; } - - /** Set the texture unit that the texture should be assigned to.*/ - void setOverlayTextureUnit(unsigned int unit); - - /** Get the texture unit that the texture should be assigned to.*/ - unsigned int getOverlayTextureUnit() const { return _textureUnit; } - - /** Set the texture size hint. The size hint is used to request a texture of specified size.*/ - void setOverlayTextureSizeHint(unsigned int size); - - /** Get the texture size hint.*/ - unsigned int getOverlayTextureSizeHint() const { return _textureSizeHint; } - - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int /*maxSize*/); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objexts - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - protected : - - virtual ~OverlayNode() {} - - void init(); - void init_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(); - void init_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(); - void init_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY(); - - void traverse_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVisitor& nv); - void traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVisitor& nv); - void traverse_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY(osg::NodeVisitor& nv); - - - void updateMainSubgraphStateSet(); - - typedef osg::buffered_value< int > TextureObjectValidList; - - mutable TextureObjectValidList _textureObjectValidList; - - OverlayTechnique _overlayTechnique; - - - // overlay subgraph is render to a texture - osg::ref_ptr _overlaySubgraph; - - osg::ref_ptr _overlayStateSet; - osg::ref_ptr _mainStateSet; - - // texture to render to, and to read from. - GLenum _texEnvMode; - unsigned int _textureUnit; - unsigned int _textureSizeHint; - osg::Vec4 _overlayClearColor; - - bool _continuousUpdate; - double _overlayBaseHeight; - bool _updateCamera; - - osg::Camera::RenderTargetImplementation _renderTargetImpl; - - struct OverlayData : public osg::Referenced - { - - void setThreadSafeRefUnref(bool threadSafe); - void resizeGLObjectBuffers(unsigned int maxSize); - void releaseGLObjects(osg::State* state= 0) const; - - osg::ref_ptr _camera; - osg::ref_ptr _overlayStateSet; - osg::ref_ptr _mainSubgraphStateSet; - osg::ref_ptr _texgenNode; - osg::ref_ptr _texture; - osg::Polytope _textureFrustum; - osg::ref_ptr _geode; - - osg::ref_ptr _mainSubgraphProgram; - - osg::ref_ptr _y0; - osg::ref_ptr _lightingEnabled; - }; - - typedef std::map > OverlayDataMap; - - OpenThreads::Mutex _overlayDataMapMutex; - OverlayDataMap _overlayDataMap; - - OverlayNode::OverlayData* getOverlayData(osgUtil::CullVisitor* cv); - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/ScalarBar b/libs/lib/mac32/include/osgSim/ScalarBar deleted file mode 100644 index 8b90f0487..000000000 --- a/libs/lib/mac32/include/osgSim/ScalarBar +++ /dev/null @@ -1,248 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_SCALARBAR -#define OSGSIM_SCALARBAR 1 - -#include -#include // The default ScalarsToColors is a ColorRange -#include -#include - -namespace osgSim -{ -/** -A ScalarBar is an osg::Geode to render a colored bar representing a range -of scalars. The scalar/color ranges are specified by an instance of -ScalarsToColors. There are a number of configurable properties on the -ScalarBar, such as the orientation, the number of labels to be displayed -across the range, the number of distinct colors to use when rendering the -bar, text details etc. - -In summary, the main configurables on the ScalarBar are: - - -# The range of scalars represented by the bar, and the colors - corresponding to this range - these are specified by the - ScalarsToColors object. - -# The number of colors used when rendering the bar geometry - - this may be thought of as the bar 'density'. - -# The number of text labels to be used when displaying the bar. - -The other configurables should be self-explanatory. -*/ -class OSGSIM_EXPORT ScalarBar: public osg::Geode -{ - -public: - - /** ScalarBar orientation specification. */ - enum Orientation{ - HORIZONTAL, ///< a horizontally ascending scalar bar (x-axis) - VERTICAL ///< a vertically ascending scalar bar (y-axis) - }; - - /** - Users may provide their own ScalarPrinter by deriving from this base class and - overriding the printScalar() method. Users may map the scalar float passed in - to any string they wish. - */ - struct OSGSIM_EXPORT ScalarPrinter: public osg::Referenced - { - virtual std::string printScalar(float scalar); - }; - - /** - TextProperties allows users to specify a number of properties for the - text used to display the labels & title on the ScalarBar. Specifiying a character - size of 0 will cause the ScalarBar to estimate an appropriate size. Note that - the attributes are public, and may be set directly. - */ - struct TextProperties - { - std::string _fontFile; - std::pair _fontResolution; - float _characterSize; - osg::Vec4 _color; - - TextProperties(): - _fontFile("fonts/arial.ttf"), - _fontResolution(40,40), - _characterSize(0.0f), - _color(1.0f,1.0f,1.0f,1.0f) - { - } - }; - - /** Default constructor. */ - ScalarBar(): osg::Geode(), - _numColors(256), - _numLabels(11), - _stc(new ColorRange(0.0f,1.0f)), - _title("Scalar Bar"), - _position(0.0f,0.0f,0.0f), - _width(1.0f), - _aspectRatio(0.03), - _orientation(HORIZONTAL), - _sp(new ScalarPrinter) - { - createDrawables(); - } - - /** - Construct a ScalarBar with the supplied parameters. - @param numColors Specify the number of colors in the scalar bar. Color - interpolation occurs where necessary. - @param numLabels Specify the number of labels in the scalar bar. - @param stc The ScalarsToColors defining the range of scalars - and the colors they map to. - @param title The title to be used when displaying the ScalarBar. - Specify "" for no title. - @param orientation The orientation of the ScalarBar. @see Orientation. - @param aspectRatio The aspect ration (y/x) for the displayed bar. Bear in mind you - may want to change this if you change the orientation. - @param sp A ScalarPrinter object for the ScalarBar. For every displayed - ScalarBar label, the scalar value will be passed to the - ScalarPrinter object to turn it into a string. Users may - override the default ScalarPrinter object to map scalars to - whatever strings they wish. @see ScalarPrinter - */ - ScalarBar(int numColors, int numLabels, ScalarsToColors* stc, - const std::string& title, - Orientation orientation = HORIZONTAL, - float aspectRatio=0.25, - ScalarPrinter* sp=new ScalarPrinter): - osg::Geode(), - _numColors(numColors), - _numLabels(numLabels), - _stc(stc), - _title(title), - _position(0.0f,0.0f,0.0f), - _width(1.0f), - _aspectRatio(aspectRatio), - _orientation(orientation), - _sp(sp) - { - createDrawables(); - } - - /** Copy constructor */ - ScalarBar(const ScalarBar& rhs, const osg::CopyOp& co): osg::Geode(rhs,co), - _numColors(rhs._numColors), - _numLabels(rhs._numLabels), - _stc(rhs._stc), // Consider clone for deep copy? - _title(rhs._title), - _position(rhs._position), - _width(rhs._width), - _aspectRatio(rhs._aspectRatio), - _orientation(rhs._orientation), - _sp(rhs._sp), // Consider clone for deep copy? - _textProperties(rhs._textProperties) - { - } - - - META_Node(osgSim, ScalarBar); - - /** Set the number of distinct colours on the ScalarBar. */ - void setNumColors(int numColors); - - /** Get the number of distinct colours on the ScalarBar. */ - int getNumColors() const; - - /** Set the number of labels to display along the ScalarBar. There - will be one label at each end point, and evenly distributed labels - in between. */ - void setNumLabels(int numLabels); - - /** Get the number of labels displayed along the ScalarBar. */ - int getNumLabels() const; - - /** Set the ScalarsToColors mapping object for the ScalarBar. */ - void setScalarsToColors(ScalarsToColors* stc); - - /** Get the ScalarsToColors mapping object from the ScalarBar. */ - const ScalarsToColors* getScalarsToColors() const; - - /** Set the title for the ScalarBar, set "" for no title. */ - void setTitle(const std::string& title); - - /** Get the title for the ScalarBar. */ - const std::string& getTitle() const; - - - /** Set the position of scalar bar's lower left corner.*/ - void setPosition(const osg::Vec3& pos); - - /** Get the position of scalar bar.*/ - const osg::Vec3& getPosition() const { return _position; } - - /** Set the width of the scalar bar.*/ - void setWidth(float width); - - /** Get the width of the scalar bar.*/ - float getWidth() const { return _width; } - - /** Set the aspect ration (y/x) for the displayed bar. Bear in mind you - may want to change this if you change the orientation. */ - void setAspectRatio(float aspectRatio); - - /** Get the aspect ration (y/x) for the displayed bar. */ - float getAspectRatio() const; - - - /** Set the orientation of the ScalarBar. @see Orientation */ - void setOrientation(ScalarBar::Orientation orientation); - - /** Get the orientation of the ScalarBar. @see Orientation */ - ScalarBar::Orientation getOrientation() const; - - - /** Set a ScalarPrinter object for the ScalarBar. For every displayed - ScalarBar label, the scalar value will be passed to the ScalarPrinter - object to turn it into a string. Users may override the default ScalarPrinter - object to map scalars to whatever strings they wish. @see ScalarPrinter */ - void setScalarPrinter(ScalarPrinter* sp); - - /** Get the ScalarPrinter object */ - const ScalarPrinter* getScalarPrinter() const; - - /** Set the TextProperties for the labels & title. @see TextProperties */ - void setTextProperties(const TextProperties& tp); - - /** Get the TextProperties for the labels & title. @see TextProperties */ - const TextProperties& getTextProperties() const; - - /** force update the drawables used to render the scalar bar.*/ - void update() { createDrawables(); } - -protected: - virtual ~ScalarBar(); - - int _numColors; - int _numLabels; - osg::ref_ptr _stc; - std::string _title; - osg::Vec3 _position; - float _width; - float _aspectRatio; - Orientation _orientation; - osg::ref_ptr _sp; - TextProperties _textProperties; - - void createDrawables(); - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/ScalarsToColors b/libs/lib/mac32/include/osgSim/ScalarsToColors deleted file mode 100644 index 4b1716f19..000000000 --- a/libs/lib/mac32/include/osgSim/ScalarsToColors +++ /dev/null @@ -1,53 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_SCALARSTCOLORS -#define OSGSIM_SCALARSTCOLORS 1 - -#include - -#include -#include - -namespace osgSim -{ -/** -ScalarsToColors defines the interface to map a scalar value to a color, -and provides a default implementation of the mapping functionaltity, -with colors ranging from black to white across the min - max scalar -range. -*/ -class OSGSIM_EXPORT ScalarsToColors: public osg::Referenced -{ -public: - - ScalarsToColors(float scalarMin, float scalarMax); - virtual ~ScalarsToColors() {} - - /** Get the color for a given scalar value. */ - virtual osg::Vec4 getColor(float scalar) const; - - /** Get the minimum scalar value. */ - float getMin() const; - - /** Get the maximum scalar value. */ - float getMax() const; - -private: - - float _min, _max; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/Sector b/libs/lib/mac32/include/osgSim/Sector deleted file mode 100644 index 58735ddda..000000000 --- a/libs/lib/mac32/include/osgSim/Sector +++ /dev/null @@ -1,314 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_SECTOR -#define OSGSIM_SECTOR 1 - -#include - -#include -#include -#include -#include -#include -#include - -namespace osgSim { - -class Sector : public osg::Object -{ - public: - - Sector() {} - - Sector(const Sector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): - osg::Object(copy,copyop) {} - - virtual const char *libraryName() const { return "osgSim"; } - virtual const char *className() const { return "Sector"; } - virtual bool isSameKindAs(const osg::Object *obj) const { return dynamic_cast(obj) != 0; } - - virtual float operator() (const osg::Vec3& /*eyeLocal*/) const = 0; - - protected: - - virtual ~Sector() {} -}; - -class OSGSIM_EXPORT AzimRange -{ - public: - - AzimRange(): - _cosAzim(1.0f), - _sinAzim(0.0f), - _cosAngle(-1.0f), - _cosFadeAngle(-1.0f) {} - - void setAzimuthRange(float minAzimuth,float maxAzimuth,float fadeAngle=0.0f); - void getAzimuthRange(float& minAzimuth, float& maxAzimuth, float& fadeAngle) const; - - - inline float azimSector(const osg::Vec3& eyeLocal) const - { - float dotproduct = eyeLocal.x()*_sinAzim+eyeLocal.y()*_cosAzim; - float length = sqrt(osg::square(eyeLocal.x())+osg::square(eyeLocal.y())); - if (dotproduct<_cosFadeAngle*length) return 0.0f; // out of sector. - if (dotproduct>=_cosAngle*length) return 1.0f; // fully in sector. - return (dotproduct-_cosFadeAngle*length)/((_cosAngle-_cosFadeAngle)*length); - } - - protected: - - float _cosAzim; - float _sinAzim; - float _cosAngle; - float _cosFadeAngle; -}; - - -class OSGSIM_EXPORT ElevationRange -{ - public: - - - ElevationRange(): - _cosMinElevation(-1.0f), - _cosMinFadeElevation(-1.0f), - _cosMaxElevation(1.0), - _cosMaxFadeElevation(1.0) {} - - void setElevationRange(float minElevation,float maxElevation,float fadeAngle=0.0f); - - float getMinElevation() const; - - float getMaxElevation() const; - - float getFadeAngle() const; - - inline float elevationSector(const osg::Vec3& eyeLocal) const - { - float dotproduct = eyeLocal.z(); // against z axis - eyeLocal*(0,0,1). - float length = eyeLocal.length(); - if (dotproduct>_cosMaxFadeElevation*length) return 0.0f; // out of sector - if (dotproduct<_cosMinFadeElevation*length) return 0.0f; // out of sector - if (dotproduct>_cosMaxElevation*length) - { - // in uppoer fade band. - return (dotproduct-_cosMaxFadeElevation*length)/((_cosMaxElevation-_cosMaxFadeElevation)*length); - } - if (dotproduct<_cosMinElevation*length) - { - // in lower fade band. - return (dotproduct-_cosMinFadeElevation*length)/((_cosMinElevation-_cosMinFadeElevation)*length); - } - return 1.0f; // fully in sector - } - - protected: - - float _cosMinElevation; - float _cosMinFadeElevation; - float _cosMaxElevation; - float _cosMaxFadeElevation; -}; - -class OSGSIM_EXPORT AzimSector : public Sector, public AzimRange -{ - public: - - AzimSector(): - Sector(), - AzimRange() {} - - AzimSector(const AzimSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): - Sector(copy,copyop), - AzimRange(copy) {} - - AzimSector(float minAzimuth,float maxAzimuth,float fadeAngle=0.0f); - - META_Object(osgSim,AzimSector); - - virtual float operator() (const osg::Vec3& eyeLocal) const; - - protected: - - virtual ~AzimSector() {} - -}; - -class OSGSIM_EXPORT ElevationSector : public Sector, public ElevationRange -{ - public: - - - ElevationSector(): - Sector(), - ElevationRange() {} - - ElevationSector(const ElevationSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): - Sector(copy,copyop), - ElevationRange(copy) {} - - ElevationSector(float minElevation,float maxElevation,float fadeAngle=0.0f); - - META_Object(osgSim,ElevationSector); - - virtual float operator() (const osg::Vec3& eyeLocal) const; - - protected: - - virtual ~ElevationSector() {} -}; - - -class OSGSIM_EXPORT AzimElevationSector : public Sector, public AzimRange, public ElevationRange -{ - public: - - AzimElevationSector(): - Sector(), - AzimRange(), - ElevationRange() {} - - AzimElevationSector(const AzimElevationSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): - Sector(copy,copyop), - AzimRange(copy), - ElevationRange(copy) {} - - AzimElevationSector(float minAzimuth,float maxAzimuth,float minElevation,float maxElevation,float fadeAngle=0.0f); - - META_Object(osgSim,AzimElevationSector); - - virtual float operator() (const osg::Vec3& eyeLocal) const; - - protected: - - virtual ~AzimElevationSector() {} -}; - - -class OSGSIM_EXPORT ConeSector : public Sector -{ - public: - - ConeSector(): - Sector(), - _axis(0.0f,0.0f,1.0f), - _cosAngle(-1.0f), - _cosAngleFade(-1.0f) {} - - ConeSector(const ConeSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): - Sector(copy,copyop), - _axis(copy._axis), - _cosAngle(copy._cosAngle), - _cosAngleFade(copy._cosAngleFade) {} - - ConeSector(const osg::Vec3& axis,float angle,float fadeangle=0.0f); - - META_Object(osgSim,ConeSector); - - void setAxis(const osg::Vec3& axis); - - const osg::Vec3& getAxis() const; - - void setAngle(float angle,float fadeangle=0.0f); - - float getAngle() const; - - float getFadeAngle() const; - - virtual float operator() (const osg::Vec3& eyeLocal) const; - - protected: - - virtual ~ConeSector() {} - - osg::Vec3 _axis; - float _cosAngle; - float _cosAngleFade; -}; - - -/* The DirectionalSector class was created to better handle OpenFlight directional - lightpoints. The Elevation and Azimuth Sectors above impose invalid limits on - the elevation range which cause lightpoints whose direction vectors are not - on the XY plane to be displayed incorrectly. Corbin Holtz 4/04 */ - -class OSGSIM_EXPORT DirectionalSector : public Sector -{ - public: - - DirectionalSector(): - Sector(), - _direction(0.0f, 0.0f, 1.0f), - _rollAngle(0.0f), - _cosHorizAngle(-1.0f), - _cosVertAngle(-1.0f), - _cosHorizFadeAngle(-1.0f), - _cosVertFadeAngle(-1.0f) {computeMatrix();} - - DirectionalSector(const DirectionalSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): - Sector(copy,copyop), - _direction(copy._direction), - _rollAngle(copy._rollAngle), - _local_to_LP(copy._local_to_LP), - _cosHorizAngle(copy._cosHorizAngle), - _cosVertAngle(copy._cosVertAngle), - _cosHorizFadeAngle(copy._cosHorizFadeAngle), - _cosVertFadeAngle(copy._cosVertFadeAngle) {} - - DirectionalSector(const osg::Vec3& direction,float horizLobeAngle, float vertLobeAngle, float lobeRollAngle, float fadeAngle=0.0f); - - META_Object(osgSim,DirectionalSector); - - void setDirection(const osg::Vec3& direction); - - const osg::Vec3& getDirection() const; - - void setHorizLobeAngle(float angle); - - float getHorizLobeAngle() const; - - void setLobeRollAngle(float angle); - - float getLobeRollAngle() const; - - void setVertLobeAngle(float angle); - - float getVertLobeAngle() const; - - void setFadeAngle(float angle); - - float getFadeAngle() const; - - virtual float operator() (const osg::Vec3& eyeLocal) const; - - void computeMatrix() ; - - protected: - - virtual ~DirectionalSector() {} - - osg::Vec3 _direction ; - float _rollAngle ; - osg::Matrix _local_to_LP ; - float _cosHorizAngle; - float _cosVertAngle; - float _cosHorizFadeAngle; - float _cosVertFadeAngle; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/ShapeAttribute b/libs/lib/mac32/include/osgSim/ShapeAttribute deleted file mode 100644 index 87caa7df7..000000000 --- a/libs/lib/mac32/include/osgSim/ShapeAttribute +++ /dev/null @@ -1,128 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2007 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_SHAPEATTRIBUTE -#define OSGSIM_SHAPEATTRIBUTE 1 - -#include -#include - -#include - -namespace osgSim -{ - -class OSGSIM_EXPORT ShapeAttribute -{ - public: - /// ShapeAttribute data type. - enum Type - { - UNKNOWN, - INTEGER, - DOUBLE, - STRING - }; - - ShapeAttribute(); - ShapeAttribute(const char * name); - ShapeAttribute(const char * name, int value); - ShapeAttribute(const char * name, double value); - - /** Note, ShapeAttribute takes a copy of both name and value, the calling code should manage its own clean up of the original strings.*/ - ShapeAttribute(const char * name, const char * value); - - ShapeAttribute(const ShapeAttribute & sa); - - ~ShapeAttribute(); - - ShapeAttribute& operator = (const ShapeAttribute& sa); - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - int compare(const osgSim::ShapeAttribute& sa) const; - - inline bool operator == (const osgSim::ShapeAttribute& sa) const { return compare(sa)==0; } - inline bool operator != (const osgSim::ShapeAttribute& sa) const { return compare(sa)!=0; } - inline bool operator < (const osgSim::ShapeAttribute& sa) const { return compare(sa)<0; } - - /// Get the attribute name. - const std::string & getName() const { return _name; } - - /// Set the attribute name. - void setName(const std::string& name) { _name = name; } - - /// Get the attribute data type. - const Type getType() const { return _type; } - - /// Get the attribute data as an int. - int getInt() const { return _integer; } - - /// Get the attribute data as a double. - double getDouble() const { return _double; } - - /// Get the attribute data as a string. - const char * getString() const { return _string; } - - /// Set an integer attribute data. - void setValue(int value) { free(); _type = INTEGER; _integer = value; } - - /// Set a double attribute data. - void setValue(double value) { free(); _type = DOUBLE; _double = value; } - - /// Set a string attribute data. - void setValue(const char * value); - - - private: - - void free(); - void copy(const ShapeAttribute& sa); - - std::string _name; - Type _type; - - union - { - int _integer; - double _double; - char* _string; - }; -}; - -class OSGSIM_EXPORT ShapeAttributeList : public osg::Object, public osg::MixinVector -{ - public: - META_Object(osgSim, ShapeAttributeList) - - ShapeAttributeList(): - Object() - {} - - /** Copy constructor, optional CopyOp object can be used to control - * shallow vs deep copying of dynamic data.*/ - ShapeAttributeList(const ShapeAttributeList& sal,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - osg::Object(sal, copyop), - osg::MixinVector(sal) - { - } - - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const osgSim::ShapeAttributeList& sal) const; - - protected: - virtual ~ShapeAttributeList() {} -}; - -} - -#endif // ** SHAPEATTRIBUTE_ ** // diff --git a/libs/lib/mac32/include/osgSim/SphereSegment b/libs/lib/mac32/include/osgSim/SphereSegment deleted file mode 100644 index 1b0313cdf..000000000 --- a/libs/lib/mac32/include/osgSim/SphereSegment +++ /dev/null @@ -1,317 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_SPHERESEGMENT -#define OSGSIM_SPHERESEGMENT 1 - -#include - -#include -#include -#include -#include -#include - -namespace osgSim{ - -/** -A SphereSegment is a Geode to represent an portion of a sphere (potentially -the whole sphere). The sphere is aligned such that the line through the -sphere's poles is parallel to the z axis. The sphere segment -may be rendered various components switched on or off: - - - The specified area of the sphere surface. - - - An edge line around the boundary of the specified area - of the sphere surface. - - - Four spokes, where a spoke is the line from - the sphere's centre to a corner of the rendered area. - - - Four planar areas, where the planar areas are formed - between the spokes. - -Caveats: - - - It's worth noting that the line through the sphere's poles is - parallel to the z axis. This has implications when specifying the - area to be rendered, and specifying areas where the centre of - the rendered area is the Z axis may lead to unexpected - geometry. - - - It's possible to render the whole sphere by specifying elevation - and azimuth ranges round the full 360 degrees. When doing - so you may consider switching the planes, spokes, and edge lines - off, to avoid rendering artefacts, e.g. the upper and lower - planes will be coincident. - -*/ -class OSGSIM_EXPORT SphereSegment: public osg::Geode -{ -public: - - /** - DrawMask represents a bit field, the values of which may be OR'ed together - to specify which parts of the sphere segment should be drawn. E.g. - \code - sphereSegment->setDrawMask(SphereSegment::DrawMask(SphereSegment::SURFACE|SphereSegment::SPOKES)); - \endcode - */ - enum DrawMask{ - SURFACE = 0x00000001, ///< Draw the specified area on the sphere's surface - SPOKES = 0x00000002, ///< Draw the spokes from the sphere's centre to the surface's corners - EDGELINE = 0x00000008, ///< Draw the line round the edge of the area on the sphere's surface - SIDES = 0x00000010, ///< Draw the planes from the sphere's centre to the edge of the sphere's surface - ALL = 0x7fffffff ///< Draw every part of the sphere segment - }; - - - /** Default constructor. */ - SphereSegment():osg::Geode(), - _centre(0.0f,0.0f,0.0f), _radius(1.0f), - _azMin(0.0f), _azMax(osg::PI/2.0f), - _elevMin(0.0f), _elevMax(osg::PI/2.0f), - _density(10), - _drawMask(DrawMask(ALL)) - { - init(); - } - - /** - Construct by angle ranges. Note that the azimuth 'zero' is the Y axis; specifying - an azimuth range from azMin -osg::PI/2.0f to azMax osg::PI/2.0f will cover the - 'top half' of the circle in the XY plane. The elev angles are 'out' of the 'zero' - XY plane with +ve angles above the plane, and -ve angles below. - @param centre sphere centre - @param radius radius of sphere - @param azMin azimuth minimum - @param azMax azimuth maximum - @param elevMin elevation minimum - @param elevMax elevation maximum - @param density number of units to divide the azimuth and elevation ranges into - */ - SphereSegment(const osg::Vec3& centre, float radius, float azMin, float azMax, - float elevMin, float elevMax, int density): - osg::Geode(), - _centre(centre), _radius(radius), - _azMin(azMin), _azMax(azMax), - _elevMin(elevMin), _elevMax(elevMax), - _density(density), - _drawMask(DrawMask(ALL)) - { - init(); - } - - /** - Construct by vector. - @param centre sphere centre - @param radius radius of sphere - @param vec vector pointing from sphere centre to centre point - of rendered area on sphere surface - @param azRange azimuth range in radians (with centre along vec) - @param elevRange elevation range in radians (with centre along vec) - @param density number of units to divide the azimuth and elevation ranges into - */ - SphereSegment(const osg::Vec3& centre, float radius, const osg::Vec3& vec, float azRange, - float elevRange, int density); - - /** Copy constructor */ - SphereSegment(const SphereSegment& rhs, const osg::CopyOp& co): - osg::Geode(rhs,co), - _centre(rhs._centre), _radius(rhs._radius), - _azMin(rhs._azMin), _azMax(rhs._azMax), - _elevMin(rhs._elevMin), _elevMax(rhs._elevMax), - _density(rhs._density), - _drawMask(rhs._drawMask) - { - init(); - } - - /** Set the centre point of the SphereSegment */ - void setCentre(const osg::Vec3& c); - - /** Get the centre point of the SphereSegment */ - const osg::Vec3& getCentre() const; - - /** Set the radius of the SphereSegment */ - void setRadius(float r); - - /** Get the radius of the SphereSegment */ - float getRadius() const; - - /** Set the area of the sphere segment - - @param vec vector pointing from sphere centre to centre point - of rendered area on sphere surface - @param azRange azimuth range in radians (with centre along vec) - @param elevRange elevation range in radians (with centre along vec) - */ - void setArea(const osg::Vec3& vec, float azRange, float elevRange); - - /** Get the area of the sphere segment - - @param vec vector pointing from sphere centre to centre point - of rendered area on sphere surface (normalized) - @param azRange azimuth range in radians (with centre along vec) - @param elevRange elevation range in radians (with centre along vec) - */ - void getArea(osg::Vec3& vec, float& azRange, float& elevRange) const; - - /** Set the area of the sphere segment - @param azMin azimuth minimum - @param azMax azimuth maximum - @param elevMin elevation minimum - @param elevMax elevation maximum - */ - void setArea(float azMin, float azMax, float elevMin, float elevMax); - - /** Get the area of the sphere segment - @param azMin azimuth minimum - @param azMax azimuth maximum - @param elevMin elevation minimum - @param elevMax elevation maximum - */ - void getArea(float &azMin, float &azMax, float &elevMin, float &elevMax) const; - - /** Set the density of the sphere segment */ - void setDensity(int d); - - /** Get the density of the sphere segment */ - int getDensity() const; - - /** - Specify the DrawMask. - @param dm Bitmask specifying which parts of the sphere segment should be drawn. - @see DrawMask - */ - void setDrawMask(int dm); - - /** Get the DrawMask */ - int getDrawMask() const { return _drawMask; } - - /** Set the color of the surface. */ - void setSurfaceColor(const osg::Vec4& c); - - /** Get the color of the surface. */ - const osg::Vec4& getSurfaceColor() const { return _surfaceColor; } - - /** Set the color of the spokes. */ - void setSpokeColor(const osg::Vec4& c); - - /** Get the color of the spokes. */ - const osg::Vec4& getSpokeColor() const { return _spokeColor; } - - /** Set the color of the edge line. */ - void setEdgeLineColor(const osg::Vec4& c); - - /** Get the color of the edge line. */ - const osg::Vec4& getEdgeLineColor() const { return _edgeLineColor; } - - /** Set the color of the planes. */ - void setSideColor(const osg::Vec4& c); - - /** Get the color of the planes. */ - const osg::Vec4& getSideColor() const { return _planeColor; } - - /** Set color of all components. */ - void setAllColors(const osg::Vec4& c); - - META_Node(osgSim, SphereSegment); - - /** A list of vertex arrays representing a list of lines.*/ - typedef std::vector< osg::ref_ptr > LineList; - - /** Compute the interesection lines between subgraph and this sphere segment. - * The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. - * The resulting intersections are in the coordinate frame of the sphere segment. */ - LineList computeIntersection(const osg::Matrixd& matrix, osg::Node* subgraph); - - /** Compute the interesection lines between specified drawable and this sphere segment. - * The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. - * The resulting intersections are in the coordinate frame of the sphere segment. */ - LineList computeIntersection(const osg::Matrixd& matrix, osg::Drawable* drawable); - - /** Compute the interesection lines between subgraph and this sphere segment. - * The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. - * The resulting intersections are in the coordinate frame of the sphere segment. */ - osg::Node* computeIntersectionSubgraph(const osg::Matrixd& matrix, osg::Node* subgraph); - - /** Compute the interesection lines between specified drawable and this sphere segment. - * The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. - * The resulting intersections are in the coordinate frame of the sphere segment. */ - osg::Node* computeIntersectionSubgraph(const osg::Matrixd& matrix, osg::Drawable* drawable); - - -private: - - void init(); // Shared constructor code, generates the drawables - - void dirtyAllDrawableDisplayLists(); // Force re-calling of gl functions - void dirtyAllDrawableBounds(); // Force recalculation of bound geometry - - // SphereSegment is actually made up of a number of Drawable classes, - // all of which are nested private classes, as declared below. These - // classes are defined in the .cpp for minimum visibility and physical - // coupling. (Reduces time spent compiling! :-) - // - // Each of the nested classes holds a pointer to the SphereSegment - // 'parent', which stores the geometry details, and performs any - // work required. The nested classes are lightweight objects which - // just pass the work on. - // - // Why are things done with these sub-Drawables? Alpha-blended - // Drawables need to be drawn last, depth sorted, and the various - // components of a SphereSegment also need to be depth sorted - // against one another (they may all be drawn with alpha blending). - // Making these Drawables allows us to get the OSG to depth sort - // for us. - - class Surface; - friend class Surface; - bool Surface_computeBound(osg::BoundingBox&) const; - void Surface_drawImplementation(osg::State&) const; - - class EdgeLine; - friend class EdgeLine; - bool EdgeLine_computeBound(osg::BoundingBox&) const; - void EdgeLine_drawImplementation(osg::State&) const; - - enum BoundaryAngle{MIN,MAX}; // Why here and not in Side class? Because we can't forward - enum SideOrientation{AZIM,ELEV}; // declare enums, Side is in the .cpp, and this is tidier... - class Side; - friend class Side; - bool Side_computeBound(osg::BoundingBox&, SideOrientation, BoundaryAngle) const; - void Side_drawImplementation(osg::State&, SideOrientation, BoundaryAngle) const; - - class Spoke; - friend class Spoke; - bool Spoke_computeBound(osg::BoundingBox&, BoundaryAngle, BoundaryAngle) const; - void Spoke_drawImplementation(osg::State&, BoundaryAngle, BoundaryAngle) const; - - // Sphere segment geometry details - osg::Vec3 _centre; - float _radius; - float _azMin, _azMax, _elevMin, _elevMax; - int _density; - - // Draw details - int _drawMask; - osg::Vec4 _surfaceColor; - osg::Vec4 _spokeColor; - osg::Vec4 _edgeLineColor; - osg::Vec4 _planeColor; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/Version b/libs/lib/mac32/include/osgSim/Version deleted file mode 100644 index c4ad87252..000000000 --- a/libs/lib/mac32/include/osgSim/Version +++ /dev/null @@ -1,46 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_VERSION -#define OSGSIM_VERSION 1 - -#include - -extern "C" { - -/** - * osgSimGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgSimGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph (OSG) Sim library - # - AC_CHECK_LIB(osg, osgSimGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph Sim library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -extern OSGSIM_EXPORT const char* osgSimGetVersion(); - -/** - * osgSimGetLibraryName() returns the library name in human friendly form. -*/ -extern OSGSIM_EXPORT const char* osgSimGetLibraryName(); - -} - -#endif diff --git a/libs/lib/mac32/include/osgSim/VisibilityGroup b/libs/lib/mac32/include/osgSim/VisibilityGroup deleted file mode 100644 index f6a28d549..000000000 --- a/libs/lib/mac32/include/osgSim/VisibilityGroup +++ /dev/null @@ -1,76 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGSIM_VISIBILITYGROUP -#define OSGSIM_VISIBILITYGROUP 1 - -#include -#include -#include - -#include - -namespace osgSim { - -/** VisibilityGroup renders (traverses) it's children only when the camera is inside a specified visibility volume. - * The visibility volume is intersected with a line segment that extends from - * the current camera's eye-point along the view vector for a given segment length. - * If an intersection is detected then the node's children are traversed. - */ -class OSGSIM_EXPORT VisibilityGroup : public osg::Group -{ - public : - - VisibilityGroup(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - VisibilityGroup(const VisibilityGroup&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osgSim, VisibilityGroup); - - virtual void traverse(osg::NodeVisitor& nv); - - /** Set the subgraph that is intersected for the visibility determination.*/ - void setVisibilityVolume(osg::Node* node) { _visibilityVolume = node; } - - /** Get the subgraph that is intersected for the visibility determination.*/ - osg::Node* getVisibilityVolume() { return _visibilityVolume.get(); } - - /** Get the const subgraph that is intersected for the visibility determination.*/ - const osg::Node* getVisibilityVolume() const { return _visibilityVolume.get(); } - - /** Set the traversal mask for the intersection testing.*/ - void setVolumeIntersectionMask(osg::Node::NodeMask mask) { _volumeIntersectionMask = mask; } - - /** Get the traversal mask for the intersection testing.*/ - osg::Node::NodeMask getVolumeIntersectionMask() const { return _volumeIntersectionMask; } - - /** Set the length of the intersection segment. - * The segments extends this many database units from the camera eye-point along the look vector. - * If this is left at zero then the diameter of the bounding sphere of the visibility volume is used.*/ - void setSegmentLength(float length) { _segmentLength = length; } - - /** Get the length of the intersection segment.*/ - float getSegmentLength() const { return _segmentLength; } - - protected : - - virtual ~VisibilityGroup() {} - - osg::ref_ptr _visibilityVolume; - osg::Node::NodeMask _volumeIntersectionMask; - float _segmentLength; -}; - -} -#endif diff --git a/libs/lib/mac32/include/osgTerrain/Export b/libs/lib/mac32/include/osgTerrain/Export deleted file mode 100644 index 45c8a2159..000000000 --- a/libs/lib/mac32/include/osgTerrain/Export +++ /dev/null @@ -1,49 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTERRAIN_EXPORT_ -#define OSGTERRAIN_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4267 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGTERRAIN_EXPORT - # elif defined( OSGTERRAIN_LIBRARY ) - # define OSGTERRAIN_EXPORT __declspec(dllexport) - # else - # define OSGTERRAIN_EXPORT __declspec(dllimport) - # endif -#else - # define OSGTERRAIN_EXPORT -#endif - -/** - -\namespace osgTerrain - -The osgTerrain library is a NodeKit that provides geospecifc terrain rendering support. -*/ - -#endif diff --git a/libs/lib/mac32/include/osgTerrain/GeometryTechnique b/libs/lib/mac32/include/osgTerrain/GeometryTechnique deleted file mode 100644 index d455ec2f7..000000000 --- a/libs/lib/mac32/include/osgTerrain/GeometryTechnique +++ /dev/null @@ -1,116 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTERRAIN_GEOMETRYTECHNIQUE -#define OSGTERRAIN_GEOMETRYTECHNIQUE 1 - -#include -#include -#include - -#include -#include - -namespace osgTerrain { - -class OSGTERRAIN_EXPORT GeometryTechnique : public TerrainTechnique -{ - public: - - GeometryTechnique(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - GeometryTechnique(const GeometryTechnique&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, GeometryTechnique); - - virtual void init(int dirtyMask, bool assumeMultiThreaded); - - virtual Locator* computeMasterLocator(); - - - virtual void update(osgUtil::UpdateVisitor* nv); - - virtual void cull(osgUtil::CullVisitor* nv); - - /** Traverse the terain subgraph.*/ - virtual void traverse(osg::NodeVisitor& nv); - - virtual void cleanSceneGraph(); - - void setFilterBias(float filterBias); - float getFilterBias() const { return _filterBias; } - - void setFilterWidth(float filterWidth); - float getFilterWidth() const { return _filterWidth; } - - void setFilterMatrix(const osg::Matrix3& matrix); - osg::Matrix3& getFilterMatrix() { return _filterMatrix; } - const osg::Matrix3& getFilterMatrix() const { return _filterMatrix; } - - enum FilterType - { - GAUSSIAN, - SMOOTH, - SHARPEN - }; - - void setFilterMatrixAs(FilterType filterType); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - - protected: - - virtual ~GeometryTechnique(); - - class BufferData : public osg::Referenced - { - public: - BufferData() {} - - osg::ref_ptr _transform; - osg::ref_ptr _geode; - osg::ref_ptr _geometry; - - protected: - ~BufferData() {} - }; - - virtual osg::Vec3d computeCenterModel(BufferData& buffer, Locator* masterLocator); - - virtual void generateGeometry(BufferData& buffer, Locator* masterLocator, const osg::Vec3d& centerModel); - - virtual void applyColorLayers(BufferData& buffer); - - virtual void applyTransparency(BufferData& buffer); - - - OpenThreads::Mutex _writeBufferMutex; - osg::ref_ptr _currentBufferData; - osg::ref_ptr _newBufferData; - - float _filterBias; - osg::ref_ptr _filterBiasUniform; - float _filterWidth; - osg::ref_ptr _filterWidthUniform; - osg::Matrix3 _filterMatrix; - osg::ref_ptr _filterMatrixUniform; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgTerrain/Layer b/libs/lib/mac32/include/osgTerrain/Layer deleted file mode 100644 index d37d11ec2..000000000 --- a/libs/lib/mac32/include/osgTerrain/Layer +++ /dev/null @@ -1,611 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTERRAIN_LAYER -#define OSGTERRAIN_LAYER 1 - -#include -#include -#include -#include - -#include -#include - -namespace osgTerrain { - -#define MAXIMUM_NUMBER_OF_LEVELS 30 - -/** Extact the setname and filename from a compound string in the from set:setname:filename". - * Returns a setname of "" when non set:setname: entry is present.*/ -extern OSGTERRAIN_EXPORT void extractSetNameAndFileName(const std::string& compoundstring, std::string& setname, std::string& filename); - -/** Create a compound string in the form set:setname:filename, or just filename if setname is "".*/ -extern OSGTERRAIN_EXPORT std::string createCompoundSetNameAndFileName(const std::string& setname, const std::string& filename); - -class OSGTERRAIN_EXPORT Layer : public osg::Object -{ - public: - - Layer(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Layer(const Layer&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, Layer); - - /** Set the name of this layer. */ - void setSetName(const std::string& setname) { setName(setname); } - - /** Get the name of this layer. */ - const std::string& getSetName() const { return getName(); } - - /** Set the file name of the data associated with this layer. */ - virtual void setFileName(const std::string& filename) { _filename = filename; } - - /** Get the file name of the layer. */ - virtual const std::string& getFileName() const { return _filename; } - - /** Return the compound name of the layer in the form set::name::filename string.*/ - std::string getCompoundName() const { return createCompoundSetNameAndFileName(getName(), getFileName()); } - - void setLocator(Locator* locator) { _locator = locator; } - Locator* getLocator() { return _locator.get(); } - const Locator* getLocator() const { return _locator.get(); } - - void setMinLevel(unsigned int minLevel) { _minLevel = minLevel; } - unsigned int getMinLevel() const { return _minLevel; } - - void setMaxLevel(unsigned int maxLevel) { _maxLevel = maxLevel; } - unsigned int getMaxLevel() const { return _maxLevel; } - - /** Set the data validation operator. */ - void setValidDataOperator(ValidDataOperator* validDataOp) { _validDataOperator = validDataOp; } - - /** Get the data validation operator. */ - ValidDataOperator* getValidDataOperator() { return _validDataOperator.get(); } - - /** Get the const data validation operator. */ - const ValidDataOperator* getValidDataOperator() const { return _validDataOperator.get(); } - - - /** Get the number of columns. */ - virtual unsigned int getNumColumns() const { return 0; } - - /** Get the number of rows. */ - virtual unsigned int getNumRows() const { return 0; } - - void setDefaultValue(const osg::Vec4& value) { _defaultValue = value; } - const osg::Vec4& getDefaultValue() const { return _defaultValue; } - - - /** Set the minification texture filter to use when a texture is associated with this layer.*/ - void setMinFilter(osg::Texture::FilterMode filter) { _minFilter = filter; } - - /** Get the minification texture filter to use when a texture is associated with this layer.*/ - osg::Texture::FilterMode getMinFilter() const { return _minFilter; } - - - /** Set the magnification texture filter to use when a texture is associated with this layer.*/ - void setMagFilter(osg::Texture::FilterMode filter) { _magFilter = filter; } - - /** Get the magnification texture filter to use when a texture is associated with this layer.*/ - osg::Texture::FilterMode getMagFilter() const { return _magFilter; } - - - - /** Return image associated with layer if supported. */ - virtual osg::Image* getImage() { return 0; } - - /** Return const image associated with layer if supported. */ - virtual const osg::Image* getImage() const { return 0; } - - - virtual bool transform(float /*offset*/, float /*scale*/) { return false; } - - /** - * Get the layer value at position i,j. - * @param[in] i X-axis (or column) index. - * @param[in] j Y-axis (or row) index. - * @param[out] value Returned layer value. - * @return true if value is valid, else false - */ - virtual bool getValue(unsigned int /*i*/, unsigned int /*j*/, float& /*value*/) const { return false; } - virtual bool getValue(unsigned int /*i*/, unsigned int /*j*/, osg::Vec2& /*value*/) const { return false; } - virtual bool getValue(unsigned int /*i*/, unsigned int /*j*/, osg::Vec3& /*value*/) const { return false; } - virtual bool getValue(unsigned int /*i*/, unsigned int /*j*/, osg::Vec4& /*value*/) const { return false; } - - inline bool getValidValue(unsigned int i, unsigned int j, float& value) const - { - if (getValue(i,j,value)) return _validDataOperator.valid() ? (*_validDataOperator)(value) : true; - return false; - } - - inline bool getValidValue(unsigned int i, unsigned int j, osg::Vec2& value) const - { - if (getValue(i,j,value)) return _validDataOperator.valid() ? (*_validDataOperator)(value) : true; - return false; - } - - inline bool getValidValue(unsigned int i, unsigned int j, osg::Vec3& value) const - { - if (getValue(i,j,value)) return _validDataOperator.valid() ? (*_validDataOperator)(value) : true; - return false; - } - - inline bool getValidValue(unsigned int i, unsigned int j, osg::Vec4& value) const - { - if (getValue(i,j,value)) return _validDataOperator.valid() ? (*_validDataOperator)(value) : true; - return false; - } - - - /** - * Compute column,row indices from normalized coordinates. - * @param[in] ndc_x Normalized X-axis coordinate. - * @param[in] ndc_y Normalized Y-axis coordinate. - * @param[out] i Returned X-axis (or column) index. - * @param[out] j Returned Y-axis (or row) index. - * @param[out] ir Returned X-axis fraction. - * @param[out] jr Returned Y-axis fraction. - */ - inline void computeIndices(double ndc_x, double ndc_y, unsigned int& i, unsigned int& j, double& ir, double& jr) - { - ndc_x *= double(getNumColumns()-1); - ndc_y *= double(getNumRows()-1); - i = (unsigned int)(ndc_x); - j = (unsigned int)(ndc_y); - ir = ndc_x - double(i); - jr = ndc_y - double(j); - } - - /** - * Calculate the interpolated layer value at the given normalized coordinates. - * @param[in] ndc_x Normalized X-axis coordinate. - * @param[in] ndc_y Normalized Y-axis coordinate. - * @param[out] value Returned layer value. - * @return true if value is valid, else false - */ - inline bool getInterpolatedValue(double ndc_x, double ndc_y, float& value) - { - unsigned int i,j; - double ir, jr; - computeIndices(ndc_x, ndc_y, i, j, ir, jr); - value = 0.0f; - double div = 0.0f; - float v,r; - - r = (1.0f-ir)*(1.0f-jr); - if (r>0.0 && getValue(i,j,v)) - { - value += v*r; - div += r; - } - - r = (ir)*(1.0f-jr); - if (r>0.0 && getValue(i+1,j,v)) - { - value += v*r; - div += r; - } - - r = (ir)*(jr); - if (r>0.0 && getValue(i+1,j+1,v)) - { - value += v*r; - div += r; - } - - r = (1.0f-ir)*(jr); - if (r>0.0 && getValue(i,j+1,v)) - { - value += v*r; - div += r; - } - - if (div != 0.0) - { - value /= div; - return true; - } - - value = 0.0; - return false; - } - - inline bool getInterpolatedValidValue(double ndc_x, double ndc_y, float& value) - { - unsigned int i,j; - double ir, jr; - computeIndices(ndc_x, ndc_y, i, j, ir, jr); - value = 0.0f; - double div = 0.0f; - float v,r; - - r = (1.0f-ir)*(1.0f-jr); - if (r>0.0 && getValidValue(i,j,v)) - { - value += v*r; - div += r; - } - - r = (ir)*(1.0f-jr); - if (r>0.0 && getValidValue(i+1,j,v)) - { - value += v*r; - div += r; - } - - r = (ir)*(jr); - if (r>0.0 && getValidValue(i+1,j+1,v)) - { - value += v*r; - div += r; - } - - r = (1.0f-ir)*(jr); - if (r>0.0 && getValidValue(i,j+1,v)) - { - value += v*r; - div += r; - } - - if (div != 0.0) - { - value /= div; - return true; - } - - value = 0.0; - return false; - } - - /** increment the modified count."*/ - virtual void dirty() {} - - /** Set the modified count value. */ - virtual void setModifiedCount(unsigned int /*value*/) {} - - /** Get modified count value. */ - virtual unsigned int getModifiedCount() const { return 0; } - - virtual osg::BoundingSphere computeBound(bool treatAsElevationLayer) const; - - protected: - - virtual ~Layer(); - - std::string _filename; - osg::ref_ptr _locator; - unsigned int _minLevel; - unsigned int _maxLevel; - osg::ref_ptr _validDataOperator; - osg::Vec4 _defaultValue; - osg::Texture::FilterMode _minFilter; - osg::Texture::FilterMode _magFilter; - -}; - -class OSGTERRAIN_EXPORT ImageLayer : public Layer -{ - public: - - ImageLayer(osg::Image* image=0); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ImageLayer(const ImageLayer& imageLayer,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, ImageLayer); - - void setFileName(const std::string& filename) { _filename = filename; if (_image.valid()) _image->setFileName(filename); } - virtual const std::string& getFileName() const { return _image.get() ? _image->getFileName() : _filename; } - - virtual bool transform(float offset, float scale); - - void setImage(osg::Image* image); - - /** Return image associated with layer. */ - virtual osg::Image* getImage() { return _image.get(); } - - /** Return const image associated with layer. */ - virtual const osg::Image* getImage() const { return _image.get(); } - - virtual unsigned int getNumColumns() const { return _image.valid() ? _image->s() : 0; } - virtual unsigned int getNumRows() const { return _image.valid() ? _image->t() : 0; } - - virtual bool getValue(unsigned int i, unsigned int j, float& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec2& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec3& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec4& value) const; - - virtual void dirty(); - virtual void setModifiedCount(unsigned int value); - virtual unsigned int getModifiedCount() const; - - protected: - - virtual ~ImageLayer() {} - - osg::ref_ptr _image; - -}; - -class OSGTERRAIN_EXPORT ContourLayer : public Layer -{ - public: - - ContourLayer(osg::TransferFunction1D* tf=0); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ContourLayer(const ContourLayer& tfLayer,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, ContourLayer); - - virtual bool transform(float offset, float scale); - - void setTransferFunction(osg::TransferFunction1D* tf); - osg::TransferFunction1D* getTransferFunction() { return _tf.get(); } - const osg::TransferFunction1D* getTransferFunction() const { return _tf.get(); } - - /** Return image associated with layer. */ - virtual osg::Image* getImage() { return _tf.valid() ? _tf->getImage() : 0; } - - /** Return const image associated with layer. */ - virtual const osg::Image* getImage() const { return _tf.valid() ? _tf->getImage() : 0; } - - - virtual unsigned int getNumColumns() const { return _tf.valid() ? _tf->getNumberImageCells() : 0; } - virtual unsigned int getNumRows() const { return _tf.valid() ? 1 : 0; } - - virtual bool getValue(unsigned int i, unsigned int j, float& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec2& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec3& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec4& value) const; - - virtual void dirty(); - virtual void setModifiedCount(unsigned int value); - virtual unsigned int getModifiedCount() const; - - protected: - - virtual ~ContourLayer() {} - - osg::ref_ptr _tf; - -}; - -class OSGTERRAIN_EXPORT HeightFieldLayer : public Layer -{ - public: - - HeightFieldLayer(osg::HeightField* hf=0); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - HeightFieldLayer(const HeightFieldLayer& hfLayer,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, HeightFieldLayer); - - void setFileName(const std::string& filename) { _filename = filename; } - virtual const std::string& getFileName() const { return _filename; } - - virtual bool transform(float offset, float scale); - - void setHeightField(osg::HeightField* hf); - osg::HeightField* getHeightField() { return _heightField.get(); } - const osg::HeightField* getHeightField() const { return _heightField.get(); } - - virtual unsigned int getNumColumns() const { return _heightField.valid() ? _heightField->getNumColumns() : 0; } - virtual unsigned int getNumRows() const { return _heightField.valid() ? _heightField->getNumRows() : 0; } - - virtual bool getValue(unsigned int i, unsigned int j, float& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec2& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec3& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec4& value) const; - - virtual void dirty(); - virtual void setModifiedCount(unsigned int value); - virtual unsigned int getModifiedCount() const; - - protected: - - virtual ~HeightFieldLayer() {} - - unsigned int _modifiedCount; - osg::ref_ptr _heightField; - -}; - - -class OSGTERRAIN_EXPORT ProxyLayer : public Layer -{ - public: - - ProxyLayer(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - ProxyLayer(const ProxyLayer& proxyLayer,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, ProxyLayer); - - /** Return image associated with layer if supported. */ - virtual osg::Image* getImage() - { - return _implementation.valid() ? _implementation->getImage() : 0; - } - - /** Return const image associated with layer if supported. */ - virtual const osg::Image* getImage() const - { - return _implementation.valid() ? _implementation->getImage() : 0; - } - - /** Set the implementation layer that does the actual work.*/ - void setImplementation(Layer* layer) { _implementation = layer; } - - /** Get the implementation layer that does the actual work.*/ - Layer* getImplementation() { return _implementation.get(); } - - /** Get the const implementation layer that does the actual work.*/ - const Layer* getImplementation() const { return _implementation.get(); } - - virtual void setFileName(const std::string& filename); - virtual const std::string& getFileName() const { return _filename; } - - virtual unsigned int getNumColumns() const; - virtual unsigned int getNumRows() const; - - virtual bool transform(float offset, float scale); - - virtual bool getValue(unsigned int i, unsigned int j, float& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec2& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec3& value) const; - virtual bool getValue(unsigned int i, unsigned int j, osg::Vec4& value) const; - - virtual void dirty(); - virtual void setModifiedCount(unsigned int value); - virtual unsigned int getModifiedCount() const; - - virtual osg::BoundingSphere computeBound(bool treatAsElevationLayer) const; - - protected: - - virtual ~ProxyLayer(); - - osg::ref_ptr _implementation; - - -}; - -class OSGTERRAIN_EXPORT CompositeLayer : public Layer -{ - public: - - CompositeLayer(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - CompositeLayer(const CompositeLayer& compositeLayer,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, CompositeLayer); - - void clear(); - - /** Set the set name of layer 'i'. */ - void setSetName(unsigned int i, const std::string& setname) { _layers[i].setname = setname; if (_layers[i].layer.valid()) _layers[i].layer->setName(setname); } - - /** Get the set name of layer 'i'. */ - const std::string& getSetName(unsigned int i) const { return _layers[i].layer.valid() ? _layers[i].layer->getName() : _layers[i].setname; } - - /** Set the file name of the data associated with layer 'i'. */ - void setFileName(unsigned int i, const std::string& filename) { _layers[i].filename = filename; if (_layers[i].layer.valid()) _layers[i].layer->setFileName(filename); } - - /** Get the file name of the data associated with layer 'i'. */ - const std::string& getFileName(unsigned int i) const { return _layers[i].layer.valid() ? _layers[i].layer->getFileName() : _layers[i].filename; } - - void setCompoundName(unsigned int i, const std::string& compoundname); - std::string getCompoundName(unsigned int i) const; - - - void setLayer(unsigned int i, Layer* layer) { if (i>=_layers.size()) _layers.resize(i+1); _layers[i].layer = layer; } - Layer* getLayer(unsigned int i) { return i<_layers.size() ? _layers[i].layer.get() : 0; } - const Layer* getLayer(unsigned int i) const { return i<_layers.size() ? _layers[i].layer.get() : 0; } - - void addLayer(const std::string& compoundname); - void addLayer(const std::string& setname, const std::string& filename); - - void addLayer(Layer* layer) { _layers.push_back(CompoundNameLayer(layer->getName(),layer->getFileName(),layer)); } - - void removeLayer(unsigned int i) { _layers.erase(_layers.begin()+i); } - - unsigned int getNumLayers() const { return _layers.size(); } - - protected: - - virtual ~CompositeLayer() {} - - struct CompoundNameLayer - { - CompoundNameLayer() {} - - CompoundNameLayer(const CompoundNameLayer& cnl): - setname(cnl.setname), - filename(cnl.filename), - layer(cnl.layer) {} - - CompoundNameLayer(const std::string& sn, const std::string& fn, Layer* l): - setname(sn), - filename(fn), - layer(l) {} - - CompoundNameLayer& operator = (const CompoundNameLayer& cnl) - { - if (&cnl==this) return *this; - - setname = cnl.setname; - filename = cnl.filename; - layer = cnl.layer; - return *this; - } - - std::string setname; - std::string filename; - osg::ref_ptr layer; - }; - - typedef std::vector< CompoundNameLayer > Layers; - - Layers _layers; -}; - - -class OSGTERRAIN_EXPORT SwitchLayer : public CompositeLayer -{ - public: - - SwitchLayer(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - SwitchLayer(const SwitchLayer& switchLayer,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, SwitchLayer); - - void setActiveLayer(int i) { _activeLayer = i; } - int getActiveLayer() const { return _activeLayer; } - - /** Return image associated with layer if supported. */ - virtual osg::Image* getImage() - { - if (_activeLayer < 0) return 0; - if (_activeLayer >= static_cast(getNumLayers())) return 0; - return _layers[_activeLayer].layer->getImage(); - } - - /** Return const image associated with layer if supported. */ - virtual const osg::Image* getImage() const - { - if (_activeLayer < 0) return 0; - if (_activeLayer >= static_cast(getNumLayers())) return 0; - return _layers[_activeLayer].layer->getImage(); - } - - protected: - - virtual ~SwitchLayer() {} - - int _activeLayer; -}; - - - -} - -#endif diff --git a/libs/lib/mac32/include/osgTerrain/Locator b/libs/lib/mac32/include/osgTerrain/Locator deleted file mode 100644 index 263dfa9cb..000000000 --- a/libs/lib/mac32/include/osgTerrain/Locator +++ /dev/null @@ -1,132 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTERRAIN_LOCATOR -#define OSGTERRAIN_LOCATOR 1 - -#include -#include -#include - -#include - -namespace osgTerrain { - -class OSGTERRAIN_EXPORT Locator : public osg::Object -{ - public: - - Locator(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Locator(const Locator&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, Locator); - - /** CoordinateSystemType provides the classification of the type coordinate system represented.*/ - enum CoordinateSystemType - { - /** GEOCENTRIC coordinate systems are ones mapped to the around the ellipsoid, i.e. whole earth.*/ - GEOCENTRIC, - - /** GEOGRAPHIC coordinate systems are ones mapped to latitude and longitude.*/ - GEOGRAPHIC, - - /** PROJECTED coordinate systems are ones projected to a local projected coordinate system i.e. UTMs.*/ - PROJECTED - }; - - /** Set the CoordinatesSyetemType. - * Note, the user must keep the CoordinateSystemString consistent with the type of the CoordinateSystem.*/ - void setCoordinateSystemType(CoordinateSystemType type) { _coordinateSystemType = type; } - - /** Get the CoordinatesSyetemType.*/ - CoordinateSystemType getCoordinateSystemType() const { return _coordinateSystemType; } - - /** Set the coordinate system format string. Typical values would be WKT, PROJ4, USGS etc.*/ - void setFormat(const std::string& format) { _format = format; } - - /** Get the coordinate system format string.*/ - const std::string& getFormat() const { return _format; } - - /** Set the CoordinateSystem reference string, should be stored in a form consistent with the Format.*/ - void setCoordinateSystem(const std::string& cs) { _cs = cs; } - - /** Get the CoordinateSystem reference string.*/ - const std::string& getCoordinateSystem() const { return _cs; } - - - /** Set EllipsoidModel to describe the model used to map lat, long and height into geocentric XYZ and back. */ - void setEllipsoidModel(osg::EllipsoidModel* ellipsode) { _ellipsoidModel = ellipsode; } - - /** Get the EllipsoidModel.*/ - osg::EllipsoidModel* getEllipsoidModel() { return _ellipsoidModel.get(); } - - /** Get the const EllipsoidModel.*/ - const osg::EllipsoidModel* getEllipsoidModel() const { return _ellipsoidModel.get(); } - - - /** Set the transformation from local coordinates to model coordinates.*/ - void setTransform(const osg::Matrixd& transform) { _transform = transform; _inverse.invert(_transform); } - - /** Set the transformation from local coordinates to model coordinates.*/ - const osg::Matrixd& getTransform() const { return _transform; } - - /** Set the extents of the local coords.*/ - void setTransformAsExtents(double minX, double minY, double maxX, double maxY); - - - virtual bool orientationOpenGL() const; - - virtual bool convertLocalToModel(const osg::Vec3d& local, osg::Vec3d& world) const; - - virtual bool convertModelToLocal(const osg::Vec3d& world, osg::Vec3d& local) const; - - static bool convertLocalCoordBetween(const Locator& source, const osg::Vec3d& sourceNDC, - const Locator& destination, osg::Vec3d& destinationNDC) - { - osg::Vec3d model; - if (!source.convertLocalToModel(sourceNDC, model)) return false; - if (!destination.convertModelToLocal(model, destinationNDC)) return false; - return true; - } - - bool computeLocalBounds(Locator& source, osg::Vec3d& bottomLeft, osg::Vec3d& topRight) const; - - void setDefinedInFile(bool flag) { _definedInFile = flag; } - bool getDefinedInFile() const { return _definedInFile; } - - void setTransformScaledByResolution(bool scaledByResolution) { _transformScaledByResolution = scaledByResolution; } - bool getTransformScaledByResolution() const { return _transformScaledByResolution; } - - protected: - - virtual ~Locator(); - - CoordinateSystemType _coordinateSystemType; - - std::string _format; - std::string _cs; - osg::ref_ptr _ellipsoidModel; - - osg::Matrixd _transform; - osg::Matrixd _inverse; - - bool _definedInFile; - bool _transformScaledByResolution; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgTerrain/Terrain b/libs/lib/mac32/include/osgTerrain/Terrain deleted file mode 100644 index 062bcf829..000000000 --- a/libs/lib/mac32/include/osgTerrain/Terrain +++ /dev/null @@ -1,122 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTerrain -#define OSGTerrain 1 - -#include - -#include - -namespace osgTerrain { - -/** Terrain provides a framework for loosely coupling height field data with height rendering algorithms. - * This allows TerrainTechniques to be plugged in at runtime.*/ -class OSGTERRAIN_EXPORT Terrain : public osg::CoordinateSystemNode -{ - public: - - Terrain(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Terrain(const Terrain&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osgTerrain, Terrain); - - virtual void traverse(osg::NodeVisitor& nv); - - virtual osgTerrain::Terrain* asTerrain() { return this; } - virtual const osgTerrain::Terrain* asTerrain() const { return this; } - - - /** Set the sample ratio hint that TerrainTile should use when building geometry. - * Defaults to 1.0, which means use all original sample points.*/ - void setSampleRatio(float ratio); - - /** Get the sample ratio hint.*/ - float getSampleRatio() const { return _sampleRatio; } - - - /** Set the vertical scale hint.*/ - void setVerticalScale(float scale); - - /** Get the vertical scale hint.*/ - float getVerticalScale() const { return _verticalScale; } - - /** If set to true the boundaries between adjacent tiles should be equalized. - * Note, it is only possible to equalizae boundaries when the TerrainTile's contain properly assigned TileID's, - * databases built with VirtualPlanetBuilder-0.9.11 and older do not set the TileID, so databases must be - * built with later versions of VirtualPlanetBuilder to take advantage of boundary equalization. */ - void setEqualizeBoundaries(bool equalizeBoundaries); - - /** If true the boundaries between adjacent tiles will be equalized. */ - bool getEqualizeBoundaries() const { return _equalizeBoundaries; } - - /** Set the default policy to use when deciding whether to enable/disable blending and use of transparent bin. - * Note, the Terrain::BlendingPolicy value only sets the value for the TerrainTiles it encloses for the - * TerrainTile's that have their policy set to INHERIT. INHERIT is the default BlendingPolicy for both - * Terrain and TerrainTile, and if both are left to INERHIT then the policy used is ENABLE_BLENDING_WHEN_ALPHA_PRESENT. */ - void setBlendingPolicy(TerrainTile::BlendingPolicy policy); - - /** Get the default policy to use when deciding whether to enable/disable blending and use of transparent bin.*/ - TerrainTile::BlendingPolicy getBlendingPolicy() const { return _blendingPolicy; } - - - /** Get the TerrainTile for a given TileID.*/ - TerrainTile* getTile(const TileID& tileID); - - /** Get the const TerrainTile for a given TileID.*/ - const TerrainTile* getTile(const TileID& tileID) const; - - /** Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from.*/ - void setTerrainTechniquePrototype(TerrainTechnique* technique) { _terrainTechnique = technique; } - - /** Get the TerrainTechnique prototype */ - TerrainTechnique* getTerrainTechniquePrototype() { return _terrainTechnique.get(); } - - /** Get the const TerrainTechnique protype*/ - const TerrainTechnique* getTerrainTechniquePrototype() const { return _terrainTechnique.get(); } - - /** Tell the Terrain node to call the terrainTile's TerrainTechnique on the next update traversal.*/ - void updateTerrainTileOnNextFrame(TerrainTile* terrainTile); - - protected: - - virtual ~Terrain(); - - friend class TerrainTile; - - void dirtyRegisteredTiles(int dirtyMask = TerrainTile::ALL_DIRTY); - - void registerTerrainTile(TerrainTile* tile); - void unregisterTerrainTile(TerrainTile* tile); - - typedef std::map< TileID, TerrainTile* > TerrainTileMap; - typedef std::set< TerrainTile* > TerrainTileSet; - - float _sampleRatio; - float _verticalScale; - TerrainTile::BlendingPolicy _blendingPolicy; - bool _equalizeBoundaries; - - mutable OpenThreads::Mutex _mutex; - TerrainTileSet _terrainTileSet; - TerrainTileMap _terrainTileMap; - TerrainTileSet _updateTerrainTileSet; - - osg::ref_ptr _terrainTechnique; -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgTerrain/TerrainTechnique b/libs/lib/mac32/include/osgTerrain/TerrainTechnique deleted file mode 100644 index 1b0d701cf..000000000 --- a/libs/lib/mac32/include/osgTerrain/TerrainTechnique +++ /dev/null @@ -1,105 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTERRAIN_TERRAINTECHNIQUE -#define OSGTERRAIN_TERRAINTECHNIQUE 1 - -#include - -#include -#include - -#include - -namespace osgTerrain { - -class TerrainTile; - -class OSGTERRAIN_EXPORT TerrainNeighbours -{ - public: - - TerrainNeighbours(); - ~TerrainNeighbours(); - - void clear(); - void addNeighbour(TerrainTile* tile); - void removeNeighbour(TerrainTile* tile); - bool containsNeighbour(TerrainTile* tile) const; - - protected: - - TerrainNeighbours(const TerrainNeighbours& /*tn*/) {} - TerrainNeighbours& operator = (const TerrainNeighbours& /*rhs*/) { return *this; } - - typedef std::set Neighbours; - - mutable OpenThreads::Mutex _neighboursMutex; - Neighbours _neighbours; -}; - - -class OSGTERRAIN_EXPORT TerrainTechnique : public osg::Object, public osg::Observer -{ - public: - - TerrainTechnique(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - TerrainTechnique(const TerrainTechnique&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgTerrain, TerrainTechnique); - - TerrainTile* getTerrainTile() { return _terrainTile; } - const TerrainTile* getTerrainTile() const { return _terrainTile; } - - virtual void init(int dirtyMask, bool assumeMultiThreaded); - - virtual void update(osgUtil::UpdateVisitor* nv); - - virtual void cull(osgUtil::CullVisitor* nv); - - /** Clean scene graph from any terrain technique specific nodes.*/ - virtual void cleanSceneGraph(); - - /** Traverse the terrain subgraph.*/ - virtual void traverse(osg::NodeVisitor& nv); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const {} - - void addNeighbour(TerrainTile* tile) { _neighbours.addNeighbour(tile); } - void removeNeighbour(TerrainTile* tile) { _neighbours.removeNeighbour(tile); } - bool containsNeighbour(TerrainTile* tile) { return _neighbours.containsNeighbour(tile); } - - protected: - - virtual ~TerrainTechnique(); - - void setTerrainTile(TerrainTile* tile); - void setDirty(bool dirty); - - friend class osgTerrain::TerrainTile; - - TerrainTile* _terrainTile; - - - TerrainNeighbours _neighbours; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgTerrain/TerrainTile b/libs/lib/mac32/include/osgTerrain/TerrainTile deleted file mode 100644 index 3e8d1ea99..000000000 --- a/libs/lib/mac32/include/osgTerrain/TerrainTile +++ /dev/null @@ -1,293 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTERRAIN_TERRAINTILE -#define OSGTERRAIN_TERRAINTILE 1 - -#include -#include - -#include - -#include -#include -#include - -namespace osgTerrain { - -class Terrain; - -class OSGTERRAIN_EXPORT TileID -{ - public: - - TileID(); - - TileID(int in_level, int in_x, int in_y); - - bool operator == (const TileID& rhs) const - { - return (level==rhs.level) && (x==rhs.x) && (y==rhs.y); - } - - bool operator != (const TileID& rhs) const - { - return (level!=rhs.level) || (x!=rhs.x) || (y!=rhs.y); - } - - bool operator < (const TileID& rhs) const - { - if (levelrhs.level) return false; - if (xrhs.x) return false; - return y=0; } - - int level; - int x; - int y; -}; - - -/** Terrain provides a framework for loosely coupling height field data with height rendering algorithms. - * This allows TerrainTechnique's to be plugged in at runtime.*/ -class OSGTERRAIN_EXPORT TerrainTile : public osg::Group -{ - public: - - TerrainTile(); - - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - TerrainTile(const TerrainTile&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Node(osgTerrain, TerrainTile); - - virtual void traverse(osg::NodeVisitor& nv); - - /** Call init on any attached TerrainTechnique.*/ - void init(int dirtyMask, bool assumeMultiThreaded); - - /** Set the Terrain that this Terrain tile is a member of.*/ - void setTerrain(Terrain* ts); - - /** Get the Terrain that this Terrain tile is a member of.*/ - Terrain* getTerrain() { return _terrain; } - - /** Get the const Terrain that this Terrain tile is a member of.*/ - const Terrain* getTerrain() const { return _terrain; } - - - /** Set the TileID (layer, x,y) of the TerrainTile. - * The TileID is used so it can be located by its neighbours - * via the enclosing Terrain node that manages a map of TileID to TerraiTiles.*/ - void setTileID(const TileID& tileID); - - /** Get the TileID (layer, x,y) of the TerrainTile.*/ - const TileID& getTileID() const { return _tileID; } - - - /** Set the TerrainTechnique*/ - void setTerrainTechnique(TerrainTechnique* terrainTechnique); - - /** Get the TerrainTechnique*/ - TerrainTechnique* getTerrainTechnique() { return _terrainTechnique.get(); } - - /** Get the const TerrainTechnique*/ - const TerrainTechnique* getTerrainTechnique() const { return _terrainTechnique.get(); } - - - /** Set the coordinate frame locator of the terrain node. - * The locator takes non-dimensional s,t coordinates into the X,Y,Z world coords and back.*/ - void setLocator(Locator* locator) { _locator = locator; } - - /** Get the coordinate frame locator of the terrain node.*/ - Locator* getLocator() { return _locator.get(); } - - /** Get the const coordinate frame locator of the terrain node.*/ - const Locator* getLocator() const { return _locator.get(); } - - /** Set the layer to use to define the elevations of the terrain.*/ - void setElevationLayer(Layer* layer); - - /** Get the layer to use to define the elevations of the terrain.*/ - Layer* getElevationLayer() { return _elevationLayer.get(); } - - /** Get the const layer to use to define the elevations of the terrain.*/ - const Layer* getElevationLayer() const { return _elevationLayer.get(); } - - - /** Set a color layer with specified layer number.*/ - void setColorLayer(unsigned int i, Layer* layer); - - /** Get color layer with specified layer number.*/ - Layer* getColorLayer(unsigned int i) { return i<_colorLayers.size() ? _colorLayers[i].get() : 0; } - - /** Set const color layer with specified layer number.*/ - const Layer* getColorLayer(unsigned int i) const { return i<_colorLayers.size() ? _colorLayers[i].get() : 0; } - - /** Get the number of colour layers.*/ - unsigned int getNumColorLayers() const { return _colorLayers.size(); } - - - /** Set hint to whether the TerrainTechnique should create per vertex normals for lighting purposes.*/ - void setRequiresNormals(bool flag) { _requiresNormals = flag; } - - /** Get whether the TerrainTechnique should create per vertex normals for lighting purposes.*/ - bool getRequiresNormals() const { return _requiresNormals; } - - - /** Set the hint to whether the TerrainTechnique should treat the invalid Layer entries that at are neigbours to valid entries with the default value.*/ - void setTreatBoundariesToValidDataAsDefaultValue(bool flag) { _treatBoundariesToValidDataAsDefaultValue = flag; } - - /** Get whether the TeatBoundariesToValidDataAsDefaultValue hint.*/ - bool getTreatBoundariesToValidDataAsDefaultValue() const { return _treatBoundariesToValidDataAsDefaultValue; } - - - enum BlendingPolicy - { - INHERIT, /** Default - check for the any BlendingPolicy set on the enclosing osgTerrain::Terrain node, and if it's also INHERIT then assume ENABLE_BLENDING_WHEN_ALPHA_PRESENT. */ - DO_NOT_SET_BLENDING, - ENABLE_BLENDING, - ENABLE_BLENDING_WHEN_ALPHA_PRESENT /** check colour layers for alpha value and if present enable blending. */ - }; - - /** Set the policy to use when deciding whether to enable/disable blending and use of transparent bin.*/ - void setBlendingPolicy(BlendingPolicy policy) { _blendingPolicy = policy; } - - /** Get the policy to use when deciding whether to enable/disable blending and use of transparent bin.*/ - BlendingPolicy getBlendingPolicy() const { return _blendingPolicy; } - - - enum DirtyMask - { - NOT_DIRTY = 0, - IMAGERY_DIRTY = 1<<0, - ELEVATION_DIRTY = 1<<1, - LEFT_EDGE_DIRTY = 1<<2, - RIGHT_EDGE_DIRTY = 1<<3, - TOP_EDGE_DIRTY = 1<<4, - TOP_LEFT_CORNER_DIRTY = 1<<5, - TOP_RIGHT_CORNER_DIRTY = 1<<6, - BOTTOM_EDGE_DIRTY = 1<<7, - BOTTOM_LEFT_CORNER_DIRTY = 1<<8, - BOTTOM_RIGHT_CORNER_DIRTY = 1<<9, - EDGES_DIRTY = LEFT_EDGE_DIRTY | RIGHT_EDGE_DIRTY | TOP_EDGE_DIRTY | BOTTOM_EDGE_DIRTY | - TOP_LEFT_CORNER_DIRTY | TOP_RIGHT_CORNER_DIRTY | BOTTOM_LEFT_CORNER_DIRTY | BOTTOM_RIGHT_CORNER_DIRTY, - ALL_DIRTY = IMAGERY_DIRTY | ELEVATION_DIRTY | EDGES_DIRTY - }; - - /** Set the dirty flag on/off.*/ - void setDirty(bool dirty) { setDirtyMask(dirty ? ALL_DIRTY : NOT_DIRTY); } - - /** return true if the any of the DirtyMask are set.*/ - int getDirty() const { return _dirtyMask!=NOT_DIRTY; } - - - /** Set the dirty flag on/off.*/ - void setDirtyMask(int dirtyMask); - - /** return true if the tile is dirty and needs to be updated,*/ - int getDirtyMask() const { return _dirtyMask; } - - - /** Compute the bounding volume of the terrain by computing the union of the bounding volumes of all layers.*/ - virtual osg::BoundingSphere computeBound() const; - - /** Callback for post processing loaded TerrainTile, and for filling in missing elements such as external external imagery.*/ - struct TileLoadedCallback : public osg::Referenced - { - virtual bool deferExternalLayerLoading() const = 0; - virtual void loaded(osgTerrain::TerrainTile* tile, const osgDB::ReaderWriter::Options* options) const = 0; - }; - - static void setTileLoadedCallback(TileLoadedCallback* lc); - static osg::ref_ptr& getTileLoadedCallback(); - - /** If State is non-zero, this function releases any associated OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objects - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; - - - protected: - - virtual ~TerrainTile(); - - typedef std::vector< osg::ref_ptr > Layers; - - friend class Terrain; - - Terrain* _terrain; - - int _dirtyMask; - bool _hasBeenTraversal; - - TileID _tileID; - - osg::ref_ptr _terrainTechnique; - osg::ref_ptr _locator; - - osg::ref_ptr _elevationLayer; - - Layers _colorLayers; - - bool _requiresNormals; - bool _treatBoundariesToValidDataAsDefaultValue; - BlendingPolicy _blendingPolicy; -}; - -/** Helper callback for managing optional sets of layers, that loading of is deffered to this callback, - * with this callback working out which layers to load, and how to create fallback versions of the layers. -*/ -class OSGTERRAIN_EXPORT WhiteListTileLoadedCallback : public TerrainTile::TileLoadedCallback -{ - public: - - WhiteListTileLoadedCallback(); - - void allow(const std::string& setname) { _setWhiteList.insert(setname); } - - void setMinimumNumOfLayers(unsigned int numLayers) { _minumumNumberOfLayers = numLayers; } - unsigned int getMinimumNumOfLayers() const { return _minumumNumberOfLayers; } - - void setReplaceSwitchLayer(bool replaceSwitchLayer) { _replaceSwitchLayer = replaceSwitchLayer; } - bool getReplaceSwitchLayer() const { return _replaceSwitchLayer; } - - void setAllowAll(bool allowAll) { _allowAll = allowAll; } - bool getAllowAll() const { return _allowAll; } - - bool layerAcceptable(const std::string& setname) const; - bool readImageLayer(osgTerrain::ImageLayer* imageLayer, const osgDB::ReaderWriter::Options* options) const; - - virtual bool deferExternalLayerLoading() const; - - virtual void loaded(osgTerrain::TerrainTile* tile, const osgDB::ReaderWriter::Options* options) const; - - protected: - - virtual ~WhiteListTileLoadedCallback(); - - typedef std::set SetWhiteList; - SetWhiteList _setWhiteList; - unsigned int _minumumNumberOfLayers; - bool _replaceSwitchLayer; - bool _allowAll; - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgTerrain/ValidDataOperator b/libs/lib/mac32/include/osgTerrain/ValidDataOperator deleted file mode 100644 index b6ea98922..000000000 --- a/libs/lib/mac32/include/osgTerrain/ValidDataOperator +++ /dev/null @@ -1,74 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTERRAIN_VALIDDATAOPERATOR -#define OSGTERRAIN_VALIDDATAOPERATOR 1 - -#include -#include -#include -#include -#include - -namespace osgTerrain { - -struct ValidDataOperator : public osg::Referenced -{ - virtual bool operator() (float /*value*/) const { return true; } - virtual bool operator() (const osg::Vec2& value) const { return operator()(value.x()) && operator()(value.y()) ; } - virtual bool operator() (const osg::Vec3& value) const { return operator()(value.x()) && operator()(value.y()) && operator()(value.z()); } - virtual bool operator() (const osg::Vec4& value) const { return operator()(value.x()) && operator()(value.y()) && operator()(value.z()) && operator()(value.w()); } -}; - -struct ValidRange : public ValidDataOperator -{ - ValidRange(float minValue, float maxValue): - _minValue(minValue), - _maxValue(maxValue) {} - - void setRange(float minValue, float maxValue) - { - _minValue = minValue; - _maxValue = maxValue; - } - - void setMinValue(float minValue) { _minValue = minValue; } - float getMinValue() const { return _minValue; } - - void setMaxValue(float maxValue) { _maxValue = maxValue; } - float getMaxValue() const { return _maxValue; } - - virtual bool operator() (float value) const { return value>=_minValue && value<=_maxValue; } - - float _minValue, _maxValue; -}; - - -struct NoDataValue : public ValidDataOperator -{ - NoDataValue(float value): - _value(value) {} - - void setNoDataValue(float value) { _value = value; } - float getValue() const { return _value; } - - virtual bool operator() (float value) const { return value!=_value; } - - float _value; -}; - -} - -#endif - - diff --git a/libs/lib/mac32/include/osgTerrain/Version b/libs/lib/mac32/include/osgTerrain/Version deleted file mode 100644 index e9a89d71f..000000000 --- a/libs/lib/mac32/include/osgTerrain/Version +++ /dev/null @@ -1,46 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTERRAIN_VERSION -#define OSGTERRAIN_VERSION 1 - -#include - -extern "C" { - -/** - * osgTerrainGetVersion() returns the library version number. - * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgTerrainGetVersion. - * - * This C function can be also used to check for the existence of the OpenSceneGraph - * library using autoconf and its m4 macro AC_CHECK_LIB. - * - * Here is the code to add to your configure.in: - \verbatim - # - # Check for the OpenSceneGraph (OSG) Terrain library - # - AC_CHECK_LIB(osg, osgTerrainGetVersion, , - [AC_MSG_ERROR(OpenSceneGraph Terrain library not found. See http://www.openscenegraph.org)],) - \endverbatim -*/ -extern OSGTERRAIN_EXPORT const char* osgTerrainGetVersion(); - -/** - * osgTerrainGetLibraryName() returns the library name in human friendly form. -*/ -extern OSGTERRAIN_EXPORT const char* osgTerrainGetLibraryName(); - -} - -#endif diff --git a/libs/lib/mac32/include/osgText/Export b/libs/lib/mac32/include/osgText/Export deleted file mode 100644 index b92b6870f..000000000 --- a/libs/lib/mac32/include/osgText/Export +++ /dev/null @@ -1,49 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTEXT_EXPORT_ -#define OSGTEXT_EXPORT_ 1 - -#include - -#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) - #pragma warning( disable : 4244 ) - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4267 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4290 ) - #pragma warning( disable : 4786 ) - #pragma warning( disable : 4305 ) - #pragma warning( disable : 4996 ) -#endif - -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) - # if defined( OSG_LIBRARY_STATIC ) - # define OSGTEXT_EXPORT - # elif defined( OSGTEXT_LIBRARY ) - # define OSGTEXT_EXPORT __declspec(dllexport) - # else - # define OSGTEXT_EXPORT __declspec(dllimport) - # endif -#else - # define OSGTEXT_EXPORT -#endif - -/** - -\namespace osgText - -The osgText library is a NodeKit that extends the core scene graph to support high quality text. -*/ - -#endif diff --git a/libs/lib/mac32/include/osgText/FadeText b/libs/lib/mac32/include/osgText/FadeText deleted file mode 100644 index 5eebfc8b6..000000000 --- a/libs/lib/mac32/include/osgText/FadeText +++ /dev/null @@ -1,63 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTEXT_FADETEXT -#define OSGTEXT_FADETEXT 1 - -#include - -namespace osgText { - - -class OSGTEXT_EXPORT FadeText : public osgText::Text -{ -public: - - FadeText(); - FadeText(const Text& text,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - - META_Object(osgText,FadeText) - - - /** Set the speed that the alpha value changes as the text is occluded or becomes visible.*/ - void setFadeSpeed(float fadeSpeed) { _fadeSpeed = fadeSpeed; } - - /** Get the speed that the alpha value changes.*/ - float getFadeSpeed() const { return _fadeSpeed; } - - /** Draw the text.*/ - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; - -protected: - - virtual ~FadeText() {} - - void init(); - - struct FadeTextUpdateCallback; - friend struct FadeTextUpdateCallback; - - typedef std::map ViewBlendColourMap; - - ViewBlendColourMap& getViewBlendColourMap() { return _viewBlendColourMap; } - const ViewBlendColourMap& getViewBlendColourMap() const { return _viewBlendColourMap; } - - float _fadeSpeed; - - mutable ViewBlendColourMap _viewBlendColourMap; -}; - -} - - -#endif diff --git a/libs/lib/mac32/include/osgText/Font b/libs/lib/mac32/include/osgText/Font deleted file mode 100644 index 39b96410a..000000000 --- a/libs/lib/mac32/include/osgText/Font +++ /dev/null @@ -1,247 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTEXT_FONT -#define OSGTEXT_FONT 1 - -#include -#include - -#include -#include -#include - -#include - -namespace osgText { - -// forward declare Font -class Font; - -/** Read a font from specified file. The filename may contain a path. - * It will search for the font file in the following places in this order: - * - In the current directory - * - All paths defined in OSG_FILE_PATH or OSGFILEPATH environment variable - * - Filename with path stripped: In the current directory - * - Filename with path stripped: All paths defined in OSG_FILE_PATH or OSGFILEPATH - * - * Then the file will be searched in OS specific directories in the following order: - * - Again in the current directory - * - Windows: In C:/winnt/fonts - * - Windows: In C:/windows/fonts - * - Windows: In the fonts directory of the windows install directory - * - Other OS: In /usr/share/fonts/ttf - * - Other OS: In /usr/share/fonts/ttf/western - * - Other OS: In /usr/share/fonts/ttf/decoratives - * - * If the given file could not be found, the path part will be stripped and - * the file will be searched again in the OS specific directories. - */ -extern OSGTEXT_EXPORT Font* readFontFile(const std::string& filename, const osgDB::Options* userOptions = 0); - -/** read a font from specified stream.*/ -extern OSGTEXT_EXPORT Font* readFontStream(std::istream& stream, const osgDB::Options* userOptions = 0); - -extern OSGTEXT_EXPORT osg::ref_ptr readRefFontFile(const std::string& filename, const osgDB::Options* userOptions = 0); - -extern OSGTEXT_EXPORT osg::ref_ptr readRefFontStream(std::istream& stream, const osgDB::Options* userOptions = 0); - -extern OSGTEXT_EXPORT std::string findFontFile(const std::string& str); - -/** Pure virtual base class for fonts. - * Concrete implementation are the DefaultFont found in src/osgText/DefaultFont.cpp - * and FreeTypeFont found in src/osgPlugins/freetype/FreeTypeFont.cpp*/ -class OSGTEXT_EXPORT Font : public osg::Object -{ -// declare the interface to a font. -public: - - // forward declare nested classes. - class FontImplementation; - -public: - Font(FontImplementation* implementation=0); - - virtual osg::Object* cloneType() const { return 0; } // cloneType() not appropriate - virtual osg::Object* clone(const osg::CopyOp&) const { return 0; } // clone() not appropriate - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Font"; } - virtual const char* libraryName() const { return "osgText"; } - - virtual std::string getFileName() const; - - static osg::ref_ptr& getDefaultFont(); - - void setTexEnv(osg::TexEnv* texenv) { if (texenv) _texenv = texenv; } - inline osg::TexEnv* getTexEnv() { return _texenv.get(); } - inline const osg::TexEnv* getTexEnv() const { return _texenv.get(); } - - void setStateSet(osg::StateSet* stateset) { _stateset = stateset; } - osg::StateSet* getStateSet() { return _stateset.get(); } - const osg::StateSet* getStateSet() const { return _stateset.get(); } - - - /** Get a kerning (adjustment of spacing of two adjacent character) for specified charcodes, w.r.t the current font size hint.*/ - virtual osg::Vec2 getKerning(unsigned int leftcharcode,unsigned int rightcharcode, KerningType kerningType); - - /** Get a Glyph for specified charcode, and the font size nearest to the current font size hint.*/ - virtual Glyph* getGlyph(const FontResolution& fontSize, unsigned int charcode); - - - /** Get a Glyph3D for specified charcode.*/ - virtual Glyph3D* getGlyph3D(unsigned int charcode); - - /** Return true if this font provides vertical alignments and spacing or glyphs.*/ - virtual bool hasVertical() const; - - /** Set the margin around each glyph, - * to ensure that texture filtering doesn't bleed adjacent glyph's into each other. - * Default margin is 1 texels.*/ - void setGlyphImageMargin(unsigned int margin); - unsigned int getGlyphImageMargin() const; - - /** Set the margin ratio around each glyph, relative to the glyph's size. - * to ensure that texture filtering doesn't bleed adjacent glyph's into each other. - * Default margin is 0.05.*/ - void setGlyphImageMarginRatio(float margin); - float getGlyphImageMarginRatio() const; - - - /** Set the size of texture to create to store the glyph images when rendering. - * Note, this doesn't affect already created Texture Glhph's.*/ - void setTextureSizeHint(unsigned int width,unsigned int height); - - unsigned int getTextureWidthHint() const; - unsigned int getTextureHeightHint() const; - - /** Set the minification texture filter to use when creating the texture to store the glyph images when rendering. - * Note, this doesn't affect already created Texture Glhph's.*/ - void setMinFilterHint(osg::Texture::FilterMode mode); - osg::Texture::FilterMode getMinFilterHint() const; - - /** Set the magnification texture filter to use when creating the texture to store the glyph images when rendering. - * Note, this doesn't affect already created Texture Glhph's.*/ - void setMagFilterHint(osg::Texture::FilterMode mode); - osg::Texture::FilterMode getMagFilterHint() const; - - unsigned int getFontDepth() const { return _depth; } - - void setNumberCurveSamples(unsigned int numSamples) { _numCurveSamples = numSamples; } - unsigned int getNumberCurveSamples() const { return _numCurveSamples; } - - - // make Text a friend to allow it add and remove its entry in the Font's _textList. - friend class FontImplementation; - - void setImplementation(FontImplementation* implementation); - - FontImplementation* getImplementation(); - const FontImplementation* getImplementation() const; - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); - - /** If State is non-zero, this function releases OpenGL objects for - * the specified graphics context. Otherwise, releases OpenGL objexts - * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* state=0) const; - - typedef OpenThreads::Mutex FontMutex; - - typedef std::vector< osg::ref_ptr > GlyphTextureList; - GlyphTextureList& getGlyphTextureList() { return _glyphTextureList; } - -protected: - - virtual ~Font(); - - void addGlyph(const FontResolution& fontRes, unsigned int charcode, Glyph* glyph); - - typedef std::vector< osg::ref_ptr > StateSetList; - typedef std::map< unsigned int, osg::ref_ptr > GlyphMap; - typedef std::map< unsigned int, osg::ref_ptr > Glyph3DMap; - - typedef std::map< FontResolution, GlyphMap > FontSizeGlyphMap; - - mutable OpenThreads::Mutex _glyphMapMutex; - - osg::ref_ptr _texenv; - osg::ref_ptr _stateset; - FontSizeGlyphMap _sizeGlyphMap; - GlyphTextureList _glyphTextureList; - - - Glyph3DMap _glyph3DMap; - - // current active size of font - FontResolution _fontSize; - unsigned int _margin; - float _marginRatio; - - unsigned int _textureWidthHint; - unsigned int _textureHeightHint; - osg::Texture::FilterMode _minFilterHint; - osg::Texture::FilterMode _magFilterHint; - - unsigned int _depth; - unsigned int _numCurveSamples; - - - osg::ref_ptr _implementation; - - -// declare the nested classes. -public: - - class FontImplementation : public osg::Referenced - { - public: - - FontImplementation(): - osg::Referenced(true), - _facade(0) {} - - virtual std::string getFileName() const = 0; - - virtual bool supportsMultipleFontResolutions() const = 0; - - /** Get a Glyph for specified charcode, and the font size nearest to the current font size hint.*/ - virtual Glyph* getGlyph(const FontResolution& fontRes, unsigned int charcode) = 0; - - /** Get a Glyph3D for specified charcode.*/ - virtual Glyph3D* getGlyph3D(unsigned int charcode) = 0; - - /** Get a kerning (adjustment of spacing of two adjacent character) for specified charcodes, w.r.t the current font size hint.*/ - virtual osg::Vec2 getKerning(unsigned int leftcharcode,unsigned int rightcharcode, KerningType kerningType) = 0; - - /** Return true if this font provides vertical alignments and spacing or glyphs.*/ - virtual bool hasVertical() const = 0; - - void addGlyph(const FontResolution& fontRes, unsigned int charcode, Glyph* glyph) - { - _facade->addGlyph(fontRes, charcode, glyph); - } - - Font* _facade; - }; - - - -}; - -} - -#endif diff --git a/libs/lib/mac32/include/osgText/Font3D b/libs/lib/mac32/include/osgText/Font3D deleted file mode 100644 index 8d9d05a9d..000000000 --- a/libs/lib/mac32/include/osgText/Font3D +++ /dev/null @@ -1,55 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTEXT_FONT3D -#define OSGTEXT_FONT3D 1 - -#include - -namespace osgText { - -typedef Font Font3D; - -/** deprecated, use readFontFile() instead.*/ -inline Font* readFont3DFile(const std::string& filename, const osgDB::ReaderWriter::Options* userOptions = 0) -{ - return readFontFile(filename,userOptions); -} - -/** deprecated, use readFontStream() instead.*/ -inline Font* readFont3DStream(std::istream& stream, const osgDB::ReaderWriter::Options* userOptions = 0) -{ - return readFontStream(stream, userOptions); -} - -/** deprecated, use readRefFontFile() instead.*/ -inline osg::ref_ptr readRefFont3DFile(const std::string& filename, const osgDB::ReaderWriter::Options* userOptions = 0) -{ - return readRefFontFile(filename, userOptions); -} - -/** deprecated, use readRefFontStream() instead.*/ -inline osg::ref_ptr readRefFont3DStream(std::istream& stream, const osgDB::ReaderWriter::Options* userOptions = 0) -{ - return readRefFontStream(stream, userOptions); -} - -/** deprecated, use findFontFile() instead.*/ -inline std::string findFont3DFile(const std::string& str) -{ - return findFontFile(str); -} - -} - -#endif diff --git a/libs/lib/mac32/include/osgText/Glyph b/libs/lib/mac32/include/osgText/Glyph deleted file mode 100644 index 67fe77a92..000000000 --- a/libs/lib/mac32/include/osgText/Glyph +++ /dev/null @@ -1,296 +0,0 @@ -/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield - * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or - * (at your option) any later version. The full license is in LICENSE file - * included with this distribution, and on the openscenegraph.org website. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * OpenSceneGraph Public License for more details. -*/ - -#ifndef OSGTEXT_GLYPH -#define OSGTEXT_GLYPH 1 - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -namespace osgText { - -class Font; -class Text; -class Glyph3D; -class GlyphGeometry; -class GlyphTexture; - -class OSGTEXT_EXPORT Glyph : public osg::Image -{ -public: - - Glyph(Font* font, unsigned int glyphCode); - - Font* getFont() { return _font; } - const Font* getFont() const { return _font; } - - unsigned int getGlyphCode() const { return _glyphCode; } - - void setWidth(float width) { _width = width; } - float getWidth() const { return _width; } - - void setHeight(float height) { _height = height; } - float getHeight() const { return _height; } - - void setHorizontalBearing(const osg::Vec2& bearing); - const osg::Vec2& getHorizontalBearing() const; - - void setHorizontalAdvance(float advance); - float getHorizontalAdvance() const; - - void setVerticalBearing(const osg::Vec2& bearing); - const osg::Vec2& getVerticalBearing() const; - - void setVerticalAdvance(float advance); - float getVerticalAdvance() const; - - void setTexture(GlyphTexture* texture); - GlyphTexture* getTexture(); - const GlyphTexture* getTexture() const; - - void setTexturePosition(int posX,int posY); - int getTexturePositionX() const; - int getTexturePositionY() const; - - void setMinTexCoord(const osg::Vec2& coord); - const osg::Vec2& getMinTexCoord() const; - - void setMaxTexCoord(const osg::Vec2& coord); - const osg::Vec2& getMaxTexCoord() const; - - void subload() const; - -protected: - - virtual ~Glyph(); - - Font* _font; - unsigned int _glyphCode; - - float _width; - float _height; - - osg::Vec2 _horizontalBearing; - float _horizontalAdvance; - - osg::Vec2 _verticalBearing; - float _verticalAdvance; - - GlyphTexture* _texture; - int _texturePosX; - int _texturePosY; - osg::Vec2 _minTexCoord; - osg::Vec2 _maxTexCoord; - - typedef osg::buffered_value GLObjectList; - mutable GLObjectList _globjList; - -}; - -class OSGTEXT_EXPORT GlyphGeometry : public osg::Referenced -{ - public: - - GlyphGeometry(); - - void setup(const Glyph3D* glyph, const Style* style); - - bool match(const Style* style) const; - - osg::Geode* getGeode() const { return _geode.get(); } - osg::Geometry* getGeometry() const { return _geometry.get(); } - - /** Set the VertexArray of the glyph. */ - void setVertexArray(osg::Vec3Array * va) { _vertices = va; } - /** Get the VertexArray of the glyph. */ - osg::Vec3Array * getVertexArray() const { return _vertices.get(); } - - /** Set the VertexArray of the glyph. */ - void setNormalArray(osg::Vec3Array* na) { _normals = na; } - /** Get the NormalArray for the wall face. */ - osg::Vec3Array* getNormalArray() const { return _normals.get(); } - - /** Get the PrimitiveSetList for the front face. */ - osg::Geometry::PrimitiveSetList& getFrontPrimitiveSetList() { return _frontPrimitiveSetList; } - /** Get the PrimitiveSetList for the wall face. */ - osg::Geometry::PrimitiveSetList& getWallPrimitiveSetList() { return _wallPrimitiveSetList; } - /** Get et the PrimitiveSetList for the back face. */ - osg::Geometry::PrimitiveSetList& getBackPrimitiveSetList() { return _backPrimitiveSetList; } - - /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ - virtual void setThreadSafeRefUnref(bool threadSafe); - - protected: - - osg::ref_ptr

L%kQ48IkGVZ&+G_(cF`%cX(1!KBs^Wh>D8Th2D;jAU&_G6 z>l*{5I6)tdNyWBklgeaLx08*}EzUu<=usUpWuj6+ZY^fe-ff!haIUL;I<2SlSqWG7 zhE~p2i&TP5zyT(o1zyK+=J<}Qw^q-PRBTA{nn{JbZD{b8uR1&}4X7H&djqnNoPpM9 z7nO}AhqXbr;hRk1N77?h3$Q6cTZPSpKQM_%kLrhhWQ+~@U@LyS&OsC3 z@?M--_LlWm-_Ubw+_^if65pzu@Mt#G&6J{XiUmakG|+nG&17I}@Zqg$(B zxeZjt750TV*>kmC*;+Dnq8LvKc*PgV{l)ik^R(l<9qk9RW$|Zr5f;_Q-@1IE2x-@j zv#{wA66qE(0QQJMlU_m|>77ED2 z{OFv^qQ!Rn2!isd<^v`p<2ly(h1`tihf?L-j1h9zp4_{4fr^?+k*dp9i@guhFaLMl!Zvq4$@|QRnv9d<3MBk7w#Ryws>B;} zz#5+#ik2}{1>UI{CuB!Iexw$k4|VE0F?A=0x?}jWG1Cd(K&OUc@kZ;%k!==iX^oH~ zmbQTaaXpR9q+PlsQjJj)>F}@bnr?sPN;i0REVtuQ_9f*J3oeI8kIDuM+Ng9Nm}SfJ zkv=#?Ut$F0k5j#(tBqIoc%G6z%6LDob@Uw-GPw|G3u0{>xhBvTan+t>mNXK1H=(w8 zmSnXklWsKxGe6#$aBkIt&5LZI3tG_)iZ*x_CShI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S{=mj@xkQtT_@WgP3?7Vic_sGI(drwd6=T{^p8v>lAhvVNX zq5&#bT!8&1cToItfT(*c`*VlJ}uunxwN_6!n@4udW&aItdWwBtfnmvJcX@ez9Z!tF<^q;&N3slk?+4fb14`Hfp%T#zM{Tc~J{ zCg;&H*S?5q+Z~8@Gt^}RmXwr)alm9(JxYDHsy;CA9)rc^W|zb@=2*?n&Z+Qpu6zF` zAWE(t6tIlD9k|JH*k_35*wL86ygJ7sp9h+}qMTnx7az+W-WdF7+cglc5GAy*uyBip zwsWNS5)yeg)F44Sp0RQ$v<_W2^@T3v1|O)9+iWjia)f&`UX#F@uE@I4dMn}atCGR` zu^od6$j7DeQKJYLOfp1q+(twZ6!ywwW2DdTFaW^7kiG1h->|6yNzAIM3aA~G3nbf` znYK@VCa91BP~{yvNB3EK_UhPI*ylSHOYWveyg4n=zS>I^8{T&!BF+YGd9ku_W@Tmu zIK#q*K5fI(H3tO&r?i5%oi6M=l`_!O#N~Ed`4tidW@>sjqSbM8Yjb9CAtOIOV6}(v z*qmg8am>ojzT4A7Ht^nfX66&>UTN~RPn;E!l9-3sEWq8DR!-0LH4SjN!8AK@TRThK zR5#^gsj`EEjo|FD{F9r}W6=(@m0vE3bMVBe>zJA<_?SwE9}S0g^>(%!Xdsb?kGdSy z)$ff~&7lkeh^H2uhE+Kxt7aR407n5Cdi-&I6}xFiGqfK}lu;|%1GM$;>6#Iq;IZv& zG{!*YH<_Zz4!ND9eMmR))xL$*RMFzej%bDJP3s17fXx48bl0L`Wg%K!iX literal 0 HcmV?d00001 diff --git a/ios/AppIcon57x57.png b/ios/AppIcon57x57.png new file mode 100644 index 0000000000000000000000000000000000000000..73db1a53429872e097bb82df2d06b727f619c84d GIT binary patch literal 23902 zcmeI42Q=JU*YKrW5fMFlCx|wT(I$*2L4+ZQh&}}~3^UB=Euu$@=+Pot64w* zhQz|H#N6z0#NH$%@``Ra7{bnqzy-ImK|3h$ELPR>aG{Y3JU67Y#kFxNRw%TFhm)1Q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FroW|kf^xT@+C=Oam3*-Lwtsm7(j3z5JnCqHF~wsb02>YZqCmKHyh zJ3S}=ybe}9$)hy*B-&}9e6H8sjU12t0 z(q}@1+Hy#ngRdk#IeV)$o=~=~n{O~vaN}{W-TNm}TXs^m-9n|t`$yF3TFq*6n+LV& zyB-m?t^l)ncKS1yAC7%es?zq*&+CBj#56;12*y$-Y2|Eayzv##AVy%YJV)-Y#m|b- z6_SyWmUfUyZY%Jpu36{l_~a#&3P~iE%5zs^@0`JsYGwy62737!2;s$PL)$zRhSyse zTJi>7y_!G!B&dxD3xW#YkrxUs#S1SV;c!3OVe| hv9WjYwJ#^hN%3D7dGmFZ_kRKX%4MkPZ_1Xp{|^A7FGK(U literal 0 HcmV?d00001 diff --git a/ios/AppIcon57x57@2x.png b/ios/AppIcon57x57@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..17cfb33ab553c7ac7e121997990b0a653df45bfa GIT binary patch literal 42021 zcmeFZcT`l%5;qD+R3u9l5J@61gdr!%s6+!I^3hMYk%ND`2o1QbLhNfw4E>5wI7 z1|&1&9KY>3_nvbu_g>ds?|pB*f1JgH?&_-E``1;~)z!TTRZ~&8d7b(?8XDTohl;XK zfN%RBZ(MBPGioZ(3;4o=D{4ESq1_<;@kU2WPNhUc6W+6Ursb%mtRw=pwc&yo+Zvg0 zx!S;i)@W#AlCE$F)XKz>!N|nS0w&J5SyRu*U|}rIsL8L)tqhkjF}F~3w>Np}uJR1( zZUq%KW|Wk;F6Jr%2(U46gfO_;Si>AdT*VoGmn#DN{!tBLWca;_qm?+L)Q=7sw3O8t zWNhtC82GsaIHBAEf((MfTs-`Of?z=o23~F+eh@bwh>x3-mrn%DEdu6c_{WP;;yUn4 z%-+~kBl%Y~22*4_-nBP=Wo;^qbM@^S(#I33(zju2N) zn8V#ag#1&Etce5E-U9AuVGCpUAs1p~>*OfT$oQk9KVSd2FB|xu9l;#_fgOM%$Q1$y z@o;g2{u7fi^iLkRlfCutmu3tFnOK|Hn7|wz06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