Commit Graph

566 Commits

Author SHA1 Message Date
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
bebcba5151 Updated AUTHORS file to reflect recent submission. 2002-01-22 11:03:46 +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
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
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
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
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
231b2de41e Submission from Sean Spicer which adds Make/makedefs.irix.std.64 which
compiles the OSG as 64bit.  Small changes by Robert to accomodate
recent MacOSX makefile changes.
2002-01-16 12:29:43 +00:00
Robert Osfield
76c4729328 Changes to Make/makerules.* and Make/makedefs.* to accomodate MacOSX's need
to treat plugins and shared libraries seperately.
2002-01-16 12:08:29 +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
Robert Osfield
9cfef010e0 Change TOP to OSGHOME in makefiles. 2002-01-05 16:19:18 +00:00
Robert Osfield
6da953e31d Moved the setting of camera fusion distance mode into the handle method so that
it is updated on everyframe to ensure that switching between Drive/Flight
and Trackball happens seemlessly.
2002-01-05 16:18:46 +00:00
Robert Osfield
42fd25c613 Renamed the TOP variable in the Makefiles to OSGHOME. 2002-01-04 20:44:41 +00:00
Robert Osfield
32c79ca554 Added a guard to osg::LOD::evaluate so that it returns -1 if the range
matched does not have a corresponding child to relate to.  This can happen
if a user creates more than n+1 ranges, where n is the number of LOD children.
2002-01-04 20:43:20 +00:00
Robert Osfield
4ea7de39c6 Added osg::ShadeModel state attribute which encapsulates glShadeModel. 2002-01-04 17:35:54 +00:00
Robert Osfield
7a7322f7b0 Fixed a bug in writing of line strips and line loops to the .osg file. 2002-01-04 17:34:01 +00:00
Robert Osfield
5be155cc4e Fixed multiple deletion of shared indecies in GeoSet destructor. 2002-01-04 13:14:06 +00:00
Robert Osfield
9b4028e7eb Futher Makefile updates for Cygwin support - from Norman Vine. 2002-01-03 23:28:54 +00:00
Robert Osfield
75fe0a6a7f Makefile changes to support Cywin port - submission from Norman Vine, updates
to fix case problems under unix by Robert.
2002-01-03 23:19:18 +00:00
Robert Osfield
e3ad8a87ee Updates for Cygwin port, from Norman Vine. 2002-01-03 21:34:57 +00:00
Robert Osfield
ba8c009219 Small source code changes for Cygwin port of OSG. 2002-01-03 19:28:13 +00:00