Commit Graph

27 Commits

Author SHA1 Message Date
Robert Osfield
6f65e86057 Further work on removing Camera references from NewCullVisitor and releted
classes, this work paves the way for making osg::Camera an optional
extra rather than a requirement for rendering.
2002-04-09 16:09:19 +00:00
Robert Osfield
84d2d01163 Added support for osg::MemoryManager which is based upon Paul Nettle's
memory manager published at flipcode.com.  This can be turned on
with the OSG_USE_MEMORY_MANGER option which then uses custom global
new and delete operators as well as provide osgNew and osgDelete macro's
which add ability to log line and file from which calls are made.

Updated osg,osgUtil,osgDB,osgText and osgPlugins/osg to use osgNew/osgDelete,
and fixed memory leaks highlighted by the new memory manager.
2002-03-26 23:52:52 +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
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
c1283c23e8 Removed the trailing ; after namespace {...} declariations in headers
which was being picked as a warning under Codewarrior.
2002-02-03 12:33:41 +00:00
Robert Osfield
02ef10fcfa Moved all references to osg::Cloner to osg::CopyOp. 2002-01-29 14:04:06 +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
cb8025d913 Renamed osg::Matric::makeIdent() to osg::Matrix::makeIdentity() to make
it consistent with the rest of the osg::Matrix naming.  Updated OSG
distribution to account for new name.

Added support for the STATIC/DYNAMIC osg::Transform::Type to the .osg
ASCII reader/writer plugin and the flt reader plugin.

Removed the non cost version of osg::Transform::getMatrix() as this could
by pass the dirty mechinism.
2001-12-15 16:56:39 +00:00
Robert Osfield
478274ae7d Fixes to Windows build in liu of the move to using just std::streams. 2001-12-14 23:18:28 +00:00
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
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
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
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
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
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
Don BURNS
5b3a52547a Removed personal note in Matrix header file 2001-10-13 01:28:33 +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
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
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
Don BURNS
7ae58df42a Synch with 20010921 2001-09-22 02:42:08 +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