Commit Graph

76 Commits

Author SHA1 Message Date
Robert Osfield
0bce843960 Completed implementation of a the new CombineLODsVisitor, ideal for use with
the .flt loader.  Code is stuff currently in sgv, but will be moved out once
more testing has been done.
2001-10-16 14:24:38 +00:00
Robert Osfield
a9564008f3 Added support for transforming LOD and Billboard centers to the
OrientationConverter and the flattenTransformVisitor in sgv.
2001-10-16 10:04:26 +00:00
Robert Osfield
659f7ad1ab Modified Veiewer.cpp so that when toggling the light with 'l' the light can
be overrided to off and overrided to on, previoulsy it only overrided to off.
2001-10-16 10:03:19 +00:00
Robert Osfield
c0b0ab5d62 Fixed problem caused by ReaderWriterPFB::writeNode(..) not ensuring that the
file extension was .pfb. Have added a check.
2001-10-16 08:24:26 +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
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
f27c006e28 Fixed rotations to account to the fixes made to Quat and Matrix related to
right hand rule rotation.
2001-10-15 11:18:51 +00:00
Robert Osfield
7c54b58306 The writeImage/Object/Node methods in the .osg and .pfb reader/writer didn't
have the new ReaderWriter::Options* structure passed to them, which meant the
the virtual functions didn't bind with the new base class methods and wern't
called on a write.
2001-10-15 08:40:30 +00:00
Don BURNS
d66bfdbbc5 Updated pfb loader to load pfb files into osg. Still broken for loading osg
files into Performer, however.
2001-10-15 03:32:47 +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
407978a248 Changed the OrientationConverter.cpp's to have consitent captilization as its
associated header file.
2001-10-14 16:55:12 +00:00
Robert Osfield
45eefec3f0 Fixed TransformFunctor code so that it now uses the inverse of the
transformation matrix to transform the normal.
2001-10-14 14:23:47 +00:00
Robert Osfield
6bb865af25 Fixed a bug in Matrix::invert(..) which did not set full_realised=true,
so that one Matrices which had not previously be initialized we're
erronously initialized later in the code resetting it to identity.
2001-10-14 14:23:03 +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
Robert Osfield
72dc08cd9a Fixed the Flight and Drive manipulators to work with the updated Matrix::rotate
code.
2001-10-14 09:57:33 +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
Don BURNS
a170b06d6d Mr. O added fancy, shmanzy C++ code, but broke normal transform functionality
Fixed.
2001-10-14 05:33:36 +00:00
Don BURNS
0e8c2ef89b Quick 'n dirty fix to TrackballManipulator to get the rotations doing the
right things after the Quat fixes.
2001-10-14 05:14:37 +00:00
Don BURNS
c6f11afbf6 Quaternions were assigning inverted values during conversion to matricies.
This is probably due to an error on the gamasutra web page demonstrating this.
It caused left-handed rotations rather than right handed rotations.  Should be
fixed now.
2001-10-14 04:28:50 +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
a57ab6d121 Added Mr. Osfields dynamic_cast<> and test for validity test. 2001-10-13 09:48:37 +00:00
Don BURNS
610358033f backed out right-handed coordinate transform for makeRot(vec3,vec3) in Quat.cpp 2001-10-13 08:34:02 +00:00
Don BURNS
b993f14cac A few more clean ups 2001-10-13 08:32:11 +00:00
Don BURNS
d391a6edc3 Cleaned up the usage message 2001-10-13 07:41:54 +00:00
Don BURNS
79a992ac72 Updated osgconv to be able to handle orientation swapping. 2001-10-13 07:24:25 +00:00
Don BURNS
49982ac835 Changed some routines to produce right-handed rotations. 2001-10-13 06:23:55 +00:00
Don BURNS
fef731c689 checking files in to move development location 2001-10-13 06:22:49 +00:00
Robert Osfield
58582998fa Added support for the new AttributeUpdateFunctors. 2001-10-12 20:06:35 +00:00
Don BURNS
cb17e99420 Added include/osg/Math to Makefile TARGET_INCLUDE_FILES and fixed references
to _mat in ConvertToPerformer.cpp
2001-10-12 17:45:15 +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
a7f0cacc41 Fixed a crash when opening an erroneous test file (reopen.bmp). 2001-10-09 21:55:47 +00:00
Robert Osfield
68e63ef750 Merged updates to BMP plugin from Geoff Michel. Also modified a little of the
code to fix a crash under Linux, Robert Osfield
2001-10-09 11:58:13 +00:00
Robert Osfield
8df894924c Fixed a recently introduced crash in the flt plugin which was happen when a
std::string was be be set with NULL char*.  Also added support for stripping
the filename from its original path, inside the osgDB::findFile function.
2001-10-08 15:54:16 +00:00
Robert Osfield
c66557087d Added support for using osgDB::fineFile into the .flt plugin. 2001-10-08 08:35:06 +00:00
Robert Osfield
2b85ce5c1c Merged Geoff Michel's udpdates to bmp plugin, and fixed a double fclose bug
which was causing a seg fault under Linux.
2001-10-07 20:10:58 +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
c56a1b8c31 Added bmp plugin files, bmp plguin written by Geoff Michel 2001-10-05 19:55:58 +00:00
Robert Osfield
df362da11b Added bmp osgPlugin, written by Geoff Michel. 2001-10-05 10:39:27 +00:00
Robert Osfield
c16fe83d0a Fixed a bug in osg::Image::ensureDimensionsArePowerOfTwo() which only
scaled dimensions if *both* axis wern't a power of two, have fixed it
to rescale if either of the axis arn't a power to two.
2001-10-05 10:38:16 +00:00
Robert Osfield
d5bff10797 Changed the ordering of comparing modes and attributes in
osg::StateAttribute::compare() as part of an investigration into state sorting.
2001-10-04 14:39:24 +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
c614c2f622 Added extra precision to the app,cull and draw timings in the Viewer. 2001-10-04 14:25:50 +00:00
Robert Osfield
f0bb34c4fe Removed some notify which were only used for debugging of the camera class
and are now redudent.
2001-10-04 14:20:23 +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
1ebddc2af7 Added missing EarthSky.cpp file to osg plguin. 2001-10-03 07:56:33 +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
0d0b33f4b0 Integrated a bug fix to osg::TexMat from Geoff Michel which adds a
glMatrixMode( GL_MODELVIEW ); after the setting of the texture matrix.
Previously the texture matrix mode could run into normal model view
matrix operations which were assuming the defaul of GL_MODELVIEW.
2001-10-01 12:06:22 +00:00
Robert Osfield
777e4ab9f1 Added setAttributeAndModes(new Depth,StateAttribute::ON);
to the StateSet::setGlobalDefault() so that the correct default for the glDepthFunc etc are set up for scene graphs, and allows override of these value which risk of inheriting state on to the rest of the scene graph.

This has allowed the hangglide demo to be simplified since it now doesn't need to set the global Depth instance itself.
2001-09-29 18:34:26 +00:00