Commit Graph

65 Commits

Author SHA1 Message Date
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
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
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
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
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
97e4488d80 Changed a #define ... (GLenum) 0x84fe to 0x84FE to fix problems under MacOS9
build.
2001-10-29 19:29:49 +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
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
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
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
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