Robert Osfield
22dfe6f8d1
From John Ivar Haugland and Michael Platings,
...
JIV:"I deleted a line from the ReaderWriterDAE.cpp file that was introduced in rev 11341. I got a crash on this line when the options pointer was NULL."
MP:"Good spot John. The next line is also unnecessary and can be removed as well (attached, plus some minor code beautifying)"
2010-04-28 20:10:53 +00:00
Robert Osfield
fccda08491
Added corner dirty options to TerrainTechnique, added experimental code paths in GeometryTechnique for accounting for neighbouring corner tiles - optionally compiled out in this check-in.
...
Changed the normal computation in GeometryTechnique so that it doesn't include diagonals, thus avoid normal jumps at corners.
2010-04-09 08:52:40 +00:00
Robert Osfield
c6c26d5d44
Change Terrain so that it subclassed from CoordinateSystemNode.
...
Implemented new update scheme of GeometryTechnique to avoid potential threading issues.
Added Terrain support to .ive.
2010-04-03 16:21:34 +00:00
Robert Osfield
a8bbf0a809
Added support for boundary equalization to GeometryTechnique
2010-04-01 21:06:56 +00:00
Robert Osfield
304214e0df
Introduced the use of linear interpolation of evelvations when sampling
2010-03-25 11:11:35 +00:00
Robert Osfield
5612a4640f
Added a minimum tiles size of 16 to prevent down sampling from being overly aggressive.
2010-03-19 17:09:30 +00:00
Robert Osfield
1590f6be3b
Added in a test of using the utility classes in include/osgUtil/MeshOptimizers to see if they could improve peformance.
...
Tests shown poorer performance with the code enabled so for now the code is #if 0 #endif'd out, and just left in place for future testing.
2010-03-18 15:04:27 +00:00
Robert Osfield
c4e82f0221
Added BlendingPolicy support into osgTerrain::Terrain.
2010-03-16 18:43:59 +00:00
Robert Osfield
1537af6235
Added osgTerrain::TerrainTile::set/getBlendingPolicy(BlendingPolicy) to enable control over whether the tile should have blending enabled on it.
2010-03-16 12:05:41 +00:00
Robert Osfield
f17e401347
Convert NOTIFY to OSG_NOTIFY to avoid problems with polution of users apps with the NOTIFY macro
2010-02-10 12:44:59 +00:00
Robert Osfield
8d8037ee12
Converted osg::notify usage to NOTIFY
2010-02-09 18:24:37 +00:00
Robert Osfield
5cd4faf05b
From Jason Beverage, "I posted a question on osg users about resources not being properly released when using osgTerrain databases and multiple viewers are used a few weeks ago and I've found that at least part of the problem comes down to the fact that the nodes that are traversed by the GeometryTechnique are never actually added to the scene graph, and thus don't have releaseGLObjects called on them. I'm submitting a few changes that takes care of this by allowing the TerrainTechnique to provide a releaseGLObjects implementation. I've applied these changes in osgEarth and this example program no longer crashes on the second run, although I get corrupt geometry (see attached shot) which could be down to a driver issue. If I increment the context ID for the second viewer, I no longer get the corrupt geometry.
...
The attached changes are against OpenSceneGraph 2.8.2.
//Sample program. Run against an osgEarth or VPB database based on osgTerrain.
#include <osgDB/ReadFile>
#include <osgViewer/Viewer>
int main(int argc, char** argv)
{
osg::ArgumentParser arguments(&argc,argv);
osgViewer::Viewer* viewer = new osgViewer::Viewer();
viewer->setUpViewInWindow(100,
100,500,500);
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
viewer->setSceneData( loadedModel.get() );
viewer->run();
delete viewer;
viewer = new osgViewer::Viewer();
viewer->setUpViewInWindow(100,100,500,500);
loadedModel = osgDB::readNodeFiles(arguments);
viewer->setSceneData( loadedModel.get() );
viewer->run();
delete viewer;
}"
2009-11-20 11:08:40 +00:00
Robert Osfield
79f780d4b8
Fixed the compute of the extents/bounding sphere
2009-08-27 19:25:23 +00:00
Robert Osfield
9ea43a31c6
From Ross Anderson, "Symptom: The computation of TerrainTiles containing only image layers (no elevation layer) is incorrect. The resulting bounding sphere will always have a radius of zero.
...
The fix is to remove the call to bs.expandBy(v) and compute the radius directly. I believe this call was intended to be bs.expandRadiusBy(v), but it is superfluous when the radius is computed directly."
2009-05-18 12:54:23 +00:00
Robert Osfield
cff4e3437a
Added disabling of mipmapping for non power of two textures
2009-04-06 12:28:02 +00:00
Robert Osfield
9852c299d5
Added check against null colour layer to prevent a crash when a null colour layer is assigned
2009-04-06 11:22:31 +00:00
Robert Osfield
c27729a3bd
Displayed display lists to prevent frame drops when compiling large geometry tiles
2009-04-03 10:47:59 +00:00
Robert Osfield
20ad246896
Added new virtual reseveElements, setElement, getElment and addElement methods to DrawElements
...
to make is easier to write code that can work on DrawElementUByte, UShort or UInt.
Changed the osgTerrain::GeometryTechnique so that it automatically chooses
the use of DrawElementUShort or DrawElementsUInt accordining to the size of the tile.
2009-03-25 11:17:21 +00:00
Robert Osfield
39cecd2a72
From Philip Lowman, "Here's the promised cleanup of the OSG's CMakeLists.txt files for the src/ folder. I'll submit the others separately.
...
Also, there was also a small bug in osgDB's CMakeLists.txt that was causing an error when I tested with CMake 2.4.4.
IF(${OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX} STREQUAL "quicktime")
was changed to
IF(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX STREQUAL "quicktime")
"
2009-03-23 16:01:02 +00:00
Robert Osfield
f3166c2d96
From Sherman Wilcox, added VS versioning information into libs
2009-02-05 14:55:17 +00:00
Robert Osfield
2e58416826
Added exports, and moved constructors into .cpp.
2009-02-05 14:54:42 +00:00
Robert Osfield
2d55740b3e
Refactored osg::TransferFunction1D to use an std::map internally which is kept in sync with the actual osg::Image that is passed to the GPU.
...
Added .osg support for osg::TransferFunction1D.
Updated wrappers
2009-02-02 14:43:27 +00:00
Robert Osfield
cedffd3adb
Introduced osgVolume::Layer and Locator classes mirrroring similar classes in osgTerrain.
2009-01-05 11:26:26 +00:00
Robert Osfield
4ad20a413a
Fixed warnings
2008-12-18 11:06:57 +00:00
Robert Osfield
a5c32da4ff
Warning fixes
2008-12-17 11:00:16 +00:00
Robert Osfield
3ce53b56c7
Added support for a Terrain::s/getTerrainTechniquePrototype()
2008-12-15 22:18:40 +00:00
Robert Osfield
10186190f6
Introduced support for controlling mipmapping of osgTerrain::ImageLayer and compression of osgTerrain::HeightFieldLayer.
2008-10-20 08:43:25 +00:00
Robert Osfield
9cce90e920
From Glenn Waldron, "osgTerrain::Locator::setTransformAsExtents() does not update the _inverse member. Fix attached.
...
"
2008-10-06 09:39:43 +00:00
Robert Osfield
5fe30854dd
From Jason Beverage, "Attached is a fix for getTile in the Terrain class. It should be checking for itr == _terrainTileMap.end() instead of itr != _terrainTileMap.end()."
2008-10-06 08:48:44 +00:00
Robert Osfield
e1930d127e
Refinements to SwitchLayer and WhiteListTileLoadedCallback
2008-09-11 14:28:42 +00:00
Robert Osfield
2be243deda
Added support for SwitchLayer into GeometryTechnique
2008-09-11 14:27:50 +00:00
Robert Osfield
ff299eb104
Introduced osgTerrain::WhiteListTileLoadedCallback for the management of options terrain layers
2008-09-11 13:21:58 +00:00
Robert Osfield
b4b5b5ea41
Introduced TerrainTile::TileLoadedCallback
2008-09-10 18:11:54 +00:00
Robert Osfield
bc747b0935
Added CompositeLayer::addLayer(setname,filename) convinience function
2008-08-29 09:28:28 +00:00
Robert Osfield
ed617f87df
Introduce the concept of layer set name, using the osg::Object::s/getName() to store
...
the setname, and using a compound string (set:setname:filename) in place of standard filename when reading and writing
files.
2008-08-28 16:15:57 +00:00
Robert Osfield
95a359bdab
Introduced SwitchLayer which will form the basis of provided support for varients
2008-08-27 10:13:30 +00:00
Robert Osfield
d05236bfb4
Implemented intial KdTree triangle intersection code, but without culling implemented
2008-07-07 13:21:37 +00:00
Robert Osfield
c4e8d6ee42
Changed the DatabasePager so that it bypasses the Registry::readNode() method and calls
...
readNodeImplementation() directly to avoid calling the KdTreeBuilder.
Updated wrappers.
2008-07-06 18:27:10 +00:00
Robert Osfield
44d144997e
Added prelimnary KdTree data structure and automatic kdtree build support
...
into osgDB::Registry/osgTerrain so that newly created subgraphs can have
KdTree built on all osg::Geometry automatically on load/creation.
2008-07-04 15:57:48 +00:00
Robert Osfield
4d60d73eca
Reorginized the TerrainTile/TerrainTechnique dirty mechanism so that TerrainTile
...
now holds the dirty flag and enables/disables event traversal in response dirty
being set/unset. This allows terrain to be automatically updated in response
to Terrain scale and sample ratio changes.
2008-05-27 15:30:20 +00:00
Robert Osfield
1519d0d546
From John Vidar Larring, "Added vertical scale as a property of osgTerrain::Terrain. Lets you configure vertical scale when initializing the terrain model. E.g:
...
osgTerrain::Terrain* terrain = findTopMostNodeOfType<osgTerrain::Terrain>(model.get());
if (!terrain)
{
terrain = new osgTerrain::Terrain;
terrain->addChild(model.get());
terrain->setVerticalScale(2.0f);
model = terrain;
}
viewerWindow->setSceneData(model.get());
"
2008-05-27 13:11:47 +00:00
Robert Osfield
e70d44e6a5
Added cast to avoid warning
2008-04-25 08:34:54 +00:00
Robert Osfield
78964b4baa
Reverted the changes for ill fated tweaks for Apple build
2008-04-24 11:34:43 +00:00
Robert Osfield
8ae30c9bfc
Refactored the inclusion of the headers in the ADD_LIBRARY so that they aren't
...
added under OSX.
2008-04-23 20:50:53 +00:00
Robert Osfield
5c08b0ccb0
Added return.
2008-04-22 14:31:30 +00:00
Robert Osfield
234bfeb648
Removed hardware down sampling hack from GeoemtryTechnique and replaced with Terrain::g/setSampleRatio()
...
usage.
2008-04-22 11:39:47 +00:00
Robert Osfield
960e0bd378
Set Texture::setMaxAnisotropy() to 16.0f for better quality terrain when looking at shallow angle.
2008-03-28 18:42:03 +00:00
Robert Osfield
3f81a994b7
Introduced mutex into Terrain node to manage the tile system data structures
2008-03-28 15:31:46 +00:00
Robert Osfield
2567b810cf
Removed TileSystem class, and added support for TerrainTile's automatically
...
registering and unregistering themseles with the enclosing Terrain node.
2008-03-27 13:21:36 +00:00
Robert Osfield
6396a156a2
Renamed osgTerrain::TerrainSystem to osgTerrain::Terrain
2008-03-27 11:55:03 +00:00
Robert Osfield
35c5bd2c92
Renamed Terrain to TerrainTile
2008-03-27 10:55:39 +00:00
Robert Osfield
a9d283ca73
Introduce TerrainSystem node which decorates a complete terrain model made up of Terrain tiles.
2008-03-26 20:06:54 +00:00
Robert Osfield
600dbf5470
Added sampling down to 32x32 mesh for 64x64 height fields as a workaround to
...
memory consumption issues with high res whole earth paged databases.
2008-03-24 18:06:40 +00:00
Robert Osfield
67f1503c7d
Refactored osgTerrain so that the interface for setting up layer is more straight forward, and added support into GeometryTechnique for handling multiple layers
2008-02-22 11:52:23 +00:00
Robert Osfield
6516bf4910
Added TextureUnit entry to osg::TransferFunction and osgTerrain::Layer
2008-02-20 12:34:13 +00:00
Robert Osfield
4163f173a0
Added missing checks for null pointers
2008-01-22 10:28:48 +00:00
Robert Osfield
5e9c708582
Added use of ref_ptr<> throughout geometry setup code to prevent memory leaks
2008-01-19 18:25:45 +00:00
Robert Osfield
d2aaa26c88
Disabled the default enabling of update traversal on osgTerrain::Terrain as this was preventing PagedLOD subgraphs from expiring inactive subgraphs
2008-01-19 13:31:12 +00:00
Robert Osfield
574582f206
Added support for rendering skirts into osgTerrain::GeometryTechinque
2008-01-18 16:36:05 +00:00
Robert Osfield
bb7ba24f59
Commented out debug message
2008-01-17 22:26:29 +00:00
Robert Osfield
fc85978077
Added computation of skirt height for osgTerrain::Terrain height fields.
2008-01-17 22:25:41 +00:00
Robert Osfield
bc6c7fcece
Added call to ClusterCullingCallback to determine if the Terrain node is culled
...
by cluster culling.
2008-01-17 17:10:12 +00:00
Robert Osfield
efdc026114
Fixed the computation of terrain bounding volume so that it properly accounts for
...
elevation layers
2008-01-17 15:37:35 +00:00
Robert Osfield
ae33e4a459
Changed the Texture clamp mode to CLAMP_TO_EDGE
2008-01-16 15:05:04 +00:00
Robert Osfield
828851c08a
Refactor osgTerrain::ProxyLayer so that it is now a pure Proxy, defering implementations
...
to an Implementation rather than a subclass of ProxyLayer. Updating the osgTerrain and GDAL plugins
to comply with this refactor.
2008-01-14 14:53:49 +00:00
Robert Osfield
a46eb79311
Indentation/bracket fixes and change of default size
2008-01-09 21:17:10 +00:00
Robert Osfield
2cab28c3b8
Added support for min to max level ranges for Layers in support of VirtualPlanetBuilder usage of this.
2007-12-20 15:51:13 +00:00
Robert Osfield
f7e91fa28e
Added Locator::s/getTransformScaledByResolution(bool) to assist with VPB integration
2007-12-13 17:51:43 +00:00
Robert Osfield
f4afa427a7
From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)."
2007-12-10 17:30:18 +00:00
Robert Osfield
8e7e6529be
From David Callu, warning fixes
2007-09-07 15:03:56 +00:00
Robert Osfield
9704ded891
From Maria Ten, fix lat/long usage.
2007-09-07 09:53:40 +00:00
Robert Osfield
92b1e7d53f
Changed tabs to four spaces to make merges more straight forward
2007-09-05 17:03:43 +00:00
Robert Osfield
a2447d493c
Added option to Locator to help specify here the locator value was defined from.
...
Update wrappers and Gdal plugin to use this new parameter
2007-09-05 14:15:55 +00:00
Robert Osfield
f4d2d1241d
Further work on osgTerrain::Locator and GDAL plugin
2007-08-30 19:26:52 +00:00
Robert Osfield
9a9ffbe229
Further work on new ProxyLayer
2007-08-29 16:29:05 +00:00
Robert Osfield
2f895b839e
Added ProxyLayer support into osgTerrain plugin
2007-08-29 12:18:41 +00:00
Robert Osfield
5b1b648ef5
Replaced CartesianLocator and EllipsoidLocator by a single general purpose
...
Locator class
2007-08-27 16:59:51 +00:00
Robert Osfield
f9ab446512
Changed debug comments to output to notify level and tweaked the handling of the .terrain file.
2007-08-24 19:16:35 +00:00
Robert Osfield
a981202953
Set the debug out to info notification level
2007-08-24 16:16:08 +00:00
Robert Osfield
c1dc079f56
Added missing clear() implementation
2007-08-21 09:32:16 +00:00
Robert Osfield
ffc8123a73
Changed the tolower of the file extension into the plugin name construction code.
...
Added support for CompositeLayer.
2007-08-16 18:49:46 +00:00
Robert Osfield
3c82058c68
Updated wrappers
2007-08-16 15:29:50 +00:00
Robert Osfield
2f41234793
From Maria Ten, "I divide the init method of the
...
geometrytechnique in submethods to made more easy the inheritance
between the user and osg-class. This is a first step to add more
functions in osgTerrain. Maybe the subdivision of the method have to
be in the terraintechnique because is the base class of
GeometryTechnique. If Robert or anyone think that this is better i
change this class too."
2007-08-16 14:13:10 +00:00
Robert Osfield
1049bd2939
Updated CMakeLists.txt to reflect renaming of TerrainNode.
2007-08-07 22:31:43 +00:00
Robert Osfield
1c6193ba78
Renamed osgTerrain::TerrainNode to osgTerrain::Terrain and introduced basic
...
.osg read support for osgTerrain::Terrain.
2007-08-07 19:53:57 +00:00
Robert Osfield
6b4e2fbdf2
From Alexandre Amalric, Fox example
...
From Robert Osfield, CMake build support for FOX example
2007-07-24 14:02:53 +00:00
Robert Osfield
5ec2969330
Added setting of ThreadSafeRefUnref to true.
2007-07-18 16:48:25 +00:00
Robert Osfield
51e07f1e66
Added traverse method implementation into GeometryTechnique.
2007-07-17 17:36:44 +00:00
Robert Osfield
03749d5e34
Removed redundent TerrainGeometry classes, and adding double buffer of
...
internal data within GeometryTechinque in prep for support multi-threaded
set up and rendering of terrain.
2007-07-12 20:12:38 +00:00
Robert Osfield
ecf0b58a19
Renamed include/osg/OperationsThread to OperationThread.
...
Created a new GraphicsThread subclass from OperationThread which allows the
GraphicsContext specific calls to be moved out of the base OperationThread class.
Updated the rest of the OSG to respect these changes.
2007-07-12 15:54:45 +00:00
Robert Osfield
691a49d0fa
From Paul Melis, fixes to spelling mistakes/typos.
2007-07-11 15:51:17 +00:00
Robert Osfield
2b84aa7760
Added dirty count support to osgTerrain::Layer clases.
...
Added LayerHandler to osgterrain example that modifies the layers in
response to pressing the 's' and 'q' keys
2007-07-06 16:47:08 +00:00
Robert Osfield
601217025f
Improved the mapping of update and cull traversal
2007-07-05 18:30:20 +00:00
Robert Osfield
9f72c9392e
Added code of support for contouring shaders
2007-06-20 12:00:29 +00:00
Robert Osfield
d4309ce69a
Added use of GLSL filters
2007-06-18 12:10:46 +00:00
Robert Osfield
b92ebca928
From Maria Ten, "The constructor method of the EllipsoidLocator of osgTerrain assumes
...
that the terrain is always the Earth planet. I changed the constructor
method to accept the Equator radius and the Polar radius like
parameters. By default, it assumes the Earth radius for the
EllipsoidLocator. I added a setEllipsoidModel method, too.
Now, we are developing some libraries for a GIS applicacion, and our
libraries can visualize terrains of planets like Mars. I think that is
a interesting change."
2007-06-01 21:33:29 +00:00
Robert Osfield
b97d8c0fe0
Added TerrainNode::init() and s/getTreatBoundariesToValidDataAsDefaultValue flag.
2007-05-13 09:54:51 +00:00
Robert Osfield
acb2ed177c
Added ValidDataOperator base class and NoDataValue and ValidRange subclasses, and
...
support for it in osgTerrain::Layer and GeometryTechniqnue.
2007-05-11 18:25:06 +00:00
Robert Osfield
8c7b5b5865
Added supoort for transforming layers by an offset and scale
2007-05-10 18:07:54 +00:00
Robert Osfield
3fd26eec28
Added automatic detection of alpha values, switching on blending when alpah!=1.0
2007-05-10 12:49:09 +00:00