Commit Graph

1212 Commits

Author SHA1 Message Date
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
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
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
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