Changeset 43
- Timestamp:
- Dec 10, 2004, 10:16:42 AM (20 years ago)
- Location:
- Swollen
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Swollen/doc/contract2_hours.txt
r14 r43 2 2 2nd Contract Hours 3 3 ------------------ 4 5 6 7 7 December, Wednesday (4 hours) 8 - new distro released 9 10 11 total = 105 hours (2.8 weeks) 12 subtotal = 7 hours 13 4 14 5 15 2 November, Tuesday (4 hours) -
Swollen/doc/contract2_priorities.txt
r36 r43 11 11 - Use per-vertex normals for reflection of light [4] 12 12 - Correct scaling and origin for datasets not centered at (0,0)? [3] 13 - Texture mapped topography [4]14 - Culling of triangles [5]13 - Texture mapped topography (currently fixed as bedslope.jpg) [4] 14 - Culling of triangles ('c' key to cycle through culling states) [5] 15 15 16 16 … … 25 25 COMPLETED: 26 26 27 - Ability to remove light source (it's in the way sometimes) [2] 27 - Ability to remove light source (it's in the way sometimes) (removed totally) [2] 28 - Movement restricted to within bounding sphere (sky now stays at fixed distance 29 from camera) [1] 30 - z-scaling to emphasize vertical details (via -scale command line parameter) [1] 31 28 32 29 33 … … 43 47 - steepcull dataset reveals steep angle cull problem 44 48 - dragging sww onto swollen (all in one directory) does not produce the same results as calling from command line 45 - Problems with Duncan's, Chris' and Stephen Roberts' machines at GA: Swollen won't render semi transparency. Swwiewer works fine. 49 - Problems with Duncan's, Chris' and Stephen Roberts' machines at GA: Swollen won't render semi transparency. 50 Swwviewer works fine. 46 51 47 52 … … 67 72 - Scene augmentation with OSG models [2] 68 73 - Optional contour lines of water surface [1] 69 - z-scaling to emphasize vertical details [1]70 74 - Optional height-dependent semi-transparent water surface [0] 71 75 … … 78 82 - Return to home view [2] 79 83 - Start up with a view sight from above rather than from the side [2] 80 - Movement restricted to within bounding sphere [1]81 84 - Command line parameters for culling, speed [1] 82 85 - Optional colour coding for momentum [0] (Superseded) -
Swollen/swollen/createSky.cpp
r6 r43 4 4 #include <osg/ShapeDrawable> 5 5 #include <osg/Texture2D> 6 #include <osg/Transform> 6 7 #include <osg/PolygonOffset> 7 8 #include <osgDB/Registry> 8 9 #include <osgDB/ReadFile> 10 #include <osgUtil/CullVisitor> 9 11 10 12 11 osg::Geode* createSky(float radius, char* filename) 13 class MoveHorizonWithEyePointTransform : public osg::Transform 14 { 15 16 public: 17 18 // Get the transformation matrix which moves from local coords to world coords 19 virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const 20 { 21 osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv); 22 if (cv) 23 { 24 osg::Vec3 eyePointLocal = cv->getEyeLocal(); 25 matrix.preMult(osg::Matrix::translate(eyePointLocal)); 26 } 27 return true; 28 } 29 30 // Get transformation matrix which moves from world coords to local coords 31 virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const 32 { 33 osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv); 34 if (cv) 35 { 36 osg::Vec3 eyePointLocal = cv->getEyeLocal(); 37 matrix.postMult(osg::Matrix::translate(-eyePointLocal)); 38 } 39 return true; 40 } 41 }; 42 43 44 45 osg::Transform* createSky(float radius, char* filename) 12 46 { 13 47 osg::Geode* geode = new osg::Geode; … … 24 58 stateset->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); 25 59 geom->setStateSet( stateset ); 26 60 27 61 geode->addDrawable(geom); 28 return geode; 62 63 osg::Transform* transform = new MoveHorizonWithEyePointTransform; 64 transform->setCullingActive(false); 65 transform->addChild(geode); 66 67 return transform; 29 68 } -
Swollen/swollen/main.cpp
r38 r43 24 24 25 25 // prototypes 26 osg:: Geode* createSky(float radius, char* filename);26 osg::Transform* createSky(float radius, char* filename); 27 27 28 28 -
Swollen/swollen/watersurface.cpp
r36 r43 21 21 #define DEF_WATER_COLOUR 0, 0, 0.5, 1 // R, G, B, Alpha (blue) 22 22 #define DEF_WATER_TRANSPARENCY 0.1 // 0=opaque, 1=transparent 23 #define DEF_ZOFFSET 0.0 123 #define DEF_ZOFFSET 0.00 24 24 25 25 // constructor … … 100 100 101 101 // vertical (z) offset to eliminate potential zbuffer problems with bedslope 102 for( unsigned int iv=0; iv < vertices.get()->size(); iv++ )103 vertices.get()->at(iv) += osg::Vec3f( 0.0, 0.0, _zoffset );102 //for( unsigned int iv=0; iv < vertices.get()->size(); iv++ ) 103 // vertices.get()->at(iv) += osg::Vec3f( 0.0, 0.0, _zoffset ); 104 104 105 105 _geom->setVertexArray( vertices.get() );
Note: See TracChangeset
for help on using the changeset viewer.