Commit Graph

2230 Commits

Author SHA1 Message Date
Robert Osfield
61df1ed6b7 Further work on occlusion culling. 2002-06-13 23:46:02 +00:00
Robert Osfield
6888d73554 Added #include <osg/ref_ptr> so that it will compile properly regardless
of include order.
2002-06-13 19:34:27 +00:00
Robert Osfield
4e5a3696e3 Merge Randall's changes. 2002-06-13 18:27:14 +00:00
Robert Osfield
0ebe473eb5 Further work on Occlusion Culling. Most of work is complete, just debugging
required now.
2002-06-13 16:21:00 +00:00
Robert Osfield
8dcb26967c Removed inappropriate inline keyword which was breaking the IRIX build. 2002-06-12 16:23:59 +00:00
Robert Osfield
e467027946 Fix for renaming of ShadowOccluderVolume to ShadowVolumeOccluder. 2002-06-12 13:54:14 +00:00
Robert Osfield
c7e99ff77a Further work on occludision code. 2002-06-12 09:22:30 +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
e1ba8a6292 Added osg::CollectOccludersVisitor which is a helper class for finding active
occluder in the view frustum, to be used as pre cull traversal.
2002-06-10 13:50:25 +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
0a8d0a255f More more occlusion culling. 2002-06-08 19:58:05 +00:00
Don BURNS
9181deb323 #ifdefed out cstdlib for irix 2002-06-07 14:54:33 +00:00
Robert Osfield
f8502a076c Added support for NodeKits to the osgDB::Registry. Object names in .osg
files which have the library::class syntax will automatically invoke
the dynamic loading of either a nodekit or database plugin.
2002-06-07 10:03:49 +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
21a8149aa5 Removed out of date comment on calling dirtyTransform() which no longer exist
in osg::Camera.
2002-06-05 16:11:57 +00:00
Robert Osfield
dc00711337 Fixed compile problems under VisualStudio6.0 2002-06-05 14:14:32 +00:00
Robert Osfield
9ba7505d1e Checked in osgParticle, writtten by Marco Jez. 2002-06-05 12:44:55 +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
ff7a7931fe Warning fix for Windows 2002-06-03 17:54:04 +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
f16a539492 Fixes for warnings under VisualStudio 2002-05-29 19:34:01 +00:00
Robert Osfield
ae5e4f848f Added new osgcallback demo, and updated small API changes to improve the
flexiblity of callbacks.

Added beginings of convex planer occlusions culling.
2002-05-28 23:43:22 +00:00
Robert Osfield
a5a267d305 Added pragma to disable warning under VisualStudio.NET. 2002-05-28 16:11:49 +00:00
Robert Osfield
6ab93ff61d Adde osgText::Text::setColor/getColor so that osg::Material's need not be
attached to set the text color.
2002-05-28 14:33:13 +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
78b7c375d8 Removed , from end of enum. 2002-05-27 06:37:51 +00:00
Robert Osfield
09121a1583 Fixed a bug in the Optimizer::RemoveDuplicateNodesVisitor which was prevent
removal of node which could have been removed.

Added so extra convinience methods to ClippingVolume and utilized them in the
CullVisitor to push and pop only culling planes that are active.
2002-05-23 15:35:12 +00:00
Don BURNS
5ce4a54c0d Fixed spelling error Calander -> Calendar 2002-05-22 19:58: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
11b8bd1fd9 Changed the public osg::State::applyMode() and applyAttribute methods so that
they dirty the associated state, this helps keep the OpenGL state valid once
out of local drawing routines.
2002-05-22 10:04:28 +00:00
Robert Osfield
2338b7116a Updates for Doxygen and osgGA headers from Neil. 2002-05-22 08:50:05 +00:00
Robert Osfield
bf872fa7ac Renamed osg::State::getCurrentMode/Attribute(..) to
getLastAppliedMode/Attribute() to make it more consistent with the internal
workings of osg::State.
2002-05-21 09:16:31 +00:00
Robert Osfield
b8d8a8be27 Added osg::State::getCurrentMode and osg::State::getCurrentAttribute().
Aded osg::clampAbove(..) and osg::clampBelow() template functions to
include/osg/Math.
2002-05-21 08:59:26 +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
7301d1505a Added osg::Image::flipHorziontal and flipVertical, submitted by Brede Johansen. 2002-05-14 09:34:11 +00:00
Robert Osfield
567989839a Added new template versions of a commonly used maths functions. 2002-05-13 21:19:42 +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
cf4a3500ec Added new osgGA - GUI Adapter library submitted by Neil Salter. This will
replace the current GUI adapter code inside osgUtil.
2002-05-09 10:31:03 +00:00
Robert Osfield
c47e082fa8 Added default values in the constructors of Vec2,Vec3,Vec4 and Quat
default constructors.
2002-05-07 11:08:12 +00:00
Robert Osfield
e296df4632 Added osg::Node::getValidStateSet(). 2002-05-03 22:47:57 +00:00
Robert Osfield
08a4fd5bfc Added support for the managing the StateSet above a LightSource node,
and made it an osg::Group so that it can be used a decorator above a
scene.

Added osgclip demo to the test suite.
2002-05-03 16:47:16 +00:00
Robert Osfield
0977f0de57 Made osg::Viewport::getViewport(..) const. 2002-05-02 22:02:14 +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
26d34ed6d6 Qarning fixes, and updated the date in NEWS to reflect todays release of 0.8.45 2002-04-26 08:16:14 +00:00
Robert Osfield
2bd20f5c6f Fixes for IRIX build.
Fix for a warning under VisualStudio.NET.
2002-04-25 22:09:28 +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
b2e6279178 Removed the use of __FUNCTION__ from MemoryManager to remove problems with
VisualStudio .NET compile.

Added support for OSG_NOTIFY_LEVEL and OSG_FILE_PATH into the relevant getenv
routines.  This compliments the exisiting OSGNOTIFYLEVEL & OSGFILEPATH which
are deprecated but still supported.  The OSG_ version are more consistent
with the rest of the env variables used in the OSG.
2002-04-24 14:52:53 +00:00
Robert Osfield
20b5e59dfd Fix for the Cygwin build related to the new FileUtils_Unix not using the
Windows PATH environmental variable for searching for libraries.  Sent in
by Norman Vine.

Reoder of the makedefs/makedirdefs to fix Mac OSX compilation. Sent in by
Bob Kuehne.
2002-04-24 08:50:03 +00:00
Robert Osfield
2f392b635c Fixed compile problems under VisualStudio w.r.t the new additions for
precompiled mipmaps.  Changed std::size_t to unsigned int.
2002-04-23 10:34:20 +00:00
Robert Osfield
43abbe311e A couple of API additions to osg::ClippingVolume, osg::Matrix and osg::Plane
sent in by Mike Connell.
2002-04-22 21:18:15 +00:00
Robert Osfield
dcfef4a023 Integrated submission from Boris Bralo:
Supported added for precompiled mip maps stored in osg::Image, and read
by osg::Texture.

Updates to TerraPage loader for support of compressed texture images and
precompiled mip maps.
2002-04-22 21:13:33 +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
9574ce97d2 Updated TODO list.
Converted AnimationPath so it is now subclassed from osg::Transform::ComputeTransfromCallback()
so that it can be directly attached to the scene to move objects about.

Changed the osg::SateSet::setGlobalDefaults() so that is sets GL_DEPTH_TEST
to ON.

Added guards and creation of default helper classes in osgGLUT::Viewer and
osgUtil::SceneView so that sensible defaults are used when no settings
are used of osg::State/StateSet,osgUtil::RenderStage/RenderGraph/CullVisitor.
2002-04-21 22:05:26 +00:00
Robert Osfield
e3958790a2 Changed the implementation of osg::Quat::makeRotate(heading,pitch,roll) so that
it conforms to the OpenFlight convention of euler angles.  Added documentation
into Matrix and Quat to reflect this.

Added so test code to osgcube for stress testing memory allocation and deallocation.

Commented out the registering of app and cull callbacks in osghud.
2002-04-19 19:55:48 +00:00
Robert Osfield
1131be56dc Fixes for Max OSX build from Bob Kuehne. 2002-04-19 16:22:25 +00:00
Robert Osfield
791150ab69 Warning fixes for VisualStudio 2002-04-17 20:04:41 +00:00
Robert Osfield
5830c60cef Fixes for warnings under VisualStudio 2002-04-17 11:36:38 +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
7836540bb3 Added osg::Image::setPixelFormat(..) and setInternalTextureFormat(), and
renamed osg::Image::pixelFormat(), internalTextureFormat(),dataType() to
osg::Image::getPixelFormat() etc.  These changes are to bring it more
into line with the style of the rest of the OSG.

Updated the rest of the distribution to take account for these names changes.
2002-04-16 14:57:39 +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
5a0f8118b7 Added support for OSG_USE_MEMORY_MANAGER into Windows build. 2002-04-15 21:03:32 +00:00
Robert Osfield
bbef7164db Added CullCallbacks to osg::Node, and osgUtil::CullVisitor. 2002-04-15 13:15:48 +00:00
Robert Osfield
c43607c14d Added support for specificing the eye mapping and seperation between the
horizontal and veritical split stereo modes.

Renamed osg::Image::ensureDimensionArePowerOfTwo() to osg::Image::ensureValidSizeForTexturing().
2002-04-14 22:21:59 +00:00
Robert Osfield
09d41789da Fixes to osg::Image::createImage(..), and addition of code to Viewer.cpp to support
output of screen snapshot via 'O'.
2002-04-14 13:41:13 +00:00
Robert Osfield
8a5c6d5102 Clean up for VisualStudio build 2002-04-13 22:19:29 +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
3f67300c82 Saved workspace from VisualStudio to follow up on missing demo dependancies 2002-04-13 10:18:58 +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
a44efe01bb Fixes for Win32 build 2002-04-12 09:53:39 +00:00
Robert Osfield
6ed233d0d2 Added DataVariance enum and set/get fields to osg::Object to help identify
which objects have values that vary over the lifetime of the object (DYNAMIC)
and ones that do not vary (STATIC).  Removed the equivalent code in
osg::Transform, StateSet and StateAttribute, as these are now encompassed
by the new DataVariance field.

Removed MatrixMode enum from Matrix, and associated fields/parameters from
osg::Transfrom and osg::NodeVisitor, since MatrixMode was not providing
any useful functionality, but made the interface more complex (MatrixMode
was an experimental API)

Added ReferenceFrame field to osg::Transform which allows users to specify
transforms that are relative to their parents (the default, and previous behavior)
or absolute reference frame, which can be used for HUD's, camera relative
light sources etc etc.  Note, the view frustum culling for absolute Transform
are disabled, and all their parents up to the root are also automatically
have view frustum culling disabled.  However, once passed an absolute Transform
node culling will return to its default state of on, so you can still cull
underneath an absolute transform, its only the culling above which is disabled.
2002-04-11 23:20:23 +00:00
Robert Osfield
e85e5a6ce6 Added several new methods to osg::Image to help keep track of memory and added
osg::Image::readPixels to encapsulate glReadPixels.

Reordering of includes in include/osg/Fog and include/osg/Light to remove silly warnings under Visual Studio.
2002-04-11 17:15:07 +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
360247225e Added new osg::DrawPixels class with encapsulates glDrawPixels as and
osg::Drawable.  Added osg::Image::readPixels to osg::Image.

Made osg::LightSource to default to cullActive set to false to that LightSource
nodes don't get culled by default.
2002-04-10 21:51:34 +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
56cee8c711 Move the applying of Projection and ModelView matrices into osg::State so that
it now maintains references to the last applied matrices, automatically doing
lazy state updating.  This simplifies the various places in the OSG which
were previously doing the applying, add paves the way for managing the
projection matrix within the scene graph.

Remove MemoryAdapter and mem_ptr as they arn't being used, and can potentially
confuse users by their existance.
2002-03-29 17:26:40 +00:00
Robert Osfield
07f9421f39 Converted from dos file endings to unix. 2002-03-29 12:23:54 +00:00
Robert Osfield
d421e35c8d A compile fix to the new Texture subload changes. 2002-03-27 23:04:52 +00:00
Robert Osfield
33c89c3be0 Added support for setting the texture subload width and height within
osg::Texture.  The values default to 0, and in this state they are
sizes of the glTexSubImage2D are taken from the source image size.  This
allows the previous setup with no settings for subload size to work as
before.
2002-03-27 22:51:58 +00:00
Robert Osfield
7e2c82f141 Futher updates to MemoryManager, fixed memory leak in osgconv. 2002-03-27 16:31:25 +00:00
Robert Osfield
84d2d01163 Added support for osg::MemoryManager which is based upon Paul Nettle's
memory manager published at flipcode.com.  This can be turned on
with the OSG_USE_MEMORY_MANGER option which then uses custom global
new and delete operators as well as provide osgNew and osgDelete macro's
which add ability to log line and file from which calls are made.

Updated osg,osgUtil,osgDB,osgText and osgPlugins/osg to use osgNew/osgDelete,
and fixed memory leaks highlighted by the new memory manager.
2002-03-26 23:52:52 +00:00
Robert Osfield
651a22453a Added osg::MemoryManger which is currently based on Paul Nettle's memory manager
published at flipcode.  I havn't adopted Paul's macro's for new/delete etc, but use
osg prefixed versions instead to allow greater flexiblity in handling include
ordering.

Have fixed a couple of new/delete[] problems which existed as a result.

To use the MemoryManager to track memory usage simply add
-DOSG_USE_MEMEORY_TRACKING to the compile line.

Have yet to move the osg from using new to osgNew, will do this next.
2002-03-25 23:18:02 +00:00
Robert Osfield
06fcd12598 Fixes for MacOSX build. 2002-03-25 19:04:30 +00:00
Robert Osfield
f50c5f7a5e Moved the exit on escape into Window, and added a virtual free method on both
Window an Viewer to clean up the windows, this is now called before exit is
finally called, ensure that more more memroy is clean up prior to exit.
2002-03-23 21:28:25 +00:00
Robert Osfield
33b0ceac0d Added GL_TEXTURE_3D definition for those with gl.h headers which don't
contain it.
2002-03-23 10:55:29 +00:00
Robert Osfield
03cda7d3f8 Renamed have_applied_mode, have_applied_attribute, apply_mode, apply_attribute
to haveAppliedMode, haveAppliedAttribute, applyMode, applyAttribute to make
it more consistent with the general OSG name convetion.
2002-03-21 12:36:05 +00:00
Robert Osfield
a364875afb Added osg:State:have_applied_mode(mode) and have_applied_attribute(type) to make it
easier to specify which modes and attributes have been modified without
the user requiring to know to what value, or to have an equivilant attribute
to pass to the have_applied_attribute method.  The original have_applied(mode)
and have_applied(attribute) methods have been renamed have_applied_mode(),
have_applied_attribute() as this was required to prevent the mode and type
values colliding during compile (it was causing a compile error when the method
names were the same.)
2002-03-21 12:00:10 +00:00
Robert Osfield
9836af1055 Added osg::TextureCubeMap which encapsulates OpenGL's cube texture mapping. 2002-03-20 22:39:51 +00:00
Robert Osfield
8656adb463 Added a Referenced::unref_nodelete() method which unreferences but does
not delete the object even if its count goes to 0 or below.  This should
only be called in special circumstances, the ReaderWriter::ReadResult
being one of them. This new method has allowed the problem of objects
being multiple referenced on return from readNodeFile() & readImageFile().
2002-03-20 14:03:30 +00:00
Robert Osfield
0b27e5c381 Updates to Texture and TextureCubeMap to clean up the code so they share
much more of the core texture setup code. This largely invloved paramterizing
the applyImmediateMode, which has also been rename applyTexImage to reflect
its functionality better.
2002-03-20 11:24:47 +00:00
Robert Osfield
8f02db61e5 Added osg::TextureCubeMap. submission from Brede Johansen. 2002-03-18 23:10:33 +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
e80496d5db Changed Texture so that is use lazy updating on texture paramters (Filter/Wrap)
mode by using a _texParamtersDirty flag in combination with an
applyTexParamters(State&) method which does the paramters setting in one
tidy bundle.  This new implementations replaces the CompileFlags submitted
yesterday.

Simplified NodeCallback by remove osg::NodeCallback::Requirements as they
are no longer needed.

Fixed comments in Drawable.

Put guards around cosf definations so that they are only used under Win32/Mac.

Fixed warning in CullVisitor.
2002-03-14 16:01:21 +00:00
Don BURNS
fea861e013 Fixed compile flags in Texture 2002-03-14 00:07:29 +00:00
Don BURNS
d0ee300405 Fixed DrawCallback in Drawable and added CullCallback to Drawable
Cull Visitor now checks for a Drawable's CullCallback and calls it
if it exists.  It then prunes based on the return value (bool) of the
cull callback.
2002-03-13 22:44:22 +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
0439b72da7 Updates to the clamp to border support in osg::Texture. 2002-03-01 09:27:10 +00:00
Robert Osfield
2973ca0a25 Added support for setting the maximum number of graphics contexts that the
OSG has to maintian.
2002-02-28 00:11:31 +00:00
Robert Osfield
3444c95261 Integrated support for GL_CLAMP_TO_BORDER_ARB extension to osg::Texture,
submitted by Sasa Bistrovic.
2002-02-27 22:00:47 +00:00
Robert Osfield
1bdebcf174 Added new osg::AnimationPath which is contaner for a set of key frames for
defining an animation path.  To be used with osg::Transform etc.
2002-02-27 00:58:54 +00:00
Robert Osfield
7c0eb0f380 Added makeRotate(heading,pitch,roll) to Quat in prep for new classes for
animation paths.
2002-02-26 20:01:04 +00:00
Robert Osfield
e21af2adce Added support for glLightModel functionality via osg::LightModel. 2002-02-25 22:46:38 +00:00
Robert Osfield
f600f6fe4a Added support for glLineStipple via osg::LineStipple state attribute. 2002-02-24 20:55:45 +00:00
Robert Osfield
20781cc621 updates for Win32 Codewarrior build 2002-02-22 23:40:25 +00:00
Robert Osfield
64b706fd0b Fix for win32 Codewarrior build 2002-02-22 23:39:42 +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
4abfdb1ebd Added OpenDX writer from Randall Hopper. 2002-02-18 20:46:47 +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
0c1264f547 Fixed the fabsf define which was eroneous mapped to sqrtf, due to the copy and
paste antipattern no doubt.
2002-02-13 22:52:07 +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
0aab3a38b0 Updated Stats code, sent in by Geof Michel. 2002-02-11 00:40:37 +00:00
Robert Osfield
7d03f8a548 Implemented NodeVisitor's getLocalToWorldMatrix and getWorldToLocalMatrix
to allow users to querry the current accumulated matrix state within the
scene graph.
2002-02-10 22:35:22 +00:00
Robert Osfield
e6638d9974 Disbalbed a dumb warning in Windows build via a #pragma. 2002-02-10 20:05:38 +00:00
Robert Osfield
c999dfb154 Updates to docs and fixes to a few warnings. 2002-02-09 14:29:58 +00:00
Robert Osfield
ed45cccc25 Fixes for cygwin and mingw builds. 2002-02-09 10:24:39 +00:00
Robert Osfield
2fb698f4ca Removed osgWX and wxsgv from the repositry as it is intend to keep the core
distribution clean from GUI examples, these instead should live in the bazaar.
This can better accomodate the many different types of viewer that users are
developming.
2002-02-08 23:04:59 +00:00
Robert Osfield
2075eb0100 Added support for parents to Drawables.
Bumped up version numbers in prep for 0.8.44.
2002-02-08 22:55:21 +00:00
Robert Osfield
4c5fcd3f61 Fixes for IRIX and Boris Bralo's TerraPage loader. 2002-02-08 09:30:02 +00:00
Robert Osfield
62d8b1e8de Fixed teh setDrawCallback so that it now calls dirtyDisplayList() instead of
dirtyBound.
2002-02-07 08:07:33 +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
ff571d2690 Added a check to the destructor of Referenced so that it detects referenced
objects that are deleted whilest still having a positive _refCount, such
as when a object has been deleted on the stack, yet other references still
exist for it.  Have put the desctructor implementation in Object.cpp to
avoid adding yet another file with only a couple of lines of code in.
2002-02-07 01:11:20 +00:00
Robert Osfield
b00d103f4e Added callbacks to allow users to modify the underlying functionality of
LOD, Billboard and Drawabel objects.
2002-02-07 01:07:11 +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
7293af59ed Have removed the old lazy initialization of Matrix since it was causing bugs
and adding checks to many mothods which in the end slow it down more than
not intilizing the code!  The code is now simpler, more robust and faster:-)
2002-02-05 21:51:06 +00:00
Robert Osfield
57fb5a0182 Added beginings of new AutoTransform class. 2002-02-03 20:57:31 +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
af968b00bd Added first cut at new AutoTransform node which will be used for generating
Transform's during the cull traversal such as for earth/sky etc.
2002-02-03 11:38:20 +00:00
Robert Osfield
cc39c462de Updates for Borland compilation. 2002-02-03 11:35:24 +00:00
Robert Osfield
0c63a4b65d Added defined( __BCPLUSPLUS__) to windows export code segments. 2002-02-02 20:07:59 +00:00
Robert Osfield
97df94db7e Typo fixed in the header guard. 2002-02-02 10:52:30 +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
Robert Osfield
1aaa46dbe7 Fixes for Windows build. 2002-01-30 16:24:24 +00:00
Robert Osfield
4d43f83295 Removed the M_PI defines from include/osg/Math and have use a const double osg::PI etc
in its place.
2002-01-30 15:27:45 +00:00
Robert Osfield
9471714ba4 Changes for Borland C++ compiler changes. 2002-01-30 15:02:56 +00:00
Robert Osfield
7b370fcb57 Made the LineSegment destructor protected to force users to create segments
on the stack thus ensure that they arn't created locally and have their
memory deleted incorrectly.

Also updated the IntersectVisitor so that it no used osg::ref_ptr<> internally
for storing all data. Have also move the IntersectState helper class to inside the
IntersectVisitor which simplifies the external interface to the class.
2002-01-30 12:09:18 +00:00
Robert Osfield
c72efc1059 Fixes for windows build. 2002-01-29 20:25:45 +00:00
Robert Osfield
f061999b22 Removed the now rendundent DeepCopy and ShallowCopy files. 2002-01-29 14:20:29 +00:00
Robert Osfield
02ef10fcfa Moved all references to osg::Cloner to osg::CopyOp. 2002-01-29 14:04:06 +00:00
Robert Osfield
9a6a96a7e7 Fixed the header guard, which was using the name define as FileUtils.
Problem spotted by Terry Welsh.
2002-01-29 12:55:23 +00:00
Robert Osfield
2487861fbc Have add new osg::CopyOp which replaces last nights osg::Cloner, the new
class now combines Cloner and DeepCopy into one class. Cloner and DeepCopy
will be removed in next commit.

Also have added osgcopy app to Demos which shows how the CopyOp have be
subclassed to create users own specific handling of copying.

Have fixed copy constructor problems in GeoSet which fix the deep copy
problem experienced yesterday.
2002-01-29 12:52:04 +00:00
Robert Osfield
f0174e34a3 A couple of fixes to DeepCopy Cloner. 2002-01-28 21:49:31 +00:00
Robert Osfield
f612924a45 Added support for shallow and deep copy of nodes, drawables and state, via a
copy constructor which takes an optional Cloner object, and the old
osg::Object::clone() has changed so that it now requires a Cloner as paramter.
This is passed on to the copy constructor to help control the shallow vs
deep copying.  The old functionality of clone() which was clone of type has
been renamed to cloneType().

Updated all of the OSG to work with these new conventions, implemention all
the required copy constructors etc.  A couple of areas will do shallow
copies by design, a couple of other still need to be updated to do either
shallow or deep.

Neither of the shallow or deep copy operations have been tested yet, only
the old functionality of the OSG has been checked so far, such running the
viewer on various demo datasets.

Also fixed a problem in osg::Optimize::RemoveRendundentNodesVisitor which
was not checking that Group didn't have have any attached StateSet's, Callbacks
or UserData.  These checks have now been added, which fixes a bug which was
revealled by the new osgscribe demo, this related to removal of group acting
as state decorator.

method
2002-01-28 21:17:01 +00:00
Robert Osfield
06bd9fda5b Have made osg::Transform more extensible via additions of new getLocalToWorldMatrix()
and getWorldToLocalMatrix(), computeLocalToWorld() and computeWorldToLocal()
methods.

Have updated the CullVisitor, IntersectVisitor and Optimizer to use the
new osg::Transform::getLocalToWorldMatrix() which has the same functionality
as the old getMatrix() but is now supports subclasses of osg::Transform
transparently.

Have added osg::PositionAttitudeTransform as subclass of osg::Transform
which manages the transform as position and attitude via a Vec3 and Quat
respectively.
2002-01-23 22:15:39 +00:00
Robert Osfield
9c8c73c77f Updates to osg::Transform to allow it subclassed more easily. 2002-01-23 15:42:36 +00:00
Robert Osfield
f16776da22 Fixed FlattenStaticTransformVisitor bug which related to incorrect handling
of objects which were transformed by multiple matrices at one time - this
cannot be handled in the flattening process (since we only have one piece
of geometry to transform).  This visitor now handles this case by disabling
flattening of any objects and transforms associated in this way.
2002-01-22 19:30:51 +00:00
Robert Osfield
604110b245 Updates to help compilation under gcc 3.03. 2002-01-20 16:24:54 +00:00
Robert Osfield
cf66502fe5 Converted osgUtil::GUIEventAdapter::MouseButtonMask from LEFT_BUTTON etc to
LEFT_MOUSE_BUTTON etc, to prevent classes with #define of LEFT_BUTTON.. when
including certain MS Windows headers. Arhsh Snarfff..
2002-01-19 22:11:05 +00:00
Robert Osfield
acf256c466 UPdates to CullVisitor so that it keeps in sync with the new method paramter
change in osg::Billboard.

Removed in instance of an object being passed () brackets, have removed the
brackets to avoid an amiguity with the compiler intepreting it as a function.
2002-01-18 22:36:56 +00:00
Robert Osfield
58f72ee2d7 Changes to fix compilation problems on the Sparc.
GeoSet.cpp simply remove rendundent code that had already been commented out.
2002-01-18 22:34:07 +00:00
Robert Osfield
4fbf4db42e Added support for multiple graphics contexts, submission from Max Rhiener.
Alas changed the indenting to use 4 spaces instead of tabs, this irons out
differences when working under Windows and Unix, keeping the identing
consistent.
2002-01-18 22:25:51 +00:00
Robert Osfield
58ead9aead First steps to updating the calcTransform function in Billboard to fix
z axis contraint on rotation axis.
2002-01-18 22:15:59 +00:00
Robert Osfield
d20c2795d1 Removed the global scope operators for the isnan(..) etc calls to fix compilation
under some compiler combinations.
2002-01-18 14:12:36 +00:00
Robert Osfield
25bb70a86b Made the osg::Timer::tick() method a const method. 2002-01-18 14:11:46 +00:00
Robert Osfield
5cff1c7a6f Fixed typo in comment, reference to BoundingSphere has been changed to
BoundingBox.  Typo spotted by Gial Paolo Lorenzetto.
2002-01-18 10:26:06 +00:00
Robert Osfield
d1b2fcd0df Fixed ENALBE_ALL_CULLING spelling mistake, have changed it to ENABLE_ALL_CULLING. 2002-01-17 22:41:34 +00:00
Robert Osfield
06e0310314 Added support for glutSpecialFunc, glutSpaceballMotion, glutSpaceballRotate and
glutSpaceballRotate into osgGLUT::Window base class.
2002-01-17 22:40:16 +00:00
Robert Osfield
7c29110e40 Changed the enum Types { ... } so that in no longer explicitly sets the values,
leaving C++ to ensire that values are unque and insequence.
2002-01-16 21:22:06 +00:00
Robert Osfield
1fb8f9cb86 First batch of changes required for MacOS X build. Orignal submission from
Phil Atkin, merged by Robert Osfield.
2002-01-16 10:36:20 +00:00
Robert Osfield
87763acc03 New ajustAspectRatio (ADJUST_NODE) mode added to osg::Camera to fix issue
with integration with vrjuggler, submitted by Allen Bierbaum.
2002-01-15 11:05:00 +00:00
Robert Osfield
4ea7de39c6 Added osg::ShadeModel state attribute which encapsulates glShadeModel. 2002-01-04 17:35:54 +00:00
Robert Osfield
e3ad8a87ee Updates for Cygwin port, from Norman Vine. 2002-01-03 21:34:57 +00:00
Robert Osfield
03b161942b Fixed the orientation of for_each_triangle cases for QUAD and QUAD_STRIP. 2002-01-02 10:49:26 +00:00
Robert Osfield
c518d69013 Removed the variables which were duplicated in osgGLUT::Viewer and
osgGLUT::Window, standardising on the Window ones, and therefore removing
an unitialized variable that had been introduced.  This caused a crash
under WindowsXP due to send invalid values to glutReshapeWindow.
2001-12-31 23:21:16 +00:00
Robert Osfield
bd0f334329 Added a more detailed explanation of how LOD's work. 2001-12-31 23:16:20 +00:00
Robert Osfield
97e7f5b829 Added osg::GeoSet::FLAT_TRIANGLE_FAN to the list if primitive handled by the
for_each_triangle template function.
2001-12-30 20:03:42 +00:00
Robert Osfield
625e8e730a Added comment to osg::Transform w.r.t use of GL_NORMALIZE when using
scaling Transforms.
2001-12-29 14:27:46 +00:00
Robert Osfield
c236e38b90 Made inline documentation on the Values enum clearer w.r.t the function of
OVERRIDE_ON and OVERRIDE_OFF.
2001-12-27 20:06:07 +00:00
Robert Osfield
98c8447ae9 Fixed the osg::Light so that it requires the user to explicitly define which
OpenGL light is being operated on, and also now relies upong the standard
osg::State handling of OpenGL modes to switch on the appropriate lights.

The previous static counter mechansim for the light number was causing a
redundent light to be created when the osg plugin created the first osg::Light
to use a prototype for other osg::Light's to be cloned from in the
.osg plugin execution.

The static count mechanism also prevent the lights modes being controlled
independantly from the setting of the light paramters themselves.  This
meant that a light once created was global, and couldn't be turned off
locally via the OSG's support for OpenGL mode enabling/disabling.  This
has been overcome with the new implementation, the user has complete
flexiblity of when and where to use the different lights at their
disposal.
2001-12-24 21:34:40 +00:00
Robert Osfield
a6d329b812 Updated the osgGLUT::Viewer to subclass from osgGLUT::Window as has been
intended since the development of osgGLUT::Window.
2001-12-24 19:06:49 +00:00
Robert Osfield
19c99dc94c Further work on improving stereo support in the OSG.
Renamed the osg::VisualsSettings to osg::DisplaySettings, and
osgUtil::VisualsRequirementsVisitor to osgUtil::DisplayRequirementsVisitor.

Added support for OSG_SCREEN_HEIGHT into osg::DisplaySettings, and added
a DisplaySettings* to the constructors of osg::SceneView and osg::Camera.
2001-12-21 22:48:19 +00:00
Robert Osfield
734be18471 Updates to the support for stereo in osg::Camera, osgUtil::SceneView and
the CameraManipulators.
2001-12-21 13:07:35 +00:00
Robert Osfield
9365f0e3b1 Added support for glLineWidth via an osg::LineWidth StateAttribute. 2001-12-20 20:48:46 +00:00
Robert Osfield
8aa72d85cf Updates to the camera code related to stereo, adding fusion distance. 2001-12-20 16:35:38 +00:00
Robert Osfield
296865e250 Adding support for controlling visual settings via environmental variables
and command line paramters.  Including support for stereo and stencil buffer.
2001-12-19 00:38:23 +00:00
Robert Osfield
bc49a83c51 Updated the Optimzer::FatternStaticTransform visit so by default it ignores
all dynamic transforms, previously it flattened dynamic transforms as well.
2001-12-17 15:05:06 +00:00
Robert Osfield
f5873a82c5 Integrated detailed near clipping plane calculation into osgUtil::CullVisitor,
submitted by Sasa Bistroviae.
2001-12-16 22:20:26 +00:00
Robert Osfield
cb8025d913 Renamed osg::Matric::makeIdent() to osg::Matrix::makeIdentity() to make
it consistent with the rest of the osg::Matrix naming.  Updated OSG
distribution to account for new name.

Added support for the STATIC/DYNAMIC osg::Transform::Type to the .osg
ASCII reader/writer plugin and the flt reader plugin.

Removed the non cost version of osg::Transform::getMatrix() as this could
by pass the dirty mechinism.
2001-12-15 16:56:39 +00:00
Robert Osfield
478274ae7d Fixes to Windows build in liu of the move to using just std::streams. 2001-12-14 23:18:28 +00:00
Robert Osfield
b1f478e5d2 Updated OSG so that the old OSG_USE_IO_DOT_H has be removed from all headers
that used it, all references to the Standard C++ stream classes use the
std::ostream etc convention, all references to "using namespace std" and
"using namespace std::ostream etc" have been removed.
2001-12-14 21:49:04 +00:00
Robert Osfield
6070a9e1b1 Updatedwidley used includes to remove most of the float/double warnings
generated when compiling under Windows with STLport.
2001-12-14 18:06:34 +00:00
Robert Osfield
84605a5f4e Fixes for Win32 build related to changes in using namespace std. 2001-12-14 10:47:20 +00:00
Robert Osfield
a4e4d4fa7c Removed all references to using namespace std to help solve compilation problems
under Windows and IRIX.

Also integrated small change to lib3ds from Drew for IRIX compilation.
2001-12-14 10:02:27 +00:00
Robert Osfield
f848c54ba3 Made the following name changes to Matrix and Quat to clean them up and make
the functionality clear given the name.  This will break user code unfortunately
so please be away of the following mapping.

  osg::Matrix::makeTrans(..)?\026 -> osg::Matrix::makeTranslate(..)
  osg::Matrix::makeRot(..)?\026   -> osg::Matrix::makeRotate(..)
  osg::Matrix::trans(..)?\026     -> osg::Matrix::translate(..)

  osg::Quat::makeRot(..)?\026     -> osg::Quat::makeRotate(..)

Also updated the rest of the OSG distribution to use the new names, and
have removed the old deprecated Matrix methods too.
2001-12-12 20:29:10 +00:00
Robert Osfield
05e4a0b4ce Fixed problem with loading interleaved arrays in the .osg loader, and corrected
a spelling mistake in osg::GeoSet.
2001-12-12 12:55:01 +00:00
Robert Osfield
b3cfed2cb2 Fixed compilation problems under Windows due to changes in using std::ostream etc. 2001-12-11 16:00:32 +00:00
Robert Osfield
6c38b61185 Removed the 'using namespace std' and replaced with more specific 'using std::ostream'
this should help prevent polution of the global namespace with std when including
these osg include files.
2001-12-11 11:22:44 +00:00
Robert Osfield
a23627467b Added support for automatic deletion of osg::GeoSet's attributes, via a
default AttributeDeleteFunctor which uses delete [].  Users can create
their own handlers for the attribute memory to override this default
behavior.

Fixed a typo in ReaderWriterOBJ.cpp.
2001-12-04 22:57:40 +00:00
Robert Osfield
20e3785bf8 Various files which should have been checked in earlier but were missed...
VisualStudio files for flt loader, and header files or Image and Texture
for new osg::Texture::CLAMP_TO_EDGE and osg::Image::dirty.
2001-12-04 20:38:27 +00:00
Robert Osfield
34a4c18a26 Beginings of support for quad bufferd, red/green, and slit screen stereo. 2001-12-02 22:20:46 +00:00
Don BURNS
bca8b68a18 Corrected a small booboo in preprocessor guard for header file in GLU and
added Matrix::identity() to Matrix
2001-12-02 08:59:39 +00:00
Don BURNS
4ef08067b7 Small fix for preprocessor _MP symbol clash with MFC. 2001-11-21 15:53:29 +00:00
Robert Osfield
bc44b9342b Added DLL export to the internal classes in osgUtil::Optimize so that the internal
classes can be used directly by client applications.
2001-11-19 11:52:58 +00:00
Robert Osfield
969f757679 Added osg::Image::dirtyImage() and setModifiedTag() to allow external
updating of the image modified flag to be used in conjunction with
texture subloading.
2001-11-18 21:31:16 +00:00
Robert Osfield
2c3b927d6c Fixed compilation problem under Wndows 2001-11-14 15:32:15 +00:00
Robert Osfield
6cf543cf8c Added osgUtil::TransformCallback to help with rigid body animation. 2001-11-14 14:10:12 +00:00
Robert Osfield
a434abafd7 Fixes for IRIX build.
Updates to the osg::Transform, adding preMult and postMult methods and
deprecating the old preRotate,preTranslate,preScale.

Updated the rest of the OSG so that it nolonger uses the deprecated
osg::Transform nodes.

Renamed osgUtil::SceneView::setGlobalState() to
osgUtil::SceneView::setGlobalStateSet() so that the name reflects its
functionality better.  Updated osgGLUT::Viewer etc to cope with new
name change.
2001-11-14 14:09:07 +00:00
Robert Osfield
34555f61d6 Added new files to cvs. 2001-11-12 10:04:57 +00:00
Robert Osfield
5ceefdcc12 Fixed compilation error in src/osgDB/FileUtils.cpp.
Added support for nested NodeCallbacks, allowing them to be chained together
so that multiple operations can be applied.
2001-11-11 22:32:59 +00:00
Robert Osfield
7290f793f1 Added osgText::Paragraph which is a subclass from Geode which composes a
list of text drawables as a paragraph block, handles breaking of text into
individual lines automatically.

Changed the osg::Node::setUserData so that the data type has to be an
osg::Referenced, and removes the dependancy on osg::MemoryAdapter.  I have
done this since it simplifies the OSG side of the interface and makes it
less like that the user might abuse the memory managment of the data. It
does however mean that user data will have by subclassed from Referenced,
and therefor may require users to have their own adapter to do this.
However, this little nuasance is worth the extra cleaness and robustness
afforded by going the osg::Referenced route.
2001-11-09 15:06:01 +00:00
Robert Osfield
b3160c882e Fixed inlcude/BoundingBox to compile under Windows. 2001-11-06 11:36:11 +00:00
Robert Osfield
138a5300b0 Fixed inlcude/Math to compile under Windows. 2001-11-06 11:07:43 +00:00
Robert Osfield
5e6153b428 Added methods to support isNaN,isInfinte and valid to osg::Vec* and osg::Math,
and added a guard to IntersectVisitor which uses these new methods to prevent
invalid segments being added.
2001-11-06 10:34:51 +00:00
Robert Osfield
b45aa55555 Integrated updates to stats sent in my Geoff Michel. 2001-11-04 19:29:20 +00:00
Robert Osfield
06abf2266b Updates to Makefiles to include osgText.
Also a couple of undefined methods in osgText::Text have been added.
2001-11-02 20:11:37 +00:00
Robert Osfield
42faf78b47 Updated index.html with dependacy info about the new osgText library.
Modified osg/Drawable::draw(..) so that it uses display list COMPILE
rather than COMPILE_AND_EXECUTE to solve performance problems under
NVidia drivers.  The old behavior is still available by comments out
a #define.
Fixed the default compilation list src/osgPlugins/Makefile so that it
compiles by defalt png and gif.
2001-11-02 12:26:33 +00:00
Robert Osfield
4d4ff39ff9 Added a bool paramter to osg::StateSet::compare(const StateSet& rhs,bool compareAttributeContents=false) const;
to allow it to use different comparison schemes, now it can use checking for pointer equality (the default)
or attribute contexts.  This has been added to assist optimization of databases within the flt loader, but
also could be useful for other operations too.
2001-10-31 20:04:32 +00:00
Robert Osfield
94ce36f9a3 Update to osgText to get things compiling under Windows. 2001-10-31 12:27:48 +00:00
Robert Osfield
8f4e62ced0 Further updates to the ReaderWriter support in osgDB, and a fix to a small warning
in Matrix.cpp.
2001-10-30 19:23:24 +00:00
Robert Osfield
f0372817b5 Added support for ReadResult and WriteResult to the osgDB::ReaderWriter
to allo plugins to pass back more information about the success or failure
of a file load.  All plugins have been updated to the new convention.
2001-10-30 14:20:37 +00:00
Robert Osfield
97e4488d80 Changed a #define ... (GLenum) 0x84fe to 0x84FE to fix problems under MacOS9
build.
2001-10-29 19:29:49 +00:00
Robert Osfield
939b12a908 Updates of osgDB/FileUtils to fix compilation problems under Win32 2001-10-24 19:48:58 +00:00
Robert Osfield
573f68c35b Updates to osgText. 2001-10-24 13:46:58 +00:00
Robert Osfield
6ddb40ba70 Updated the osgText implemention, now works under Linux. 2001-10-24 09:08:02 +00:00
Robert Osfield
36d206f40f Updates to the new osgText library to get it to compile under Linux. 2001-10-23 22:08:02 +00:00
Robert Osfield
8e1b1bcfc1 First past integrat of Max Rhiener work on wrapping FTGL to create osgText
library and demo.
2001-10-23 19:51:39 +00:00
Robert Osfield
63bb05e6fd Added new osgGLUT::Window base class which is very basic right now, all it does
is bring up a GLUT window and provide virtual functions from which users should
subclass to add functionality.
2001-10-23 15:55:01 +00:00
Robert Osfield
25c8b05914 Integrated Geoff Michel's updates to Stats code, whilest move all text rendering
back in the viewer from the Statistics header.

Added a osg::State::captureCurrentState(StateSet&) method and a copy constructor
to osg::StateSet.
2001-10-22 22:02:47 +00:00
Robert Osfield
7082abb8ad Added support for an osgUtil::SceneView::init() traversal which is called once
per scene view.  The user can attach a NodeVisitor to do init for them, or
leave it to the default which is to use the osgUtil::DisplayListVisitor
which compiles all display lists and texture objects.  The init traversal
is called automatically by the first call to either app() or cull(), so
should not be called by user code during initialization. This ensures
that a valid graphics context has been established before OpenGL is initialized.

osgUtil::DisplayListVisitor has also been updated to use a bit mask for options, and the addition of
compilation of texture objects (via StateAttribute::compile) has also been
added.
2001-10-20 20:26:36 +00:00
Robert Osfield
ccc3d3fd8a Added osgUtil::Optimizer which contains four visitor each designed for doing
different types of optimization on the scene graph - state optimization,
flattening static transforms, combining LOD's and removing redundent groups.
The new Optimizer replaces the once seperate OptimizerStateVisitor.
2001-10-19 14:22:02 +00:00
Robert Osfield
54d490e24b Added support for specifying whether view frustum and small feature culling
should be applied to a node or its child with the new osg::Node::setCullingActive()
flag.  A mechanism has been implemented so that if child has its culling disabled
then their parents, all the way up to the root are also have their culling
implicitly disabled.

The osg::CullVisitor has updated to take account of
both the explicit control via setCullingActive and the implicit culling
disabling through children being disabled.

This feature is useful for nodes which don't have a bounding volume to cull
against, earth sky implementations and light sources.

The default osg::Node::_cullingActive is true, i.e. culling is enabled by
default.
2001-10-19 12:56:37 +00:00
Robert Osfield
60d33f91f8 Reverted Bryan's changes to FrameStamp w.r.t std::tm structure which doesn't
compile under Win32 and IRIX.  Will need to find another solution.
2001-10-16 21:47:47 +00:00
Bryan THRALL
a203a1b127 *** empty log message *** 2001-10-16 20:56:46 +00:00
Robert Osfield
ada36c3462 Fixes for Win32 compilation. 2001-10-16 16:48:19 +00:00
Don BURNS
747019d0b9 added float *() operator to Vec{2,3,4} so we can pass Vec3's directly to
OpenGL glVertex?fv().
2001-10-16 03:59:37 +00:00
Robert Osfield
de924ca759 Fixes for compilation under IRIX, submitted by Randal Hopper, with mods
from Robert.
2001-10-15 15:50:55 +00:00
Robert Osfield
5de4e8e6d8 Made the new global state attribute instances in osg::State use osg:ref_ptr
to automatically handle the memory deletion.
2001-10-15 14:29:40 +00:00
Robert Osfield
59077fed15 Added support for automatic creation of global StateAttributes to osg::State,
these global attributes are created by cloning any attributes which are
applied during rendering, the clone in a shallow copy, which will set up
default valus for that attribute.  This should prevent attribute bleed
from one stateset to the next when the global StateSet doesn't contain
an attribute used within the scene graph.
2001-10-15 14:07:54 +00:00
Robert Osfield
06dafa487e Added osgDB::ReaderWriter::Options class to the ReaderWriter base class, support
for settings options in osgDB::Registry, and added the paramter to all of the
reaader/writer plugins.  The Options structure by default has an string attached
for packing basic options, however, it also can be subclassed to encapsulate
any users defined option data. In the later case both the client code *and*
the plugin need to be aware of subclass, the plugin will need to use
dynamic_cast<> to assertain its type.
2001-10-14 17:54:25 +00:00
Robert Osfield
39ea16aad7 Added osg::StateSet::merge(const StateSet& rhs) merges merges the modes and
attributes of rhs into 'this' stateset.
2001-10-14 09:58:49 +00:00
Don BURNS
3ecaf3cd6c Fixed a small boo-boo in definition of bit masks in include/osg/Drawable
Fixed incorrect normal conversions for osgconv.
2001-10-14 06:01:31 +00:00
Robert Osfield
1e4a0cadf5 Changed the naming and calling convention of the new Drawable::AttributeFunctor
and have updated GeoSet to use mutable values for the _numverts etc, allowing
osg::GeoSet::computeNumVerts() to be a const operation. osg::GeoSet::getNumVerts
is now a const once more, so avoiding compilation problems.  Also chaned the new
osgconv orientation code to use a Drawable::AttributeFunctor so it can work on
other Drawables other than just GeoSets.
2001-10-13 11:16:10 +00:00
Don BURNS
79a992ac72 Updated osgconv to be able to handle orientation swapping. 2001-10-13 07:24:25 +00:00
Don BURNS
5b3a52547a Removed personal note in Matrix header file 2001-10-13 01:28:33 +00:00
Robert Osfield
9db63dfd5d Added != method to Vec2,Vec3,Vec4 and did further work on the
AttributeUpdateFunctors.
2001-10-12 20:05:55 +00:00
Robert Osfield
96085619ee Added support for DYNAMIC/STATIC osg::Transform types and added new osg::Drawable::getStats
and supportsAttributeUpdate(..) and applyAttributeUpdate(...) methods which will
be to enable hooks into Drawable subclasses.
2001-10-10 20:20:14 +00:00
Robert Osfield
3c5b9c813d Fixed spelling of osg::GeoSet::getNumInterleavedIndices, was missing a 'n'! 2001-10-10 14:38:12 +00:00
Robert Osfield
22aef83a8f Updated MSVC Workspace files to fix build problems. 2001-10-09 20:03:51 +00:00
Robert Osfield
3da57d6d22 Added a osg::DegreesToRadians() and osg::RadiansToDegrees() method to osg/Math,
updated the ReaderWriterBMP.cpp (mods sent in my Geoff Michel) and
moved the osgUtil::Statistics to osg::Statistics in preperation to adding it
to the the Drawable base class.
2001-10-06 20:29:42 +00:00
Robert Osfield
1fc623ad15 Added the Copyright message to the top of osgWX, with Ben Disoe's name as
he wrote all the code.
2001-10-04 16:49:13 +00:00
Robert Osfield
9917b6500d Added a copyright notice to all core headers, which all begin with
//C++ header to help scripts and editors pick up the fact that the
file is a header file.
2001-10-04 15:12:57 +00:00
Robert Osfield
d5ed4e2305 Added an implemention of basic state sorting to the RenderBin, but have commented
out the sort operation as Peformance benifit is currently negligable, will need
to improve on the sort functor to see real benifits.
2001-10-04 14:35:42 +00:00
Robert Osfield
4be1324b8c Changed the numeric ordering of StateAttributes Types, as part of an
investigation into state sorting.
2001-10-04 14:10:20 +00:00
Robert Osfield
2c6e85442b Integrated changes for MacOSX, submitted by Phil Atkin, with small mods by
Robert Osfield to maintain compatability under Linux.
2001-10-03 21:44:07 +00:00
Robert Osfield
7a7a26c2ea Added include/osg/EarthSky and src/osg/EarthSky to cvs.
Also move osg across to using radians for angular paramters by default.
By defining USE_DEGREES_INTERNALLY you can get the OSG to revert to
the old style degrees. This later feature is deprecated and only meant
for helping comptability in the interim.
2001-10-02 15:59:49 +00:00
Robert Osfield
430c8606e9 Added osg::EarthSky node to the core osg library, and added support for it into
osgUtil::SceneView, osg::CullVisitor, osgPlugin/osg and updated the hangglide
demo to use the new earth sky node.
2001-10-02 11:36:14 +00:00
Robert Osfield
fc1fa57275 Added support for osg::StateSet comparison operators and using this new feature
added support in osgUtil::OptimizeStateVisitor for removing duplicate
StateSet's from the scene graph, previously only duplicated StateAttributes
we're removed.
2001-10-01 23:02:14 +00:00
Robert Osfield
7359d33d53 Made spelling corrections, the spelling mistakes picked up by a script
written by Neil Salter.

script
2001-10-01 11:15:55 +00:00
Robert Osfield
ef3217cfde Interegrated changes to Timer from Neil Salter to fix compilation problems which had been introduced by doing #include's within the osg namespace. 2001-09-30 20:41:20 +00:00
Robert Osfield
8e2f1bdb72 Modified the Matrix multiple method added by Don so it is safer and added comments explaining why it shouldn't be needed as other more efficient methods should be doing the work for us.
Also added Matrix::ensureRealized() to support the lazy initialization of Matrix, whilest keeping the implementation robust so that external calls to Matrix which get values do so on an initialized matrix.
2001-09-29 09:37:43 +00:00
Don BURNS
4ba58ca29b Added operator * (Matrix &) to Matrix (header) and
operator [] to reference matrix elements.
2001-09-29 02:48:31 +00:00
Robert Osfield
ef2e9236bd Made spelling corrections to osg include files, spelling mistakes detected by a script written by Neil Salter which analyses comments for mistakes. 2001-09-28 20:10:41 +00:00
Robert Osfield
12f77f141e *** empty log message *** 2001-09-28 16:56:19 +00:00
Robert Osfield
57fd2b4bcb *** empty log message *** 2001-09-28 12:36:40 +00:00
Robert Osfield
2a9848ea95 *** empty log message *** 2001-09-27 16:34:41 +00:00
Robert Osfield
ba47264c5e *** empty log message *** 2001-09-27 09:44:55 +00:00
Robert Osfield
9fd1706e3c *** empty log message *** 2001-09-25 17:56:56 +00:00
Don BURNS
7ae58df42a Synch with 20010921 2001-09-22 02:42:08 +00:00
Don BURNS
ac2bdbda30 1) new implementation of the osg::Matrix class. Note details below.
2) cleaned up osg::Timer, still in progress.  My intent has been to
     pave the way for support for other OS's.
  3) new osg::FrameStamp class which has a frame number, reference
     time for each frame to be app, culled and drawn.  The FrameStamp
     also can be passed to other machines (i.e. cluster) and the
     FrameStamp can be used with the slaves own app,cull and draw.
     I've also added the beginings of a calander time data to the
     FrameStamp to allow time or day and year to be used in setting
     up position of sun/moon etc. etc.
  4) The osg::State now has contains a pointer to the last applied
     osg::Camera and the current osg::FrameStamp, so that drawables
     can use both pieces of information for creating effects such
     CLOD, earth/sky etc.  The osg::NodeVisitor also now allows you
     to attach a FrameStamp to support syncronization of actions on
     the scene graph.
2001-09-19 23:52:12 +00:00
Don BURNS
736e0f73c3 o Added osgUtil::StateOptimizeVisitor which traversing the scene
graph and builds up a map of all StateAttributes and StateSets
    and then removes the duplicates. This promotes state sharing
    throughout the scene graph which inturn can significantly improve
    performance thanks to reduced state changing. Particularily
    effective on datasets where a great deal of duplicated state
exists.
  o Added pure virtual compare(const osg::StateAttribute&)
    method to osg::StateAttribute, and implemented it in all the
    subclasses from StateAttribute. Added <,== & != operator
    on StateAttribute and Matrix to support new StateOptimizeVisitor.
  o Added META_Object, META_Node and META_StateAttribute macros to
    Object, Node and StateAttribute respectively which define the
    standard pure virtual methods such as clone, className
    & isSameKindAs.  Changed all the appropriate header files to
    use these macro's rather define them in each header, these cleans
    up the headers considerably.
  o Corrected the implementation of osg::Light::getType so it correctly
    uses a unique type for each of the OpenGL lights (GL_LIGHT0..
    GL_LIGHT7 relates to osg::StateAttriburte::LIGHT_0..LIGHT_7.
  o Changed the definition of osg::StateStateAttribute::Type to
    is now a unsigned int rather than an enum, and have changed the
    name of the previous Type enum list to be Types.  This makes it
    more consistent with the difination of values found in
StateAttribute
    and also easier to extend with having to cast to an enum.
  o From Pail Fredrikson, updated Maitrx.new implemention which uses
    the same matrix orientation as the original Matrix implemention.
2001-09-19 23:46:48 +00:00
Don BURNS
81f553aaee o Updated Metrowerks files for MacOS. They aren't 100% there yet,
but getting there.

  o First cut of osgcluster demo.  Very simple beginings.  Alas
    I only one PC here so I can't test it in its current guise.

  o New support for NodeCallbacks, via AppCallback attached to
    osg::Node's, and a default osgUtil::AppVisitor which calls them on
    each frame.

  o Support for traversal masks in osg::NodeVisitor, osg::Node
    which allows nodes to be switched on or off via a bit mask.

  o Suppport for traversal number (frame number) and reference time
    into osg::NodeVisitor to handle syncronization of app and cull
    traversals.  This also assist clustering as traversal number
    master to slaves.
2001-09-19 23:41:39 +00:00
Don BURNS
77494207fb Removed files.... synching witn 0.8.42 2001-09-19 21:51:06 +00:00
Don BURNS
7e81f6cfa6 More clean up for synch with 0.8.42 2001-09-19 21:19:47 +00:00
Don BURNS
e8f256a59d Added a bunch of files synched with 0.8.42 2001-09-19 21:08:56 +00:00
Don BURNS
70208ebc06 Initial revision 2001-01-10 16:32:10 +00:00