Changeset 112
- Timestamp:
- Jul 30, 2010, 10:08:44 PM (14 years ago)
- Location:
- osgVisual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/include/sky_Silverlining/skySilverLining_ProjectionMatrixCallback.h
r107 r112 99 99 //OSG_NOTIFY( osg::ALWAYS ) << "znear: " << znear << ", zfar: " << zfar << std::endl; 100 100 101 if (skyDrawable .valid())101 if (skyDrawable) 102 102 { 103 103 skyDrawable->setSkyboxSize(((zfar - znear) * 0.5 + znear) * 2.0); … … 124 124 //OSG_NOTIFY( osg::ALWAYS ) << "znear: " << znear << ", zfar: " << zfar << std::endl; 125 125 126 if (skyDrawable .valid())126 if (skyDrawable) 127 127 { 128 128 skyDrawable->setSkyboxSize(((zfar - znear) * 0.5 + znear) * 2.0); … … 222 222 //clamp the near plane if low above ground. 223 223 double x,y,z,hat; 224 util::getXYZofCamera( camera.get(), x, y, z );225 if( util::queryHeightAboveTerrainInWorld( hat, csn .get(), x, y, z ) )224 util::getXYZofCamera( camera, x, y, z ); 225 if( util::queryHeightAboveTerrainInWorld( hat, csn, x, y, z ) ) 226 226 { 227 227 if (hat < 80 ) … … 238 238 near_ = 2; 239 239 far_ = 125000; 240 util::getXYZofCamera( camera .get(), x, y, z );241 if( util::queryHeightAboveTerrainInWorld( hat, csn .get(), x, y, z ) )240 util::getXYZofCamera( camera, x, y, z ); 241 if( util::queryHeightAboveTerrainInWorld( hat, csn, x, y, z ) ) 242 242 { 243 243 osg::Vec2 planesNearFar; … … 263 263 /** 264 264 * Pointer to silverlinings atmosphere instance. 265 * It has to be a pure C++ Pointer, because SilverLining::athmosphere is not derived from osg/Referenced266 265 */ 267 266 SilverLining::Atmosphere *atmosphere; … … 270 269 * Pointer to the camera on which the callback is installed 271 270 */ 272 osg::observer_ptr<osg::Camera>camera;271 osg::Camera *camera; 273 272 274 273 /** 275 274 * Pointer to the skyDrawable 276 275 */ 277 osg::observer_ptr<skySilverLining_skyDrawable>skyDrawable;276 skySilverLining_skyDrawable *skyDrawable; 278 277 279 278 /** … … 281 280 * @todo: wofür ist diese variable nötig? 282 281 */ 283 osg:: observer_ptr<osg::CoordinateSystemNode>csn;282 osg::CoordinateSystemNode *csn; 284 283 285 284 -
osgVisual/src/core/visual_core.cpp
r89 r112 296 296 //testObj->addUpdater( new object_updater(testObj) ); 297 297 298 osg::ref_ptr<visual_object> testObj2 = new visual_object( rootNode, " cessna" ); // todo memleak298 osg::ref_ptr<visual_object> testObj2 = new visual_object( rootNode, "neuschwanstein" ); // todo memleak 299 299 //testObj2->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 600 ); 300 testObj2->setNewPosition( osg::DegreesToRadians( 50.8123), osg::DegreesToRadians(8.94088), 600 );301 testObj2->loadGeometry( "../models/ cessna.osg" );302 testObj2->addUpdater( new object_updater(testObj2) ); // todo memleak300 testObj2->setNewPosition( osg::DegreesToRadians(47.557523564234), osg::DegreesToRadians(10.749646398595), 950 ); 301 testObj2->loadGeometry( "../models/neuschwanstein.osgb" ); 302 //testObj2->addUpdater( new object_updater(testObj2) ); // todo memleak 303 303 304 304 osg::ref_ptr<visual_object> testObj3 = new visual_object( rootNode, "SAENGER1" ); // todo memleak … … 323 323 // Manipulatoren auf dieses Objekt binden (Primärobjekt) 324 324 if (objectMountedCameraManip.valid()) 325 objectMountedCameraManip->setAttachedObject( testObj 4);325 objectMountedCameraManip->setAttachedObject( testObj2 ); 326 326 if (mouseTrackerManip.valid()) 327 327 { 328 mouseTrackerManip->setTrackNode( testObj 4->getGeometry() );328 mouseTrackerManip->setTrackNode( testObj2->getGeometry() ); 329 329 mouseTrackerManip->setMinimumDistance( 100 ); 330 330 }
Note: See TracChangeset
for help on using the changeset viewer.