Commit Graph

7993 Commits

Author SHA1 Message Date
Robert Osfield
7be3d1ae02 Reordered KdLeaf/KdNode so that the first element to be accessed is first in the data structure 2008-07-09 19:41:36 +00:00
Robert Osfield
c41ca3d6a0 Introduced code for doing dummy test traversals - used for benchmarking KdTree code. 2008-07-09 19:40:10 +00:00
Robert Osfield
15e5bdbcae Added range of camera manipulators and a center of screen test intersection that
is insticated by pressing 'c' key
2008-07-09 19:28:00 +00:00
Robert Osfield
cbf5429c19 Introduce a intersecion performance testing code path, #if def'd out for now. 2008-07-09 19:26:40 +00:00
Robert Osfield
a00f94ac18 Updated wrappers 2008-07-09 12:37:59 +00:00
Robert Osfield
ee9b23f670 Fixed set method 2008-07-08 18:02:09 +00:00
Robert Osfield
2851429333 Added optional control of whether to use KdTrees for intersections 2008-07-08 17:35:10 +00:00
Robert Osfield
134c86c2d5 Implement hierachy culling in KdTree::intersect(..) 2008-07-07 20:27:56 +00:00
Robert Osfield
f1db402f2b Improved the handling of KdTree intersections 2008-07-07 14:27:58 +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
e8487b8830 Added KdTreeBuilder calls into FindCompileableGLObjectsVisitor, and an alternative
path that explictly calls the KdTreeBuilde when required in cases when no pre compile of GL objects is required.
2008-07-07 10:46:22 +00:00
Robert Osfield
682be50e2a Changed types to avoid warnings under Windows 2008-07-07 09:40:30 +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
3965fe357b Moved KdTree build code into osg::KdTree 2008-07-06 12:14:19 +00:00
Robert Osfield
10595e49e3 Added handling of co-incident start and end points. 2008-07-05 17:29:07 +00:00
Robert Osfield
9a9c543ffa Ported intersection code to use new osgUtil::LineSegmentIntersector/IntersectionVisitor. 2008-07-05 16:39:28 +00:00
Robert Osfield
e70e3a6d5d Converted TerrainManipulator to use osgUtil::InterectionVisitor rather than the
old IntersectVisitor
2008-07-04 19:16:19 +00:00
Robert Osfield
db57d2504e Added KdTree intersection support into LineSegmentIntersector 2008-07-04 17:02:02 +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
bc1032653c Moved vertex indicies method into a single block with deprecated doc lines 2008-07-04 11:51:55 +00:00
Robert Osfield
e2ae39c8f6 Introduced bounding boxes to KDLeaf and KDNode structs 2008-07-03 17:18:14 +00:00
Robert Osfield
178d6ff423 Added new data structure + build algorithm that places triangles into leaves
without being shared, but with varying the boundaries of leaves so that they
may overlap.
2008-07-03 15:49:28 +00:00
Robert Osfield
3f025bec5d From Mario Valle, "xed the following warning on Linux 64 bits Athlon:
/users/mvalle/OSG/OpenSceneGraph/src/osg/BufferObject.cpp: In member function `virtual void osg::ElementBufferObject::compileBuffer(osg::State&) const':
/users/mvalle/OSG/OpenSceneGraph/src/osg/BufferObject.cpp:600: warning: cast to pointer from integer of different size"
2008-07-03 15:01:04 +00:00
Robert Osfield
14c86a5389 From Mario Valle, removed extraneous spaces 2008-07-03 14:59:07 +00:00
Robert Osfield
7db303b16b Added header guards 2008-07-03 11:23:44 +00:00
Robert Osfield
f0defbd824 Refactored example so that the example will be able to run different kdtree data strucutres/algorithms. 2008-07-03 11:22:23 +00:00
Robert Osfield
d62a4ef6d0 From Eric Sokolowsky, "The check for Leopard to build 4-way binaries by default was broken. Here is an updated CMakeLists.txt file to fix the problem." 2008-07-03 11:07:59 +00:00
Robert Osfield
1729ec0819 Implement an experiemental triangle kdtree building support 2008-07-03 10:24:20 +00:00
Robert Osfield
45d5376503 Set the DataVariance on FadeText to DYNAMIC to reflect their nature 2008-07-03 10:03:06 +00:00
Robert Osfield
a65b74d287 Updated wrappers 2008-07-02 10:00:09 +00:00
Robert Osfield
201522feb3 Introduced support for UNSCPECIFIED and STATIC DataVariance of StateSet/Textures 2008-07-02 09:25:08 +00:00
Robert Osfield
aa593fcd2d From Colin McDonald, "There is a problem reading bmp files containing a colour palette,
due to an incorrect scan line length calculation.  Attached is a fix,
and a little bmp file which demonstrates the problem."
2008-07-01 19:04:29 +00:00
Robert Osfield
dba344feba From Lilin Xiong, "I change ive plugin a little for osgText inout, so the ive plugin supports backdrop setting,
and Text3D, FadeText inout :

1. in DataInputStream.cpp, add 1286--1293 lines;
2. in Text.cpp, add some code for text's Backdrop setting;
3. in IveVersion.h, add line 39,  increase the VERSION to VERSION_028(line 41)
4. in ReadWrite.h,  add line 146,147
5. add file FadeText.h, FadeText.cpp, Text3D.h, Text3D.cpp."
2008-07-01 18:37:13 +00:00
Robert Osfield
82ed445a31 Added Vec3Array arrange pointer to avoid dynamic cast 2008-07-01 13:56:02 +00:00
Robert Osfield
c6ba70e3ad From Mathias Froehlich, "It appears not to be sufficient to set a cmake variable to get a define in
such a config file. Instead set that variable to 1. Also included a small compile fix, that appears to be required  than ..."
2008-07-01 09:40:06 +00:00
Robert Osfield
bec0fc9c32 Added guards against FBO not being supported/setup 2008-06-30 16:53:06 +00:00
Robert Osfield
55ea6e5e23 Updated README date for 2.5.3 dev release 2008-06-29 13:41:07 +00:00
Robert Osfield
5e0169f664 Changed the Optimizer::StateVisitor so that it can individually decide whether
to optimize away duplicate state with dynamic, static and unspecified DataVarience.  By default
the code now optimizes away duplicate state with either static and unspecied state, previously 
it was just handling static state.
2008-06-29 12:22:50 +00:00
Robert Osfield
8820d0bb1d Added realize of new graphics contexts to handle new views being added with
unrealized windows
2008-06-28 16:59:26 +00:00
Robert Osfield
fec2a8fabe Changed back to use an std::vector<> rather than a std::list for RequestQueue to
avoid member template problems under Solaris.
2008-06-27 19:40:52 +00:00
Robert Osfield
a9b05e0815 Refactored the sort of the requestQueue so that there is single code path for doing the sort. 2008-06-27 18:59:27 +00:00
Robert Osfield
214491dd94 From Mathias Froehlich, "Update to the configure check for msvc 7.1.
MemoryBarrier() is used in the implementation, so it should be checked.
This in effect disables the faster atomic ops on msvc 7.1 and older, even if
only the MemoryBarrier() call is missing. But it ensures for the fist cut
that it will build everywhere. If somebody cares for msvc 7.1 enough and has
one for testing installed, he might provide the apropriate defines to guard
that MemoryBarrier() call.

I tested that msvc8 32/64bit still passes the configure tests and compiles.
"
2008-06-27 16:47:43 +00:00
Robert Osfield
1057d74a11 Simplified the MixinVector class so that it no longer supports custom allocators,
instead just uses std::vector<>'s default allocators.
2008-06-27 12:44:41 +00:00
Robert Osfield
34f58482e6 Moved the apply(&) default implementations from the header into the NodeVisitor.cpp,
and changed the casts to use static_cast<>.
2008-06-27 12:35:56 +00:00
Stephan Maximilian HUBER
46931464ef from Stephan Huber: updated XCode project 2008-06-27 11:47:06 +00:00
Robert Osfield
9a80c331a2 From Andre Normann, "with version 8504, I am not able to compile osgwrappers under Windows, because there are some DLL export macros missing. I fixed it and put the files in the attached zip file.
"
2008-06-27 10:17:38 +00:00
Robert Osfield
1a8017fecf Updated authors and osgversion 2008-06-26 19:51:24 +00:00
Robert Osfield
1b433f808b Updated ChangeLog 2008-06-26 19:47:00 +00:00
Robert Osfield
6d53566654 Updated wrappers 2008-06-26 19:21:54 +00:00
Robert Osfield
8dc1143263 From Paul Martz, "The method IntersectionVisitor::apply(osg::PagedLOD&) appears to attempt to identify a "highest res" child of the PagedLOD and only allow intersection on that child. The implementation appears to be flawed in two cases:
1) The "highest res" child is assumed to be the child with index "getNumFileNames()-1" or "getNumChildren()-1". As a result, PagedLODs that do not sort children from furthest to nearest will intersect with the wrong child. (see attached "case1.osg" to reproduce this problem.)
 
2) The code assumes there is only one highest res child. As a result. PagedLODs with multiple children at the same highest res range can only intersect one of those children. ("case2.osg" demonstrates this issue; you can only pick the quad on the right.)
 
I've attached a modified IntersectionVisitor.cpp that attempts to resolve these issues. It identifies a highest res range based on the range mode, then continues traversal on all valid children corresponding to that range description. Only in the case of a malformed PagedLOD does the code fall back to getting the last child in the list.
 "
2008-06-26 18:34:01 +00:00