Commit Graph

358 Commits

Author SHA1 Message Date
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
c726abd773 Integrated fixes to the detailed depth calculation in the CullVisitor from
Sasa, and fix to the IntersectVisitor's management of path from Sean.
2002-02-24 16:49:23 +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
6d267336c1 Fixes to Win32 build of new DX writer plugin. 2002-02-18 21:52:45 +00:00
Robert Osfield
36ae60180f Comment w.r.t OpenDX plugin updated. 2002-02-18 20:48:52 +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
f77afd4282 Fixed impostor bug introduced when new modelview matrix was moved entirely
within the cull traversal/draw traversal. The impostor code has been adapted
to the new convention.
2002-02-14 11:06:03 +00:00
Robert Osfield
e87f7cf853 Updated the makefiles to all have the #!gmake reference to force IRIX
compilation using gmake rather than pmake or smake.  This gets round
issues with exporting OSGHOME.
2002-02-13 22:56:47 +00:00
Robert Osfield
5d1289144c Updated the osgconv support for orientation conversion so that it used
inserted a static transform to do the work of rotating the scene, then
applied a standard osgUtil::Optimizer::FlattenStaticTransformsVisitor
traversal to flatten the transfrom down on to the geometry nodes.
2002-02-13 22:53:58 +00:00
Robert Osfield
2624162b0e Fixed problems with intersection visitor coupled with the viewer. 2002-02-13 00:13:03 +00:00
Robert Osfield
ef0d53ea54 Added sgv -stereo cessna.osg to make test list. 2002-02-13 00:00:20 +00:00
Robert Osfield
bba95040d6 Added a set of test runs to the makefiles and demos. The demos now have
titles relevenat to their function.
2002-02-12 23:49:24 +00:00
Robert Osfield
3ef8e4b0dd Updates for IRIX build, and docs updates. 2002-02-12 22:51:18 +00:00
Robert Osfield
e6ac4cd190 Updates to Transform handling in CullVisitor, in prep for moving camera
modelview and projection into Transform nodes.
2002-02-11 23:24:23 +00:00
Robert Osfield
61e3e0c693 Clean up of TXP plugin for IRIX build. 2002-02-11 22:53:42 +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
aeaa31bd2a Fixed Linux hang of the TXP loader by overriding the default -O2 optimization
level which appears to cause the code to hang, -O works fine for some strange
reason, I havn't found any direct problems in the code.  This may be compiler
bug or a code bug, the bug may go away in later versions of GNUC++, the
problem currently occurs under GCC2.96.
2002-02-11 15:09:52 +00:00
Robert Osfield
6238cef37f Applied fix to transparancy in flt loader. 2002-02-11 12:51:08 +00:00
Robert Osfield
479fc6d2f3 Fixed a make install error on the plugins related to the old definitions for
plugin names hanging around despite being deprecated.  These definiations
confused the make install/make instclean so it tried to link a non existant
library.  Have removed old definitions and everything intalls properly once
more:-)
2002-02-11 02:34:30 +00:00
Robert Osfield
0aab3a38b0 Updated Stats code, sent in by Geof Michel. 2002-02-11 00:40:37 +00:00
Robert Osfield
7bb160d27f Updateds NEWS for the 0.8.44 release.
Change the osg::NodeVisitor::getLocalToWorldMatrix() /
getWorldToLocalMatrix() methods so it do not initilize the matrix being
passed to them, and assume the the users has already initiliazed them
appropriately, such as to take account of camera positions.
2002-02-10 23:19:47 +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
d9398af300 Fixed a bug in the drive manipulator which was due to it using the local
coords of the intersection point with the scene rather than the world
coord value for that point.  The code now uses
osgUtil::Hit::getWorldIntersectionPoint() method for getting the world coords.

Added support for getWorldIntersectionPoint to Viewer.cpp.

Put and #ifdef around the setting of the default display list visitor so
it nolonger sets in under IRIX. This is a world around to the IR graphics
imbending lighting info into display lists, if the display lists are
created before state is set up it produces lighting artifacts such as
flickering.  Remove the the default display list init visitor removes
these problems, display lists are then built on the fly and drawables
a drawn for the first time.
2002-02-10 17:16:43 +00:00
Robert Osfield
a08fc47313 Fixes for MacOSX build. 2002-02-10 11:17:58 +00:00
Robert Osfield
86620891af Fixes to TXP loader for Cygwin and Ming builds. 2002-02-10 10:42:55 +00:00
Robert Osfield
634ef7e3a6 Fixed the osgUtil::Optimizer::FlattenStaticTransformVisitor so that it
does not flatten drawables which have double references to them, but only
one reference with a static transform on it.  This case can't be flattened
but this wasn't picked up.  The code now detects the case correctly.
2002-02-09 22:29:40 +00:00
Robert Osfield
6ccb4b20c5 Updates to BMP loader from Geoff Michel. 2002-02-09 21:29:33 +00:00
Robert Osfield
88b6691369 Added std:: infront of string refrences to solve compile problems under gcc 3.0.3.
Also converted to unix file endings so other the windows style files.
2002-02-09 19:46:44 +00:00
Robert Osfield
c999dfb154 Updates to docs and fixes to a few warnings. 2002-02-09 14:29:58 +00:00
Robert Osfield
16ada0fa3b Fix to BMP loader. 2002-02-09 10:50:09 +00:00
Robert Osfield
ed45cccc25 Fixes for cygwin and mingw builds. 2002-02-09 10:24:39 +00:00
Robert Osfield
254d22ec90 Removed further wxsgv files. 2002-02-08 23:07:43 +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
ab45bdf214 Fix for Win32 build. 2002-02-07 01:17:54 +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
7c7f195d6e Fix for the handling of lighting in the DW loader. 2002-02-07 01:12:06 +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
a4ea331f3a Added extensions code submitted by Yefrei. 2002-02-07 01:05:52 +00:00
Robert Osfield
95fb921953 Compile fixes. 2002-02-06 08:57:06 +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
92f68e2669 Added comment to flt2osg's handling of osg::Material setup w.r.t
osg::Material::_colorMode.
2002-02-05 10:49:58 +00:00
Don BURNS
18998a0654 added shademodel to TARGET_INCLUDE_FILES 2002-02-03 22:32:48 +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
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
41d4360675 Fixed a copy and paste error which was causing compile problems under Windows,
due to a incorrect comparison of objects of different types.
2002-02-02 19:49:47 +00:00
Robert Osfield
08194e04d6 Fixes for Windows build 2002-01-30 18:59:36 +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
2695342858 Added osgbillboard demo. The code is main a copy of osgtexture right now,
my plan to do change it to make it a better demo of the different types
of billboard that one can do.
2002-01-30 15:01:02 +00:00
Robert Osfield
34b93a9f9d Removed a Makedepend that didn't belong! 2002-01-30 14:37:47 +00:00
Robert Osfield
c2ac55a44b Fixed the rotation direction of the POINT_ROT_* modes, this was broken by
earlier fixes to the osg::Matrix.
2002-01-30 13:15:59 +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
02ef10fcfa Moved all references to osg::Cloner to osg::CopyOp. 2002-01-29 14:04:06 +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
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
7f65110322 Added stateset->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE_ON); to scribbed
subgraph so that lighting is always on, this is needed since glMaterial is only
active when lighting is enabled.
2002-01-27 20:28:43 +00:00
Robert Osfield
f9f9c577a8 Added new osgscribe demo which demostrates how to create a wireframe
overlay of a model.
2002-01-26 19:48:37 +00:00
Robert Osfield
78fc28be7c Fixed the LOD center and range code that so that the values are now multiple
by the _unitScale to compenstate for different scales in the flt model.  This
_unitScale had already been applied to the geometry data.

Integrated new defaults for the texturing wrap mode, for when now .attr file
is supplied with a flt file.
2002-01-26 14:13:27 +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
55e0a21dad Fixed problem with Optimzer::removeRedundentNodesVisitor which was removing the
correct redundent groups but for groups which had a single child it was
was not using replaceChild to rettach the child to its parents. It was using
parent->removeChild(group)...parent->addChild(child); which was allow the child
to be attached in a different place than the original group, this broke LOD code.
Have used removeChild instead which solves the LOD problem.
2002-01-23 15:28:31 +00:00
Robert Osfield
9a59cf0fe2 Changed the ordering of applying OpenGL modes and attributes back to the original
modes first then attributes since the it was cause a display bug on some
datesets.  It seems that the modes needs enabling before glMaterial's
take affect, at least on the NVidia drivers under Windows and Linux.
The OpenGL reference guide doesn't mention any dependancy so I'm not
sure what the official line is.  Some other OpenGl attribute and modes
need to be applied in that order according to the blue book, however,
drivers, at least the NVidia drivers seem require the opposite.  This may raise
the spectra of before and after mode applies, but this will require extra
support in osg::State and osg::StateAttribute, and would have to be handled
on a per attribute basis, and possibly different of each platform.  Yuck.
2002-01-23 12:04:53 +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
d115e143b5 Temporily commented out the call to the FlatternStaticTransformVisitor to
prevent a bug in handling instance nodes.  Will be commented back in once the
bug has been solved.
2002-01-22 12:03:47 +00:00
Robert Osfield
9d3a81b715 Added support for node instances to Open Flight loader. Submitted by Yefei He. 2002-01-22 11:03:26 +00:00
Robert Osfield
38b7380294 Fixes to Windows compile. 2002-01-20 19:30:16 +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
974b099135 Fixed the handling of non transparent billboards, since it was not taking into
account any accumulated transforms inherited from above.
2002-01-19 20:34:07 +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
baeb396ade Fixed copy constructor which was copying a matrix to unitialized memory. 2002-01-18 19:00:55 +00:00
Robert Osfield
25bb70a86b Made the osg::Timer::tick() method a const method. 2002-01-18 14:11:46 +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
13f06f4f93 Reversed the ordering of setting of OpenGL modes and attributes, so that
attributes are now set first, then modes.  This is keep consistent with
the setting of glColorMaterial and glEnable(GL_COLOR_MATERIAL) as specfied
in OpenGL documentation.
2002-01-16 21:23:29 +00:00
Robert Osfield
1594b762b4 Fixes to makefiles which have become a bit unhinged after MacOS X integration. 2002-01-16 21:20:22 +00:00
Robert Osfield
13ed25221a Added support for billboard in OpenFlight loader. Submission from Nikolaus Hanekamp. 2002-01-16 21:12:02 +00:00
Robert Osfield
92785c864e Integrated the changes to osgPlugin/Makefile's for MacOSX port. 2002-01-16 12:05:22 +00:00
Robert Osfield
d69c38f0ed Changed hardwired char[1024] arrays to char[FILEUTILS_MAX_PATH_LENGTH] and
defined the value to be 2048, this should avoid problems with path lengths
which have been overflowing the 1024 limit (Sasa report this bug). The
real solution is to use std::string throught FileUtils, but this will have
to wait for another day.
2002-01-16 12:03:29 +00:00
Robert Osfield
ad6a1665cc Added quicktime plugin (for Mac's only), submitted by Phil Atkin. 2002-01-16 10:41:55 +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
f7e944c47f Changed the use of std::vector<..>.begin() to &vector<..>.front() in code
from passing the vector contents to the GeoSet::setPrimLengths(..) etc.
methods.  This has been done to fix the compile under the MS .NET compiler
which has changed the definiation of the std::vector<..>::iterator to
a class rather than a pointer.
2002-01-15 23:21:31 +00:00
Robert Osfield
5ed8d680c0 Fix to osgDB::getStrippedName(..) so that handles the case of file without
an extension.
2002-01-15 19:54:55 +00:00
Robert Osfield
ff61505789 Added '# LIBS += -limage' and explanation in comments to pfb Makefile,
submitted by Randall Hooper.
2002-01-15 15:49:02 +00:00
Robert Osfield
3671e77168 Added the set of GL_TEXTURE_GEN_S and _T to code converting pfTexGen to
osg::TexGen. This is try and fix a bug in handling tex gen datasets such
as sj_texgen.pfb.
2002-01-15 12:13:29 +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
686b1abc83 Missing _attachedTransformMode in osg::Camera constructor, fix submitted by
Ben Discoe.
2002-01-12 21:49:07 +00:00