Commit Graph

187 Commits

Author SHA1 Message Date
Robert Osfield
2166f9b701 Fixes to the Impostor implementation. 2003-04-09 21:53:09 +00:00
Robert Osfield
48868982f1 Added a traverseGeode method to the UpdateVisitor which contains the
traversal code for both the nodes traversal and the drawables the geode
contains.
2003-03-22 09:48:43 +00:00
Robert Osfield
e87a08f1c3 Fixes to osgcluster demo as new Producer based example.
Added extra pragrma remove a warning about float to int cast under VS.NET.
2003-03-16 21:58:27 +00:00
Robert Osfield
fbe674b321 First cut of new osgText implementation. 2003-03-02 21:05:05 +00:00
Robert Osfield
c2b4a05825 Minor fixes to ReaderWriter and Paragraph to help work with use of Doxygen.
Fix to CullVisior to handle the new no referenced counted cull and draw traversal.
2003-02-10 13:58:39 +00:00
Robert Osfield
6c4f2f5207 Fixes for multipipe support.
Addition of FrameStatsHandler to osgproducer demo to add frame stats.
2003-01-29 17:16:26 +00:00
Robert Osfield
329a8a1656 Fixed an Optimizer crash where if the top most node of a model was
a static transform it would crash when this root was deleted.  Have fixed
by recognising this node as one not to remove and set it to identity instead.
2003-01-22 12:06:22 +00:00
Robert Osfield
48bda9cc79 Added new Copyright/License notice to header and source files. 2003-01-21 16:45:36 +00:00
Robert Osfield
f36bc69c58 Made the more of the OSG's referenced object desctructors protected to ensure
that they arn't created on the stack inappropriately.

Split the implemention of Matrix up so that it is a simple no referenced counted
class and can be safefly created on the stack.  To support referenced counting a
seperate subclass now exists, this is RefMatrix which inherits from both Matrix and
Object.
2003-01-10 09:25:42 +00:00
Robert Osfield
e6b64a5550 Added support for sharing arrays in the .osg format for osg::Geometry.
Fixed the osgUtil::Optimizater so it takes into account sharing of arrays when
deciding whether an geometry can be merged or not.
2003-01-07 16:29:07 +00:00
Robert Osfield
adf5c91808 Renamed all instance of AppCallback/AppVisitor to UpdateCallback/UpdateVisitor
inline with the decision to rename the "app phase" the "update phase".
2002-12-19 15:55:40 +00:00
Robert Osfield
ee3348afc9 Added txp::TerrapageNode to the txp plugin, and implemented the node so that it
automatically assign handles the updates of eye points and database merges.
2002-12-17 15:41:05 +00:00
Robert Osfield
00cc3a1833 Converted the instance of osgNew and osgDelete back to new and delete as part
of depecating the include/osg/MemoryManager
2002-12-16 13:40:58 +00:00
Don BURNS
b63827c5d9 Cleanin' up after Robert's spelling ...er ... challenges. 2002-12-07 06:59:08 +00:00
Robert Osfield
1be82ec697 From Tree, mods to help support the creation of Java bindings. 2002-12-06 09:44:11 +00:00
Robert Osfield
8e84722f90 Added LEFT_EYE and RIGHT_EYE stereo to osg::DisplaySettings/osgUtil::SceneView
Renamed LODBias to LODScale.
2002-11-12 10:22:38 +00:00
Robert Osfield
9816a51bc7 Added GL_LIBS to the osgText/Makefile for OSX build.
Fixed typo in IntersectVisitor.

Fixed warnings in osgimpsotor demo.
2002-11-08 11:00:16 +00:00
Robert Osfield
f5f20e4ac1 Fix from Don Tidrow for bug when moving between RenderGraph when popping back
up to common parents.
2002-10-23 07:46:11 +00:00
Robert Osfield
e1b084749e Renamed the RenderBin::sort_local to sortImplementation(),
draw_local to drawImplementation() and added a new RenderBin::DrawCallback().

Added osgcubemap to the Make/ test scripts.
2002-10-17 13:48:46 +00:00
Robert Osfield
50652f389b Added Macro's new cube map generation classes and osgcubemap demo. 2002-10-10 12:44:38 +00:00
Robert Osfield
70861ef70e Converted osg::LOD from used n+1 successive ranges to n min/max ranges,
one min/max pair per child. Converted the rest of the OSG to use the new
osg::LOD node.
2002-10-06 20:33:13 +00:00
Robert Osfield
68384e984b Made the calls to the drawing of the pre rendering stages exclit, using
a seperate method in RenderStage and associated calls in sceneView.cpp.
This fixes problems when doing stereo and prerender at the same time.
2002-09-19 09:52:50 +00:00
Robert Osfield
f11410928f Simplified the depth calculation code in CullVisitor so that it always computes
the depth of all drawables, so that it is always safe for RenderBin sort routines can use
these values directly.

Add an example of a RenderBin::SortCallback to sgv.cpp.
2002-09-18 14:57:01 +00:00
Robert Osfield
ed43d97ed3 Improved the sort callback support in osgUtil::RenderBin, and removed the
now rendundent DepthSortedBin class.
2002-09-17 15:47:23 +00:00
Don BURNS
b5870857c4 Fixed setFusionDistance 2002-09-12 14:29:59 +00:00
Robert Osfield
f574d0dd68 Added support for setting the fusion distance directly in SceneView, defaults
to the original behavior of using the values from the Camera if attached.
2002-09-04 10:49:17 +00:00
Robert Osfield
12226e4371 Converted the instances of const built in types being returned from methods
and passed as paramters into straight forward non const built in types,
i.e. const bool foogbar(const int) becomes bool foobar(int).
2002-09-02 12:31:35 +00:00
Robert Osfield
b1f69a9b11 Fixed the flatten static transform visitor. 2002-08-30 15:07:10 +00:00
Robert Osfield
0b5c20af8d Made the sort callback's sort method pure virtual. 2002-08-26 12:34:42 +00:00
Robert Osfield
43d3beb59e Removed redundent parameter in sort() callback which was never being used. 2002-08-26 12:28:10 +00:00
Robert Osfield
239068f223 Added new osg::TextureBase, osg::Texture1D, osg::Texture2D, and osg::Texture3D
classes, and changed osg::Texture and osg::TextureCubeMap so that they now derive
from osg::TextureBase.
2002-08-24 19:39:39 +00:00
Robert Osfield
b23a48a763 Renamed the osg::EarthSky to osg::ClearNode to make it more obvious what
role it has play and make it more relevant to non vis-sim applications.
2002-08-19 11:42:37 +00:00
Robert Osfield
1ba901cf64 Added support for a sort callback in RenderBin. 2002-08-03 16:49:42 +00:00
Robert Osfield
95bdcfc3f6 Fixes to Doxygen files from Neil.
Removed unused set/getReportMode() methods and member variables from IntersectVisitor.

Added deep copy construction of Geometry objects.
2002-07-25 21:50:08 +00:00
Robert Osfield
389dd8adbb Futher changes to remove unitialized variables/reordering of initialization to
prevent unitialized warnings.
2002-07-21 01:29:11 +00:00
Robert Osfield
48b3be40e9 Various fixes to constructors to ensure that all variables are initialized. 2002-07-20 23:54:55 +00:00
Robert Osfield
7682e32521 Updates to the Geometry to add more access methods, and updates to Optimizer
to add the new merge primtives option.
2002-07-19 14:19:49 +00:00
Robert Osfield
8036901ea1 Rewrote osg:Statistics so that it is PrimitiveFunctor as is now completely
decoupled from osg::Drawable.  The Drawable::getStats() virtual method
no longer exists.

Updated the Viewer to use the osg::Statistics incarnation and reformated stats
to clean it up.
2002-07-18 14:20:01 +00:00
Robert Osfield
1a139efbbc Added const to LessGeometry functor to fix Win32 build. 2002-07-18 09:17:50 +00:00
Robert Osfield
09bdb10af5 Various fixes to the flt loader, and knock on changes to the osgUtil::Optimizer
to better support removal of seperate osg::Geometry instances where they
share the same state and bindings.
2002-07-18 00:53:03 +00:00
Robert Osfield
3a964a6b93 Updated docs and added osgGA 2002-07-16 20:07:32 +00:00
Robert Osfield
8a14aa29cd Added support to osgUtil::Tesselator to insert extra vertices and other
attributes into an osg::Geometry node.  Uses the new osg::ArrayVisitor.

Converted the osg plugin Geometry support to use the new UByte4 class.
2002-07-15 22:23:57 +00:00
Robert Osfield
27338f57b1 Added app callback to Drawable. 2002-07-10 15:35:47 +00:00
Robert Osfield
c1fc3dcdb9 Ported all the demos and loaders across to use the new multitexturing API. 2002-07-10 11:22:24 +00:00
Robert Osfield
f4a167c64c Added setCurrentRenderBin() method. 2002-07-10 09:04:28 +00:00
Robert Osfield
3700e7e2cd Reimplemted the osgUtil::SceneView::setCalcNearFar() functionality to bring
it inline with the CullStack/CullVisitor implementation.  Also added the
setSmallFeatureCullingPixelSize() method and wired them up inside
SceneView.cpp so they set the corresponding CullVisitor paramters.

Intergrated pfImage copying change in the Performer plugin, submission sent in by Ulrich Hertlein
2002-07-02 19:53:18 +00:00
Don BURNS
d2aa4270ce Added support for CullVisitor to contain a osg::State. This used when
cull Callbacks require the contextID for  doing operations on texture
objects, for example.  Modified CullVisitor SceneView and Drawable
2002-07-02 06:22:28 +00:00
Robert Osfield
48e7679e78 Rewrote the osgUtil::Tesselator so that it is easier to use, and can also
easily retesselate osg::Primitive::POLYGONS found in Geometry objects.
Added calls to the tesselate to the lwo and flt loaders.
2002-06-28 22:42:02 +00:00
Robert Osfield
40fefcf335 Ported various demos and support classes over to use the new osg::Geometry class
thus removing dependancy on osg::Geoset from most of the OSG, only loaders
left to port now.
2002-06-26 10:28:17 +00:00
Robert Osfield
cbeeeefdab Added osg::Drawable::PrimitiveFunctor and TriangleFunctor subclass for
querrying the primitive data inside Drawables.  Moved various support
classes over from being osg::GeoSet based to osg::Geometry based.
2002-06-25 20:27:51 +00:00
Robert Osfield
f2e215bf44 Added conversion to osg::GeoSet::converToGeometry() utility to help the
migration to and testing of the new osg::Geometry class.
2002-06-23 21:43:46 +00:00
Robert Osfield
fa13d948b5 A little more work on Occlusion culling. 2002-06-11 19:52:55 +00:00
Robert Osfield
247cb3ff7e Checked in Macro Jez's additions to osgText to support .osg IO make it
a fully functioning NodeKit.

Also reimplement notify() to try an prevent a crash which has been caused by
to objects in notify.cpp being initiliazed twice, the second time the auto_ptr
holding the dev/null ofstream was being initilized to 0.
2002-06-11 18:41:57 +00:00
Robert Osfield
348419219d Created new helper class osg::CullStack to handle the accumulation of projection,
modelview and culling sets, to be used during travesal of the scene graph, such
as the cull traversal.
2002-06-10 11:21:21 +00:00
Robert Osfield
d91b848a63 Checked in migration from osgUtil based GUIAdapter code to Neil Salter's
osgGA (Gui Abstraction).  This may break users code, but all it should
require to fix the builds should be a change from
osgUtil::CameraManipulator (etc) to osgGA::CameraManipulator and
include <osgUtil/CameraManipulator (etc) to osgGA/CameraManipulator and
the extra dependency of the link line.
2002-06-09 13:10:09 +00:00
Robert Osfield
99580f2212 Addd libraryName() method to osg::Object in preperation for the osgDB support
for node kits plugins.
2002-06-06 13:25:36 +00:00
Robert Osfield
5feba17410 Added new osg::OccluderNode which subclasses from osg::Group, and will
provide hooks for adding ConvexPlanerOccluders to the scene.
2002-06-05 09:39:04 +00:00
Robert Osfield
f67be7c07f Further work on moving culling functionality from CullVisitor into CullingSet,
in preperation for occlusion culling.
2002-06-04 15:21:24 +00:00
Robert Osfield
db78726acf Updates to shadow occlusion culling code. 2002-06-03 17:49:28 +00:00
Robert Osfield
3f84849210 Additions for the support for ConvexPlaneOccluder. Work still underway. 2002-06-03 15:39:41 +00:00
Robert Osfield
a5a267d305 Added pragma to disable warning under VisualStudio.NET. 2002-05-28 16:11:49 +00:00
Robert Osfield
e73d4ca5b3 Changes for Cygwin build, sent in by Norman Vine. 2002-05-28 11:40:37 +00:00
Robert Osfield
02fc6ad5f8 Various updates to operations related to cull traversal. 2002-05-28 10:24:43 +00:00
Robert Osfield
553db68bc4 Added osgUtil::CullVisitor::getCurentRenderGraph() and getRootRenderGraph()
methods which replace getRenderGraph(). Small changing of order of push/pop
of StateSet's in SceneView to clean things up.
2002-05-22 12:01:12 +00:00
Robert Osfield
00f91631c2 Various API updates to suppor light points developments better, but should also
benifit other extensions to rendering.
2002-05-18 08:39:42 +00:00
Robert Osfield
806efcd0d4 Exposed the CullVisitor::setComputeNearFarMode 2002-05-15 11:27:47 +00:00
Robert Osfield
10c3b4e7bf Fixes to new flipVertical/flipHorizontal. 2002-05-14 10:20:55 +00:00
Robert Osfield
d140decb44 Added pixelSize method to CullVisitor, and converted small feature
culling to use the pixelSize method instead of a ratio of radius to
distance from eye point.  setSmallFeatureCullingPixelSize() method
has also been added to provide the user with finer control of small
featyre culling.
2002-05-09 18:59:19 +00:00
Robert Osfield
ae8076f83b dded osg::ClipNode class for managing OpenGL clipping planes, and osgclip demo. 2002-05-02 00:14:40 +00:00
Robert Osfield
f0e7e8e48b Removed CullViewState from the distribution, moved CullViewState::CullingMode
into CullVisitor, and then removed all references to CullViewState from other
parts of the scene graph.
2002-04-24 20:24:10 +00:00
Robert Osfield
8b30a10375 Added code in hangglide to move the earth sky around with the eye point,
use osg::Transform::ComputeTransformCallback.
2002-04-22 19:41:33 +00:00
Robert Osfield
56dc083330 Added support for compute the near and far planes and then applying to
the current projection matrix into CullVisitor itself.  Similar code to
support this has been moved out of SceneView completely.

Added Matrix:: infront of the definition of the static
osg::Matrix::inverse(Matrix) method which was missing.
2002-04-22 14:54:39 +00:00
Robert Osfield
e17261c45f Changed the osg::Billboard comution so that it get passed in the current
modelview matrix rathan than an identity matrix, this matrix is then modified
locally.

Changed the osg::Matrix set methods so they are inline.

Added a few useful comments to MemoryManager.cpp to help people understand
the assert's better.
2002-04-17 09:48:19 +00:00
Robert Osfield
5deafbda24 Added clearing of seperation band between horizontal/vertical split stereo
areas.
2002-04-16 15:31:46 +00:00
Robert Osfield
f8340f9ef5 Removed the cached matrices from osg::Camera, so that
osg::Camrea::getModelViewMatrix() and osg::Camera::getProjectionMatrix() are
calculated on the fly.  Removed various redudent methods, including the
project and unproject methods which are better supported within osgUtil::SceneView.

Added a computeWindowMatrix() method to Viewport, to make it easier to construct
a MV*P*W matrix for converting local coords into screen coords and visa versa.
Converted SceneView and CullVisitor to use this new method.
2002-04-16 11:41:32 +00:00
Robert Osfield
9fd7c528f4 Compile fixes for IRIX, submitted by Randall Hopper. 2002-04-15 21:48:43 +00:00
Robert Osfield
bbef7164db Added CullCallbacks to osg::Node, and osgUtil::CullVisitor. 2002-04-15 13:15:48 +00:00
Robert Osfield
9b2fe06896 Fixed compile problem related to missing includes (a result of removing include of Camera..) 2002-04-13 11:08:04 +00:00
Robert Osfield
341ffb2361 Further work on cleaning up SceneView and Camera, in particular moving strereo
support out of Camera and into SceneView. Also enabled the option to set the
projection and modelview matrices directly on SceneView thereby removing the
dependance on osg::Camrea to control the view of the scene.
2002-04-12 18:06:13 +00:00
Robert Osfield
e037c79917 Fixed refrences to NewCullVisitor which has now been mapped onto CullVisitor. 2002-04-11 08:24:55 +00:00
Robert Osfield
f2ffbdd469 Copied NewCullVisitor over top of CullVisitor and then removed NewCullVisitor.
Added some defines to Image in prep for writing code to determine how big a
pixel is.
2002-04-10 22:10:07 +00:00
Robert Osfield
1369987cdd Added setProjectionMatrix and setModelViewMatrix() methods to osg::SceneView,
and associated member variables.  I have not linked them up to the
cull traversal yet, but this will be the next task.
2002-04-09 21:46:34 +00:00
Robert Osfield
6f65e86057 Further work on removing Camera references from NewCullVisitor and releted
classes, this work paves the way for making osg::Camera an optional
extra rather than a requirement for rendering.
2002-04-09 16:09:19 +00:00
Robert Osfield
3351306d80 Added new osg::Projection node, and osgUtil::NewCullVisitor which are work
in progress for the new support for controlling the projection matrix from
within the scene graph.

Also Added osg::State::getClippingVolume(), getProjectionMatrix() and
getModelViewMatrix() with allows drawables to access the current projection,
and model view matrices and the view frustum in local coords to the drawable.
2002-03-31 16:40:44 +00:00
Robert Osfield
7e2c82f141 Futher updates to MemoryManager, fixed memory leak in osgconv. 2002-03-27 16:31:25 +00:00
Don BURNS
eb0587b5fb Changes required for SUN Solaris port... 2002-03-18 21:56:00 +00:00
Robert Osfield
c49c62ee15 Integrated various changes worked on at the Glasgow Science Center. Changes
include change the CameraManipulators so they work with double for time
instead of float.  Also added support for DataType to osg::StateAttribute
and StateSet so that they can be set to either STATIC or DYNAMIC, this
allows the optimizer to know whether that an attribute can be optimized
or not.
2002-03-14 17:34:08 +00:00
Robert Osfield
a6aa57a255 Added support for seperate traversal masks for standard, left and right
cull traversals.  This allows one to create seperate rendering for left
and right eyes when doing stereo.
2002-03-03 22:31:46 +00:00
Robert Osfield
00e91eec1d Add support for Metrowerks Codewarrior build under Windows. 2002-02-22 17:12:10 +00:00
Robert Osfield
aefaafdbf9 Fixed stereo implementation. 2002-02-18 23:01:09 +00:00
Robert Osfield
685d0b08cb Beginings of reimplementation of stereo support in scene view. Work
not complete yet.
2002-02-14 13:26:37 +00:00
Robert Osfield
b2e2a971fd Updates to Transform and CullVistor to support new getLocalToWorldMatrix methods. 2002-02-12 08:23:07 +00:00
Robert Osfield
386b87d4a0 Cleand up the root Makefile.
Moved CullVisitor/RenderStage/RenderStageLighting across to managing lights
entirely within RenderStageLighting, and changed the management of modelview
matrices so that RenderLeaf now stores the absolute modelview matrix, rather
than a model matrix as done previously. The later allows RenderLeaf's to do
a glLoadMatrix rather than a glPushMatrix/glMultMatrix/glPopMatrix.
2002-02-11 19:51:24 +00:00
Robert Osfield
4c5fcd3f61 Fixes for IRIX and Boris Bralo's TerraPage loader. 2002-02-08 09:30:02 +00:00
Robert Osfield
d12a726d5b Various investigations into culling errors w.r.t matrix inversion resulted in
the conclusion that the osg::Matrix::inverse was broken, have lifted a new
implementation from sgl and it seems to work fine.  Will need further testing
but looks good.
2002-02-07 01:15:15 +00:00
Robert Osfield
a703130aa0 Have taken a few more steps towards support for view dependant transformations
by adding a ComputeTransformCallback to osg::Transform, and have now removed
the recently added AutoTransform since it is nolonger required.  Have also
updated CullVisitor to account for the new ways for tracking transformation
matrices in the scene.
2002-02-05 21:54:46 +00:00
Robert Osfield
6630cfb455 Fixes for GCC 3.0.3 build. 2002-02-03 19:18:14 +00:00
Robert Osfield
c1283c23e8 Removed the trailing ; after namespace {...} declariations in headers
which was being picked as a warning under Codewarrior.
2002-02-03 12:33:41 +00:00
Robert Osfield
0c63a4b65d Added defined( __BCPLUSPLUS__) to windows export code segments. 2002-02-02 20:07:59 +00:00
Robert Osfield
5b978813c3 Fixed clone(CopyOp&) and cloneType() methods which were out of sync with the
new style clone operations.
2002-01-30 19:59:36 +00:00