diff --git a/AUTHORS b/AUTHORS index 32891685c..471c57ca7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -65,6 +65,9 @@ Axel Volley Geoff Michel - .dw (design workshop) loader plugin. - OpenGL based stats reporting added to osgGLUT::Viewer. + +Paul Fredrikson + - new Matrix implementation. Indirect Contributors --------------------- diff --git a/ChangeLog b/ChangeLog index d0a20e230..1b6040d7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,147 @@ OSG Change log ============== +21th September 2001 - osg-20010921.tar.gz + + o Fixed compilation problem under Windows due to ctime being included + in the osg::Timer header file. The ctime refrence has been replaced + by time.h. Also fixed typo in osgGLUT/Viewer.cpp which was causing + compilation problems. + o Made the new osg::Matrix::translate/scale/rotate static method inline + to help improve peformance. + o Fixed bugs in osg::Matrix::preMult and postMult. + + +19th September 2001 - osg-20010919.tar.gz + + o Cleaned up the implementation of the osg::Timer class so it is easy + to read and maintain, and have added support for gettimeofday under + unix OS's where no other realtime timer is available, if this isn't + available either than + o Added FrameStamp class which encapsulates the frame number, + reference time and the calander time that a frame in schedualed. + o Fixed a couple of bugs & integrated further fixes from Paul Fredrikson, + to the new Matrix implemention, double checked results against the old + matrix class and am now getting consistent results. For this dev + version onwards the new Matrix class simply replaces the old one. The + new Matrix class contains old style methods to keep things compiling, + however these are deprecated and will be removed, probably by the next + full release. Check the header file for deprecated methods. You can + also comment in the #define WARN_DEPRECATED at the top of Matrix.cpp + and this will produce console warnings. + o From Don Burns - fixes to src/osgPlugins/osg/GeoSet.cpp adding in + an iterator increment to the code for outputing interleaved arrays, + previously the code entered an .osg writing inifite loop for this + data type. + o Have added #ifndef WIN32 around the call to the new OptimizeStateVisitor + which was added to sgv to prevent its use automatically under Windows - + thus avoiding the windows crash due to the MSVC++ buggy SLL implementation. + +14th September 2001 - osg-20010914.tar.gz + + o Added osgUtil::StateOptimizeVisitor which traversing the scene + graph and builds up a map of all StateAttributes and StateSets + and then removes the duplicates. This promotes state sharing + throughout the scene graph which inturn can significantly improve + performance thanks to reduced state changing. Particularily + effective on datasets where a great deal of duplicated state exists. + Even on already optimized datasets such as Performer town up + o Added pure virtual compare(const osg::StateAttribute&) + method to osg::StateAttribute, and implemented it in all the + subclasses from StateAttribute. Added <,== & != operator + on StateAttribute and Matrix to support new StateOptimizeVisitor. + o Added META_Object, META_Node and META_StateAttribute macros to + Object, Node and StateAttribute respectively which define the + standard pure virtual methods such as clone, className + & isSameKindAs. Changed all the appropriate header files to + use these macro's rather define them in each header, these cleans + up the headers considerably. + o Corrected the implementation of osg::Light::getType so it correctly + uses a unique type for each of the OpenGL lights (GL_LIGHT0.. + GL_LIGHT7 relates to osg::StateAttriburte::LIGHT_0..LIGHT_7. + o Changed the definition of osg::StateStateAttribute::Type to + is now a unsigned int rather than an enum, and have changed the + name of the previous Type enum list to be Types. This makes it + more consistent with the difination of values found in StateAttribute + and also easier to extend with having to cast to an enum. + o From Pail Fredrikson, updated Maitrx.new implemention which uses + the same matrix orientation as the original Matrix implemention. + +11th September 2001 - osg-20010911.tar.gz + + o From Paul Fredrikson - added new proposed Matrix implemention, its + been added in as Matrix.new and Matrix.cpp.new, the old Matrix + implemetion has been moved to Matrix.old and Matrix.cpp.old, and + new Matrix and Matrix.cpp directs compilation to Matrix.new if + USE_NEW_MATRIX is defined, otherwise defaults to Matrix.old. Once + a new implementation is settled and thoroughly tested then the + old one will be completely replaced by the new one. + o Added osg::NodeVisitor::s/getTraversalNumber(..) and s/getReferenceTime(..) + to better support syncronization of different traversals of the scene + graph and support osgcluster syncornization through the traversal number + and refernce time. + o Added osg::NodeVisitor::s/getTraversalMask(..), s/getNodeMaskOverride(..) + and validNodeMask(..) and modified all osg::Node's and its + subclass' ::accept(NodeVisitor) methods to check NodeVisitor:: + validNodeMask(..) and only call the NodeVisitor::apply(..) if it + returns true. This extra functionality allows users to switch on/off + nodes and their subgraph using a Node::s/getNodeMask() and since + a bit mask is used this can be done selectively for different + traversals, by using diffent bits for a traversal type (i.e app/cull). + o Added reuse of AlphaFunc and TexEnv objects between ImpostorSprites + into osg::ImpostorSpriteManager. + o Added osgcluster demo (can be found in src/Demos/osgcluster/), this + demo demonstrates a simple implmentation of keeping camera in sync + between entirely seperate apps running on different machines, and + what you get is multi-channel graphics cluster! osgcluster uses + UDP packets to keep the camera position in sync between other + osgcluster viewers running on other machines in the local area + network. + o Changes to osg::Camera - added osg::Camera::setFOV(), osg::Camera:: + s/getAdjustAspectRatioMode(), and osg::Camera::adjustAspectRatio(), + and renamed AdjustAxis enumerate AdjectAspectRatioMode. + o Updates to osg::NodeCallback and osgUtil::AppVisitor. + + +24th August 2001 - osg-20010824.tar.gz + + o Changed the impostor viewport so it is centered in the middle of + main viewport instead of the bottom left hand corner. The later + was causing problems with the windowing decoration was obscuring + the backbuffer drawing and texture read. + o Changed the default resolution to 800x600 for osgGLUT::Viewer and + osg::Viewer so that the demos appear ok on very small screens such + as laptops. + o Three items added for support of app traversal callbacks. + - added osg::NodeCallback for use as an app callback on osg::Node's + which is called by an app visitor. + - added osg::Node::setAppCallback()/getAppCallback(). + - added osgUtil::AppVisitor and made it default AppVisitor on SceneView. + note: new files are include/osg/NodeCallback, + include/osgUtil/AppVisitor and src/osgUtil/AppVisitor.cpp. + o Changed osgreflect and osgcube demos so they use an app callback, + instead of its own app visitor/glutTimerCallback repsectively. + o Changed the texture object type from osg::uint to GLunit in osg::Texture + to solved comptability problems under MacOS. + o Fixed spelling mistake of Minimum which occured several times + in include/osgUtil/VisualsRequirementsVisitor. + o Removed Lighting.cpp as it is nolonger used in any Makefiles, + and is only laying around due to not be removed earlier. + o From Bryan Woods - updated Metrowerks files for the MacOS port. + +22nd August 2001 - osg-20010822.tar.gz + + o Removed osg::StateSet::getAttributeVector() and getModeVector() + since they were simply hacks around MSVC++ bugs which are both + fixed by using STLport under windows, along with other bugs reported + under Windows. Its is now recommended that Windows users adopt + STLport instead of the MSVC++ one since the later is just plain flakey. + o From Ben Discoe - fixed typo of a bookmark in index.html + o Added osg::Viewport for encapsulating glViewport and for passing around + viewport object between various osg classes. Also helps avoid some + portability issues which have arisen over OpenGl types under MacOS. + o From Bryan Woods - updated Metrowerks files for the MacOS port. + 9th August 2001 - osg-0.8.42.tar.gz o Toned down the specular light values set by default in osgUtil::SceneView:: diff --git a/INSTALL b/INSTALL index 763b1592d..2d637b2ed 100644 --- a/INSTALL +++ b/INSTALL @@ -53,6 +53,9 @@ Environmental settings under Unix: export OSGFILEPATH=./:${OSGDATA}:${OSGDATA}/Images: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${OSGHOME}/lib export PATH=${PATH}:${OSGHOME}/bin + + note: under IRIX you'll need to use LD_LIBRARYN32_PATH instead + of LD_LIBRARY_PATH. Compiling under Linux : ----------------------- @@ -143,7 +146,11 @@ Compiling under Windows : The Microsoft Visual C++ 6.0 workspace file is VisualStudio.dsw located in the VisualStudio\ below the OSG this root directory. The OSG will compile with the basic VisualC++6.0, but its recommended that you use - Service Pack 4 to fix MS compiler bugs which affect the OSG. + Service Pack 4 to fix MS compiler bugs which affect the OSG. Even + Service Pack 4 does not completely fix MSVC bugs associated with STL, so + it is recommended that you also use STLPort which can be downloaded + from http://www.stlport.org since they actually know how to write a + STL library and have done a rather good job at it. The OSG is composed of a number of libraries and executables, to get running you'll need at least to compile osg,osgUtil,osgDB,osgGLUT, diff --git a/TODO b/TODO index 29544b75e..07b99165e 100644 --- a/TODO +++ b/TODO @@ -50,7 +50,7 @@ o Core OSG Library . spacial subdivision decoration nodes? - Visitors - . improve state sorting of opaque bins in osg::RenderVistor. + . improve state sorting of opaque bins in osg::RenderBin. . add statistics visitor for logging the stats of the scene graph. . add OpenGL picking visitor. diff --git a/VisualStudio/osg/osg.dsp b/VisualStudio/osg/osg.dsp index 924237ccd..62ca3a3af 100755 --- a/VisualStudio/osg/osg.dsp +++ b/VisualStudio/osg/osg.dsp @@ -142,6 +142,10 @@ SOURCE=..\..\Src\Osg\FrontFace.cpp # End Source File # Begin Source File +SOURCE=..\..\Src\Osg\FrameStamp.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\osg\Geode.cpp # End Source File # Begin Source File @@ -276,6 +280,10 @@ SOURCE=..\..\src\osg\Transparency.cpp SOURCE=..\..\src\osg\Version.cpp # End Source File +# Begin Source File + +SOURCE=..\..\src\osg\Viewport.cpp +# End Source File # End Group # Begin Group "Header Files" @@ -338,6 +346,10 @@ SOURCE=..\..\Include\Osg\FrontFace # End Source File # Begin Source File +SOURCE=..\..\Include\Osg\FrameStamp +# End Source File +# Begin Source File + SOURCE=..\..\Include\Osg\Geode # End Source File # Begin Source File @@ -418,6 +430,10 @@ SOURCE=..\..\Include\Osg\Node # End Source File # Begin Source File +SOURCE=..\..\Include\Osg\NodeCallback +# End Source File +# Begin Source File + SOURCE=..\..\Include\Osg\NodeVisitor # End Source File # Begin Source File @@ -516,6 +532,10 @@ SOURCE=..\..\Include\Osg\Vec4 SOURCE=..\..\Include\Osg\Version # End Source File +# Begin Source File + +SOURCE=..\..\Include\Osg\Viewport +# End Source File # End Group # Begin Group "Resource Files" diff --git a/VisualStudio/osgUtil/osgUtil.dsp b/VisualStudio/osgUtil/osgUtil.dsp index 07494791f..565f5bcd7 100755 --- a/VisualStudio/osgUtil/osgUtil.dsp +++ b/VisualStudio/osgUtil/osgUtil.dsp @@ -94,6 +94,10 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File +SOURCE=..\..\src\osgUtil\AppVisitor.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\osgUtil\VisualsRequirementsVisitor.cpp # End Source File # Begin Source File @@ -142,6 +146,10 @@ SOURCE=..\..\src\osgUtil\NvTriStripObjects.cpp # End Source File # Begin Source File +SOURCE=..\..\src\osgUtil\OptimizeStateVisitor.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\osgUtil\RenderBin.cpp # End Source File # Begin Source File @@ -198,6 +206,10 @@ SOURCE=..\..\src\osgUtil\Version.cpp # PROP Default_Filter ";h;hpp;hxx;hm;inl" # Begin Source File +SOURCE=..\..\Include\osgUtil\AppVisitor +# End Source File +# Begin Source File + SOURCE=..\..\Include\osgUtil\VisualsRequirementsVisitor # End Source File # Begin Source File @@ -258,6 +270,10 @@ SOURCE=..\..\Include\osgUtil\InsertImpostorsVisitor # End Source File # Begin Source File +SOURCE=..\..\Include\osgUtil\OptimizeStateVisitor +# End Source File +# Begin Source File + SOURCE=..\..\src\osgUtil\NvTriStripObjects.h # End Source File # Begin Source File diff --git a/dist/RedHatRPM/Makefile b/dist/RedHatRPM/Makefile index 7f5f07831..1ae396b69 100644 --- a/dist/RedHatRPM/Makefile +++ b/dist/RedHatRPM/Makefile @@ -1,9 +1,9 @@ SHELL = /bin/sh BINDIRS = \ - OpenSceneGraph-${OSGVERSION}/bin/\ - OpenSceneGraph-${OSGVERSION}/include/\ - OpenSceneGraph-${OSGVERSION}/lib/\ + osg-${OSGVERSION}/bin/\ + osg-${OSGVERSION}/include/\ + osg-${OSGVERSION}/lib/\ all :: rpm @@ -13,7 +13,7 @@ rpm : osg.spec tardist osg.spec : makespec - makespec + ./makespec tardist : @[ -n "${OSGHOME}" ] || (echo Please define OSGHOME; exit 3) @@ -22,7 +22,7 @@ tardist : @[ "`whoami`" = "root" ] || (echo Must be ROOT; exit 6) (cd ${OSGHOME}/..; \ tar cf - ${BINDIRS} | gzip > \ - /usr/src/redhat/SOURCES/osg-${OSGVERSION}-${OSGRELEASE}.tar.gz) + /usr/src/redhat/SOURCES/osg-${OSGVERSION}.tar.gz) clean : diff --git a/dist/RedHatRPM/makespec b/dist/RedHatRPM/makespec index a648f3820..129601057 100755 --- a/dist/RedHatRPM/makespec +++ b/dist/RedHatRPM/makespec @@ -11,7 +11,7 @@ list_install_files() for f in `ls -1 $d` do echo cp -rf \ - /usr/src/redhat/BUILD/OpenSceneGraph-"$OSGVERSION"/$dd/$f /usr/$dd/$f + /usr/src/redhat/BUILD/osg-"$OSGVERSION"/$dd/$f /usr/$dd/$f done done } @@ -47,12 +47,12 @@ list_attr_files() cat <<-LEOF > osg.spec Summary: Open Scene Graph -Name: OpenSceneGraph +Name: osg Version: $OSGVERSION Release: $OSGRELEASE Copyright: GLPL Group: Graphics -Source: osg-$OSGVERSION-$OSGRELEASE.tar.gz +Source: osg-$OSGVERSION.tar.gz URL: http://www.openscenegraph.org Packager: `awk -f - /etc/passwd <<-EOF BEGIN { FS=":"} diff --git a/dist/RedHatRPM/osg.spec b/dist/RedHatRPM/osg.spec index c12790b05..1170ede1b 100644 --- a/dist/RedHatRPM/osg.spec +++ b/dist/RedHatRPM/osg.spec @@ -1,11 +1,11 @@ Summary: Open Scene Graph -Name: OpenSceneGraph -Version: 0.8.39 +Name: osg +Version: 0.8.42 Release: 1 -Copyright: LGPL +Copyright: GLPL Group: Graphics -Source: osg-0.8.39.tar.gz +Source: osg-0.8.42.tar.gz URL: http://www.openscenegraph.org Packager: Robert Osfield @@ -18,7 +18,24 @@ Open Scene Graph is an open-source scene graph API. %build %install - +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/bin/hangglide /usr/bin/hangglide +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/bin/osgconv /usr/bin/osgconv +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/bin/osgcube /usr/bin/osgcube +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/bin/osgimpostor /usr/bin/osgimpostor +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/bin/osgreflect /usr/bin/osgreflect +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/bin/osgtexture /usr/bin/osgtexture +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/bin/osgviews /usr/bin/osgviews +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/bin/sgv /usr/bin/sgv +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/lib/libosgDB.so /usr/lib/libosgDB.so +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/lib/libosgGLUT.so /usr/lib/libosgGLUT.so +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/lib/libosg.so /usr/lib/libosg.so +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/lib/libosgUtil.so /usr/lib/libosgUtil.so +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/lib/osgPlugins /usr/lib/osgPlugins +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/include/osg /usr/include/osg +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/include/osgDB /usr/include/osgDB +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/include/osgGLUT /usr/include/osgGLUT +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/include/osgUtil /usr/include/osgUtil +cp -rf /usr/src/redhat/BUILD/osg-0.8.42/include/osgWX /usr/include/osgWX @@ -26,7 +43,78 @@ Open Scene Graph is an open-source scene graph API. # FILES Sections %files -%attr(755, root, root) /usr/bin/* -%attr(755, root, root) /usr/lib/* -%attr(444, root, root) /usr/include/osg/* +%attr(755, root, root) /usr/bin/hangglide +%attr(755, root, root) /usr/bin/osgconv +%attr(755, root, root) /usr/bin/osgcube +%attr(755, root, root) /usr/bin/osgimpostor +%attr(755, root, root) /usr/bin/osgreflect +%attr(755, root, root) /usr/bin/osgtexture +%attr(755, root, root) /usr/bin/osgviews +%attr(755, root, root) /usr/bin/sgv +%attr(755, root, root) /usr/lib/libosgDB.so +%attr(755, root, root) /usr/lib/libosgGLUT.so +%attr(755, root, root) /usr/lib/libosg.so +%attr(755, root, root) /usr/lib/libosgUtil.so +%attr(755, root, root) /usr/lib/osgPlugins +%attr(444, root, root) /usr/include/osg/AlphaFunc +%attr(444, root, root) /usr/include/osg/Billboard +%attr(444, root, root) /usr/include/osg/BoundingBox +%attr(444, root, root) /usr/include/osg/BoundingSphere +%attr(444, root, root) /usr/include/osg/BoundsChecking +%attr(444, root, root) /usr/include/osg/Camera +%attr(444, root, root) /usr/include/osg/ClippingVolume +%attr(444, root, root) /usr/include/osg/ClipPlane +%attr(444, root, root) /usr/include/osg/ColorMask +%attr(444, root, root) /usr/include/osg/CullFace +%attr(444, root, root) /usr/include/osg/Depth +%attr(444, root, root) /usr/include/osg/Drawable +%attr(444, root, root) /usr/include/osg/Export +%attr(444, root, root) /usr/include/osg/Fog +%attr(444, root, root) /usr/include/osg/FrontFace +%attr(444, root, root) /usr/include/osg/Geode +%attr(444, root, root) /usr/include/osg/GeoSet +%attr(444, root, root) /usr/include/osg/GL +%attr(444, root, root) /usr/include/osg/GLExtensions +%attr(444, root, root) /usr/include/osg/Group +%attr(444, root, root) /usr/include/osg/Image +%attr(444, root, root) /usr/include/osg/Impostor +%attr(444, root, root) /usr/include/osg/ImpostorSprite +%attr(444, root, root) /usr/include/osg/Light +%attr(444, root, root) /usr/include/osg/LightSource +%attr(444, root, root) /usr/include/osg/LineSegment +%attr(444, root, root) /usr/include/osg/LOD +%attr(444, root, root) /usr/include/osg/Material +%attr(444, root, root) /usr/include/osg/Matrix +%attr(444, root, root) /usr/include/osg/MemoryAdapter +%attr(444, root, root) /usr/include/osg/mem_ptr +%attr(444, root, root) /usr/include/osg/Node +%attr(444, root, root) /usr/include/osg/NodeCallback +%attr(444, root, root) /usr/include/osg/NodeVisitor +%attr(444, root, root) /usr/include/osg/Notify +%attr(444, root, root) /usr/include/osg/Object +%attr(444, root, root) /usr/include/osg/Plane +%attr(444, root, root) /usr/include/osg/Point +%attr(444, root, root) /usr/include/osg/PolygonMode +%attr(444, root, root) /usr/include/osg/PolygonOffset +%attr(444, root, root) /usr/include/osg/Quat +%attr(444, root, root) /usr/include/osg/Referenced +%attr(444, root, root) /usr/include/osg/ref_ptr +%attr(444, root, root) /usr/include/osg/State +%attr(444, root, root) /usr/include/osg/StateAttribute +%attr(444, root, root) /usr/include/osg/StateSet +%attr(444, root, root) /usr/include/osg/Stencil +%attr(444, root, root) /usr/include/osg/Switch +%attr(444, root, root) /usr/include/osg/TexEnv +%attr(444, root, root) /usr/include/osg/TexGen +%attr(444, root, root) /usr/include/osg/TexMat +%attr(444, root, root) /usr/include/osg/Texture +%attr(444, root, root) /usr/include/osg/Timer +%attr(444, root, root) /usr/include/osg/Transform +%attr(444, root, root) /usr/include/osg/Transparency +%attr(444, root, root) /usr/include/osg/Types +%attr(444, root, root) /usr/include/osg/Vec2 +%attr(444, root, root) /usr/include/osg/Vec3 +%attr(444, root, root) /usr/include/osg/Vec4 +%attr(444, root, root) /usr/include/osg/Version +%attr(444, root, root) /usr/include/osg/Viewport diff --git a/doc/doc++/osg/AlphaFunc.html b/doc/doc++/osg/AlphaFunc.html index 7bc5d8e17..1ee547237 100644 --- a/doc/doc++/osg/AlphaFunc.html +++ b/doc/doc++/osg/AlphaFunc.html @@ -25,40 +25,37 @@

Public Methods

[more] AlphaFunc()
-[more]virtual bool isSameKindAs(const Object* obj) const +[more] META_StateAttribute(AlphaFunc, ALPHAFUNC)
-[more]virtual Object* clone() const +[more]virtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
-[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
-[more]virtual const Type getType() const +[more]inline void setFunction(const ComparisonFunction func, const float ref)
-[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline const ComparisonFunction getFunction() const
-[more]inline void setFunction(const ComparisonFunction func, const float ref) +[more]inline const float getReferenceValue() const
-[more]inline const ComparisonFunction getFunction() const -
-[more]inline const float getReferenceValue() const -
-[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

Public Members

-[more]enum ComparisonFunction +[more]enum ComparisonFunction

Protected Fields

-[more]ComparisonFunction _comparisonFunc +[more]ComparisonFunction _comparisonFunc
-[more]float _referenceValue +[more]float _referenceValue

Protected Methods

-[more]virtual ~AlphaFunc() +[more]virtual ~AlphaFunc()

@@ -66,6 +63,20 @@

Public Methods

+ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual const Type getType() const +
+obool operator < (const StateAttribute& rhs) const +
+obool operator == (const StateAttribute& rhs) const +
+obool operator != (const StateAttribute& rhs) const +
ovirtual void compile(State&) const

@@ -79,7 +90,9 @@
oenum Values
-oenum Type +otypedef unsigned int Type +
+oenum Types

@@ -116,90 +129,83 @@
o AlphaFunc()

- + -

ovirtual bool isSameKindAs(const Object* obj) const +
o META_StateAttribute(AlphaFunc, ALPHAFUNC)

- + -

ovirtual Object* clone() const -

- - -

ovirtual const char* className() const -

- - -

ovirtual const Type getType() const +
ovirtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

- -

ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

- +

oenum ComparisonFunction

- +
o NEVER

- +

o LESS

- +

o EQUAL

- +

o LEQUAL

- +

o GREATER

- +

o NOTEQUAL

- +

o GEQUAL

- +

o ALWAYS

- -
oinline void setFunction(const ComparisonFunction func, const float ref) + +
oinline void setFunction(const ComparisonFunction func, const float ref)

- -

oinline const ComparisonFunction getFunction() const + +
oinline const ComparisonFunction getFunction() const

- +

oinline const float getReferenceValue() const

- +

ovirtual void apply(State& state) const

- +

ovirtual ~AlphaFunc()

- -

oComparisonFunction _comparisonFunc + +
oComparisonFunction _comparisonFunc

- +

ofloat _referenceValue

diff --git a/doc/doc++/osg/Billboard.html b/doc/doc++/osg/Billboard.html index 8eb677351..03f2f32a4 100644 --- a/doc/doc++/osg/Billboard.html +++ b/doc/doc++/osg/Billboard.html @@ -25,74 +25,68 @@

Public Methods

[more] Billboard()
-[more]virtual Object* clone() const +[more] META_Node(Billboard)
-[more]virtual bool isSameKindAs(const Object* obj) const -
-[more]virtual const char* className() const -
-[more]virtual void accept(NodeVisitor& nv) -
-[more]inline void setAxis(const Vec3& axis) +[more]inline void setAxis(const Vec3& axis)
Set the axis about which all the billboard's drawable rotate.
-[more]inline const Vec3& getAxis() const +[more]inline const Vec3& getAxis() const
Get the axis about which all the billboard's drawable rotate.
-[more]inline void setMode(const Mode mode) +[more]inline void setMode(const Mode mode)
Set the billboard rotation mode.
-[more]inline const Mode getMode() const +[more]inline const Mode getMode() const
Get the billboard rotation mode.
-[more]inline void setPos(int i, const Vec3& pos) +[more]inline void setPos(int i, const Vec3& pos)
Set the position of specified drawable.
-[more]inline const Vec3& getPos(int i) const +[more]inline const Vec3& getPos(int i) const
Get the position of specified drawable.
-[more]inline PositionList& getPositionList() +[more]inline PositionList& getPositionList()
Get the PostionList from the billboard
-[more]inline const PositionList& getPositionList() const +[more]inline const PositionList& getPositionList() const
Get a const PostionList from the billboard
-[more]virtual const bool addDrawable( Drawable* gset ) +[more]virtual const bool addDrawable( Drawable* gset )
Add Drawable to Billboard with default position(0,0,0); If gset not NULL and is not contained in Billboard then increment its reference count, and dirty the bounding box to cause it to recompute on next getBound() and return true for success.
-[more]virtual const bool addDrawable(Drawable* gset, const Vec3& pos) +[more]virtual const bool addDrawable(Drawable* gset, const Vec3& pos)
Add Drawable to Geode at position pos.
-[more]virtual const bool removeDrawable( Drawable* gset ) +[more]virtual const bool removeDrawable( Drawable* gset )
Remove Drawable and associated position from Billboard.
-[more]void calcRotation(const Vec3& eye_local, const Vec3& pos_local, Matrix& mat) const +[more]void calcRotation(const Vec3& eye_local, const Vec3& pos_local, Matrix& mat) const
-[more]void calcTransform(const Vec3& eye_local, const Vec3& pos_local, Matrix& mat) const +[more]void calcTransform(const Vec3& eye_local, const Vec3& pos_local, Matrix& mat) const

Public Members

[more]enum Mode
-[more]typedef std::vector<Vec3> PositionList +[more]typedef std::vector<Vec3> PositionList
PositionList represents a list of pivot points for each drawable

Protected Fields

-[more]Mode _mode +[more]Mode _mode
-[more]Vec3 _axis +[more]Vec3 _axis
-[more]PositionList _positionList +[more]PositionList _positionList

Protected Methods

-[more]virtual ~Billboard() +[more]virtual ~Billboard()
-[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const

@@ -127,6 +121,14 @@

Public Methods

+ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual void accept(NodeVisitor& nv) +
ovirtual void ascend(NodeVisitor& nv)
ovirtual void traverse(NodeVisitor& ) @@ -137,7 +139,7 @@
oinline const std::string& getName() const
-oinline const ParentList& getParents() const +oinline const ParentList& getParents() const
oinline Group* getParent(const int i)
@@ -145,7 +147,15 @@
oinline const int getNumParents() const
-oinline void setUserData(void* data, MemoryAdapter* ma=0L) +ovoid setAppCallback(NodeCallback* nc) +
+oinline NodeCallback* getAppCallback() +
+oinline const NodeCallback* getAppCallback() const +
+oinline const int getNumChildrenRequiringAppTraversal() const +
+oinline void setUserData(void* data, MemoryAdapter* ma=0L)
oinline void* getUserData()
@@ -159,9 +169,9 @@
oinline const NodeMask getNodeMask() const
-oinline const DescriptionList& getDescriptions() const +oinline const DescriptionList& getDescriptions() const
-oinline DescriptionList& getDescriptions() +oinline DescriptionList& getDescriptions()
oinline const std::string& getDescription(const int i) const
@@ -197,7 +207,11 @@
ostd::string _name
-oParentList _parents +oParentList _parents +
+oref_ptr<NodeCallback> _appCallback +
+oint _numChildrenRequiringAppTraversal
ovoid* _userData
@@ -205,11 +219,16 @@
oNodeMask _nodeMask
-oDescriptionList _descriptions +oDescriptionList _descriptions
oref_ptr<StateSet> _dstate

+

+

Protected Methods

+ovoid setNumChildrenRequiringAppTraversal(const int num) +

+

Inherited from Object:

@@ -264,69 +283,57 @@ Typical uses are for trees, or particle explosions.
o Billboard()

- + -

ovirtual Object* clone() const -

- - -

ovirtual bool isSameKindAs(const Object* obj) const -

- - -

ovirtual const char* className() const -

- - -

ovirtual void accept(NodeVisitor& nv) +
o META_Node(Billboard)

- +

oinline void setAxis(const Vec3& axis)
Set the axis about which all the billboard's drawable rotate.

- +

oinline const Vec3& getAxis() const
Get the axis about which all the billboard's drawable rotate.

- +

oinline void setMode(const Mode mode)
Set the billboard rotation mode.

- +

oinline const Mode getMode() const
Get the billboard rotation mode.

- +

oinline void setPos(int i, const Vec3& pos)
Set the position of specified drawable.

- +

oinline const Vec3& getPos(int i) const
Get the position of specified drawable.

- +

otypedef std::vector<Vec3> PositionList
PositionList represents a list of pivot points for each drawable

- -

oinline PositionList& getPositionList() + +
oinline PositionList& getPositionList()
Get the PostionList from the billboard

- -

oinline const PositionList& getPositionList() const + +
oinline const PositionList& getPositionList() const
Get a const PostionList from the billboard

- +

ovirtual const bool addDrawable( Drawable* gset )
Add Drawable to Billboard with default position(0,0,0); If gset not NULL and is not contained in Billboard then increment its @@ -334,7 +341,7 @@ reference count, and dirty the bounding box to cause it to recompute on next getBound() and return true for success. Otherwise return false.

- +

ovirtual const bool addDrawable(Drawable* gset, const Vec3& pos)
Add Drawable to Geode at position pos. If gset not NULL and is not contained in Billboard then increment its @@ -342,7 +349,7 @@ reference count, and dirty the bounding box to cause it to recompute on next getBound() and return true for success. Otherwise return false.

- +

ovirtual const bool removeDrawable( Drawable* gset )
Remove Drawable and associated position from Billboard. If gset is contained in Billboard then remove it from the geoset @@ -352,32 +359,32 @@ return true for success. If gset is not found then return false and do not the reference count of gset is left unchanged.

- +

ovoid calcRotation(const Vec3& eye_local, const Vec3& pos_local, Matrix& mat) const

- +

ovoid calcTransform(const Vec3& eye_local, const Vec3& pos_local, Matrix& mat) const

- +

ovirtual ~Billboard()

- +

ovirtual const bool computeBound() const

- +

oMode _mode

- +

oVec3 _axis

- -

oPositionList _positionList + +
oPositionList _positionList


This class has no child classes.
diff --git a/doc/doc++/osg/Camera.html b/doc/doc++/osg/Camera.html index d00130a37..1de788180 100644 --- a/doc/doc++/osg/Camera.html +++ b/doc/doc++/osg/Camera.html @@ -30,122 +30,134 @@ [more]const ProjectionType getProjectionType() const
Get the projection type set by setOtho,setOtho2D,setFrustum, and set perspective methods
-[more]void setOrtho(const double left, const double right, const double bottom, const double top, const double zNear, const double zFar) +[more]void setOrtho(const double left, const double right, const double bottom, const double top, const double zNear, const double zFar)
Set a orthographics projection.
-[more]void setOrtho2D(const double left, const double right, const double bottom, const double top) +[more]void setOrtho2D(const double left, const double right, const double bottom, const double top)
Set a 2D orthographics projection.
-[more]void setFrustum(const double left, const double right, const double bottom, const double top, const double zNear, const double zFar) +[more]void setFrustum(const double left, const double right, const double bottom, const double top, const double zNear, const double zFar)
Set a perspective projection.
-[more]void setPerspective(const double fovy, const double aspectRatio, const double zNear, const double zFar) +[more]void setPerspective(const double fovy, const double aspectRatio, const double zNear, const double zFar)
Set a sysmetical perspective projection, See gluPerspective for further details.
-[more]void setNearFar(const double zNear, const double zFar) +[more]void setFOV(const double fovx, const double fovy, const double zNear, const double zFar) +
Set a sysmetical perspective projection using field of view +
+[more]void setNearFar(const double zNear, const double zFar)
Set the near and far clipping planes
-[more]void adjustAspectRatio(const double newAspectRatio, const AdjustAxis aa = ADJUST_HORIZONTAL) +[more]void setAdjustAspectRatioMode(const AdjustAspectRatioMode aam) +
Set the way that the vertical or horizontal dimensions of the window are adjusted on a resize. +
+[more]const AdjustAspectRatioMode getAdjustAspectRatioMode() const +
Get the way that the vertical or horizontal dimensions of the window are adjusted on a resize. +
+[more]void adjustAspectRatio(const double newAspectRatio)
Adjust the clipping planes to account for a new window aspcect ratio.
-[more]const double left() const +[more]void adjustAspectRatio(const double newAspectRatio, const AdjustAspectRatioMode aa) +
Adjust the clipping planes to account for a new window aspcect ratio.
-[more]const double right() const +[more]const double left() const
-[more]const double top() const +[more]const double right() const
-[more]const double bottom() const +[more]const double top() const
-[more]const double zNear() const +[more]const double bottom() const
-[more]const double zFar() const +[more]const double zNear() const
-[more]const double calc_fovy() const +[more]const double zFar() const +
+[more]const double calc_fovy() const
Calculate and return the equivilant fovx for the current project setting.
-[more]const double calc_fovx() const +[more]const double calc_fovx() const
Calculate and return the equivilant fovy for the current project setting.
-[more]const double calc_aspectRatio() const +[more]const double calc_aspectRatio() const
Calculate and return the projection aspect ratio.
-[more]const Matrix& getProjectionMatrix() const +[more]const Matrix& getProjectionMatrix() const
-[more]const LookAtType getLookAtType() const +[more]const LookAtType getLookAtType() const
-[more]void home() +[more]void home()
hardwired home view for now, looking straight down the Z axis at the origin, with 'up' being the y axis
-[more]void setView(const Vec3& eyePoint, const Vec3& lookPoint, const Vec3& upVector) +[more]void setView(const Vec3& eyePoint, const Vec3& lookPoint, const Vec3& upVector)
Set the View, the up vector should be orthogonal to the look vector.
-[more]void setLookAt(const Vec3& eye, const Vec3& center, const Vec3& up) +[more]void setLookAt(const Vec3& eye, const Vec3& center, const Vec3& up)
set the position and orientaion of the camera, using the same convention as gluLookAt
-[more]void setLookAt(const double eyeX, const double eyeY, const double eyeZ, const double centerX, const double centerY, const double centerZ, const double upX, const double upY, const double upZ) +[more]void setLookAt(const double eyeX, const double eyeY, const double eyeZ, const double centerX, const double centerY, const double centerZ, const double upX, const double upY, const double upZ)
set the position and orientaion of the camera, using the same convention as gluLookAt
-[more]void transformLookAt(const Matrix& matrix) +[more]void transformLookAt(const Matrix& matrix)
post multiple the existing eye point and orientation by matrix.
-[more]void ensureOrthogonalUpVector() +[more]void ensureOrthogonalUpVector()
-[more]inline const Vec3& getEyePoint() const +[more]inline const Vec3& getEyePoint() const
get the eye point.
-[more]inline const Vec3& getCenterPoint() const +[more]inline const Vec3& getCenterPoint() const
get the center point.
-[more]inline const Vec3& getUpVector() const +[more]inline const Vec3& getUpVector() const
get the up vector
-[more]const Vec3 getLookVector() const +[more]const Vec3 getLookVector() const
calculate look vector
-[more]const Vec3 getSideVector() const +[more]const Vec3 getSideVector() const
calculate side vector
-[more]inline const float getFocalLength() const +[more]inline const float getFocalLength() const
get focal distance
-[more]void attachTransform(const TransformMode mode, Matrix* modelTransform=0) +[more]void attachTransform(const TransformMode mode, Matrix* modelTransform=0)
Attach a transform matrix which is applied after the camera look at.
-[more]void dirtyTransform() +[more]void dirtyTransform()
must be called after you modify an attachedTransform.
-[more]Matrix* getTransform(const TransformMode mode) +[more]Matrix* getTransform(const TransformMode mode)
-[more]const Matrix* getTransform(const TransformMode mode) const +[more]const Matrix* getTransform(const TransformMode mode) const
-[more]const Vec3 getEyePoint_Model() const +[more]const Vec3 getEyePoint_Model() const
-[more]const Vec3 getCenterPoint_Model() const +[more]const Vec3 getCenterPoint_Model() const
-[more]const Vec3 getLookVector_Model() const +[more]const Vec3 getLookVector_Model() const
-[more]const Vec3 getUpVector_Model() const +[more]const Vec3 getUpVector_Model() const
-[more]const Vec3 getSideVector_Model() const +[more]const Vec3 getSideVector_Model() const
-[more]const Matrix& getModelViewMatrix() const +[more]const Matrix& getModelViewMatrix() const
Get the ModelView matrix.
-[more]void setUseNearClippingPlane(const bool use) +[more]void setUseNearClippingPlane(const bool use)
-[more]const bool getUseNearClippingPlane() const +[more]const bool getUseNearClippingPlane() const
-[more]void setUseFarClippingPlane(const bool use) +[more]void setUseFarClippingPlane(const bool use)
-[more]const bool getUseFarClippingPlane() const +[more]const bool getUseFarClippingPlane() const
-[more]const ClippingVolume& getClippingVolume() const +[more]const ClippingVolume& getClippingVolume() const
get the view frustum clipping in model coordinates
-[more]const bool project(const Vec3& obj, const int* viewport, Vec3& win) const +[more]const bool project(const Vec3& obj, const Viewport& viewport, Vec3& win) const
Map object coordinates into windows coordinates.
-[more]const bool unproject(const Vec3& win, const int* viewport, Vec3& obj) const +[more]const bool unproject(const Vec3& win, const Viewport& viewport, Vec3& obj) const
Map window coordinates into object coordinates.

@@ -154,70 +166,72 @@ [more]enum ProjectionType
Range of projection types.
-[more]enum AdjustAxis +[more]enum AdjustAspectRatioMode
Use in combination with adjustAspectRatio, to control the change in frustum clipping planes to account for changes in windows aspect ratio,
-[more]enum LookAtType +[more]enum LookAtType
-[more]enum TransformMode +[more]enum TransformMode

Protected Fields

-[more]ProjectionType _projectionType +[more]ProjectionType _projectionType
-[more]double _left +[more]AdjustAspectRatioMode _adjustAspectRatioMode
-[more]double _right +[more]double _left
-[more]double _bottom +[more]double _right
-[more]double _top +[more]double _bottom
-[more]double _zNear +[more]double _top
-[more]double _zFar +[more]double _zNear
-[more]LookAtType _lookAtType +[more]double _zFar
-[more]Vec3 _eye +[more]LookAtType _lookAtType
-[more]Vec3 _center +[more]Vec3 _eye
-[more]Vec3 _up +[more]Vec3 _center
-[more]double _focalLength +[more]Vec3 _up
-[more]TransformMode _attachedTransformMode +[more]double _focalLength
-[more]ref_ptr<Matrix> _eyeToModelTransform +[more]TransformMode _attachedTransformMode
-[more]ref_ptr<Matrix> _modelToEyeTransform +[more]ref_ptr<Matrix> _eyeToModelTransform
-[more]bool _useNearClippingPlane +[more]ref_ptr<Matrix> _modelToEyeTransform
-[more]bool _useFarClippingPlane +[more]bool _useNearClippingPlane
-[more]mutable bool _dirty +[more]bool _useFarClippingPlane
-[more]mutable ref_ptr<Matrix> _projectionMatrix +[more]mutable bool _dirty
-[more]mutable ref_ptr<Matrix> _modelViewMatrix +[more]mutable ref_ptr<Matrix> _projectionMatrix
-[more]mutable ClippingVolume _clippingVolume +[more]mutable ref_ptr<Matrix> _modelViewMatrix
-[more]mutable ref_ptr<Matrix> _MP +[more]mutable ClippingVolume _clippingVolume
-[more]mutable ref_ptr<Matrix> _inverseMP +[more]mutable ref_ptr<Matrix> _MP +
+[more]mutable ref_ptr<Matrix> _inverseMP

Protected Methods

-[more] Camera(const Camera&) +[more] Camera(const Camera&)
-[more]Camera& operator=(const Camera&) +[more]Camera& operator=(const Camera&)
-[more]void calculateMatricesAndClippingVolume() const +[more]void calculateMatricesAndClippingVolume() const

@@ -293,133 +307,157 @@ and set perspective methods

-

ovoid setOrtho(const double left, const double right, const double bottom, const double top, const double zNear, const double zFar) +
ovoid setOrtho(const double left, const double right, const double bottom, const double top, const double zNear, const double zFar)
Set a orthographics projection. See glOrtho for further details.

-

ovoid setOrtho2D(const double left, const double right, const double bottom, const double top) +
ovoid setOrtho2D(const double left, const double right, const double bottom, const double top)
Set a 2D orthographics projection. See gluOrtho2D for further details.

-

ovoid setFrustum(const double left, const double right, const double bottom, const double top, const double zNear, const double zFar) +
ovoid setFrustum(const double left, const double right, const double bottom, const double top, const double zNear, const double zFar)
Set a perspective projection. See glFrustum for further details.

-

ovoid setPerspective(const double fovy, const double aspectRatio, const double zNear, const double zFar) +
ovoid setPerspective(const double fovy, const double aspectRatio, const double zNear, const double zFar)
Set a sysmetical perspective projection, See gluPerspective for further details. Aspect ratio is defined as width/height.

- + -

ovoid setNearFar(const double zNear, const double zFar) +
ovoid setFOV(const double fovx, const double fovy, const double zNear, const double zFar) +
Set a sysmetical perspective projection using field of view +

+ + +

ovoid setNearFar(const double zNear, const double zFar)
Set the near and far clipping planes

- - -

oenum AdjustAxis + + +
oenum AdjustAspectRatioMode
Use in combination with adjustAspectRatio, to control the change in frustum clipping planes to account for changes in windows aspect ratio,

- +
o ADJUST_VERTICAL

- +

o ADJUST_HORIZONTAL

+ + +
ovoid setAdjustAspectRatioMode(const AdjustAspectRatioMode aam) +
Set the way that the vertical or horizontal dimensions of the window +are adjusted on a resize. +

+ + +

oconst AdjustAspectRatioMode getAdjustAspectRatioMode() const +
Get the way that the vertical or horizontal dimensions of the window +are adjusted on a resize. +

- -

ovoid adjustAspectRatio(const double newAspectRatio, const AdjustAxis aa = ADJUST_HORIZONTAL) + +
ovoid adjustAspectRatio(const double newAspectRatio) +
Adjust the clipping planes to account for a new window aspcect ratio. +Typicall used after resizeing a window. Aspect ratio is defined as +width/height. +

+ + +

ovoid adjustAspectRatio(const double newAspectRatio, const AdjustAspectRatioMode aa)
Adjust the clipping planes to account for a new window aspcect ratio. Typicall used after resizeing a window. Aspect ratio is defined as width/height.

- +

oconst double left() const

- +

oconst double right() const

- +

oconst double top() const

- +

oconst double bottom() const

- +

oconst double zNear() const

- +

oconst double zFar() const

- +

oconst double calc_fovy() const
Calculate and return the equivilant fovx for the current project setting. This value is only valid for when a symetric persepctive projection exists. i.e. getProjectionType()==PERSPECTIVE.

- +

oconst double calc_fovx() const
Calculate and return the equivilant fovy for the current project setting. This value is only valid for when a symetric persepctive projection exists. i.e. getProjectionType()==PERSPECTIVE.

- +

oconst double calc_aspectRatio() const
Calculate and return the projection aspect ratio. Aspect ratio is defined as width/height.

- +

oconst Matrix& getProjectionMatrix() const

- +

oenum LookAtType

- +
o USE_HOME_POSITON

- +

o USE_EYE_AND_QUATERNION

- +

o USE_EYE_CENTER_AND_UP

- -
oconst LookAtType getLookAtType() const + +
oconst LookAtType getLookAtType() const

- +

ovoid home()
hardwired home view for now, looking straight down the Z axis at the origin, with 'up' being the y axis

- +

ovoid setView(const Vec3& eyePoint, const Vec3& lookPoint, const Vec3& upVector)
Set the View, the up vector should be orthogonal to the look vector. @@ -427,78 +465,78 @@ setView is now mapped to setLookAt(eye,center,up), and is only kept for backwards compatibility.

- +

ovoid setLookAt(const Vec3& eye, const Vec3& center, const Vec3& up)
set the position and orientaion of the camera, using the same convention as gluLookAt

- +

ovoid setLookAt(const double eyeX, const double eyeY, const double eyeZ, const double centerX, const double centerY, const double centerZ, const double upX, const double upY, const double upZ)
set the position and orientaion of the camera, using the same convention as gluLookAt

- +

ovoid transformLookAt(const Matrix& matrix)
post multiple the existing eye point and orientation by matrix. note, does not affect any ModelTransforms that are applied.

- +

ovoid ensureOrthogonalUpVector()

- +

oinline const Vec3& getEyePoint() const
get the eye point.

- +

oinline const Vec3& getCenterPoint() const
get the center point.

- +

oinline const Vec3& getUpVector() const
get the up vector

- +

oconst Vec3 getLookVector() const
calculate look vector

- +

oconst Vec3 getSideVector() const
calculate side vector

- +

oinline const float getFocalLength() const
get focal distance

- +

oenum TransformMode

- +
o EYE_TO_MODEL

- +

o MODEL_TO_EYE

- +

o NO_ATTACHED_TRANSFORM

- -
ovoid attachTransform(const TransformMode mode, Matrix* modelTransform=0) + +
ovoid attachTransform(const TransformMode mode, Matrix* modelTransform=0)
Attach a transform matrix which is applied after the camera look at. The attached matrix can work in two ways, either as transform of the eye into the model coordinates - EYE_TO_MODEL, or as a transform of the @@ -518,40 +556,40 @@ if you modify the attached transform then you must call dirtyTransform, to allow the OSG to update matrices accordingly.

- +

ovoid dirtyTransform()
must be called after you modify an attachedTransform.

- -

oMatrix* getTransform(const TransformMode mode) + +
oMatrix* getTransform(const TransformMode mode)

- -

oconst Matrix* getTransform(const TransformMode mode) const + +
oconst Matrix* getTransform(const TransformMode mode) const

- +

oconst Vec3 getEyePoint_Model() const

- +

oconst Vec3 getCenterPoint_Model() const

- +

oconst Vec3 getLookVector_Model() const

- +

oconst Vec3 getUpVector_Model() const

- +

oconst Vec3 getSideVector_Model() const

- +

oconst Matrix& getModelViewMatrix() const
Get the ModelView matrix. If a ModelTransform is supplied then the ModelView matrix is @@ -560,140 +598,144 @@ Otherwise it is simply created by using the current LookAt, equivialent to using gluLookAt.

- +

ovoid setUseNearClippingPlane(const bool use)

- +

oconst bool getUseNearClippingPlane() const

- +

ovoid setUseFarClippingPlane(const bool use)

- +

oconst bool getUseFarClippingPlane() const

- +

oconst ClippingVolume& getClippingVolume() const
get the view frustum clipping in model coordinates

- -

oconst bool project(const Vec3& obj, const int* viewport, Vec3& win) const + +
oconst bool project(const Vec3& obj, const Viewport& viewport, Vec3& win) const
Map object coordinates into windows coordinates. Equivilant to gluProject(...).

- -

oconst bool unproject(const Vec3& win, const int* viewport, Vec3& obj) const + +
oconst bool unproject(const Vec3& win, const Viewport& viewport, Vec3& obj) const
Map window coordinates into object coordinates. Equivilant to gluUnProject(...).

- -

o Camera(const Camera&) + +
o Camera(const Camera&)

- +

oCamera& operator=(const Camera&)

- +

oProjectionType _projectionType

+ + +

oAdjustAspectRatioMode _adjustAspectRatioMode +

- +

odouble _left

- +

odouble _right

- +

odouble _bottom

- +

odouble _top

- +

odouble _zNear

- +

odouble _zFar

- -

oLookAtType _lookAtType + +
oLookAtType _lookAtType

- +

oVec3 _eye

- +

oVec3 _center

- +

oVec3 _up

- +

odouble _focalLength

- -

oTransformMode _attachedTransformMode + +
oTransformMode _attachedTransformMode

- +

oref_ptr<Matrix> _eyeToModelTransform

- +

oref_ptr<Matrix> _modelToEyeTransform

- +

obool _useNearClippingPlane

- +

obool _useFarClippingPlane

- +

omutable bool _dirty

- +

omutable ref_ptr<Matrix> _projectionMatrix

- +

omutable ref_ptr<Matrix> _modelViewMatrix

- +

omutable ClippingVolume _clippingVolume

- +

omutable ref_ptr<Matrix> _MP

- +

omutable ref_ptr<Matrix> _inverseMP

- +

ovoid calculateMatricesAndClippingVolume() const

diff --git a/doc/doc++/osg/ClipPlane.html b/doc/doc++/osg/ClipPlane.html index 33b5421d9..4fc5e2f87 100644 --- a/doc/doc++/osg/ClipPlane.html +++ b/doc/doc++/osg/ClipPlane.html @@ -25,57 +25,51 @@

Public Methods

[more] ClipPlane()
-[more]virtual Object* clone() const -
return a shallow copy of a node, with Object* return type +[more] META_StateAttribute(ClipPlane, (Type)(CLIPPLANE+_clipPlaneNum))
-[more]virtual bool isSameKindAs(const Object* obj) const -
return true if this and obj are of the same kind of object +[more]virtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
-[more]virtual const char* className() const -
return the name of the node's class type +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
-[more]virtual const Type getType() const -
-[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const -
-[more]void setClipPlane(const Vec4& plane) +[more]void setClipPlane(const Vec4& plane)
Set the clip plane, using a Vec4 to define plane.
-[more]void setClipPlane(const Plane& plane) +[more]void setClipPlane(const Plane& plane)
Set the clip plane, using a Plane to define plane.
-[more]void setClipPlane(const double* plane) +[more]void setClipPlane(const double* plane)
Set the clip plane, using a double[4] to define plane.
-[more]void getClipPlane(Vec4& plane) const +[more]void getClipPlane(Vec4& plane) const
Get the clip plane, values entered into a Vec4 passed to the getClipPlane.
-[more]void getClipPlane(Plane& plane) const +[more]void getClipPlane(Plane& plane) const
Get the clip plane, values entered into a Plane passed to the getClipPlane.
-[more]void getClipPlane(double* plane) const +[more]void getClipPlane(double* plane) const
Get the clip plane, values entered into a double[4] passed to the getClipPlane.
-[more]void setClipPlaneNum(const unsigned int num) +[more]void setClipPlaneNum(const unsigned int num)
Set the clip plane number.
-[more]const unsigned int getClipPlaneNum() const +[more]const unsigned int getClipPlaneNum() const
Get the clip plane number.
-[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const
Apply the clip plane's state to the OpenGL state machine.

Protected Fields

-[more]double* _clipPlane +[more]double _clipPlane[4]
-[more]unsigned int _clipPlaneNum +[more]unsigned int _clipPlaneNum

Protected Methods

-[more]virtual ~ClipPlane() +[more]virtual ~ClipPlane()

@@ -83,6 +77,20 @@

Public Methods

+ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual const Type getType() const +
+obool operator < (const StateAttribute& rhs) const +
+obool operator == (const StateAttribute& rhs) const +
+obool operator != (const StateAttribute& rhs) const +
ovirtual void compile(State&) const

@@ -96,7 +104,9 @@
oenum Values
-oenum Type +otypedef unsigned int Type +
+oenum Types

@@ -133,84 +143,74 @@
o ClipPlane()

- + -

ovirtual Object* clone() const -
return a shallow copy of a node, with Object* return type +
o META_StateAttribute(ClipPlane, (Type)(CLIPPLANE+_clipPlaneNum))

- + -

ovirtual bool isSameKindAs(const Object* obj) const -
return true if this and obj are of the same kind of object -

- - -

ovirtual const char* className() const -
return the name of the node's class type -

- - -

ovirtual const Type getType() const +
ovirtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

- -

ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

- +

ovoid setClipPlane(const Vec4& plane)
Set the clip plane, using a Vec4 to define plane.

- +

ovoid setClipPlane(const Plane& plane)
Set the clip plane, using a Plane to define plane.

- +

ovoid setClipPlane(const double* plane)
Set the clip plane, using a double[4] to define plane.

- +

ovoid getClipPlane(Vec4& plane) const
Get the clip plane, values entered into a Vec4 passed to the getClipPlane.

- +

ovoid getClipPlane(Plane& plane) const
Get the clip plane, values entered into a Plane passed to the getClipPlane.

- +

ovoid getClipPlane(double* plane) const
Get the clip plane, values entered into a double[4] passed to the getClipPlane.

- +

ovoid setClipPlaneNum(const unsigned int num)
Set the clip plane number.

- +

oconst unsigned int getClipPlaneNum() const
Get the clip plane number.

- +

ovirtual void apply(State& state) const
Apply the clip plane's state to the OpenGL state machine.

- +

ovirtual ~ClipPlane()

- -

odouble* _clipPlane + +
odouble _clipPlane[4]

- +

ounsigned int _clipPlaneNum

diff --git a/doc/doc++/osg/ColorMask.html b/doc/doc++/osg/ColorMask.html index 0ee21e77f..c54438e4d 100644 --- a/doc/doc++/osg/ColorMask.html +++ b/doc/doc++/osg/ColorMask.html @@ -25,41 +25,38 @@

Public Methods

[more] ColorMask()
-[more]virtual bool isSameKindAs(const Object* obj) const +[more] META_StateAttribute(ColorMask, COLORMASK)
-[more]virtual Object* clone() const +[more]virtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
-[more]virtual const char* className() const +[more]inline void setMask(bool red, bool green, bool blue, bool alpha)
-[more]virtual const Type getType() const +[more]inline const bool getRedMask() const
-[more]inline void setMask(bool red, bool green, bool blue, bool alpha) +[more]inline const bool getGreenMask() const
-[more]inline const bool getRedMask() const +[more]inline const bool getBlueMask() const
-[more]inline const bool getGreenMask() const +[more]inline const bool getAlphaMask() const
-[more]inline const bool getBlueMask() const -
-[more]inline const bool getAlphaMask() const -
-[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

Protected Fields

-[more]bool _red +[more]bool _red
-[more]bool _green +[more]bool _green
-[more]bool _blue +[more]bool _blue
-[more]bool _alpha +[more]bool _alpha

Protected Methods

-[more]virtual ~ColorMask() +[more]virtual ~ColorMask()

@@ -67,7 +64,21 @@

Public Methods

-ovirtual void setStateSetModes(StateSet&, const GLModeValue) const +ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual const Type getType() const +
+obool operator < (const StateAttribute& rhs) const +
+obool operator == (const StateAttribute& rhs) const +
+obool operator != (const StateAttribute& rhs) const +
+ovirtual void setStateSetModes(StateSet&, const GLModeValue) const
ovirtual void compile(State&) const

@@ -82,7 +93,9 @@
oenum Values
-oenum Type +otypedef unsigned int Type +
+oenum Types

@@ -119,64 +132,57 @@
o ColorMask()

- + -

ovirtual bool isSameKindAs(const Object* obj) const +
o META_StateAttribute(ColorMask, COLORMASK)

- + -

ovirtual Object* clone() const -

- - -

ovirtual const char* className() const -

- - -

ovirtual const Type getType() const +
ovirtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

- +

oinline void setMask(bool red, bool green, bool blue, bool alpha)

- +

oinline const bool getRedMask() const

- +

oinline const bool getGreenMask() const

- +

oinline const bool getBlueMask() const

- +

oinline const bool getAlphaMask() const

- +

ovirtual void apply(State& state) const

- +

ovirtual ~ColorMask()

- +

obool _red

- +

obool _green

- +

obool _blue

- +

obool _alpha

diff --git a/doc/doc++/osg/CullFace.html b/doc/doc++/osg/CullFace.html index b98d9b15c..35688b273 100644 --- a/doc/doc++/osg/CullFace.html +++ b/doc/doc++/osg/CullFace.html @@ -25,36 +25,33 @@

Public Methods

[more] CullFace()
-[more]virtual bool isSameKindAs(const Object* obj) const +[more] META_StateAttribute(CullFace, CULLFACE)
-[more]virtual Object* clone() const +[more]virtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
-[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
-[more]virtual const Type getType() const +[more]inline void setMode(const Mode mode)
-[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline const Mode getMode() const
-[more]inline void setMode(const Mode mode) -
-[more]inline const Mode getMode() const -
-[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

Public Members

-[more]enum Mode +[more]enum Mode

Protected Fields

-[more]Mode _mode +[more]Mode _mode

Protected Methods

-[more]virtual ~CullFace() +[more]virtual ~CullFace()

@@ -62,6 +59,20 @@

Public Methods

+ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual const Type getType() const +
+obool operator < (const StateAttribute& rhs) const +
+obool operator == (const StateAttribute& rhs) const +
+obool operator != (const StateAttribute& rhs) const +
ovirtual void compile(State&) const

@@ -75,7 +86,9 @@
oenum Values
-oenum Type +otypedef unsigned int Type +
+oenum Types

@@ -112,63 +125,56 @@
o CullFace()

- + -

ovirtual bool isSameKindAs(const Object* obj) const +
o META_StateAttribute(CullFace, CULLFACE)

- + -

ovirtual Object* clone() const -

- - -

ovirtual const char* className() const -

- - -

ovirtual const Type getType() const +
ovirtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

- -

ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

- +

oenum Mode

- +
o FRONT

- +

o BACK

- +

o FRONT_AND_BACK

- -
oinline void setMode(const Mode mode) + +
oinline void setMode(const Mode mode)

- -

oinline const Mode getMode() const + +
oinline const Mode getMode() const

- +

ovirtual void apply(State& state) const

- +

ovirtual ~CullFace()

- -

oMode _mode + +
oMode _mode


This class has no child classes.
diff --git a/doc/doc++/osg/Depth.html b/doc/doc++/osg/Depth.html index 478b3d6c1..ee3461b38 100644 --- a/doc/doc++/osg/Depth.html +++ b/doc/doc++/osg/Depth.html @@ -25,52 +25,49 @@

Public Methods

[more] Depth()
-[more]virtual bool isSameKindAs(const Object* obj) const +[more] META_StateAttribute(Depth, DEPTH)
-[more]virtual Object* clone() const +[more]virtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
-[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
-[more]virtual const Type getType() const +[more]inline void setFunction(const Function func)
-[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline const Function getFunction() const
-[more]inline void setFunction(const Function func) +[more]inline void setWriteMask(const bool mask)
-[more]inline const Function getFunction() const +[more]inline const bool getWriteMask() const
-[more]inline void setWriteMask(const bool mask) +[more]inline void setRange(const double zNear, const double zFar)
-[more]inline const bool getWriteMask() const +[more]inline const double getZNear() const
-[more]inline void setRange(const double zNear, const double zFar) +[more]inline const double getZFar() const
-[more]inline const double getZNear() const -
-[more]inline const double getZFar() const -
-[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

Public Members

-[more]enum Function +[more]enum Function

Protected Fields

-[more]Function _func +[more]Function _func
-[more]bool _depthWriteMask +[more]bool _depthWriteMask
-[more]double _zNear +[more]double _zNear
-[more]double _zFar +[more]double _zFar

Protected Methods

-[more]virtual ~Depth() +[more]virtual ~Depth()

@@ -78,6 +75,20 @@

Public Methods

+ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual const Type getType() const +
+obool operator < (const StateAttribute& rhs) const +
+obool operator == (const StateAttribute& rhs) const +
+obool operator != (const StateAttribute& rhs) const +
ovirtual void compile(State&) const

@@ -91,7 +102,9 @@
oenum Values
-oenum Type +otypedef unsigned int Type +
+oenum Types

@@ -128,114 +141,107 @@
o Depth()

- + -

ovirtual bool isSameKindAs(const Object* obj) const +
o META_StateAttribute(Depth, DEPTH)

- + -

ovirtual Object* clone() const -

- - -

ovirtual const char* className() const -

- - -

ovirtual const Type getType() const +
ovirtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

- -

ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

- +

oenum Function

- +
o NEVER

- +

o LESS

- +

o EQUAL

- +

o LEQUAL

- +

o GREATER

- +

o NOTEQUAL

- +

o GEQUAL

- +

o ALWAYS

- -
oinline void setFunction(const Function func) + +
oinline void setFunction(const Function func)

- -

oinline const Function getFunction() const + +
oinline const Function getFunction() const

- +

oinline void setWriteMask(const bool mask)

- +

oinline const bool getWriteMask() const

- -

oinline void setRange(const double zNear, const double zFar) + +
oinline void setRange(const double zNear, const double zFar)

- +

oinline const double getZNear() const

- +

oinline const double getZFar() const

- +

ovirtual void apply(State& state) const

- +

ovirtual ~Depth()

- -

oFunction _func + +
oFunction _func

- +

obool _depthWriteMask

- +

odouble _zNear

- +

odouble _zFar

diff --git a/doc/doc++/osg/Fog.html b/doc/doc++/osg/Fog.html index 349d1f617..daeabad0a 100644 --- a/doc/doc++/osg/Fog.html +++ b/doc/doc++/osg/Fog.html @@ -25,60 +25,57 @@

Public Methods

[more] Fog()
-[more]virtual Object* clone() const +[more] META_StateAttribute(Fog, FOG)
-[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
-[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
-[more]virtual const Type getType() const +[more]inline void setMode( const Mode mode )
-[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline Mode getMode() const
-[more]inline void setMode( const Mode mode ) +[more]inline void setDensity( const float density )
-[more]inline Mode getMode() const +[more]inline const float getDensity() const
-[more]inline void setDensity( const float density ) +[more]inline void setStart( const float start )
-[more]inline const float getDensity() const +[more]inline const float getStart() const
-[more]inline void setStart( const float start ) +[more]inline void setEnd( const float end )
-[more]inline const float getStart() const +[more]inline const float getEnd() const
-[more]inline void setEnd( const float end ) +[more]inline void setColor( const Vec4 &color )
-[more]inline const float getEnd() const +[more]inline const Vec4& getColor() const
-[more]inline void setColor( const Vec4 &color ) -
-[more]inline const Vec4& getColor() const -
-[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

Public Members

-[more]enum Mode +[more]enum Mode

Protected Fields

-[more]Mode _mode +[more]Mode _mode
-[more]float _density +[more]float _density
-[more]float _start +[more]float _start
-[more]float _end +[more]float _end
-[more]Vec4 _color +[more]Vec4 _color

Protected Methods

-[more]virtual ~Fog() +[more]virtual ~Fog()

@@ -86,6 +83,20 @@

Public Methods

+ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual const Type getType() const +
+obool operator < (const StateAttribute& rhs) const +
+obool operator == (const StateAttribute& rhs) const +
+obool operator != (const StateAttribute& rhs) const +
ovirtual void compile(State&) const

@@ -99,7 +110,9 @@
oenum Values
-oenum Type +otypedef unsigned int Type +
+oenum Types

@@ -136,110 +149,103 @@
o Fog()

- + -

ovirtual Object* clone() const +
o META_StateAttribute(Fog, FOG)

- + -

ovirtual bool isSameKindAs(const Object* obj) const -

- - -

ovirtual const char* className() const -

- - -

ovirtual const Type getType() const +
ovirtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

- -

ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

- +

oenum Mode

- +
o LINEAR

- +

o EXP

- +

o EXP2

- -
oinline void setMode( const Mode mode ) + +
oinline void setMode( const Mode mode )

- -

oinline Mode getMode() const + +
oinline Mode getMode() const

- +

oinline void setDensity( const float density )

- +

oinline const float getDensity() const

- -

oinline void setStart( const float start ) + +
oinline void setStart( const float start )

- +

oinline const float getStart() const

- -

oinline void setEnd( const float end ) + +
oinline void setEnd( const float end )

- +

oinline const float getEnd() const

- +

oinline void setColor( const Vec4 &color )

- +

oinline const Vec4& getColor() const

- +

ovirtual void apply(State& state) const

- +

ovirtual ~Fog()

- -

oMode _mode + +
oMode _mode

- +

ofloat _density

- +

ofloat _start

- +

ofloat _end

- +

oVec4 _color

diff --git a/doc/doc++/osg/FrontFace.html b/doc/doc++/osg/FrontFace.html index 838238b06..6132eeda4 100644 --- a/doc/doc++/osg/FrontFace.html +++ b/doc/doc++/osg/FrontFace.html @@ -23,36 +23,33 @@

Public Methods

-[more] FrontFace() +[more] FrontFace()
-[more]virtual bool isSameKindAs(const Object* obj) const +[more] META_StateAttribute(FrontFace, FRONTFACE)
-[more]virtual Object* clone() const +[more]virtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
-[more]virtual const char* className() const +[more]inline void setMode(const Mode mode)
-[more]virtual const Type getType() const +[more]inline const Mode getMode() const
-[more]inline void setMode(const Mode mode) -
-[more]inline const Mode getMode() const -
-[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

Public Members

-[more]enum Mode +[more]enum Mode

Protected Fields

-[more]Mode _mode +[more]Mode _mode

Protected Methods

-[more]virtual ~FrontFace() +[more]virtual ~FrontFace()

@@ -60,7 +57,21 @@

Public Methods

-ovirtual void setStateSetModes(StateSet&, const GLModeValue) const +ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual const Type getType() const +
+obool operator < (const StateAttribute& rhs) const +
+obool operator == (const StateAttribute& rhs) const +
+obool operator != (const StateAttribute& rhs) const +
+ovirtual void setStateSetModes(StateSet&, const GLModeValue) const
ovirtual void compile(State&) const

@@ -75,7 +86,9 @@
oenum Values
-oenum Type +otypedef unsigned int Type +
+oenum Types

@@ -109,58 +122,51 @@
- +
o FrontFace()

- - -

ovirtual bool isSameKindAs(const Object* obj) const + + +
o META_StateAttribute(FrontFace, FRONTFACE)

- - -

ovirtual Object* clone() const -

- - -

ovirtual const char* className() const -

- - -

ovirtual const Type getType() const + + +
ovirtual int compare(const StateAttribute& sa) const +
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

- +

oenum Mode

- +
o CLOCKWISE

- +

o COUNTER_CLOCKWISE

- -
oinline void setMode(const Mode mode) + +
oinline void setMode(const Mode mode)

- -

oinline const Mode getMode() const + +
oinline const Mode getMode() const

- +

ovirtual void apply(State& state) const

- +

ovirtual ~FrontFace()

- -

oMode _mode + +
oMode _mode


This class has no child classes.
diff --git a/doc/doc++/osg/General.html b/doc/doc++/osg/General.html index 49865c489..cdd8f0eef 100644 --- a/doc/doc++/osg/General.html +++ b/doc/doc++/osg/General.html @@ -67,6 +67,9 @@ o#define OSG_FOG
+o#define +OSG_FRAMESTAMP
+ o#define OSG_FRONTFACE
@@ -139,6 +142,9 @@ o#define OSG_NODE
+o#define +OSG_NODECALLBACK
+ o#define OSG_NODEVISITOR
@@ -275,7 +281,10 @@ OSG_VEC4
o#define -OSG_VERSION +OSG_VERSION
+ +o#define +OSG_VIEWPORT

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++. diff --git a/doc/doc++/osg/GeoSet.html b/doc/doc++/osg/GeoSet.html index ca65a2c6a..a278ba7cd 100644 --- a/doc/doc++/osg/GeoSet.html +++ b/doc/doc++/osg/GeoSet.html @@ -23,284 +23,284 @@

Public Methods

-[more] GeoSet() +[more] GeoSet()
-[more]virtual Object* clone() const +[more]virtual Object* clone() const
-[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual bool isSameKindAs(const Object* obj) const
-[more]virtual const char* className() const +[more]virtual const char* className() const
-[more]inline void setNumPrims( const int n ) +[more]inline void setNumPrims( const int n )
-[more]inline const int getNumPrims() const +[more]inline const int getNumPrims() const
-[more]void setPrimType( const PrimitiveType type ) +[more]void setPrimType( const PrimitiveType type )
-[more]inline const PrimitiveType getPrimType() const +[more]inline const PrimitiveType getPrimType() const
-[more]inline void setPrimLengths( int* lens ) +[more]inline void setPrimLengths( int* lens )
-[more]inline int* getPrimLengths() +[more]inline int* getPrimLengths()
-[more]inline const int* getPrimLengths() const +[more]inline const int* getPrimLengths() const
-[more]void computeNumVerts() +[more]void computeNumVerts()
-[more]inline const int getNumCoords() const +[more]inline const int getNumCoords() const
get the number of coords required by the defined primitives.
-[more]inline Vec3* getCoords() +[more]inline Vec3* getCoords()
get a pointer to Vec3 coord array.
-[more]inline const Vec3* getCoords() const +[more]inline const Vec3* getCoords() const
get a const pointer to Vec3 coord array.
-[more]inline const int getNumCoordIndices() const +[more]inline const int getNumCoordIndices() const
get the number of indices required by the defined primitives.
-[more]inline IndexPointer& getCoordIndices() +[more]inline IndexPointer& getCoordIndices()
get the coord index array.
-[more]inline const IndexPointer& getCoordIndices() const +[more]inline const IndexPointer& getCoordIndices() const
get the const coord index array.
-[more]void setCoords( Vec3* cp ) +[more]void setCoords( Vec3* cp )
set the coords (ie the geometry) of the geoset
-[more]void setCoords( Vec3* cp, ushort* ci ) +[more]void setCoords( Vec3* cp, ushort* ci )
set the coords (ie the geometry) and ushort indices of the geoset.
-[more]void setCoords( Vec3* cp, uint* ci ) +[more]void setCoords( Vec3* cp, uint* ci )
set the coords (ie the geometry) and uint indices of the geoset.
-[more]void setCoords( Vec3* cp, IndexPointer& ip ) +[more]void setCoords( Vec3* cp, IndexPointer& ip )
set the coords (ie the geometry) and indices of the geoset
-[more]inline const int getNumNormals() const +[more]inline const int getNumNormals() const
get the number of normals required by the defined primitives and normals binding
-[more]inline Vec3* getNormals() +[more]inline Vec3* getNormals()
get a pointer to Vec3 normal array.
-[more]inline const Vec3* getNormals() const +[more]inline const Vec3* getNormals() const
get a const pointer to Vec3 normal array.
-[more]inline int getNumNormalIndices() const +[more]inline int getNumNormalIndices() const
get the number of normal indices required by the defined primitives and normals binding
-[more]inline IndexPointer& getNormalIndices() +[more]inline IndexPointer& getNormalIndices()
get the normal index array.
-[more]inline const IndexPointer& getNormalIndices() const +[more]inline const IndexPointer& getNormalIndices() const
get the const normal index array.
-[more]void setNormals( Vec3* np ) +[more]void setNormals( Vec3* np )
set the normals of the geoset
-[more]void setNormals( Vec3* np, ushort* ni ) +[more]void setNormals( Vec3* np, ushort* ni )
set the normals and normal indices of the geoset
-[more]void setNormals( Vec3* np, uint* ni ) +[more]void setNormals( Vec3* np, uint* ni )
set the normals and normal indices of the geoset
-[more]void setNormals( Vec3* np, IndexPointer& ip ) +[more]void setNormals( Vec3* np, IndexPointer& ip )
set the normals and normal indices of the geoset
-[more]void setNormalBinding( const BindingType binding ) +[more]void setNormalBinding( const BindingType binding )
set the normals binding to the vertices/primitives/overall
-[more]inline const BindingType getNormalBinding() const +[more]inline const BindingType getNormalBinding() const
-[more]inline const int getNumColors() const +[more]inline const int getNumColors() const
get the number of colors required by the defined primitives and color binding
-[more]inline Vec4* getColors() +[more]inline Vec4* getColors()
get a pointer to Vec4 color array.
-[more]inline const Vec4* getColors() const +[more]inline const Vec4* getColors() const
get a pointer to Vec4 color array.
-[more]inline int getNumColorIndices() const +[more]inline int getNumColorIndices() const
get the number of colors indices required by the defined primitives and color binding
-[more]inline IndexPointer& getColorIndices() +[more]inline IndexPointer& getColorIndices()
get the color index array.
-[more]inline const IndexPointer& getColorIndices() const +[more]inline const IndexPointer& getColorIndices() const
get the const color index array.
-[more]void setColors( Vec4* cp ) +[more]void setColors( Vec4* cp )
set the colors of the geoset
-[more]void setColors( Vec4* cp, ushort* li ) +[more]void setColors( Vec4* cp, ushort* li )
set the colors and color indices of the geoset
-[more]void setColors( Vec4* cp, uint* li ) +[more]void setColors( Vec4* cp, uint* li )
set the colors and color indices of the geoset
-[more]void setColors( Vec4* cp, IndexPointer& ip ) +[more]void setColors( Vec4* cp, IndexPointer& ip )
set the colors and color indices of the geoset
-[more]void setColorBinding( BindingType binding ) +[more]void setColorBinding( BindingType binding )
set the color binding to the vertices/primitives/overall
-[more]inline BindingType getColorBinding() const +[more]inline BindingType getColorBinding() const
-[more]inline const int getNumTextureCoords() const +[more]inline const int getNumTextureCoords() const
get the number of texture coords required by the defined primitives and textures binding
-[more]inline Vec2* getTextureCoords() +[more]inline Vec2* getTextureCoords()
get a pointer to Vec4 color array.
-[more]inline const Vec2* getTextureCoords() const +[more]inline const Vec2* getTextureCoords() const
get a pointer to Vec4 color array.
-[more]inline const int getNumTextureIndices() const +[more]inline const int getNumTextureIndices() const
get the number of texture coord indices required by the defined primitives and texture binding
-[more]inline IndexPointer& getTextureIndices() +[more]inline IndexPointer& getTextureIndices()
get the texture index array.
-[more]inline const IndexPointer& getTextureIndices() const +[more]inline const IndexPointer& getTextureIndices() const
get the texture index array.
-[more]void setTextureCoords( Vec2* tc ) +[more]void setTextureCoords( Vec2* tc )
set the texture coords of the geoset
-[more]void setTextureCoords( Vec2* tc, ushort* ti ) +[more]void setTextureCoords( Vec2* tc, ushort* ti )
set the texture coords and texture coord indices of the geoset
-[more]void setTextureCoords( Vec2* tc, uint* ti ) +[more]void setTextureCoords( Vec2* tc, uint* ti )
set the texture coords and texture coord indices of the geoset
-[more]void setTextureCoords( Vec2* tc, IndexPointer& ip ) +[more]void setTextureCoords( Vec2* tc, IndexPointer& ip )
set the texture coords and texture indices of the geoset
-[more]void setTextureBinding( const BindingType binding ) +[more]void setTextureBinding( const BindingType binding )
set the texture coord binding to the vertices/primitives/overall
-[more]inline const BindingType getTextureBinding() const +[more]inline const BindingType getTextureBinding() const
-[more]inline const int getNumInterleavedCoords() const +[more]inline const int getNumInterleavedCoords() const
get the number of texture coords required by the defined primitives and textures binding
-[more]inline void* getInterleavedArray() +[more]inline void* getInterleavedArray()
get a pointer to interleaved float array.
-[more]inline const void* getInterleavedArray() const +[more]inline const void* getInterleavedArray() const
get a const pointer to interleaved float array.
-[more]inline const int getNumIterleavedIndices() const +[more]inline const int getNumIterleavedIndices() const
get the number of texture coord indices required by the defined primitives and texture binding
-[more]inline IndexPointer& getInterleavedIndices() +[more]inline IndexPointer& getInterleavedIndices()
get the texture index array.
-[more]inline const IndexPointer& getInterleavedIndices() const +[more]inline const IndexPointer& getInterleavedIndices() const
get the interleaved index array.
-[more]inline const InterleaveArrayType getInterleavedFromat() const +[more]inline const InterleaveArrayType getInterleavedFromat() const
get the interleaved array storage format.
-[more]void setInterleavedArray( const InterleaveArrayType format, float* ia ) +[more]void setInterleavedArray( const InterleaveArrayType format, float* ia )
set the interleaved arrays of the geoset
-[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, ushort* iai ) +[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, ushort* iai )
-[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, uint* iai ) +[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, uint* iai )
-[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, IndexPointer& iai ) +[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, IndexPointer& iai )
-[more]virtual void drawImmediateMode(State& state) +[more]virtual void drawImmediateMode(State& state)
draw geoset directly ignoring an OpenGL display list which could be attached.
-[more]const bool check() const +[more]const bool check() const

Public Members

-[more]enum PrimitiveType +[more]enum PrimitiveType
-[more]enum BindingType +[more]enum BindingType
-[more]enum InterleaveArrayType +[more]enum InterleaveArrayType
-[more]struct IndexPointer +[more]struct IndexPointer

Protected Fields

-[more]int _numprims +[more]int _numprims
-[more]PrimitiveType _primtype +[more]PrimitiveType _primtype
-[more]int _needprimlen +[more]int _needprimlen
-[more]unsigned int _oglprimtype +[more]unsigned int _oglprimtype
-[more]int* _primLengths +[more]int* _primLengths
-[more]unsigned char _primlength +[more]unsigned char _primlength
-[more]unsigned char _flat_shaded_skip +[more]unsigned char _flat_shaded_skip
-[more]int _numcoords +[more]int _numcoords
-[more]Vec3* _coords +[more]Vec3* _coords
-[more]IndexPointer _cindex +[more]IndexPointer _cindex
-[more]BindingType _normal_binding +[more]BindingType _normal_binding
-[more]int _numnormals +[more]int _numnormals
-[more]Vec3* _normals +[more]Vec3* _normals
-[more]IndexPointer _nindex +[more]IndexPointer _nindex
-[more]BindingType _color_binding +[more]BindingType _color_binding
-[more]int _numcolors +[more]int _numcolors
-[more]Vec4* _colors +[more]Vec4* _colors
-[more]IndexPointer _colindex +[more]IndexPointer _colindex
-[more]BindingType _texture_binding +[more]BindingType _texture_binding
-[more]int _numtcoords +[more]int _numtcoords
-[more]Vec2* _tcoords +[more]Vec2* _tcoords
-[more]IndexPointer _tindex +[more]IndexPointer _tindex
-[more]void* _iarray +[more]void* _iarray
-[more]IndexPointer _iaindex +[more]IndexPointer _iaindex
-[more]InterleaveArrayType _iaformat +[more]InterleaveArrayType _iaformat
-[more]unsigned int _ogliaformat +[more]unsigned int _ogliaformat
-[more]int _fast_path +[more]int _fast_path

Protected Methods

-[more] GeoSet(const GeoSet&) +[more] GeoSet(const GeoSet&)
-[more]GeoSet& operator = (const GeoSet&) +[more]GeoSet& operator = (const GeoSet&)
-[more]virtual ~GeoSet() +[more]virtual ~GeoSet()
-[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const
-[more]void set_fast_path( void ) +[more]void set_fast_path( void )
-[more]void draw_fast_path( void ) +[more]void draw_fast_path( void )
-[more]void draw_alternate_path( void ) +[more]void draw_alternate_path( void )

@@ -391,699 +391,699 @@ be shared for optimal memory usage and graphics performance.
- +
oenum PrimitiveType

- +
o NO_TYPE

- +

o POINTS

- +

o LINES

- +

o LINE_STRIP

- +

o FLAT_LINE_STRIP

- +

o LINE_LOOP

- +

o TRIANGLES

- +

o TRIANGLE_STRIP

- +

o FLAT_TRIANGLE_STRIP

- +

o TRIANGLE_FAN

- +

o FLAT_TRIANGLE_FAN

- +

o QUADS

- +

o QUAD_STRIP

- +

o POLYGON

- +
oenum BindingType

- +
o BIND_OFF

- +

o BIND_OVERALL

- +

o BIND_PERPRIM

- +

o BIND_PERVERTEX

- +

o BIND_DEFAULT

- +
oenum InterleaveArrayType

- +
o IA_OFF

- +

o IA_V2F

- +

o IA_V3F

- +

o IA_C4UB_V2F

- +

o IA_C4UB_V3F

- +

o IA_C3F_V3F

- +

o IA_N3F_V3F

- +

o IA_C4F_N3F_V3F

- +

o IA_T2F_V3F

- +

o IA_T4F_V4F

- +

o IA_T2F_C4UB_V3F

- +

o IA_T2F_C3F_V3F

- +

o IA_T2F_N3F_V3F

- +

o IA_T2F_C4F_N3F_V3F

- +

o IA_T4F_C4F_N3F_V4F

- +
ostruct IndexPointer

- +
ouint _size

- +

obool _is_ushort

- +

ounion

- +
oushort* _ushort

- +

ouint* _uint

- +
o IndexPointer()

- -

oinline const bool operator == (const IndexPointer& ip) const + +
oinline const bool operator == (const IndexPointer& ip) const

- +

oinline const bool valid() const

- +

oinline const bool null() const

- +

oinline void setToNull()

- -

oinline void set(uint size, ushort* data) + +
oinline void set(uint size, ushort* data)

- -

ovoid set(const uint size, uint* data) + +
ovoid set(const uint size, uint* data)

- +

oinline const uint maxIndex() const

- +

oinline const uint operator [] (const uint pos) const

- +
o GeoSet()

- +

ovirtual Object* clone() const

- +

ovirtual bool isSameKindAs(const Object* obj) const

- +

ovirtual const char* className() const

- +

oinline void setNumPrims( const int n )

- +

oinline const int getNumPrims() const

- -

ovoid setPrimType( const PrimitiveType type ) + +
ovoid setPrimType( const PrimitiveType type )

- -

oinline const PrimitiveType getPrimType() const + +
oinline const PrimitiveType getPrimType() const

- +

oinline void setPrimLengths( int* lens )

- +

oinline int* getPrimLengths()

- +

oinline const int* getPrimLengths() const

- +

ovoid computeNumVerts()

- +

oinline const int getNumCoords() const
get the number of coords required by the defined primitives.

- +

oinline Vec3* getCoords()
get a pointer to Vec3 coord array.

- +

oinline const Vec3* getCoords() const
get a const pointer to Vec3 coord array.

- +

oinline const int getNumCoordIndices() const
get the number of indices required by the defined primitives.

- -

oinline IndexPointer& getCoordIndices() + +
oinline IndexPointer& getCoordIndices()
get the coord index array.

- -

oinline const IndexPointer& getCoordIndices() const + +
oinline const IndexPointer& getCoordIndices() const
get the const coord index array.

- +

ovoid setCoords( Vec3* cp )
set the coords (ie the geometry) of the geoset

- +

ovoid setCoords( Vec3* cp, ushort* ci )
set the coords (ie the geometry) and ushort indices of the geoset. To reduce memory footprint and bandwidth for small datasets it is recommended the ushort undices are used instead of unit indices.

- +

ovoid setCoords( Vec3* cp, uint* ci )
set the coords (ie the geometry) and uint indices of the geoset. Unless your data set exceeds 65536 indices prefer ushort indices over uint indices, only use this unit indices version if neccessary.

- -

ovoid setCoords( Vec3* cp, IndexPointer& ip ) + +
ovoid setCoords( Vec3* cp, IndexPointer& ip )
set the coords (ie the geometry) and indices of the geoset

- +

oinline const int getNumNormals() const
get the number of normals required by the defined primitives and normals binding

- +

oinline Vec3* getNormals()
get a pointer to Vec3 normal array.

- +

oinline const Vec3* getNormals() const
get a const pointer to Vec3 normal array.

- +

oinline int getNumNormalIndices() const
get the number of normal indices required by the defined primitives and normals binding

- -

oinline IndexPointer& getNormalIndices() + +
oinline IndexPointer& getNormalIndices()
get the normal index array.

- -

oinline const IndexPointer& getNormalIndices() const + +
oinline const IndexPointer& getNormalIndices() const
get the const normal index array.

- +

ovoid setNormals( Vec3* np )
set the normals of the geoset

- +

ovoid setNormals( Vec3* np, ushort* ni )
set the normals and normal indices of the geoset

- +

ovoid setNormals( Vec3* np, uint* ni )
set the normals and normal indices of the geoset

- -

ovoid setNormals( Vec3* np, IndexPointer& ip ) + +
ovoid setNormals( Vec3* np, IndexPointer& ip )
set the normals and normal indices of the geoset

- -

ovoid setNormalBinding( const BindingType binding ) + +
ovoid setNormalBinding( const BindingType binding )
set the normals binding to the vertices/primitives/overall

- -

oinline const BindingType getNormalBinding() const + +
oinline const BindingType getNormalBinding() const

- +

oinline const int getNumColors() const
get the number of colors required by the defined primitives and color binding

- +

oinline Vec4* getColors()
get a pointer to Vec4 color array.

- +

oinline const Vec4* getColors() const
get a pointer to Vec4 color array.

- +

oinline int getNumColorIndices() const
get the number of colors indices required by the defined primitives and color binding

- -

oinline IndexPointer& getColorIndices() + +
oinline IndexPointer& getColorIndices()
get the color index array.

- -

oinline const IndexPointer& getColorIndices() const + +
oinline const IndexPointer& getColorIndices() const
get the const color index array.

- +

ovoid setColors( Vec4* cp )
set the colors of the geoset

- +

ovoid setColors( Vec4* cp, ushort* li )
set the colors and color indices of the geoset

- +

ovoid setColors( Vec4* cp, uint* li )
set the colors and color indices of the geoset

- -

ovoid setColors( Vec4* cp, IndexPointer& ip ) + +
ovoid setColors( Vec4* cp, IndexPointer& ip )
set the colors and color indices of the geoset

- -

ovoid setColorBinding( BindingType binding ) + +
ovoid setColorBinding( BindingType binding )
set the color binding to the vertices/primitives/overall

- -

oinline BindingType getColorBinding() const + +
oinline BindingType getColorBinding() const

- +

oinline const int getNumTextureCoords() const
get the number of texture coords required by the defined primitives and textures binding

- +

oinline Vec2* getTextureCoords()
get a pointer to Vec4 color array.

- +

oinline const Vec2* getTextureCoords() const
get a pointer to Vec4 color array.

- +

oinline const int getNumTextureIndices() const
get the number of texture coord indices required by the defined primitives and texture binding

- -

oinline IndexPointer& getTextureIndices() + +
oinline IndexPointer& getTextureIndices()
get the texture index array.

- -

oinline const IndexPointer& getTextureIndices() const + +
oinline const IndexPointer& getTextureIndices() const
get the texture index array.

- +

ovoid setTextureCoords( Vec2* tc )
set the texture coords of the geoset

- +

ovoid setTextureCoords( Vec2* tc, ushort* ti )
set the texture coords and texture coord indices of the geoset

- +

ovoid setTextureCoords( Vec2* tc, uint* ti )
set the texture coords and texture coord indices of the geoset

- -

ovoid setTextureCoords( Vec2* tc, IndexPointer& ip ) + +
ovoid setTextureCoords( Vec2* tc, IndexPointer& ip )
set the texture coords and texture indices of the geoset

- -

ovoid setTextureBinding( const BindingType binding ) + +
ovoid setTextureBinding( const BindingType binding )
set the texture coord binding to the vertices/primitives/overall

- -

oinline const BindingType getTextureBinding() const + +
oinline const BindingType getTextureBinding() const

- +

oinline const int getNumInterleavedCoords() const
get the number of texture coords required by the defined primitives and textures binding

- +

oinline void* getInterleavedArray()
get a pointer to interleaved float array.

- +

oinline const void* getInterleavedArray() const
get a const pointer to interleaved float array.

- +

oinline const int getNumIterleavedIndices() const
get the number of texture coord indices required by the defined primitives and texture binding

- -

oinline IndexPointer& getInterleavedIndices() + +
oinline IndexPointer& getInterleavedIndices()
get the texture index array.

- -

oinline const IndexPointer& getInterleavedIndices() const + +
oinline const IndexPointer& getInterleavedIndices() const
get the interleaved index array.

- -

oinline const InterleaveArrayType getInterleavedFromat() const + +
oinline const InterleaveArrayType getInterleavedFromat() const
get the interleaved array storage format.

- -

ovoid setInterleavedArray( const InterleaveArrayType format, float* ia ) + +
ovoid setInterleavedArray( const InterleaveArrayType format, float* ia )
set the interleaved arrays of the geoset

- -

ovoid setInterleavedArray( const InterleaveArrayType format, float* ia, ushort* iai ) + +
ovoid setInterleavedArray( const InterleaveArrayType format, float* ia, ushort* iai )

- -

ovoid setInterleavedArray( const InterleaveArrayType format, float* ia, uint* iai ) + +
ovoid setInterleavedArray( const InterleaveArrayType format, float* ia, uint* iai )

- -

ovoid setInterleavedArray( const InterleaveArrayType format, float* ia, IndexPointer& iai ) + +
ovoid setInterleavedArray( const InterleaveArrayType format, float* ia, IndexPointer& iai )

- +

ovirtual void drawImmediateMode(State& state)
draw geoset directly ignoring an OpenGL display list which could be attached. This is the internal draw method which does the drawing itself, and is the method to override when deriving from GeoSet for user-drawn objects.

- +

oconst bool check() const

- -

o GeoSet(const GeoSet&) + +
o GeoSet(const GeoSet&)

- +

oGeoSet& operator = (const GeoSet&)

- +

ovirtual ~GeoSet()

- +

ovirtual const bool computeBound() const

- +

oint _numprims

- -

oPrimitiveType _primtype + +
oPrimitiveType _primtype

- +

oint _needprimlen

- +

ounsigned int _oglprimtype

- +

oint* _primLengths

- +

ounsigned char _primlength

- +

ounsigned char _flat_shaded_skip

- +

oint _numcoords

- +

oVec3* _coords

- -

oIndexPointer _cindex + +
oIndexPointer _cindex

- -

oBindingType _normal_binding + +
oBindingType _normal_binding

- +

oint _numnormals

- +

oVec3* _normals

- -

oIndexPointer _nindex + +
oIndexPointer _nindex

- -

oBindingType _color_binding + +
oBindingType _color_binding

- +

oint _numcolors

- +

oVec4* _colors

- -

oIndexPointer _colindex + +
oIndexPointer _colindex

- -

oBindingType _texture_binding + +
oBindingType _texture_binding

- +

oint _numtcoords

- +

oVec2* _tcoords

- -

oIndexPointer _tindex + +
oIndexPointer _tindex

- +

ovoid* _iarray

- -

oIndexPointer _iaindex + +
oIndexPointer _iaindex

- -

oInterleaveArrayType _iaformat + +
oInterleaveArrayType _iaformat

- +

ounsigned int _ogliaformat

- +

oint _fast_path

- +

ovoid set_fast_path( void )

- +

ovoid draw_fast_path( void )

- +

ovoid draw_alternate_path( void )

diff --git a/doc/doc++/osg/Geode.html b/doc/doc++/osg/Geode.html index 7e145500f..aad6f7886 100644 --- a/doc/doc++/osg/Geode.html +++ b/doc/doc++/osg/Geode.html @@ -23,57 +23,51 @@

Public Methods

-[more]typedef std::vector< ref_ptr<Drawable> > DrawableList Geode() +[more]typedef std::vector< ref_ptr<Drawable> > DrawableList Geode()
-[more]virtual Object* clone() const +[more] META_Node(Geode)
-[more]virtual bool isSameKindAs(const Object* obj) const -
-[more]virtual const char* className() const -
-[more]virtual void accept(NodeVisitor& nv) -
-[more]virtual const bool addDrawable( Drawable* drawable ) +[more]virtual const bool addDrawable( Drawable* drawable )
Add Drawable to Geode.
-[more]virtual const bool removeDrawable( Drawable* drawable ) +[more]virtual const bool removeDrawable( Drawable* drawable )
Remove Drawable from Geode.
-[more]virtual const bool replaceDrawable( Drawable* origDraw, Drawable* newDraw ) +[more]virtual const bool replaceDrawable( Drawable* origDraw, Drawable* newDraw )
Replace specified Drawable with another Drawable.
-[more]inline const int getNumDrawables() const +[more]inline const int getNumDrawables() const
return the number of geoset's
-[more]inline Drawable* getDrawable( const int i ) +[more]inline Drawable* getDrawable( const int i )
return geoset at position i
-[more]inline const Drawable* getDrawable( const int i ) const +[more]inline const Drawable* getDrawable( const int i ) const
return geoset at position i
-[more]inline const bool containsDrawable(const Drawable* gset) const -
return true is geoset is contained within Geode +[more]inline const bool containsDrawable(const Drawable* gset) const +
return true if geoset is contained within Geode
-[more]inline DrawableList::iterator findDrawable(const Drawable* gset) +[more]inline DrawableList::iterator findDrawable(const Drawable* gset)
return the iterator postion for specified Drawable.
-[more]inline DrawableList::const_iterator findDrawable(const Drawable* gset) const +[more]inline DrawableList::const_iterator findDrawable(const Drawable* gset) const
return the const_iterator postion for specified Drawable.
-[more]void compileDrawables(State& state) +[more]void compileDrawables(State& state)
complile OpenGL Display List for each geoset

Protected Fields

-[more]DrawableList _drawables +[more]DrawableList _drawables

Protected Methods

-[more]virtual ~Geode() +[more]virtual ~Geode()
-[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const

@@ -81,6 +75,14 @@

Public Methods

+ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual void accept(NodeVisitor& nv) +
ovirtual void ascend(NodeVisitor& nv)
ovirtual void traverse(NodeVisitor& ) @@ -91,7 +93,7 @@
oinline const std::string& getName() const
-oinline const ParentList& getParents() const +oinline const ParentList& getParents() const
oinline Group* getParent(const int i)
@@ -99,7 +101,15 @@
oinline const int getNumParents() const
-oinline void setUserData(void* data, MemoryAdapter* ma=0L) +ovoid setAppCallback(NodeCallback* nc) +
+oinline NodeCallback* getAppCallback() +
+oinline const NodeCallback* getAppCallback() const +
+oinline const int getNumChildrenRequiringAppTraversal() const +
+oinline void setUserData(void* data, MemoryAdapter* ma=0L)
oinline void* getUserData()
@@ -113,9 +123,9 @@
oinline const NodeMask getNodeMask() const
-oinline const DescriptionList& getDescriptions() const +oinline const DescriptionList& getDescriptions() const
-oinline DescriptionList& getDescriptions() +oinline DescriptionList& getDescriptions()
oinline const std::string& getDescription(const int i) const
@@ -151,7 +161,11 @@
ostd::string _name
-oParentList _parents +oParentList _parents +
+oref_ptr<NodeCallback> _appCallback +
+oint _numChildrenRequiringAppTraversal
ovoid* _userData
@@ -159,11 +173,16 @@
oNodeMask _nodeMask
-oDescriptionList _descriptions +oDescriptionList _descriptions
oref_ptr<StateSet> _dstate

+

+

Protected Methods

+ovoid setNumChildrenRequiringAppTraversal(const int num) +

+

Inherited from Object:

@@ -195,27 +214,15 @@
- +
otypedef std::vector< ref_ptr<Drawable> > DrawableList Geode()

- - -

ovirtual Object* clone() const -

- - -

ovirtual bool isSameKindAs(const Object* obj) const -

- - -

ovirtual const char* className() const -

- - -

ovirtual void accept(NodeVisitor& nv) + + +
o META_Node(Geode)

- +

ovirtual const bool addDrawable( Drawable* drawable )
Add Drawable to Geode. If gset is not NULL and is not contained in Geode then increment its @@ -224,7 +231,7 @@ sphere to force it to recompute on next getBound() and return true for success. Otherwise return false.

- +

ovirtual const bool removeDrawable( Drawable* drawable )
Remove Drawable from Geode. If gset is contained in Geode then remove it from the geoset @@ -234,7 +241,7 @@ return true for success. If gset is not found then return false and do not change the reference count of gset.

- +

ovirtual const bool replaceDrawable( Drawable* origDraw, Drawable* newDraw )
Replace specified Drawable with another Drawable. Decrement the reference count origGSet and increments the @@ -245,52 +252,52 @@ add newGset. If newGset is NULL then return false and do not remove origGset.

- +

oinline const int getNumDrawables() const
return the number of geoset's

- +

oinline Drawable* getDrawable( const int i )
return geoset at position i

- +

oinline const Drawable* getDrawable( const int i ) const
return geoset at position i

- +

oinline const bool containsDrawable(const Drawable* gset) const -
return true is geoset is contained within Geode +
return true if geoset is contained within Geode

- +

oinline DrawableList::iterator findDrawable(const Drawable* gset)
return the iterator postion for specified Drawable. return _geoset.end() if gset not is contained in Geode.

- +

oinline DrawableList::const_iterator findDrawable(const Drawable* gset) const
return the const_iterator postion for specified Drawable. return _geoset.end() if gset not is contained in Geode.

- +

ovoid compileDrawables(State& state)
complile OpenGL Display List for each geoset

- +

ovirtual ~Geode()

- +

ovirtual const bool computeBound() const

- +

oDrawableList _drawables


diff --git a/doc/doc++/osg/Group.html b/doc/doc++/osg/Group.html index eda54fe27..c4fb29099 100644 --- a/doc/doc++/osg/Group.html +++ b/doc/doc++/osg/Group.html @@ -23,56 +23,50 @@

Public Methods

-[more]typedef std::vector<ref_ptr<Node> > ChildList Group() +[more]typedef std::vector<ref_ptr<Node> > ChildList Group()
-[more]virtual Object* clone() const +[more] META_Node(Group)
-[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual void traverse(NodeVisitor& nv)
-[more]virtual const char* className() const -
-[more]virtual void accept(NodeVisitor& nv) -
-[more]virtual void traverse(NodeVisitor& nv) -
-[more]virtual bool addChild( Node* child ) +[more]virtual bool addChild( Node* child )
Add Node to Group.
-[more]virtual bool removeChild( Node* child ) +[more]virtual bool removeChild( Node* child )
Remove Node from Group.
-[more]virtual bool replaceChild( Node* origChild, Node* newChild ) +[more]virtual bool replaceChild( Node* origChild, Node* newChild )
Replace specified Node with another Node.
-[more]inline const int getNumChildren() const +[more]inline const int getNumChildren() const
return the number of chilren nodes
-[more]inline Node* getChild( const int i ) +[more]inline Node* getChild( const int i )
return child node at position i
-[more]inline const Node* getChild( const int i ) const +[more]inline const Node* getChild( const int i ) const
return child node at position i
-[more]inline bool containsNode( const Node* node ) const +[more]inline bool containsNode( const Node* node ) const
return true if node is contained within Group
-[more]inline ChildList::iterator findNode( const Node* node ) +[more]inline ChildList::iterator findNode( const Node* node )
return the iterator postion for specified Node.
-[more]inline ChildList::const_iterator findNode( const Node* node ) const +[more]inline ChildList::const_iterator findNode( const Node* node ) const
return the const_iterator postion for specified Node.

Protected Fields

-[more]ChildList _children +[more]ChildList _children

Protected Methods

-[more]virtual ~Group() +[more]virtual ~Group()
-[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const

@@ -80,6 +74,14 @@

Public Methods

+ovirtual Object* clone() const +
+ovirtual bool isSameKindAs(const Object* obj) const +
+ovirtual const char* className() const +
+ovirtual void accept(NodeVisitor& nv) +
ovirtual void ascend(NodeVisitor& nv)
oinline void setName( const std::string& name ) @@ -88,7 +90,7 @@
oinline const std::string& getName() const
-oinline const ParentList& getParents() const +oinline const ParentList& getParents() const
oinline Group* getParent(const int i)
@@ -96,7 +98,15 @@
oinline const int getNumParents() const
-oinline void setUserData(void* data, MemoryAdapter* ma=0L) +ovoid setAppCallback(NodeCallback* nc) +
+oinline NodeCallback* getAppCallback() +
+oinline const NodeCallback* getAppCallback() const +
+oinline const int getNumChildrenRequiringAppTraversal() const +
+oinline void setUserData(void* data, MemoryAdapter* ma=0L)
oinline void* getUserData()
@@ -110,9 +120,9 @@
oinline const NodeMask getNodeMask() const
-oinline const DescriptionList& getDescriptions() const +oinline const DescriptionList& getDescriptions() const
-oinline DescriptionList& getDescriptions() +oinline DescriptionList& getDescriptions()
oinline const std::string& getDescription(const int i) const
@@ -148,7 +158,11 @@
ostd::string _name
-oParentList _parents +oParentList _parents +
+oref_ptr<NodeCallback> _appCallback +
+oint _numChildrenRequiringAppTraversal
ovoid* _userData
@@ -156,11 +170,16 @@
oNodeMask _nodeMask
-oDescriptionList _descriptions +oDescriptionList _descriptions
oref_ptr<StateSet> _dstate

+

+

Protected Methods

+ovoid setNumChildrenRequiringAppTraversal(const int num) +

+

Inherited from Object:

@@ -194,31 +213,19 @@ with memory management handled automatically via osg::Referenced.
- +
otypedef std::vector<ref_ptr<Node> > ChildList Group()

- - -

ovirtual Object* clone() const -

- - -

ovirtual bool isSameKindAs(const Object* obj) const -

- - -

ovirtual const char* className() const -

- - -

ovirtual void accept(NodeVisitor& nv) + + +
o META_Node(Group)

- +

ovirtual void traverse(NodeVisitor& nv)

- +

ovirtual bool addChild( Node* child )
Add Node to Group. If node is not NULL and is not contained in Group then increment its @@ -227,7 +234,7 @@ sphere to force it to recompute on next getBound() and return true for success. Otherwise return false. Scene nodes can't be added as child nodes.

- +

ovirtual bool removeChild( Node* child )
Remove Node from Group. If Node is contained in Group then remove it from the child @@ -237,7 +244,7 @@ return true for success. If Node is not found then return false and do not change the reference count of the Node.

- +

ovirtual bool replaceChild( Node* origChild, Node* newChild )
Replace specified Node with another Node. Decrement the reference count origNode and increments the @@ -248,47 +255,47 @@ add newNode. If newNode is NULL then return false and do not remove origNode. Also returns false if newChild is a Scene node.

- +

oinline const int getNumChildren() const
return the number of chilren nodes

- +

oinline Node* getChild( const int i )
return child node at position i

- +

oinline const Node* getChild( const int i ) const
return child node at position i

- +

oinline bool containsNode( const Node* node ) const
return true if node is contained within Group

- +

oinline ChildList::iterator findNode( const Node* node )
return the iterator postion for specified Node. return _chilren.end() if node is not contained in Group.

- +

oinline ChildList::const_iterator findNode( const Node* node ) const
return the const_iterator postion for specified Node. return _chilren.end() if node is not contained in Group.

- +

ovirtual ~Group()

- +

ovirtual const bool computeBound() const

- +

oChildList _children


diff --git a/doc/doc++/osg/HIER.html b/doc/doc++/osg/HIER.html index d2d32ec45..c8769f7a2 100644 --- a/doc/doc++/osg/HIER.html +++ b/doc/doc++/osg/HIER.html @@ -12,14 +12,17 @@
  • osg::BoundingBox
  • osg::BoundingSphere
  • osg::ClippingVolume +
  • osg::Matrix::MatrixProduct
  • osg::Plane
  • osg::Quat
  • osg::Referenced
  • osg::StateSet diff --git a/doc/doc++/osg/HIERjava.html b/doc/doc++/osg/HIERjava.html index de72c0d70..dd327c531 100644 --- a/doc/doc++/osg/HIERjava.html +++ b/doc/doc++/osg/HIERjava.html @@ -30,6 +30,13 @@ + + + + + + + @@ -43,11 +50,11 @@ - - - - - + + + + + diff --git a/doc/doc++/osg/Image.html b/doc/doc++/osg/Image.html index eb4b79b36..c91c90c8c 100644 --- a/doc/doc++/osg/Image.html +++ b/doc/doc++/osg/Image.html @@ -23,80 +23,80 @@

    Public Methods

    -[more] Image() +[more] Image()
    -[more]virtual Object* clone() const +[more]virtual Object* clone() const
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual bool isSameKindAs(const Object* obj) const
    -[more]virtual const char* className() const +[more]virtual const char* className() const
    -[more]inline const std::string& getFileName() const +[more]inline const std::string& getFileName() const
    -[more]void setFileName(const std::string& fileName) +[more]void setFileName(const std::string& fileName)
    -[more]void setImage(const int s, const int t, const int r, const int internalFormat, const unsigned int pixelFormat, const unsigned int dataType, unsigned char* data, const int packing=-1) +[more]void setImage(const int s, const int t, const int r, const int internalFormat, const unsigned int pixelFormat, const unsigned int dataType, unsigned char* data, const int packing=-1)
    set the image data and format.
    -[more]inline const int s() const +[more]inline const int s() const
    Width of image
    -[more]inline const int t() const +[more]inline const int t() const
    Height of image
    -[more]inline const int r() const +[more]inline const int r() const
    Depth of image
    -[more]inline const int internalFormat() const +[more]inline const int internalFormat() const
    -[more]inline const unsigned int pixelFormat() const +[more]inline const unsigned int pixelFormat() const
    -[more]inline const unsigned int dataType() const +[more]inline const unsigned int dataType() const
    -[more]inline const unsigned int packing() const +[more]inline const unsigned int packing() const
    -[more]inline unsigned char* data() +[more]inline unsigned char* data()
    raw image data
    -[more]inline const unsigned char* data() const +[more]inline const unsigned char* data() const
    raw const image data
    -[more]void scaleImage(const int s, const int t, const int r) +[more]void scaleImage(const int s, const int t, const int r)
    Scale image to specified size.
    -[more]void ensureDimensionsArePowerOfTwo() +[more]void ensureDimensionsArePowerOfTwo()
    Ensure image dimensions are a power of two.
    -[more]inline const unsigned int getModifiedTag() const +[more]inline const unsigned int getModifiedTag() const
    Get modified tag value.

    Protected Fields

    -[more]std::string _fileName +[more]std::string _fileName
    -[more]int _s +[more]int _s
    -[more]int _t +[more]int _t
    -[more]int _r +[more]int _r
    -[more]int _internalFormat +[more]int _internalFormat
    -[more]unsigned int _pixelFormat +[more]unsigned int _pixelFormat
    -[more]unsigned int _dataType +[more]unsigned int _dataType
    -[more]unsigned int _packing +[more]unsigned int _packing
    -[more]unsigned char* _data +[more]unsigned char* _data
    -[more]unsigned int _modifiedTag +[more]unsigned int _modifiedTag

    Protected Methods

    -[more]virtual ~Image() +[more]virtual ~Image()

    @@ -130,32 +130,32 @@
    - +
    o Image()

    - +

    ovirtual Object* clone() const

    - +

    ovirtual bool isSameKindAs(const Object* obj) const

    - +

    ovirtual const char* className() const

    - +

    oinline const std::string& getFileName() const

    - +

    ovoid setFileName(const std::string& fileName)

    - -

    ovoid setImage(const int s, const int t, const int r, const int internalFormat, const unsigned int pixelFormat, const unsigned int dataType, unsigned char* data, const int packing=-1) + +
    ovoid setImage(const int s, const int t, const int r, const int internalFormat, const unsigned int pixelFormat, const unsigned int dataType, unsigned char* data, const int packing=-1)
    set the image data and format. note, when the packing value is negative (the default is -1) this method assumes a _packing width of 1 if the width is not a multiple of 4, @@ -163,105 +163,105 @@ otherwise automatically sets to _packing to 4. If a postive value of packing is supplied than _packing is simply set to that value.

    - +

    oinline const int s() const
    Width of image

    - +

    oinline const int t() const
    Height of image

    - +

    oinline const int r() const
    Depth of image

    - +

    oinline const int internalFormat() const

    - +

    oinline const unsigned int pixelFormat() const

    - +

    oinline const unsigned int dataType() const

    - +

    oinline const unsigned int packing() const

    - +

    oinline unsigned char* data()
    raw image data

    - +

    oinline const unsigned char* data() const
    raw const image data

    - -

    ovoid scaleImage(const int s, const int t, const int r) + +
    ovoid scaleImage(const int s, const int t, const int r)
    Scale image to specified size.

    - +

    ovoid ensureDimensionsArePowerOfTwo()
    Ensure image dimensions are a power of two. Mip Mapped texture require the image dimensions to be power of two.

    - +

    oinline const unsigned int getModifiedTag() const
    Get modified tag value.

    - +

    ovirtual ~Image()

    - +

    ostd::string _fileName

    - +

    oint _s

    - +

    oint _t

    - +

    oint _r

    - +

    oint _internalFormat

    - +

    ounsigned int _pixelFormat

    - +

    ounsigned int _dataType

    - +

    ounsigned int _packing

    - +

    ounsigned char* _data

    - +

    ounsigned int _modifiedTag

    diff --git a/doc/doc++/osg/Impostor.html b/doc/doc++/osg/Impostor.html index 185a3aeb7..fdfb33be8 100644 --- a/doc/doc++/osg/Impostor.html +++ b/doc/doc++/osg/Impostor.html @@ -23,51 +23,45 @@

    Public Methods

    -[more] Impostor() +[more] Impostor()
    -[more]virtual Object* clone() const +[more] META_Node(Impostor)
    -[more]virtual bool isSameKindAs(const Object* obj) const -
    -[more]virtual const char* className() const -
    -[more]virtual void accept(NodeVisitor& nv) -
    -[more]inline void setImpostorThreshold(float distance) +[more]inline void setImpostorThreshold(float distance)
    Set the Impostor threshold distance.
    -[more]inline void setImpostorThresholdToBound(float ratio=1.0f) +[more]inline void setImpostorThresholdToBound(float ratio=1.0f)
    Set the Impostor threshold distance relative to the node's bounding sphere's radius
    -[more]inline const float getImpostorThreshold() const +[more]inline const float getImpostorThreshold() const
    -[more]inline const float getImpostorThreshold2() const +[more]inline const float getImpostorThreshold2() const
    -[more]ImpostorSprite* findBestImpostorSprite(const osg::Vec3& currLocalEyePoint) +[more]ImpostorSprite* findBestImpostorSprite(const osg::Vec3& currLocalEyePoint)
    Find the ImposterSprite which fits the current eye point best
    -[more]void addImpostorSprite(ImpostorSprite* is) +[more]void addImpostorSprite(ImpostorSprite* is)
    Add an ImpostorSprite to the Impostor
    -[more]inline ImpostorSpriteList& getImpostorSpriteList() +[more]inline ImpostorSpriteList& getImpostorSpriteList()
    Get the list of ImpostorSprites attached to this Impostor
    -[more]inline const ImpostorSpriteList& getImpostorSpriteList() const +[more]inline const ImpostorSpriteList& getImpostorSpriteList() const
    Get a const list of ImpostorSprites attached to this const Impostor

    Protected Fields

    -[more]ImpostorSpriteList _impostorSpriteList +[more]ImpostorSpriteList _impostorSpriteList
    -[more]float _impostorThreshold +[more]float _impostorThreshold

    Protected Methods

    -[more]virtual ~Impostor() +[more]virtual ~Impostor()
    -[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const

    @@ -136,6 +130,14 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual void accept(NodeVisitor& nv) +
    ovirtual void ascend(NodeVisitor& nv)
    oinline void setName( const std::string& name ) @@ -144,7 +146,7 @@
    oinline const std::string& getName() const
    -oinline const ParentList& getParents() const +oinline const ParentList& getParents() const
    oinline Group* getParent(const int i)
    @@ -152,7 +154,15 @@
    oinline const int getNumParents() const
    -oinline void setUserData(void* data, MemoryAdapter* ma=0L) +ovoid setAppCallback(NodeCallback* nc) +
    +oinline NodeCallback* getAppCallback() +
    +oinline const NodeCallback* getAppCallback() const +
    +oinline const int getNumChildrenRequiringAppTraversal() const +
    +oinline void setUserData(void* data, MemoryAdapter* ma=0L)
    oinline void* getUserData()
    @@ -166,9 +176,9 @@
    oinline const NodeMask getNodeMask() const
    -oinline const DescriptionList& getDescriptions() const +oinline const DescriptionList& getDescriptions() const
    -oinline DescriptionList& getDescriptions() +oinline DescriptionList& getDescriptions()
    oinline const std::string& getDescription(const int i) const
    @@ -204,7 +214,11 @@
    ostd::string _name
    -oParentList _parents +oParentList _parents +
    +oref_ptr<NodeCallback> _appCallback +
    +oint _numChildrenRequiringAppTraversal
    ovoid* _userData
    @@ -212,11 +226,16 @@
    oNodeMask _nodeMask
    -oDescriptionList _descriptions +oDescriptionList _descriptions
    oref_ptr<StateSet> _dstate

    +

    +

    Protected Methods

    +ovoid setNumChildrenRequiringAppTraversal(const int num) +

    +

    Inherited from Object:

    @@ -284,80 +303,68 @@ geometry.
    - +
    o Impostor()

    - - -

    ovirtual Object* clone() const -

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual void accept(NodeVisitor& nv) + + +
    o META_Node(Impostor)

    - -

    oinline void setImpostorThreshold(float distance) + +
    oinline void setImpostorThreshold(float distance)
    Set the Impostor threshold distance. For eye points further than this threshold the Imposter is used if appropriate, otherwise the LOD children as chosen as per a standard LOD node.

    - +

    oinline void setImpostorThresholdToBound(float ratio=1.0f)
    Set the Impostor threshold distance relative to the node's bounding sphere's radius

    - +

    oinline const float getImpostorThreshold() const

    - +

    oinline const float getImpostorThreshold2() const

    - +

    oImpostorSprite* findBestImpostorSprite(const osg::Vec3& currLocalEyePoint)
    Find the ImposterSprite which fits the current eye point best

    - +

    ovoid addImpostorSprite(ImpostorSprite* is)
    Add an ImpostorSprite to the Impostor

    - +

    oinline ImpostorSpriteList& getImpostorSpriteList()
    Get the list of ImpostorSprites attached to this Impostor

    - +

    oinline const ImpostorSpriteList& getImpostorSpriteList() const
    Get a const list of ImpostorSprites attached to this const Impostor

    - +

    ovirtual ~Impostor()

    - +

    ovirtual const bool computeBound() const

    - +

    oImpostorSpriteList _impostorSpriteList

    - +

    ofloat _impostorThreshold

    diff --git a/doc/doc++/osg/ImpostorSprite.html b/doc/doc++/osg/ImpostorSprite.html index b8330859a..5d5b2681f 100644 --- a/doc/doc++/osg/ImpostorSprite.html +++ b/doc/doc++/osg/ImpostorSprite.html @@ -23,106 +23,106 @@

    Public Methods

    -[more] ImpostorSprite() +[more] ImpostorSprite()
    -[more]virtual Object* clone() const +[more]virtual Object* clone() const
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual bool isSameKindAs(const Object* obj) const
    -[more]virtual const char* className() const +[more]virtual const char* className() const
    -[more]void setParent(Impostor* parent) +[more]void setParent(Impostor* parent)
    Set the parent, which must be an Impostor.
    -[more]Impostor* getParent() +[more]Impostor* getParent()
    Get the parent, which is an Impostor.
    -[more]const Impostor* getParent() const +[more]const Impostor* getParent() const
    Get the const parent, which is an Impostor.
    -[more]inline void setStoredLocalEyePoint(const Vec3& v) +[more]inline void setStoredLocalEyePoint(const Vec3& v)
    Set the eye point for when the ImpsotorSprite was snapped
    -[more]inline const Vec3& getStoredLocalEyePoint() const +[more]inline const Vec3& getStoredLocalEyePoint() const
    Get the eye point for when the ImpsotorSprite was snapped
    -[more]inline void setLastFrameUsed(const int frameNumber) +[more]inline void setLastFrameUsed(const int frameNumber)
    Set the frame number for when the ImpostorSprite was last used in rendering
    -[more]inline int getLastFrameUsed() const +[more]inline int getLastFrameUsed() const
    Get the frame number for when the ImpostorSprite was last used in rendering
    -[more]inline Vec3* getCoords() +[more]inline Vec3* getCoords()
    Get the coordinates of the corners of the quad.
    -[more]inline const Vec3* getCoords() const +[more]inline const Vec3* getCoords() const
    Get the const coordinates of the corners of the quad
    -[more]inline Vec2* getTexCoords() +[more]inline Vec2* getTexCoords()
    Get the texture coordinates of the corners of the quad.
    -[more]inline const Vec2* getTexCoords() const +[more]inline const Vec2* getTexCoords() const
    Get the const texture coordinates of the corners of the quad
    -[more]inline Vec3* getControlCoords() +[more]inline Vec3* getControlCoords()
    Get the control coordinates of the corners of the quad.
    -[more]inline const Vec3* getControlCoords() const +[more]inline const Vec3* getControlCoords() const
    Get the const control coordinates of the corners of the quad
    -[more]const float calcPixelError(const Camera& camera, const int* viewport, const osg::Matrix* matrix) const +[more]const float calcPixelError(const Camera& camera, const Viewport& viewport, const osg::Matrix* matrix) const
    calculate the pixel error value for current camera position and object position
    -[more]void setTexture(Texture* tex, int s, int t) +[more]void setTexture(Texture* tex, int s, int t)
    -[more]Texture* getTexture() +[more]Texture* getTexture()
    -[more]const Texture* getTexture() const +[more]const Texture* getTexture() const
    -[more]const int s() const +[more]const int s() const
    -[more]const int t() const +[more]const int t() const
    -[more]virtual void drawImmediateMode(State& state) +[more]virtual void drawImmediateMode(State& state)
    draw ImpostorSprite directly.

    Protected Fields

    -[more]Impostor* _parent +[more]Impostor* _parent
    -[more]ImpostorSpriteManager* _ism +[more]ImpostorSpriteManager* _ism
    -[more]ImpostorSprite* _previous +[more]ImpostorSprite* _previous
    -[more]ImpostorSprite* _next +[more]ImpostorSprite* _next
    -[more]int _lastFrameUsed +[more]int _lastFrameUsed
    -[more]Vec3 _storedLocalEyePoint +[more]Vec3 _storedLocalEyePoint
    -[more]Vec3 _coords[4] +[more]Vec3 _coords[4]
    -[more]Vec2 _texcoords[4] +[more]Vec2 _texcoords[4]
    -[more]Vec3 _controlcoords[4] +[more]Vec3 _controlcoords[4]
    -[more]Texture* _texture +[more]Texture* _texture
    -[more]int _s +[more]int _s
    -[more]int _t +[more]int _t

    Protected Methods

    -[more] ImpostorSprite(const ImpostorSprite&) +[more] ImpostorSprite(const ImpostorSprite&)
    -[more]ImpostorSprite& operator = (const ImpostorSprite&) +[more]ImpostorSprite& operator = (const ImpostorSprite&)
    -[more]virtual ~ImpostorSprite() +[more]virtual ~ImpostorSprite()
    -[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const

    @@ -212,82 +212,82 @@ necessary to deal with it directly.
    - +
    o ImpostorSprite()

    - +

    ovirtual Object* clone() const

    - +

    ovirtual bool isSameKindAs(const Object* obj) const

    - +

    ovirtual const char* className() const

    - +

    ovoid setParent(Impostor* parent)
    Set the parent, which must be an Impostor. Unlike conventional Drawables, ImpostorSprite's can only ever have one parent.

    - +

    oImpostor* getParent()
    Get the parent, which is an Impostor.

    - +

    oconst Impostor* getParent() const
    Get the const parent, which is an Impostor.

    - +

    oinline void setStoredLocalEyePoint(const Vec3& v)
    Set the eye point for when the ImpsotorSprite was snapped

    - +

    oinline const Vec3& getStoredLocalEyePoint() const
    Get the eye point for when the ImpsotorSprite was snapped

    - +

    oinline void setLastFrameUsed(const int frameNumber)
    Set the frame number for when the ImpostorSprite was last used in rendering

    - +

    oinline int getLastFrameUsed() const
    Get the frame number for when the ImpostorSprite was last used in rendering

    - +

    oinline Vec3* getCoords()
    Get the coordinates of the corners of the quad. Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.

    - +

    oinline const Vec3* getCoords() const
    Get the const coordinates of the corners of the quad

    - +

    oinline Vec2* getTexCoords()
    Get the texture coordinates of the corners of the quad. Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.

    - +

    oinline const Vec2* getTexCoords() const
    Get the const texture coordinates of the corners of the quad

    - +

    oinline Vec3* getControlCoords()
    Get the control coordinates of the corners of the quad. The control coordinates are the cornders of the quad projected @@ -302,102 +302,102 @@ can then be used to dertermine whether the impostor needs to be updated. Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.

    - +

    oinline const Vec3* getControlCoords() const
    Get the const control coordinates of the corners of the quad

    - -

    oconst float calcPixelError(const Camera& camera, const int* viewport, const osg::Matrix* matrix) const + +
    oconst float calcPixelError(const Camera& camera, const Viewport& viewport, const osg::Matrix* matrix) const
    calculate the pixel error value for current camera position and object position

    - -

    ovoid setTexture(Texture* tex, int s, int t) + +
    ovoid setTexture(Texture* tex, int s, int t)

    - +

    oTexture* getTexture()

    - +

    oconst Texture* getTexture() const

    - +

    oconst int s() const

    - +

    oconst int t() const

    - +

    ovirtual void drawImmediateMode(State& state)
    draw ImpostorSprite directly.

    - -

    o ImpostorSprite(const ImpostorSprite&) + +
    o ImpostorSprite(const ImpostorSprite&)

    - +

    oImpostorSprite& operator = (const ImpostorSprite&)

    - +

    ovirtual ~ImpostorSprite()

    - +

    ovirtual const bool computeBound() const

    - +

    oImpostor* _parent

    - +

    oImpostorSpriteManager* _ism

    - +

    oImpostorSprite* _previous

    - +

    oImpostorSprite* _next

    - +

    oint _lastFrameUsed

    - +

    oVec3 _storedLocalEyePoint

    - +

    oVec3 _coords[4]

    - +

    oVec2 _texcoords[4]

    - +

    oVec3 _controlcoords[4]

    - +

    oTexture* _texture

    - +

    oint _s

    - +

    oint _t

    diff --git a/doc/doc++/osg/ImpostorSpriteManager.html b/doc/doc++/osg/ImpostorSpriteManager.html index 8511adf75..4f75a54b3 100644 --- a/doc/doc++/osg/ImpostorSpriteManager.html +++ b/doc/doc++/osg/ImpostorSpriteManager.html @@ -23,31 +23,35 @@

    Public Methods

    -[more] ImpostorSpriteManager() +[more] ImpostorSpriteManager()
    -[more]const bool empty() const +[more]const bool empty() const
    -[more]ImpostorSprite* first() +[more]ImpostorSprite* first()
    -[more]ImpostorSprite* last() +[more]ImpostorSprite* last()
    -[more]void push_back(ImpostorSprite* is) +[more]void push_back(ImpostorSprite* is)
    -[more]void remove(ImpostorSprite* is) +[more]void remove(ImpostorSprite* is)
    -[more]ImpostorSprite* createOrReuseImpostorSprite(int s, int t, int frameNumber) +[more]ImpostorSprite* createOrReuseImpostorSprite(int s, int t, int frameNumber)

    Protected Fields

    -[more]ImpostorSprite* _first +[more]ref_ptr<TexEnv> _texenv
    -[more]ImpostorSprite* _last +[more]ref_ptr<AlphaFunc> _alphafunc +
    +[more]ImpostorSprite* _first +
    +[more]ImpostorSprite* _last

    Protected Methods

    -[more] ~ImpostorSpriteManager() +[more] ~ImpostorSpriteManager()

    @@ -78,43 +82,51 @@
    - +
    o ImpostorSpriteManager()

    - +

    oconst bool empty() const

    - +

    oImpostorSprite* first()

    - +

    oImpostorSprite* last()

    - +

    ovoid push_back(ImpostorSprite* is)

    - +

    ovoid remove(ImpostorSprite* is)

    - -

    oImpostorSprite* createOrReuseImpostorSprite(int s, int t, int frameNumber) + +
    oImpostorSprite* createOrReuseImpostorSprite(int s, int t, int frameNumber)

    - +

    o ~ImpostorSpriteManager()

    + + +

    oref_ptr<TexEnv> _texenv +

    + + +

    oref_ptr<AlphaFunc> _alphafunc +

    - +

    oImpostorSprite* _first

    - +

    oImpostorSprite* _last

    diff --git a/doc/doc++/osg/LOD.html b/doc/doc++/osg/LOD.html index c93c284a8..d685cac29 100644 --- a/doc/doc++/osg/LOD.html +++ b/doc/doc++/osg/LOD.html @@ -23,52 +23,46 @@

    Public Methods

    -[more] LOD() +[more] LOD()
    -[more]virtual Object* clone() const +[more] META_Node(LOD)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual void traverse(NodeVisitor& nv)
    -[more]virtual const char* className() const -
    -[more]virtual void accept(NodeVisitor& nv) -
    -[more]virtual void traverse(NodeVisitor& nv) -
    -[more]void setRange(const unsigned int index, const float range) +[more]void setRange(const unsigned int index, const float range)
    Sets the value of range list element index to range which is a floating point distance specified in world coordinates.
    -[more]inline const float getRange(const unsigned int index) const +[more]inline const float getRange(const unsigned int index) const
    returns the range for specified index
    -[more]inline const int getNumRanges() const +[more]inline const int getNumRanges() const
    returns the number of ranges currently set
    -[more]inline void setCenter(const Vec3 &center) +[more]inline void setCenter(const Vec3 &center)
    Sets the object-space point which defines the center of the osg::LOD.
    -[more]inline const Vec3& getCenter() const +[more]inline const Vec3& getCenter() const
    return the LOD center point.
    -[more]const int evaluate(const Vec3& eye_local, const float bias=1.0f) const +[more]const int evaluate(const Vec3& eye_local, const float bias=1.0f) const
    return the child to traverse.

    Protected Fields

    -[more]RangeList _rangeList2 +[more]RangeList _rangeList2
    -[more]Vec3 _center +[more]Vec3 _center

    Protected Methods

    -[more]virtual ~LOD() +[more]virtual ~LOD()

    Protected Members

    -[more]typedef std::vector<float> RangeList RangeList _rangeList +[more]typedef std::vector<float> RangeList RangeList _rangeList

    @@ -110,6 +104,14 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual void accept(NodeVisitor& nv) +
    ovirtual void ascend(NodeVisitor& nv)
    oinline void setName( const std::string& name ) @@ -118,7 +120,7 @@
    oinline const std::string& getName() const
    -oinline const ParentList& getParents() const +oinline const ParentList& getParents() const
    oinline Group* getParent(const int i)
    @@ -126,7 +128,15 @@
    oinline const int getNumParents() const
    -oinline void setUserData(void* data, MemoryAdapter* ma=0L) +ovoid setAppCallback(NodeCallback* nc) +
    +oinline NodeCallback* getAppCallback() +
    +oinline const NodeCallback* getAppCallback() const +
    +oinline const int getNumChildrenRequiringAppTraversal() const +
    +oinline void setUserData(void* data, MemoryAdapter* ma=0L)
    oinline void* getUserData()
    @@ -140,9 +150,9 @@
    oinline const NodeMask getNodeMask() const
    -oinline const DescriptionList& getDescriptions() const +oinline const DescriptionList& getDescriptions() const
    -oinline DescriptionList& getDescriptions() +oinline DescriptionList& getDescriptions()
    oinline const std::string& getDescription(const int i) const
    @@ -178,7 +188,11 @@
    ostd::string _name
    -oParentList _parents +oParentList _parents +
    +oref_ptr<NodeCallback> _appCallback +
    +oint _numChildrenRequiringAppTraversal
    ovoid* _userData
    @@ -186,11 +200,16 @@
    oNodeMask _nodeMask
    -oDescriptionList _descriptions +oDescriptionList _descriptions
    oref_ptr<StateSet> _dstate

    +

    +

    Protected Methods

    +ovoid setNumChildrenRequiringAppTraversal(const int num) +

    +

    Inherited from Object:

    @@ -227,31 +246,19 @@ also be chosen.
    - +
    o LOD()

    - - -

    ovirtual Object* clone() const -

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual void accept(NodeVisitor& nv) + + +
    o META_Node(LOD)

    - +

    ovirtual void traverse(NodeVisitor& nv)

    - +

    ovoid setRange(const unsigned int index, const float range)
    Sets the value of range list element index to range which is a floating point distance specified in world coordinates. @@ -259,47 +266,47 @@ Range list automatically expands to accomodate values beyond the current getNumRanges().

    - +

    oinline const float getRange(const unsigned int index) const
    returns the range for specified index

    - +

    oinline const int getNumRanges() const
    returns the number of ranges currently set

    - +

    oinline void setCenter(const Vec3 &center)
    Sets the object-space point which defines the center of the osg::LOD. center is affected by any transforms in the hierarchy above the osg::LOD.

    - +

    oinline const Vec3& getCenter() const
    return the LOD center point.

    - +

    oconst int evaluate(const Vec3& eye_local, const float bias=1.0f) const
    return the child to traverse. Selected by the distance between the eye point in local coordinates and the LOD center, mutliplied by the bias.

    - +

    ovirtual ~LOD()

    - +

    otypedef std::vector<float> RangeList RangeList _rangeList

    - +

    oRangeList _rangeList2

    - +

    oVec3 _center


    diff --git a/doc/doc++/osg/Light.html b/doc/doc++/osg/Light.html index dcf4fbd08..6c12724c0 100644 --- a/doc/doc++/osg/Light.html +++ b/doc/doc++/osg/Light.html @@ -23,128 +23,120 @@

    Public Methods

    -[more] Light() +[more] Light()
    -[more]virtual Object* clone() const -
    return a shallow copy of a node, with Object* return type +[more] META_StateAttribute(Light, (Type)(LIGHT_0+_lightnum))
    -[more]virtual bool isSameKindAs(const Object* obj) const -
    return true if this and obj are of the same kind of object +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const -
    return the name of the node's class type -
    -[more]virtual const Type getType() const -
    -[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const -
    -[more]inline void on() +[more]inline void on()
    Turn the light on.
    -[more]inline void off() +[more]inline void off()
    Turn the light off.
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const
    Apply the light's state to the OpenGL state machine.
    -[more]inline void setAmbient( const Vec4& ambient ) +[more]inline void setAmbient( const Vec4& ambient )
    Set the ambient component of the light.
    -[more]inline const Vec4& getAmbient() const +[more]inline const Vec4& getAmbient() const
    Get the ambient component of the light.
    -[more]inline void setDiffuse( const Vec4& diffuse ) +[more]inline void setDiffuse( const Vec4& diffuse )
    Set the diffuse component of the light.
    -[more]inline const Vec4& getDiffuse() const +[more]inline const Vec4& getDiffuse() const
    Get the diffuse component of the light.
    -[more]inline void setSpecular( const Vec4& specular ) +[more]inline void setSpecular( const Vec4& specular )
    Set the specular component of the light.
    -[more]inline const Vec4& getSpecular() const +[more]inline const Vec4& getSpecular() const
    Get the specular component of the light.
    -[more]inline void setPosition( const Vec4& position ) +[more]inline void setPosition( const Vec4& position )
    Set the position of the light.
    -[more]inline const Vec4& getPosition() const +[more]inline const Vec4& getPosition() const
    Get the position of the light.
    -[more]inline void setDirection( const Vec3& direction ) +[more]inline void setDirection( const Vec3& direction )
    Set the direction of the light.
    -[more]inline const Vec3& getDirection() const +[more]inline const Vec3& getDirection() const
    Get the direction of the light.
    -[more]inline void setConstantAttenuation( const float constant_attenuation ) +[more]inline void setConstantAttenuation( const float constant_attenuation )
    Set the constant attenuation of the light.
    -[more]inline const float getConstantAttenuation() const +[more]inline const float getConstantAttenuation() const
    Get the constant attenuation of the light.
    -[more]inline void setLinearAttenuation( const float linear_attenuation ) +[more]inline void setLinearAttenuation( const float linear_attenuation )
    Set the linear attenuation of the light.
    -[more]inline const float getLinearAttenuation() const +[more]inline const float getLinearAttenuation() const
    Get the linear attenuation of the light.
    -[more]inline void setQuadraticAttenuation( const float quadratic_attenuation ) +[more]inline void setQuadraticAttenuation( const float quadratic_attenuation )
    Set the quadratic attenuation of the light.
    -[more]inline const float getQuadraticAttenuation() const +[more]inline const float getQuadraticAttenuation() const
    Get the quadratic attenuation of the light.
    -[more]inline void setSpotExponent( const float spot_exponent ) +[more]inline void setSpotExponent( const float spot_exponent )
    Set the spot exponent of the light.
    -[more]inline const float getSpotExponent() const +[more]inline const float getSpotExponent() const
    Get the spot exponent of the light.
    -[more]inline void setSpotCutoff( const float spot_cutoff ) +[more]inline void setSpotCutoff( const float spot_cutoff )
    Set the spot cutoff of the light.
    -[more]inline const float getSpotCutoff() const +[more]inline const float getSpotCutoff() const
    Get the spot cutoff of the light.
    -[more]void captureLightState() +[more]void captureLightState()
    Capture the lighting settings of the current OpenGL state and store them in this object

    Protected Fields

    -[more]int _lightnum +[more]int _lightnum
    -[more]bool _on +[more]bool _on
    -[more]Vec4 _ambient +[more]Vec4 _ambient
    -[more]Vec4 _diffuse +[more]Vec4 _diffuse
    -[more]Vec4 _specular +[more]Vec4 _specular
    -[more]Vec4 _position +[more]Vec4 _position
    -[more]Vec3 _direction +[more]Vec3 _direction
    -[more]float _constant_attenuation +[more]float _constant_attenuation
    -[more]float _linear_attenuation +[more]float _linear_attenuation
    -[more]float _quadratic_attenuation +[more]float _quadratic_attenuation
    -[more]float _spot_exponent +[more]float _spot_exponent
    -[more]float _spot_cutoff +[more]float _spot_cutoff
    -[more]static int _currentLightNum +[more]static int _currentLightNum

    Protected Methods

    -[more]virtual ~Light() +[more]virtual ~Light()
    -[more]void init() +[more]void init()
    Initialize the light's settings with some decent defaults.

    @@ -153,6 +145,22 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    +ovirtual void setStateSetModes(StateSet&, const GLModeValue) const +
    ovirtual void compile(State&) const

    @@ -166,7 +174,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -200,217 +210,203 @@
    - +
    o Light()

    - - -

    ovirtual Object* clone() const -
    return a shallow copy of a node, with Object* return type + + +
    o META_StateAttribute(Light, (Type)(LIGHT_0+_lightnum))

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -
    return true if this and obj are of the same kind of object -

    - - -

    ovirtual const char* className() const -
    return the name of the node's class type -

    - - -

    ovirtual const Type getType() const -

    - - -

    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - +

    oinline void on()
    Turn the light on. Calling this method doesn't directly affect OpenGL's lighting mode.

    - +

    oinline void off()
    Turn the light off. Calling this method doesn't directly affect OpenGL's lighting mode.

    - +

    ovirtual void apply(State& state) const
    Apply the light's state to the OpenGL state machine.

    - +

    oinline void setAmbient( const Vec4& ambient )
    Set the ambient component of the light.

    - +

    oinline const Vec4& getAmbient() const
    Get the ambient component of the light.

    - +

    oinline void setDiffuse( const Vec4& diffuse )
    Set the diffuse component of the light.

    - +

    oinline const Vec4& getDiffuse() const
    Get the diffuse component of the light.

    - +

    oinline void setSpecular( const Vec4& specular )
    Set the specular component of the light.

    - +

    oinline const Vec4& getSpecular() const
    Get the specular component of the light.

    - +

    oinline void setPosition( const Vec4& position )
    Set the position of the light.

    - +

    oinline const Vec4& getPosition() const
    Get the position of the light.

    - +

    oinline void setDirection( const Vec3& direction )
    Set the direction of the light.

    - +

    oinline const Vec3& getDirection() const
    Get the direction of the light.

    - +

    oinline void setConstantAttenuation( const float constant_attenuation )
    Set the constant attenuation of the light.

    - +

    oinline const float getConstantAttenuation() const
    Get the constant attenuation of the light.

    - +

    oinline void setLinearAttenuation( const float linear_attenuation )
    Set the linear attenuation of the light.

    - +

    oinline const float getLinearAttenuation() const
    Get the linear attenuation of the light.

    - +

    oinline void setQuadraticAttenuation( const float quadratic_attenuation )
    Set the quadratic attenuation of the light.

    - +

    oinline const float getQuadraticAttenuation() const
    Get the quadratic attenuation of the light.

    - +

    oinline void setSpotExponent( const float spot_exponent )
    Set the spot exponent of the light.

    - +

    oinline const float getSpotExponent() const
    Get the spot exponent of the light.

    - +

    oinline void setSpotCutoff( const float spot_cutoff )
    Set the spot cutoff of the light.

    - +

    oinline const float getSpotCutoff() const
    Get the spot cutoff of the light.

    - +

    ovoid captureLightState()
    Capture the lighting settings of the current OpenGL state and store them in this object

    - +

    ovirtual ~Light()

    - +

    ovoid init()
    Initialize the light's settings with some decent defaults.

    - +

    oint _lightnum

    - +

    obool _on

    - +

    oVec4 _ambient

    - +

    oVec4 _diffuse

    - +

    oVec4 _specular

    - +

    oVec4 _position

    - +

    oVec3 _direction

    - +

    ofloat _constant_attenuation

    - +

    ofloat _linear_attenuation

    - +

    ofloat _quadratic_attenuation

    - +

    ofloat _spot_exponent

    - +

    ofloat _spot_cutoff

    - +

    ostatic int _currentLightNum

    diff --git a/doc/doc++/osg/LightSource.html b/doc/doc++/osg/LightSource.html index 1b919e11c..2c08bf6bc 100644 --- a/doc/doc++/osg/LightSource.html +++ b/doc/doc++/osg/LightSource.html @@ -23,36 +23,30 @@

    Public Methods

    -[more] LightSource() +[more] LightSource()
    -[more]virtual Object* clone() const +[more] META_Node(LightSource)
    -[more]virtual bool isSameKindAs(const Object* obj) const -
    -[more]virtual const char* className() const -
    -[more]virtual void accept(NodeVisitor& nv) -
    -[more]inline void setLight(Light* light) +[more]inline void setLight(Light* light)
    Set the attached light
    -[more]inline Light* getLight() +[more]inline Light* getLight()
    Get the attached light
    -[more]inline const Light* getLight() const +[more]inline const Light* getLight() const
    Get the const attached light

    Protected Fields

    -[more]ref_ptr<Light> _light +[more]ref_ptr<Light> _light

    Protected Methods

    -[more]virtual ~LightSource() +[more]virtual ~LightSource()
    -[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const

    @@ -60,6 +54,14 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual void accept(NodeVisitor& nv) +
    ovirtual void ascend(NodeVisitor& nv)
    ovirtual void traverse(NodeVisitor& ) @@ -70,7 +72,7 @@
    oinline const std::string& getName() const
    -oinline const ParentList& getParents() const +oinline const ParentList& getParents() const
    oinline Group* getParent(const int i)
    @@ -78,7 +80,15 @@
    oinline const int getNumParents() const
    -oinline void setUserData(void* data, MemoryAdapter* ma=0L) +ovoid setAppCallback(NodeCallback* nc) +
    +oinline NodeCallback* getAppCallback() +
    +oinline const NodeCallback* getAppCallback() const +
    +oinline const int getNumChildrenRequiringAppTraversal() const +
    +oinline void setUserData(void* data, MemoryAdapter* ma=0L)
    oinline void* getUserData()
    @@ -92,9 +102,9 @@
    oinline const NodeMask getNodeMask() const
    -oinline const DescriptionList& getDescriptions() const +oinline const DescriptionList& getDescriptions() const
    -oinline DescriptionList& getDescriptions() +oinline DescriptionList& getDescriptions()
    oinline const std::string& getDescription(const int i) const
    @@ -130,7 +140,11 @@
    ostd::string _name
    -oParentList _parents +oParentList _parents +
    +oref_ptr<NodeCallback> _appCallback +
    +oint _numChildrenRequiringAppTraversal
    ovoid* _userData
    @@ -138,11 +152,16 @@
    oNodeMask _nodeMask
    -oDescriptionList _descriptions +oDescriptionList _descriptions
    oref_ptr<StateSet> _dstate

    +

    +

    Protected Methods

    +ovoid setNumChildrenRequiringAppTraversal(const int num) +

    +

    Inherited from Object:

    @@ -174,50 +193,38 @@
    - +
    o LightSource()

    - - -

    ovirtual Object* clone() const -

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual void accept(NodeVisitor& nv) + + +
    o META_Node(LightSource)

    - +

    oinline void setLight(Light* light)
    Set the attached light

    - +

    oinline Light* getLight()
    Get the attached light

    - +

    oinline const Light* getLight() const
    Get the const attached light

    - +

    ovirtual ~LightSource()

    - +

    ovirtual const bool computeBound() const

    - +

    oref_ptr<Light> _light

    diff --git a/doc/doc++/osg/LineSegment.html b/doc/doc++/osg/LineSegment.html index 7751fca5a..2f6c28483 100644 --- a/doc/doc++/osg/LineSegment.html +++ b/doc/doc++/osg/LineSegment.html @@ -23,58 +23,58 @@

    Public Methods

    -[more] LineSegment() +[more] LineSegment()
    -[more] LineSegment(const LineSegment& seg) +[more] LineSegment(const LineSegment& seg)
    -[more] LineSegment(const Vec3& s, const Vec3& e) +[more] LineSegment(const Vec3& s, const Vec3& e)
    -[more]virtual ~LineSegment() +[more]virtual ~LineSegment()
    -[more]LineSegment& operator = (const LineSegment& seg) +[more]LineSegment& operator = (const LineSegment& seg)
    -[more]inline void set(const Vec3& s, const Vec3& e) +[more]inline void set(const Vec3& s, const Vec3& e)
    -[more]inline Vec3& start() +[more]inline Vec3& start()
    -[more]inline const Vec3& start() const +[more]inline const Vec3& start() const
    -[more]inline Vec3& end() +[more]inline Vec3& end()
    -[more]inline const Vec3& end() const +[more]inline const Vec3& end() const
    -[more]const bool intersect(const BoundingBox& bb) const +[more]const bool intersect(const BoundingBox& bb) const
    return true if segment intersects BoundingBox
    -[more]const bool intersect(const BoundingBox& bb, float& r1, float& r2) const +[more]const bool intersect(const BoundingBox& bb, float& r1, float& r2) const
    return true if segment intersects BoundingSphere and return the intersection ratio's
    -[more]const bool intersect(const BoundingSphere& bs) const +[more]const bool intersect(const BoundingSphere& bs) const
    return true if segment intersects BoundingSphere
    -[more]const bool intersect(const BoundingSphere& bs, float& r1, float& r2) const +[more]const bool intersect(const BoundingSphere& bs, float& r1, float& r2) const
    return true if segment intersects BoundingSphere and return the intersection ratio's
    -[more]const bool intersect(const Vec3& v1, const Vec3& v2, const Vec3& v3, float& r) +[more]const bool intersect(const Vec3& v1, const Vec3& v2, const Vec3& v3, float& r)
    return true if segment intersects triangle and set ratio long segment.
    -[more]inline void mult(const LineSegment& seg, const Matrix& m) +[more]inline void mult(const LineSegment& seg, const Matrix& m)
    post multiply a segment by matrix
    -[more]inline void mult(const Matrix& m, const LineSegment& seg) +[more]inline void mult(const Matrix& m, const LineSegment& seg)
    pre multiply a segment by matrix

    Protected Fields

    -[more]Vec3 _s +[more]Vec3 _s
    -[more]Vec3 _e +[more]Vec3 _e

    Protected Methods

    -[more]static const bool intersectAndClip(Vec3& s, Vec3& e, const BoundingBox& bb) +[more]static const bool intersectAndClip(Vec3& s, Vec3& e, const BoundingBox& bb)

    @@ -103,90 +103,90 @@
    - +
    o LineSegment()

    - -

    o LineSegment(const LineSegment& seg) + +
    o LineSegment(const LineSegment& seg)

    - -

    o LineSegment(const Vec3& s, const Vec3& e) + +
    o LineSegment(const Vec3& s, const Vec3& e)

    - +

    ovirtual ~LineSegment()

    - +

    oLineSegment& operator = (const LineSegment& seg)

    - -

    oinline void set(const Vec3& s, const Vec3& e) + +
    oinline void set(const Vec3& s, const Vec3& e)

    - +

    oinline Vec3& start()

    - +

    oinline const Vec3& start() const

    - +

    oinline Vec3& end()

    - +

    oinline const Vec3& end() const

    - +

    oconst bool intersect(const BoundingBox& bb) const
    return true if segment intersects BoundingBox

    - +

    oconst bool intersect(const BoundingBox& bb, float& r1, float& r2) const
    return true if segment intersects BoundingSphere and return the intersection ratio's

    - +

    oconst bool intersect(const BoundingSphere& bs) const
    return true if segment intersects BoundingSphere

    - +

    oconst bool intersect(const BoundingSphere& bs, float& r1, float& r2) const
    return true if segment intersects BoundingSphere and return the intersection ratio's

    - -

    oconst bool intersect(const Vec3& v1, const Vec3& v2, const Vec3& v3, float& r) + +
    oconst bool intersect(const Vec3& v1, const Vec3& v2, const Vec3& v3, float& r)
    return true if segment intersects triangle and set ratio long segment.

    - +

    oinline void mult(const LineSegment& seg, const Matrix& m)
    post multiply a segment by matrix

    - +

    oinline void mult(const Matrix& m, const LineSegment& seg)
    pre multiply a segment by matrix

    - -

    ostatic const bool intersectAndClip(Vec3& s, Vec3& e, const BoundingBox& bb) + +
    ostatic const bool intersectAndClip(Vec3& s, Vec3& e, const BoundingBox& bb)

    - +

    oVec3 _s

    - +

    oVec3 _e

    diff --git a/doc/doc++/osg/Material.html b/doc/doc++/osg/Material.html index 6de0046e4..5c44dc164 100644 --- a/doc/doc++/osg/Material.html +++ b/doc/doc++/osg/Material.html @@ -23,115 +23,112 @@

    Public Methods

    -[more] Material() +[more] Material()
    -[more]virtual Object* clone() const +[more] META_StateAttribute(Material, MATERIAL)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
    -[more]virtual const Type getType() const +[more]virtual void apply(State& state) const
    -[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline void setColorMode(const ColorMode mode)
    -[more]virtual void apply(State& state) const +[more]inline const ColorMode getColorMode() const
    -[more]inline void setColorMode(const ColorMode mode) +[more]void setAmbient( const Face face, const Vec4& ambient )
    -[more]inline const ColorMode getColorMode() const +[more]const Vec4& getAmbient(const Face face) const
    -[more]void setAmbient( const Face face, const Vec4& ambient ) +[more]inline const bool getAmbientFrontAndBack() const
    -[more]const Vec4& getAmbient(const Face face) const +[more]void setDiffuse( const Face face, const Vec4& diffuse )
    -[more]inline const bool getAmbientFrontAndBack() const +[more]const Vec4& getDiffuse(const Face face) const
    -[more]void setDiffuse( const Face face, const Vec4& diffuse ) +[more]inline const bool getDiffuseFrontAndBack() const
    -[more]const Vec4& getDiffuse(const Face face) const -
    -[more]inline const bool getDiffuseFrontAndBack() const -
    -[more]void setSpecular( const Face face, const Vec4& specular ) +[more]void setSpecular( const Face face, const Vec4& specular )
    Set specular value of specified face(s) of the material, valid specular[03] range is 00 to 10
    -[more]const Vec4& getSpecular(const Face face) const +[more]const Vec4& getSpecular(const Face face) const
    Get the specular value for specified face
    -[more]inline const bool getSpecularFrontAndBack() const +[more]inline const bool getSpecularFrontAndBack() const
    Get the whether specular values are equal for front and back faces
    -[more]void setEmission( const Face face, const Vec4& emission ) +[more]void setEmission( const Face face, const Vec4& emission )
    Set emmision value of specified face(s) of the material, valid emmison[03] range is 00 to 10
    -[more]const Vec4& getEmission(const Face face) const +[more]const Vec4& getEmission(const Face face) const
    Get the emmsion value for specified face
    -[more]inline const bool getEmissionFrontAndBack() const +[more]inline const bool getEmissionFrontAndBack() const
    Get the whether emmision values are equal for front and back faces
    -[more]void setShininess( const Face face, float shininess ) +[more]void setShininess( const Face face, float shininess )
    Set shininess of specified face(s) of the material, valid shininess range is 00 to 10
    -[more]const float getShininess(const Face face) const +[more]const float getShininess(const Face face) const
    Get the shininess value for specified face
    -[more]inline const bool getShininessFrontAndBack() const +[more]inline const bool getShininessFrontAndBack() const
    Get the whether shininess values are equal for front and back faces
    -[more]void setTransparency(const Face face, float trans) +[more]void setTransparency(const Face face, float trans)
    Set the alpha value of ambient,diffuse,specular and emmission colors, of specified face, to 1-transparancy.
    -[more]void setAlpha(const Face face, float alpha) +[more]void setAlpha(const Face face, float alpha)
    Set the alpha value of ambient,diffuse,specular and emmission colors.

    Public Members

    -[more]enum Face +[more]enum Face
    -[more]enum ColorMode +[more]enum ColorMode

    Protected Fields

    -[more]ColorMode _colorMode +[more]ColorMode _colorMode
    -[more]bool _ambientFrontAndBack +[more]bool _ambientFrontAndBack
    -[more]Vec4 _ambientFront +[more]Vec4 _ambientFront
    -[more]Vec4 _ambientBack +[more]Vec4 _ambientBack
    -[more]bool _diffuseFrontAndBack +[more]bool _diffuseFrontAndBack
    -[more]Vec4 _diffuseFront +[more]Vec4 _diffuseFront
    -[more]Vec4 _diffuseBack +[more]Vec4 _diffuseBack
    -[more]bool _specularFrontAndBack +[more]bool _specularFrontAndBack
    -[more]Vec4 _specularFront +[more]Vec4 _specularFront
    -[more]Vec4 _specularBack +[more]Vec4 _specularBack
    -[more]bool _emissionFrontAndBack +[more]bool _emissionFrontAndBack
    -[more]Vec4 _emissionFront +[more]Vec4 _emissionFront
    -[more]Vec4 _emissionBack +[more]Vec4 _emissionBack
    -[more]bool _shininessFrontAndBack +[more]bool _shininessFrontAndBack
    -[more]float _shininessFront +[more]float _shininessFront
    -[more]float _shininessBack +[more]float _shininessBack

    Protected Methods

    -[more]virtual ~Material() +[more]virtual ~Material()

    @@ -139,6 +136,20 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    ovirtual void compile(State&) const

    @@ -152,7 +163,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -186,238 +199,231 @@
    - +
    o Material()

    - - -

    ovirtual Object* clone() const + + +
    o META_StateAttribute(Material, MATERIAL)

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    oconst char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - -

    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

    - +

    ovirtual void apply(State& state) const

    - +

    oenum Face

    - +
    o FRONT

    - +

    o BACK

    - +

    o FRONT_AND_BACK

    - +
    oenum ColorMode

    - +
    o AMBIENT

    - +

    o DIFFUSE

    - +

    o SPECULAR

    - +

    o EMISSION

    - +

    o AMBIENT_AND_DIFFUSE

    - +

    o OFF

    - -
    oinline void setColorMode(const ColorMode mode) + +
    oinline void setColorMode(const ColorMode mode)

    - -

    oinline const ColorMode getColorMode() const + +
    oinline const ColorMode getColorMode() const

    - -

    ovoid setAmbient( const Face face, const Vec4& ambient ) + +
    ovoid setAmbient( const Face face, const Vec4& ambient )

    - -

    oconst Vec4& getAmbient(const Face face) const + +
    oconst Vec4& getAmbient(const Face face) const

    - +

    oinline const bool getAmbientFrontAndBack() const

    - -

    ovoid setDiffuse( const Face face, const Vec4& diffuse ) + +
    ovoid setDiffuse( const Face face, const Vec4& diffuse )

    - -

    oconst Vec4& getDiffuse(const Face face) const + +
    oconst Vec4& getDiffuse(const Face face) const

    - +

    oinline const bool getDiffuseFrontAndBack() const

    - -

    ovoid setSpecular( const Face face, const Vec4& specular ) + +
    ovoid setSpecular( const Face face, const Vec4& specular )
    Set specular value of specified face(s) of the material, valid specular[03] range is 00 to 10

    - -

    oconst Vec4& getSpecular(const Face face) const + +
    oconst Vec4& getSpecular(const Face face) const
    Get the specular value for specified face

    - +

    oinline const bool getSpecularFrontAndBack() const
    Get the whether specular values are equal for front and back faces

    - -

    ovoid setEmission( const Face face, const Vec4& emission ) + +
    ovoid setEmission( const Face face, const Vec4& emission )
    Set emmision value of specified face(s) of the material, valid emmison[03] range is 00 to 10

    - -

    oconst Vec4& getEmission(const Face face) const + +
    oconst Vec4& getEmission(const Face face) const
    Get the emmsion value for specified face

    - +

    oinline const bool getEmissionFrontAndBack() const
    Get the whether emmision values are equal for front and back faces

    - -

    ovoid setShininess( const Face face, float shininess ) + +
    ovoid setShininess( const Face face, float shininess )
    Set shininess of specified face(s) of the material, valid shininess range is 00 to 10

    - -

    oconst float getShininess(const Face face) const + +
    oconst float getShininess(const Face face) const
    Get the shininess value for specified face

    - +

    oinline const bool getShininessFrontAndBack() const
    Get the whether shininess values are equal for front and back faces

    - -

    ovoid setTransparency(const Face face, float trans) + +
    ovoid setTransparency(const Face face, float trans)
    Set the alpha value of ambient,diffuse,specular and emmission colors, of specified face, to 1-transparancy. Valid transparancy range is 0.0 to 1.0.

    - -

    ovoid setAlpha(const Face face, float alpha) + +
    ovoid setAlpha(const Face face, float alpha)
    Set the alpha value of ambient,diffuse,specular and emmission colors. Valid transparancy range is 0.0 to 1.0.

    - +

    ovirtual ~Material()

    - -

    oColorMode _colorMode + +
    oColorMode _colorMode

    - +

    obool _ambientFrontAndBack

    - +

    oVec4 _ambientFront

    - +

    oVec4 _ambientBack

    - +

    obool _diffuseFrontAndBack

    - +

    oVec4 _diffuseFront

    - +

    oVec4 _diffuseBack

    - +

    obool _specularFrontAndBack

    - +

    oVec4 _specularFront

    - +

    oVec4 _specularBack

    - +

    obool _emissionFrontAndBack

    - +

    oVec4 _emissionFront

    - +

    oVec4 _emissionBack

    - +

    obool _shininessFrontAndBack

    - +

    ofloat _shininessFront

    - +

    ofloat _shininessBack

    diff --git a/doc/doc++/osg/Matrix.html b/doc/doc++/osg/Matrix.html index f81bede82..714b83510 100644 --- a/doc/doc++/osg/Matrix.html +++ b/doc/doc++/osg/Matrix.html @@ -7,8 +7,7 @@ -

    class SG_EXPORT osg::Matrix

    4x4 Matrix for storage & manipulation of transformations in scene graph.
    -
    +

    class SG_EXPORT osg::Matrix


    Inheritance:

    @@ -23,104 +22,184 @@

    Public Fields

    -[more]float _mat[4][4] +[more]float _mat[4][4] +
    +[more]bool fully_realized

    Public Methods

    -[more] Matrix() +[more] META_Object(Matrix)
    -[more] Matrix(const Matrix& matrix) +[more] Matrix()
    -[more] Matrix( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33) +[more] Matrix( const Matrix& other )
    -[more]Matrix& operator = (const Matrix& matrix) +[more]explicit Matrix( float const* const def )
    -[more]virtual ~Matrix() +[more] Matrix( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
    -[more]virtual Object* clone() const +[more]virtual ~Matrix()
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]Matrix& operator = (const Matrix& )
    -[more]virtual const char* className() const +[more]int compare(const Matrix& m) const
    -[more]void makeIdent() +[more]bool operator < (const Matrix& m) const
    -[more]void set(const float* m) +[more]bool operator == (const Matrix& m) const
    -[more]void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33) +[more]bool operator != (const Matrix& m) const
    -[more]void copy(const Matrix& matrix) +[more]inline float& operator()(int col, int row)
    -[more]void makeScale(float sx, float sy, float sz) +[more]inline float operator()(int col, int row) const
    -[more]void preScale( float sx, float sy, float sz, const Matrix& m ) +[more]void set( float const* const )
    -[more]void postScale( const Matrix& m, float sx, float sy, float sz ) +[more]void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
    -[more]void preScale( float sx, float sy, float sz ) +[more]const float* values()
    -[more]void postScale( float sx, float sy, float sz ) +[more]void makeIdent()
    -[more]void makeTrans( float tx, float ty, float tz ) +[more]void makeScale( const Vec3& )
    -[more]void preTrans( float tx, float ty, float tz, const Matrix& m ) +[more]void makeScale( float, float, float )
    -[more]void postTrans( const Matrix& m, float tx, float ty, float tz ) +[more]void makeTrans( const Vec3& )
    -[more]void preTrans( float tx, float ty, float tz ) +[more]void makeTrans( float, float, float )
    -[more]void postTrans( float tx, float ty, float tz ) +[more]void makeRot( const Vec3& from, const Vec3& to )
    -[more]void makeRot( const Vec3& old_vec, const Vec3& new_vec ) -
    Calc the rotation matrix which aligns vector \a old_vec with vector \a new_vec. +[more]void makeRot( float angle, const Vec3& orientation )
    -[more]void makeRot( float deg, float x, float y, float z ) +[more]void makeRot( float angle, float x, float y, float z )
    -[more]void preRot( float deg, float x, float y, float z, const Matrix& m ) +[more]void makeRot( const Quat& )
    -[more]void postRot( const Matrix& m, float deg, float x, float y, float z ) +[more]void makeRot( float, float, float )
    -[more]void preRot( float deg, float x, float y, float z ) +[more]bool invert( const Matrix& )
    -[more]void postRot( float deg, float x, float y, float z ) +[more]bool invertAffine( const Matrix& )
    -[more]void setTrans( float tx, float ty, float tz ) +[more]inline static Matrix scale( const Vec3& )
    -[more]void setTrans( const Vec3& v ) +[more]inline static Matrix scale( float, float, float )
    -[more]Vec3 getTrans() const +[more]inline static Matrix trans( const Vec3& )
    -[more]void preMult(const Matrix& m) +[more]inline static Matrix trans( float, float, float )
    -[more]void postMult(const Matrix& m) +[more]inline static Matrix rotate( const Vec3&, const Vec3& )
    -[more]void mult(const Matrix& lhs, const Matrix& rhs) +[more]inline static Matrix rotate( float, float, float, float )
    -[more]Matrix operator * (const Matrix& m) const +[more]inline static Matrix rotate( const Quat& )
    -[more]inline static Vec3 transform3x3(const Vec3& v, const Matrix& m) +[more]void setTrans( float tx, float ty, float tz ) +
    +[more]void setTrans( const Vec3& v ) +
    +[more]Vec3 getTrans() const +
    +[more]void copy( const Matrix& ) +
    +[more]void preScale( float sx, float sy, float sz, const Matrix& m ) +
    +[more]void postScale( const Matrix& m, float sx, float sy, float sz ) +
    +[more]void preScale( float sx, float sy, float sz ) +
    +[more]void postScale( float sx, float sy, float sz ) +
    +[more]void preTrans( float tx, float ty, float tz, const Matrix& m ) +
    +[more]void postTrans( const Matrix& m, float tx, float ty, float tz ) +
    +[more]void preTrans( float tx, float ty, float tz) +
    +[more]void postTrans( float tx, float ty, float tz ) +
    +[more]void preRot( float deg, float x, float y, float z, const Matrix& m ) +
    +[more]void postRot( const Matrix& m, float deg, float x, float y, float z ) +
    +[more]void preRot( float deg, float x, float y, float z ) +
    +[more]void postRot( float deg, float x, float y, float z ) +
    +[more]inline static Vec3 transform3x3(const Vec3& v, const Matrix& m)
    apply apply an 3x3 transform of v*M[02,02]
    -[more]inline static Vec3 transform3x3(const Matrix& m, const Vec3& v) +[more]inline static Vec3 transform3x3(const Matrix& m, const Vec3& v)
    apply apply an 3x3 transform of M[02,02]*v
    -[more]bool invert(const Matrix& m) +[more]void mult( const Matrix&, const Matrix& ) +
    nd of Deprecated methods
    -[more]inline Vec3 operator * (const Vec3& v) const -
    post multipy v. +[more]void preMult( const Matrix& )
    -[more]inline Vec4 operator * (const Vec4& v) const -
    post multipy v. +[more]void postMult( const Matrix& )
    -[more]inline Vec3 transform3x3(const Vec3& v, const Matrix& m) +[more]inline MatrixProduct operator * ( const Matrix& other ) const
    -[more]inline Vec3 transform3x3(const Matrix& m, const Vec3& v) +[more]inline void operator *= ( const Matrix& other ) +
    +[more]inline void operator = ( const MatrixProduct& p ) +
    +[more] Matrix( const MatrixProduct& p ) +
    +[more]inline Matrix scale(float sx, float sy, float sz) +
    +[more]inline Matrix scale(const Vec3& v ) +
    +[more]inline Matrix trans(float tx, float ty, float tz) +
    +[more]inline Matrix trans(const Vec3& v ) +
    +[more]inline Matrix rotate( const Quat& q ) +
    +[more]inline Matrix rotate(float angle, float x, float y, float z ) +
    +[more]inline Matrix rotate(const Vec3& from, const Vec3& to ) +
    +[more]inline Vec3 postMult( const Vec3& v ) const +
    +[more]inline Vec3 preMult( const Vec3& v ) const +
    +[more]inline Vec4 postMult( const Vec4& v ) const +
    +[more]inline Vec4 preMult( const Vec4& v ) const +
    +[more]inline Vec3 transform3x3(const Vec3& v, const Matrix& m) +
    +[more]inline Vec3 transform3x3(const Matrix& m, const Vec3& v) +
    +[more]inline Vec3 operator* (const Vec3& v) const +
    +[more]inline Vec4 operator* (const Vec4& v) const +

    + +

    +

    Public Members

    +class MatrixProduct


    Inherited from Object:

    +

    +

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object*) const +
    +ovirtual const char* className() const +

    +

    Inherited from Referenced:

    @@ -143,200 +222,323 @@

    Documentation

    -
    4x4 Matrix for storage & manipulation of transformations in scene graph. -Provides basic maths operations, IO and via osg::Object reference counting. -You can directly load the matrix with OpenGL's LoadMatrixf() function via -the public member _mat as the matrix is stored in the OpenGL format. -Caution: The disadvantage of this feature is, that the matrix access is -'transposed' if you compare it with the standard C/C++ 2d-array-access -convention . I.e. _mat[i][j] accesses the ith column of the jth row in the -4x4 matrix.
    + + +
    ofloat _mat[4][4] +

    + + +

    obool fully_realized +

    + + +

    o META_Object(Matrix) +

    - +

    o Matrix()

    - -

    o Matrix(const Matrix& matrix) + +
    o Matrix( const Matrix& other )

    - + +

    oexplicit Matrix( float const* const def ) +

    + +

    o Matrix( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)

    - - -

    oMatrix& operator = (const Matrix& matrix) -

    - +

    ovirtual ~Matrix()

    - - -

    ovirtual Object* clone() const + + +
    oMatrix& operator = (const Matrix& )

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const + + +
    oint compare(const Matrix& m) const

    - - -

    ovirtual const char* className() const + + +
    obool operator < (const Matrix& m) const

    - - -

    ovoid makeIdent() + + +
    obool operator == (const Matrix& m) const +

    + + +

    obool operator != (const Matrix& m) const +

    + + +

    oinline float& operator()(int col, int row) +

    + + +

    oinline float operator()(int col, int row) const

    - -

    ovoid set(const float* m) + +
    ovoid set( float const* const )

    - +

    ovoid set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)

    - - -

    ovoid copy(const Matrix& matrix) + + +
    oconst float* values() +

    + + +

    ovoid makeIdent()

    - -

    ovoid makeScale(float sx, float sy, float sz) + +
    ovoid makeScale( const Vec3& )

    - - -

    ovoid preScale( float sx, float sy, float sz, const Matrix& m ) -

    - - -

    ovoid postScale( const Matrix& m, float sx, float sy, float sz ) -

    - - -

    ovoid preScale( float sx, float sy, float sz ) -

    - - -

    ovoid postScale( float sx, float sy, float sz ) + + +
    ovoid makeScale( float, float, float )

    - -

    ovoid makeTrans( float tx, float ty, float tz ) + +
    ovoid makeTrans( const Vec3& )

    - - -

    ovoid preTrans( float tx, float ty, float tz, const Matrix& m ) -

    - - -

    ovoid postTrans( const Matrix& m, float tx, float ty, float tz ) -

    - - -

    ovoid preTrans( float tx, float ty, float tz ) -

    - - -

    ovoid postTrans( float tx, float ty, float tz ) + + +
    ovoid makeTrans( float, float, float )

    - -

    ovoid makeRot( const Vec3& old_vec, const Vec3& new_vec ) -
    -Calc the rotation matrix which aligns vector \a old_vec with -vector \a new_vec. Both \a old_vec and \a new_vec must have -length 1.0. + +
    ovoid makeRot( const Vec3& from, const Vec3& to )

    - -

    ovoid makeRot( float deg, float x, float y, float z ) + +
    ovoid makeRot( float angle, const Vec3& orientation )

    - - -

    ovoid preRot( float deg, float x, float y, float z, const Matrix& m ) + + +
    ovoid makeRot( float angle, float x, float y, float z )

    - - -

    ovoid postRot( const Matrix& m, float deg, float x, float y, float z ) + + +
    ovoid makeRot( const Quat& )

    - - -

    ovoid preRot( float deg, float x, float y, float z ) + + +
    ovoid makeRot( float, float, float )

    - - -

    ovoid postRot( float deg, float x, float y, float z ) + + +
    obool invert( const Matrix& ) +

    + + +

    obool invertAffine( const Matrix& ) +

    + + +

    oinline static Matrix scale( const Vec3& ) +

    + + +

    oinline static Matrix scale( float, float, float ) +

    + + +

    oinline static Matrix trans( const Vec3& ) +

    + + +

    oinline static Matrix trans( float, float, float ) +

    + + +

    oinline static Matrix rotate( const Vec3&, const Vec3& ) +

    + + +

    oinline static Matrix rotate( float, float, float, float ) +

    + + +

    oinline static Matrix rotate( const Quat& )

    - +

    ovoid setTrans( float tx, float ty, float tz )

    - +

    ovoid setTrans( const Vec3& v )

    - +

    oVec3 getTrans() const

    - - -

    ovoid preMult(const Matrix& m) + + +
    ovoid copy( const Matrix& )

    - - -

    ovoid postMult(const Matrix& m) + + +
    ovoid preScale( float sx, float sy, float sz, const Matrix& m )

    - - -

    ovoid mult(const Matrix& lhs, const Matrix& rhs) + + +
    ovoid postScale( const Matrix& m, float sx, float sy, float sz )

    - - -

    oMatrix operator * (const Matrix& m) const + + +
    ovoid preScale( float sx, float sy, float sz ) +

    + + +

    ovoid postScale( float sx, float sy, float sz ) +

    + + +

    ovoid preTrans( float tx, float ty, float tz, const Matrix& m ) +

    + + +

    ovoid postTrans( const Matrix& m, float tx, float ty, float tz ) +

    + + +

    ovoid preTrans( float tx, float ty, float tz) +

    + + +

    ovoid postTrans( float tx, float ty, float tz ) +

    + + +

    ovoid preRot( float deg, float x, float y, float z, const Matrix& m ) +

    + + +

    ovoid postRot( const Matrix& m, float deg, float x, float y, float z ) +

    + + +

    ovoid preRot( float deg, float x, float y, float z ) +

    + + +

    ovoid postRot( float deg, float x, float y, float z )

    - +

    oinline static Vec3 transform3x3(const Vec3& v, const Matrix& m)
    apply apply an 3x3 transform of v*M[02,02]

    - +

    oinline static Vec3 transform3x3(const Matrix& m, const Vec3& v)
    apply apply an 3x3 transform of M[02,02]*v

    - - -

    obool invert(const Matrix& m) + + +
    ovoid mult( const Matrix&, const Matrix& ) +
    nd of Deprecated methods

    - - -

    ofloat _mat[4][4] + + +
    ovoid preMult( const Matrix& ) +

    + + +

    ovoid postMult( const Matrix& )

    - -

    oinline Vec3 operator * (const Vec3& v) const -
    post multipy v. ie. (m*v) + +
    oinline MatrixProduct operator * ( const Matrix& other ) const

    - - -

    oinline Vec4 operator * (const Vec4& v) const -
    post multipy v. ie. (m*v) + + +
    oinline void operator *= ( const Matrix& other ) +

    + + +

    oinline void operator = ( const MatrixProduct& p ) +

    + + +

    o Matrix( const MatrixProduct& p ) +

    + + +

    oinline Matrix scale(float sx, float sy, float sz) +

    + + +

    oinline Matrix scale(const Vec3& v ) +

    + + +

    oinline Matrix trans(float tx, float ty, float tz) +

    + + +

    oinline Matrix trans(const Vec3& v ) +

    + + +

    oinline Matrix rotate( const Quat& q ) +

    + + +

    oinline Matrix rotate(float angle, float x, float y, float z ) +

    + + +

    oinline Matrix rotate(const Vec3& from, const Vec3& to ) +

    + + +

    oinline Vec3 postMult( const Vec3& v ) const +

    + + +

    oinline Vec3 preMult( const Vec3& v ) const +

    + + +

    oinline Vec4 postMult( const Vec4& v ) const +

    + + +

    oinline Vec4 preMult( const Vec4& v ) const

    - +

    oinline Vec3 transform3x3(const Vec3& v, const Matrix& m)

    - +

    oinline Vec3 transform3x3(const Matrix& m, const Vec3& v) +

    + + +

    oinline Vec3 operator* (const Vec3& v) const +

    + + +

    oinline Vec4 operator* (const Vec4& v) const


    This class has no child classes.
    -
    Friends:
    inline Vec3 operator * (const Vec3& v,const Matrix& m)
    inline Vec4 operator * (const Vec4& v,const Matrix& m)
    inline ostream& operator << (ostream& output, const Matrix& matrix)

    Alphabetic index HTML hierarchy of classes or Java


    +

    Alphabetic index HTML hierarchy of classes or Java



    This page was generated with the help of DOC++. diff --git a/doc/doc++/osg/MatrixProduct.html b/doc/doc++/osg/MatrixProduct.html index 711d0f320..512f1a346 100644 --- a/doc/doc++/osg/MatrixProduct.html +++ b/doc/doc++/osg/MatrixProduct.html @@ -12,14 +12,14 @@

    Public Fields

    -[more]const Matrix& A +[more]const Matrix& A
    -[more]const Matrix& B +[more]const Matrix& B

    Public Methods

    -[more] MatrixProduct( const Matrix& lhs, const Matrix& rhs ) +[more] MatrixProduct( const Matrix& lhs, const Matrix& rhs )

    @@ -30,15 +30,15 @@
    - +
    oconst Matrix& A

    - +

    oconst Matrix& B

    - +

    o MatrixProduct( const Matrix& lhs, const Matrix& rhs )

    diff --git a/doc/doc++/osg/MemoryAdapter.html b/doc/doc++/osg/MemoryAdapter.html index 6bc5f91f6..9f5bce2eb 100644 --- a/doc/doc++/osg/MemoryAdapter.html +++ b/doc/doc++/osg/MemoryAdapter.html @@ -23,21 +23,21 @@

    Public Methods

    -[more] MemoryAdapter() +[more] MemoryAdapter()
    -[more]virtual void ref_data(void* ) = 0 +[more]virtual void ref_data(void* ) = 0
    Increment the reference count of the userData
    -[more]virtual void unref_data(void* ) = 0 +[more]virtual void unref_data(void* ) = 0
    Decrement the reference count of the userData.
    -[more]virtual void* clone_data(void* ) +[more]virtual void* clone_data(void* )
    not current used, but will be used in future

    Protected Methods

    -[more]virtual ~MemoryAdapter() +[more]virtual ~MemoryAdapter()

    @@ -70,16 +70,16 @@ which can be attached to osg::Node.
    - +
    o MemoryAdapter()

    - +

    ovirtual void ref_data(void* ) = 0
    Increment the reference count of the userData

    - +

    ovirtual void unref_data(void* ) = 0
    Decrement the reference count of the userData. Is usually implemented such that if reference count @@ -88,12 +88,12 @@ deleted. However, this is entirely up to the discression of the user who is extending this base class.

    - +

    ovirtual void* clone_data(void* )
    not current used, but will be used in future

    - +

    ovirtual ~MemoryAdapter()

    diff --git a/doc/doc++/osg/Node.html b/doc/doc++/osg/Node.html index 194be6796..95ba3ac84 100644 --- a/doc/doc++/osg/Node.html +++ b/doc/doc++/osg/Node.html @@ -23,140 +23,158 @@

    Public Methods

    -[more] Node() +[more] Node()
    Construct a node.
    -[more]virtual Object* clone() const +[more]virtual Object* clone() const
    return a shallow copy of a node, with Object* return type
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual bool isSameKindAs(const Object* obj) const
    return true if this and obj are of the same kind of object
    -[more]virtual const char* className() const +[more]virtual const char* className() const
    return the name of the node's class type
    -[more]virtual void accept(NodeVisitor& nv) +[more]virtual void accept(NodeVisitor& nv)
    Visitor Pattern : calls the apply method of a NodeVisitor with this node's type
    -[more]virtual void ascend(NodeVisitor& nv) +[more]virtual void ascend(NodeVisitor& nv)
    Traverse upwards : calls parents' accept method with NodeVisitor
    -[more]virtual void traverse(NodeVisitor& ) +[more]virtual void traverse(NodeVisitor& )
    Traverse downwards : calls children's accept method with NodeVisitor
    -[more]inline void setName( const std::string& name ) +[more]inline void setName( const std::string& name )
    Set the name of node using C++ style string
    -[more]inline void setName( const char* name ) +[more]inline void setName( const char* name )
    Set the name of node using a C style string
    -[more]inline const std::string& getName() const +[more]inline const std::string& getName() const
    Get the name of node
    -[more]inline const ParentList& getParents() const +[more]inline const ParentList& getParents() const
    Get the parent list of node.
    -[more]inline Group* getParent(const int i) +[more]inline Group* getParent(const int i)
    Get the a copy of parent list of node.
    -[more]inline const Group* getParent(const int i) const +[more]inline const Group* getParent(const int i) const
    Get a single const parent of node.
    -[more]inline const int getNumParents() const +[more]inline const int getNumParents() const
    Get the number of parents of node.
    -[more]inline void setUserData(void* data, MemoryAdapter* ma=0L) +[more]void setAppCallback(NodeCallback* nc) +
    Set app node callback, called during app traversal. +
    +[more]inline NodeCallback* getAppCallback() +
    Get app node callback, called during app traversal. +
    +[more]inline const NodeCallback* getAppCallback() const +
    Get const app node callback, called during app traversal. +
    +[more]inline const int getNumChildrenRequiringAppTraversal() const +
    Get the number of Children of this node which require App traversal, since they have an AppCallback attached to them or their children +
    +[more]inline void setUserData(void* data, MemoryAdapter* ma=0L)
    Set user data.
    -[more]inline void* getUserData() +[more]inline void* getUserData()
    Get user data
    -[more]inline const void* getUserData() const +[more]inline const void* getUserData() const
    Get const user data
    -[more]inline MemoryAdapter* getMemoryAdapter() +[more]inline MemoryAdapter* getMemoryAdapter()
    Get the memory adapter associated with _userData
    -[more]inline const MemoryAdapter* getMemoryAdapter() const +[more]inline const MemoryAdapter* getMemoryAdapter() const
    Get the const memory adapter associated with _userData
    -[more]inline void setNodeMask(const NodeMask nm) +[more]inline void setNodeMask(const NodeMask nm)
    Set the node mask.
    -[more]inline const NodeMask getNodeMask() const +[more]inline const NodeMask getNodeMask() const
    Get the node Mask.
    -[more]inline const DescriptionList& getDescriptions() const +[more]inline const DescriptionList& getDescriptions() const
    Get the description list of the const node
    -[more]inline DescriptionList& getDescriptions() +[more]inline DescriptionList& getDescriptions()
    Get the description list of the const node
    -[more]inline const std::string& getDescription(const int i) const +[more]inline const std::string& getDescription(const int i) const
    Get a single const description of the const node
    -[more]inline std::string& getDescription(const int i) +[more]inline std::string& getDescription(const int i)
    Get a single description of the node
    -[more]inline const int getNumDescriptions() const +[more]inline const int getNumDescriptions() const
    Get the number of descriptions of the node
    -[more]void addDescription(const std::string& desc) +[more]void addDescription(const std::string& desc)
    Add a description string to the node
    -[more]inline void setStateSet(osg::StateSet* dstate) +[more]inline void setStateSet(osg::StateSet* dstate)
    set the node's StateSet
    -[more]inline osg::StateSet* getStateSet() +[more]inline osg::StateSet* getStateSet()
    return the node's StateSet
    -[more]inline const osg::StateSet* getStateSet() const +[more]inline const osg::StateSet* getStateSet() const
    return the node's const StateSet
    -[more]inline const BoundingSphere& getBound() const +[more]inline const BoundingSphere& getBound() const
    get the bounding sphere of node.
    -[more]void dirtyBound() +[more]void dirtyBound()
    Mark this node's bounding sphere dirty.

    Public Members

    -[more]typedef std::vector<Group*> ParentList +[more]typedef std::vector<Group*> ParentList
    A vector of osg::Group pointers which is used to store the parent(s) of node
    -[more]typedef std::vector<std::string> DescriptionList +[more]typedef std::vector<std::string> DescriptionList
    A vector of std::string's which are used to describe the object

    Protected Fields

    -[more]mutable BoundingSphere _bsphere +[more]mutable BoundingSphere _bsphere
    -[more]mutable bool _bsphere_computed +[more]mutable bool _bsphere_computed
    -[more]std::string _name +[more]std::string _name
    -[more]ParentList _parents +[more]ParentList _parents
    -[more]void* _userData +[more]ref_ptr<NodeCallback> _appCallback
    -[more]ref_ptr<MemoryAdapter> _memoryAdapter +[more]int _numChildrenRequiringAppTraversal
    -[more]NodeMask _nodeMask +[more]void* _userData
    -[more]DescriptionList _descriptions +[more]ref_ptr<MemoryAdapter> _memoryAdapter
    -[more]ref_ptr<StateSet> _dstate +[more]NodeMask _nodeMask +
    +[more]DescriptionList _descriptions +
    +[more]ref_ptr<StateSet> _dstate

    Protected Methods

    -[more]virtual ~Node() +[more]virtual ~Node()
    Node destructor.
    -[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const
    Compute the bounding sphere around Node's geometry or children. +
    +[more]void setNumChildrenRequiringAppTraversal(const int num)

    @@ -191,75 +209,75 @@ Provides interface for most common node operations (Composite Pattern). - +
    o Node()
    Construct a node. Initialize the parent list to empty, node name to "" and bounding sphere dirty flag to true.

    - +

    ovirtual Object* clone() const
    return a shallow copy of a node, with Object* return type

    - +

    ovirtual bool isSameKindAs(const Object* obj) const
    return true if this and obj are of the same kind of object

    - +

    ovirtual const char* className() const
    return the name of the node's class type

    - +

    ovirtual void accept(NodeVisitor& nv)
    Visitor Pattern : calls the apply method of a NodeVisitor with this node's type

    - +

    ovirtual void ascend(NodeVisitor& nv)
    Traverse upwards : calls parents' accept method with NodeVisitor

    - +

    ovirtual void traverse(NodeVisitor& )
    Traverse downwards : calls children's accept method with NodeVisitor

    - +

    oinline void setName( const std::string& name )
    Set the name of node using C++ style string

    - +

    oinline void setName( const char* name )
    Set the name of node using a C style string

    - +

    oinline const std::string& getName() const
    Get the name of node

    - +

    otypedef std::vector<Group*> ParentList
    A vector of osg::Group pointers which is used to store the parent(s) of node

    - -

    oinline const ParentList& getParents() const + +
    oinline const ParentList& getParents() const
    Get the parent list of node.

    - +

    oinline Group* getParent(const int i)
    Get the a copy of parent list of node. A copy is returned to -prevent modifiaction of the parent list. +prevent modification of the parent list.

    - +

    oinline const Group* getParent(const int i) const
    Get a single const parent of node. @@ -267,113 +285,134 @@ Get a single const parent of node.
    Parameters:
    i - index of the parent to get.
    Returns:
    the parent i.

    - +

    oinline const int getNumParents() const
    Get the number of parents of node.
    Returns:
    the number of parents of this node.

    + + +

    ovoid setAppCallback(NodeCallback* nc) +
    Set app node callback, called during app traversal. +

    + + +

    oinline NodeCallback* getAppCallback() +
    Get app node callback, called during app traversal. +

    + + +

    oinline const NodeCallback* getAppCallback() const +
    Get const app node callback, called during app traversal. +

    + + +

    oinline const int getNumChildrenRequiringAppTraversal() const +
    Get the number of Children of this node which require App traversal, +since they have an AppCallback attached to them or their children +

    - -

    oinline void setUserData(void* data, MemoryAdapter* ma=0L) + +
    oinline void setUserData(void* data, MemoryAdapter* ma=0L)
    Set user data. See MemoryAdapter documention for details -of how to specify memory managament of _userData. +of how to specify memory management of _userData.

    - +

    oinline void* getUserData()
    Get user data

    - +

    oinline const void* getUserData() const
    Get const user data

    - +

    oinline MemoryAdapter* getMemoryAdapter()
    Get the memory adapter associated with _userData

    - +

    oinline const MemoryAdapter* getMemoryAdapter() const
    Get the const memory adapter associated with _userData

    - +

    oinline void setNodeMask(const NodeMask nm)
    Set the node mask. Note, node mask is will be replaced by TraversalMask.

    - +

    oinline const NodeMask getNodeMask() const
    Get the node Mask. Note, node mask is will be replaced by TraversalMask.

    - +

    otypedef std::vector<std::string> DescriptionList
    A vector of std::string's which are used to describe the object

    - -

    oinline const DescriptionList& getDescriptions() const + +
    oinline const DescriptionList& getDescriptions() const
    Get the description list of the const node

    - -

    oinline DescriptionList& getDescriptions() + +
    oinline DescriptionList& getDescriptions()
    Get the description list of the const node

    - +

    oinline const std::string& getDescription(const int i) const
    Get a single const description of the const node

    - +

    oinline std::string& getDescription(const int i)
    Get a single description of the node

    - +

    oinline const int getNumDescriptions() const
    Get the number of descriptions of the node

    - +

    ovoid addDescription(const std::string& desc)
    Add a description string to the node

    - +

    oinline void setStateSet(osg::StateSet* dstate)
    set the node's StateSet

    - +

    oinline osg::StateSet* getStateSet()
    return the node's StateSet

    - +

    oinline const osg::StateSet* getStateSet() const
    return the node's const StateSet

    - +

    oinline const BoundingSphere& getBound() const
    get the bounding sphere of node. Using lazy evaluation computes the bounding sphere if it is 'dirty'.

    - +

    ovoid dirtyBound()
    Mark this node's bounding sphere dirty. Forcing it to be computed on the next call to getBound().

    - +

    ovirtual ~Node()
    Node destructor. Note, is protected so that Nodes cannot be deleted other than by being dereferenced and the reference @@ -384,46 +423,58 @@ forcing all nodes to be created on the heap i.e Node* node = new Node().

    - +

    ovirtual const bool computeBound() const
    Compute the bounding sphere around Node's geometry or children. This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound().

    - +

    omutable BoundingSphere _bsphere

    - +

    omutable bool _bsphere_computed

    - +

    ostd::string _name

    - -

    oParentList _parents + +
    oParentList _parents +

    + + +

    oref_ptr<NodeCallback> _appCallback +

    + + +

    oint _numChildrenRequiringAppTraversal +

    + + +

    ovoid setNumChildrenRequiringAppTraversal(const int num)

    - +

    ovoid* _userData

    - +

    oref_ptr<MemoryAdapter> _memoryAdapter

    - +

    oNodeMask _nodeMask

    - -

    oDescriptionList _descriptions + +
    oDescriptionList _descriptions

    - +

    oref_ptr<StateSet> _dstate


    diff --git a/doc/doc++/osg/NodeAcceptOp.html b/doc/doc++/osg/NodeAcceptOp.html index 7b0005ceb..b9edc013e 100644 --- a/doc/doc++/osg/NodeAcceptOp.html +++ b/doc/doc++/osg/NodeAcceptOp.html @@ -12,13 +12,13 @@

    -[more]NodeVisitor& _nv +[more]NodeVisitor& _nv
    -[more] NodeAcceptOp(NodeVisitor& nv) +[more] NodeAcceptOp(NodeVisitor& nv)
    -[more]void operator () (Node* node) +[more]void operator () (Node* node)
    -[more]void operator () (ref_ptr<Node> node) +[more]void operator () (ref_ptr<Node> node)

    @@ -29,19 +29,19 @@
    - +
    oNodeVisitor& _nv

    - +

    o NodeAcceptOp(NodeVisitor& nv)

    - +

    ovoid operator () (Node* node)

    - +

    ovoid operator () (ref_ptr<Node> node)

    Alphabetic index HTML hierarchy of classes or Java


    diff --git a/doc/doc++/osg/NodeCallback.html b/doc/doc++/osg/NodeCallback.html index a5bb99de5..4317447c3 100644 --- a/doc/doc++/osg/NodeCallback.html +++ b/doc/doc++/osg/NodeCallback.html @@ -22,28 +22,28 @@

    Public Fields

    -[more]Requirements _requirements +[more]Requirements _requirements

    Public Methods

    -[more] NodeCallback(const Requirements ncr=NO_REQUIREMENTS) +[more] NodeCallback(const Requirements ncr=NO_REQUIREMENTS)
    -[more]virtual ~NodeCallback() +[more]virtual ~NodeCallback()
    -[more]inline void setRequirements(const Requirements ncr) +[more]inline void setRequirements(const Requirements ncr)
    Set what values from traversal are required by this NodeCallback
    -[more]inline const Requirements getRequirements() const +[more]inline const Requirements getRequirements() const
    Get what values from traversal are required by this NodeCallback
    -[more]virtual void operator()(Node*, NodeVisitor*) +[more]virtual void operator()(Node*, NodeVisitor*)
    Callback method call by the NodeVisitor when visiting a node

    Public Members

    -[more]enum Requirements +[more]enum Requirements
    The range of values which can be accumulated by the NodeVisitor.

    @@ -74,58 +74,58 @@
    - +
    oenum Requirements
    The range of values which can be accumulated by the NodeVisitor.

    - +
    o NO_REQUIREMENTS

    - +

    o REQUIRES_TRAVERSAL

    - +

    o REQUIRES_PARENT_PATH

    - +

    o REQUIRES_ACCUMULATED_MATRIX

    - +

    o REQUIRES_ACCUMULATED_INVERSE

    - -
    o NodeCallback(const Requirements ncr=NO_REQUIREMENTS) + +
    o NodeCallback(const Requirements ncr=NO_REQUIREMENTS)

    - +

    ovirtual ~NodeCallback()

    - -

    oinline void setRequirements(const Requirements ncr) + +
    oinline void setRequirements(const Requirements ncr)
    Set what values from traversal are required by this NodeCallback

    - -

    oinline const Requirements getRequirements() const + +
    oinline const Requirements getRequirements() const
    Get what values from traversal are required by this NodeCallback

    - +

    ovirtual void operator()(Node*, NodeVisitor*)
    Callback method call by the NodeVisitor when visiting a node

    - -

    oRequirements _requirements + +
    oRequirements _requirements


    This class has no child classes.
    diff --git a/doc/doc++/osg/NodeVisitor.html b/doc/doc++/osg/NodeVisitor.html index 42bcdbd8f..3d030beba 100644 --- a/doc/doc++/osg/NodeVisitor.html +++ b/doc/doc++/osg/NodeVisitor.html @@ -23,59 +23,94 @@

    Public Methods

    -[more] NodeVisitor(TraversalMode tm=TRAVERSE_NONE) +[more] NodeVisitor(TraversalMode tm=TRAVERSE_NONE)
    -[more]virtual ~NodeVisitor() +[more]virtual ~NodeVisitor()
    -[more]virtual void reset() +[more]virtual void reset()
    Method to call to reset visitor.
    -[more]void setTraversalMode(const TraversalMode mode) +[more]inline void setTraversalNumber(const int fn) +
    Set the traversal number. +
    +[more]inline const int getTraversalNumber() const +
    Get the traversal number. +
    +[more]inline void setFrameStamp(FrameStamp* fs) +
    Set the FrameStamp that this traversal is assoicated with +
    +[more]inline const FrameStamp* getFrameStamp() const +
    Get the FrameStamp that this traversal is assoicated with +
    +[more]inline void setTraversalMask(const Node::NodeMask mask) +
    Set the TraversalMask of this NodeVisitor. +
    +[more]inline const Node::NodeMask getTraversalMask() const +
    Get the TraversalMask +
    +[more]inline void setNodeMaskOverride(const Node::NodeMask mask) +
    Set the NodeMaskOverride mask. +
    +[more]inline const Node::NodeMask getNodeMaskOverride() const +
    Get the NodeMaskOverride mask +
    +[more]inline const bool validNodeMask(const osg::Node& node) const +
    Method to called by Node and its subclass' Node::accept() method, if the result is true to be used to cull operations of nodes and their subgraphs. +
    +[more]void setTraversalMode(const TraversalMode mode)
    Set the traversal mode for Node::traverse() to use when deciding which children of a node to traverse.
    -[more]inline const TraversalMode getTraversalMode() const +[more]inline const TraversalMode getTraversalMode() const
    Get the traversal mode
    -[more]void setTraversalVisitor(NodeVisitor* nv) +[more]void setTraversalVisitor(NodeVisitor* nv)
    Set a visitor to handle traversal.
    -[more]NodeVisitor* getTraversalVisitor() +[more]NodeVisitor* getTraversalVisitor()
    Get the traversal visitor, returns NULL if none is attached
    -[more]void traverse(Node& node) -
    Inline method for passing handling traversal of a nodes. +[more]void traverse(Node& node) +
    Inline method for handling traversal of a nodes.
    -[more]virtual void apply(Node& node) +[more]virtual void apply(Node& node)
    -[more]virtual void apply(Geode& node) +[more]virtual void apply(Geode& node)
    -[more]virtual void apply(Billboard& node) +[more]virtual void apply(Billboard& node)
    -[more]virtual void apply(LightSource& node) +[more]virtual void apply(LightSource& node)
    -[more]virtual void apply(Group& node) +[more]virtual void apply(Group& node)
    -[more]virtual void apply(Transform& node) +[more]virtual void apply(Transform& node)
    -[more]virtual void apply(Switch& node) +[more]virtual void apply(Switch& node)
    -[more]virtual void apply(Sequence& node) +[more]virtual void apply(Sequence& node)
    -[more]virtual void apply(LOD& node) +[more]virtual void apply(LOD& node)
    -[more]virtual void apply(Impostor& node) +[more]virtual void apply(Impostor& node)

    Public Members

    -[more]enum TraversalMode +[more]enum TraversalMode

    Protected Fields

    -[more]ref_ptr<NodeVisitor> _traversalVisitor +[more]int _traversalNumber
    -[more]TraversalMode _traversalMode +[more]ref_ptr<FrameStamp> _frameStamp +
    +[more]ref_ptr<NodeVisitor> _traversalVisitor +
    +[more]TraversalMode _traversalMode +
    +[more]Node::NodeMask _traversalMask +
    +[more]Node::NodeMask _nodeMaskOverride

    @@ -107,50 +142,112 @@ Based on GOF's Visitor pattern.
    - +
    oenum TraversalMode

    - +
    o TRAVERSE_NONE

    - +

    o TRAVERSE_PARENTS

    - +

    o TRAVERSE_ALL_CHILDREN

    - +

    o TRAVERSE_ACTIVE_CHILDREN

    - +

    o TRAVERSE_VISITOR

    - -
    o NodeVisitor(TraversalMode tm=TRAVERSE_NONE) + +
    o NodeVisitor(TraversalMode tm=TRAVERSE_NONE)

    - +

    ovirtual ~NodeVisitor()

    - +

    ovirtual void reset()
    Method to call to reset visitor. Useful for your visitor accumulates state during a traversal, and you plan to resuse the visitor. To flush that state for the next traversal than call reset() prior to each traversal.

    + + +

    oinline void setTraversalNumber(const int fn) +
    Set the traversal number. Typically used to denote the frame count. +

    + + +

    oinline const int getTraversalNumber() const +
    Get the traversal number. Typically used to denote the frame count. +

    + + +

    oinline void setFrameStamp(FrameStamp* fs) +
    Set the FrameStamp that this traversal is assoicated with +

    + + +

    oinline const FrameStamp* getFrameStamp() const +
    Get the FrameStamp that this traversal is assoicated with +

    + + +

    oinline void setTraversalMask(const Node::NodeMask mask) +
    Set the TraversalMask of this NodeVisitor. +The TraversalMask is used by the NodeVisitor::validNodeMask() method +to determine whether to operate on a node and its subgraph. +validNodeMask() is called automaticaly in the Node::accept() method before +any call to NodeVisitor::apply(), apply() is only ever called if validNodeMask +returns true. Note, if NodeVisitor::_traversalMask is 0 then all operations +will be swithced off for all nodes. Whereas setting both _traversalMask and +_nodeMaskOverride to 0xffffffff will allow a visitor to work on all nodes +regardless of their own Node::_nodeMask state. +

    + + +

    oinline const Node::NodeMask getTraversalMask() const +
    Get the TraversalMask +

    + + +

    oinline void setNodeMaskOverride(const Node::NodeMask mask) +
    Set the NodeMaskOverride mask. +Used in validNodeMask() to determine whether to operate on a node or its +subgraph, by OR'ing NodeVisitor::_nodeMaskOverride with the Node's own Node::_nodeMask. +Typically used to force on nodes which may have +been switched off by their own Node::_nodeMask. +

    + + +

    oinline const Node::NodeMask getNodeMaskOverride() const +
    Get the NodeMaskOverride mask +

    + + +

    oinline const bool validNodeMask(const osg::Node& node) const +
    Method to called by Node and its subclass' Node::accept() method, if the result is true +to be used to cull operations of nodes and their subgraphs. +Return true if the result of a bit wise and of the NodeVisitor::_traversalMask +with the bit or between NodeVistor::_nodeMaskOverride and the Node::_nodeMask. +default values for _traversalMask is 0xffffffff, _nodeMaskOverride is 0x0, +and osg::Node::_nodeMask is 0xffffffff. +

    - -

    ovoid setTraversalMode(const TraversalMode mode) + +
    ovoid setTraversalMode(const TraversalMode mode)
    Set the traversal mode for Node::traverse() to use when deciding which children of a node to traverse. If a NodeVisitor has been attached via setTraverseVisitor() @@ -158,76 +255,92 @@ and the new mode is not TRAVERSE_VISITOR then the attached visitor is detached. Default mode is TRAVERSE_NONE.

    - -

    oinline const TraversalMode getTraversalMode() const + +
    oinline const TraversalMode getTraversalMode() const
    Get the traversal mode

    - +

    ovoid setTraversalVisitor(NodeVisitor* nv)
    Set a visitor to handle traversal. Overides the traverse mode setting it to TRAVERSAL_VISITOR.

    - +

    oNodeVisitor* getTraversalVisitor()
    Get the traversal visitor, returns NULL if none is attached

    - +

    ovoid traverse(Node& node) -
    Inline method for passing handling traversal of a nodes. +
    Inline method for handling traversal of a nodes. If you intend to use the visitor for actively traversing the scene graph then make sure the accept() methods call this method unless they handle traversal directly.

    - +

    ovirtual void apply(Node& node)

    - +

    ovirtual void apply(Geode& node)

    - +

    ovirtual void apply(Billboard& node)

    - +

    ovirtual void apply(LightSource& node)

    - +

    ovirtual void apply(Group& node)

    - +

    ovirtual void apply(Transform& node)

    - +

    ovirtual void apply(Switch& node)

    - +

    ovirtual void apply(Sequence& node)

    - +

    ovirtual void apply(LOD& node)

    - +

    ovirtual void apply(Impostor& node)

    + + +

    oint _traversalNumber +

    + + +

    oref_ptr<FrameStamp> _frameStamp +

    - +

    oref_ptr<NodeVisitor> _traversalVisitor

    - -

    oTraversalMode _traversalMode + +
    oTraversalMode _traversalMode +

    + + +

    oNode::NodeMask _traversalMask +

    + + +

    oNode::NodeMask _nodeMaskOverride


    This class has no child classes.
    diff --git a/doc/doc++/osg/NotifySeverity.html b/doc/doc++/osg/NotifySeverity.html index 4454a7108..a77410f84 100644 --- a/doc/doc++/osg/NotifySeverity.html +++ b/doc/doc++/osg/NotifySeverity.html @@ -12,19 +12,19 @@

    -[more] ALWAYS +[more] ALWAYS
    -[more] FATAL +[more] FATAL
    -[more] WARN +[more] WARN
    -[more] NOTICE +[more] NOTICE
    -[more] INFO +[more] INFO
    -[more] DEBUG_INFO +[more] DEBUG_INFO
    -[more] DEBUG_FP +[more] DEBUG_FP

    @@ -39,31 +39,31 @@ further details.
    - +
    o ALWAYS

    - +

    o FATAL

    - +

    o WARN

    - +

    o NOTICE

    - +

    o INFO

    - +

    o DEBUG_INFO

    - +

    o DEBUG_FP

    Alphabetic index HTML hierarchy of classes or Java


    diff --git a/doc/doc++/osg/Object.html b/doc/doc++/osg/Object.html index 9cd9fc2dd..e05b8c093 100644 --- a/doc/doc++/osg/Object.html +++ b/doc/doc++/osg/Object.html @@ -23,21 +23,21 @@

    Public Methods

    -[more] Object() +[more] Object()
    Construct an object.
    -[more]virtual Object* clone() const = 0 +[more]virtual Object* clone() const = 0
    return a shallow copy of a node, with Object* return type.
    -[more]virtual bool isSameKindAs(const Object*) const +[more]virtual bool isSameKindAs(const Object*) const
    -[more]virtual const char* className() const = 0 +[more]virtual const char* className() const = 0
    return the name of the object's class type.

    Protected Methods

    -[more]virtual ~Object() +[more]virtual ~Object()
    Object destructor.

    @@ -71,7 +71,7 @@ Based on GOF Composite, Prototype and Template Method patterns.
    - +
    o Object()
    Construct an object. Note Object is a pure virtual base class and therefore cannot be constructed on its own, only derived @@ -79,23 +79,23 @@ classes which overide the clone and className methods are concrete classes and can be constructed.

    - +

    ovirtual Object* clone() const = 0
    return a shallow copy of a node, with Object* return type. Must be defined by derived classes.

    - +

    ovirtual bool isSameKindAs(const Object*) const

    - +

    ovirtual const char* className() const = 0
    return the name of the object's class type. Must be defined by derived classes.

    - +

    ovirtual ~Object()
    Object destructor. Note, is protected so that Objects cannot be deleted other than by being derefernced and the reference diff --git a/doc/doc++/osg/Plane.html b/doc/doc++/osg/Plane.html index dc27cb08d..a783f6372 100644 --- a/doc/doc++/osg/Plane.html +++ b/doc/doc++/osg/Plane.html @@ -13,68 +13,68 @@

    Public Methods

    -[more]inline Plane() +[more]inline Plane()
    -[more]inline Plane(const Plane& pl) +[more]inline Plane(const Plane& pl)
    -[more]inline Plane(const float a, const float b, const float c, const float d) +[more]inline Plane(const float a, const float b, const float c, const float d)
    -[more]inline Plane(const Vec4& vec) +[more]inline Plane(const Vec4& vec)
    -[more]inline Plane(const Vec3& norm, const float d) +[more]inline Plane(const Vec3& norm, const float d)
    -[more]inline Plane(const Vec3& v1, const Vec3& v2, const Vec3& v3) +[more]inline Plane(const Vec3& v1, const Vec3& v2, const Vec3& v3)
    -[more]inline Plane& operator = (const Plane& pl) +[more]inline Plane& operator = (const Plane& pl)
    -[more]inline void set(const Plane& pl) +[more]inline void set(const Plane& pl)
    -[more]inline void set(const float a, const float b, const float c, const float d) +[more]inline void set(const float a, const float b, const float c, const float d)
    -[more]inline void set(const Vec4& vec) +[more]inline void set(const Vec4& vec)
    -[more]inline void set(const Vec3& norm, const float d) +[more]inline void set(const Vec3& norm, const float d)
    -[more]inline void set(const Vec3& v1, const Vec3& v2, const Vec3& v3) +[more]inline void set(const Vec3& v1, const Vec3& v2, const Vec3& v3)
    -[more]inline void makeUnitLength() +[more]inline void makeUnitLength()
    -[more]inline void calculateUpperLowerBBCorners() +[more]inline void calculateUpperLowerBBCorners()
    calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations
    -[more]inline const bool valid() const +[more]inline const bool valid() const
    -[more]inline Vec4& asVec4() +[more]inline Vec4& asVec4()
    -[more]inline const Vec4& asVec4() const +[more]inline const Vec4& asVec4() const
    -[more]inline float& operator [] (const int i) +[more]inline float& operator [] (const int i)
    -[more]inline float operator [] (const int i) const +[more]inline float operator [] (const int i) const
    -[more]inline const float distance(const osg::Vec3& v) const +[more]inline const float distance(const osg::Vec3& v) const
    calculate the distance between a point and the plane
    -[more]inline const int intersect(const BoundingSphere& bs) const +[more]inline const int intersect(const BoundingSphere& bs) const
    interesection test between plane and bounding sphere.
    -[more]inline const int intersect(const BoundingBox& bb) const +[more]inline const int intersect(const BoundingBox& bb) const
    interesection test between plane and bounding sphere.
    -[more]inline void transform(const osg::Matrix& matrix) +[more]inline void transform(const osg::Matrix& matrix)
    Transform the plane by matrix.
    -[more]inline void transformProvidingInverse(const osg::Matrix& matrix) +[more]inline void transformProvidingInverse(const osg::Matrix& matrix)
    Transform the plane by provide a pre inverted matrix.

    Protected Fields

    -[more]Vec4 _fv +[more]Vec4 _fv
    -[more]unsigned int _upperBBCorner +[more]unsigned int _upperBBCorner
    -[more]unsigned int _lowerBBCorner +[more]unsigned int _lowerBBCorner

    @@ -86,90 +86,90 @@
    - +
    oinline Plane()

    - -

    oinline Plane(const Plane& pl) + +
    oinline Plane(const Plane& pl)

    - +

    oinline Plane(const float a, const float b, const float c, const float d)

    - +

    oinline Plane(const Vec4& vec)

    - +

    oinline Plane(const Vec3& norm, const float d)

    - +

    oinline Plane(const Vec3& v1, const Vec3& v2, const Vec3& v3)

    - +

    oinline Plane& operator = (const Plane& pl)

    - +

    oinline void set(const Plane& pl)

    - +

    oinline void set(const float a, const float b, const float c, const float d)

    - +

    oinline void set(const Vec4& vec)

    - +

    oinline void set(const Vec3& norm, const float d)

    - +

    oinline void set(const Vec3& v1, const Vec3& v2, const Vec3& v3)

    - +

    oinline void makeUnitLength()

    - +

    oinline void calculateUpperLowerBBCorners()
    calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations

    - +

    oinline const bool valid() const

    - +

    oinline Vec4& asVec4()

    - +

    oinline const Vec4& asVec4() const

    - +

    oinline float& operator [] (const int i)

    - +

    oinline float operator [] (const int i) const

    - +

    oinline const float distance(const osg::Vec3& v) const
    calculate the distance between a point and the plane

    - +

    oinline const int intersect(const BoundingSphere& bs) const
    interesection test between plane and bounding sphere. return 1 if the bs is completely above plane, @@ -177,7 +177,7 @@ return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.

    - +

    oinline const int intersect(const BoundingBox& bb) const
    interesection test between plane and bounding sphere. return 1 if the bs is completely above plane, @@ -185,7 +185,7 @@ return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.

    - +

    oinline void transform(const osg::Matrix& matrix)
    Transform the plane by matrix. Note, this operations carries out the calculation of the inverse of the matrix since to transforms @@ -195,21 +195,21 @@ calculated elsewhere then use transformProvidingInverse() instead. See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf

    - +

    oinline void transformProvidingInverse(const osg::Matrix& matrix)
    Transform the plane by provide a pre inverted matrix. see transform for details.

    - +

    oVec4 _fv

    - +

    ounsigned int _upperBBCorner

    - +

    ounsigned int _lowerBBCorner

    diff --git a/doc/doc++/osg/Point.html b/doc/doc++/osg/Point.html index 9f9f06813..556f9dcdf 100644 --- a/doc/doc++/osg/Point.html +++ b/doc/doc++/osg/Point.html @@ -23,47 +23,44 @@

    Public Methods

    -[more] Point() +[more] Point()
    -[more]virtual Object* clone() const +[more] META_StateAttribute(Point, POINT)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
    -[more]virtual const Type getType() const +[more]void setSize(const float size)
    -[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline const float getSize() const
    -[more]void setSize(const float size) +[more]void setFadeThresholdSize(const float fadeThresholdSize)
    -[more]inline const float getSize() const +[more]inline const float getFadeThresholdSize() const
    -[more]void setFadeThresholdSize(const float fadeThresholdSize) +[more]void setDistanceAttenuation(const Vec3& distanceAttenuation)
    -[more]inline const float getFadeThresholdSize() const +[more]inline const Vec3& getDistanceAttenuation() const
    -[more]void setDistanceAttenuation(const Vec3& distanceAttenuation) +[more]virtual void apply(State& state) const
    -[more]inline const Vec3& getDistanceAttenuation() const -
    -[more]virtual void apply(State& state) const -
    -[more]static void init_GL_EXT() +[more]static void init_GL_EXT()

    Protected Fields

    -[more]float _size +[more]float _size
    -[more]float _fadeThresholdSize +[more]float _fadeThresholdSize
    -[more]Vec3 _distanceAttenuation +[more]Vec3 _distanceAttenuation

    Protected Methods

    -[more]virtual ~Point() +[more]virtual ~Point()

    @@ -71,6 +68,20 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    ovirtual void compile(State&) const

    @@ -84,7 +95,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -118,75 +131,68 @@
    - +
    o Point()

    - - -

    ovirtual Object* clone() const + + +
    o META_StateAttribute(Point, POINT)

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - -

    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

    - +

    ovoid setSize(const float size)

    - +

    oinline const float getSize() const

    - +

    ovoid setFadeThresholdSize(const float fadeThresholdSize)

    - +

    oinline const float getFadeThresholdSize() const

    - +

    ovoid setDistanceAttenuation(const Vec3& distanceAttenuation)

    - +

    oinline const Vec3& getDistanceAttenuation() const

    - +

    ovirtual void apply(State& state) const

    - +

    ostatic void init_GL_EXT()

    - +

    ovirtual ~Point()

    - +

    ofloat _size

    - +

    ofloat _fadeThresholdSize

    - +

    oVec3 _distanceAttenuation

    diff --git a/doc/doc++/osg/PolygonMode.html b/doc/doc++/osg/PolygonMode.html index 9e2843a30..bb2406825 100644 --- a/doc/doc++/osg/PolygonMode.html +++ b/doc/doc++/osg/PolygonMode.html @@ -23,44 +23,41 @@

    Public Methods

    -[more] PolygonMode() +[more] PolygonMode()
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more] META_StateAttribute(PolygonMode, POLYGONMODE)
    -[more]virtual Object* clone() const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]void setMode(const Face face, const Mode mode)
    -[more]virtual const Type getType() const +[more]const Mode getMode(const Face face) const
    -[more]void setMode(const Face face, const Mode mode) +[more]inline const bool getFrontAndBack() const
    -[more]const Mode getMode(const Face face) const -
    -[more]inline const bool getFrontAndBack() const -
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

    Public Members

    -[more]enum Face +[more]enum Face
    -[more]enum Mode +[more]enum Mode

    Protected Fields

    -[more]bool _frontAndBack +[more]bool _frontAndBack
    -[more]Mode _modeFront +[more]Mode _modeFront
    -[more]Mode _modeBack +[more]Mode _modeBack

    Protected Methods

    -[more]virtual ~PolygonMode() +[more]virtual ~PolygonMode()

    @@ -68,7 +65,21 @@

    Public Methods

    -ovirtual void setStateSetModes(StateSet&, const GLModeValue) const +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    +ovirtual void setStateSetModes(StateSet&, const GLModeValue) const
    ovirtual void compile(State&) const

    @@ -83,7 +94,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -117,92 +130,85 @@
    - +
    o PolygonMode()

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const + + +
    o META_StateAttribute(PolygonMode, POLYGONMODE)

    - - -

    ovirtual Object* clone() const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - +

    oenum Face

    - +
    o FRONT

    - +

    o BACK

    - +

    o FRONT_AND_BACK

    - +
    oenum Mode

    - +
    o POINT

    - +

    o LINE

    - +

    o FILL

    - -
    ovoid setMode(const Face face, const Mode mode) + +
    ovoid setMode(const Face face, const Mode mode)

    - -

    oconst Mode getMode(const Face face) const + +
    oconst Mode getMode(const Face face) const

    - +

    oinline const bool getFrontAndBack() const

    - +

    ovirtual void apply(State& state) const

    - +

    ovirtual ~PolygonMode()

    - +

    obool _frontAndBack

    - -

    oMode _modeFront + +
    oMode _modeFront

    - -

    oMode _modeBack + +
    oMode _modeBack


    This class has no child classes.
    diff --git a/doc/doc++/osg/PolygonOffset.html b/doc/doc++/osg/PolygonOffset.html index 0f4b965c6..09977a7c2 100644 --- a/doc/doc++/osg/PolygonOffset.html +++ b/doc/doc++/osg/PolygonOffset.html @@ -23,39 +23,36 @@

    Public Methods

    -[more] PolygonOffset() +[more] PolygonOffset()
    -[more]virtual Object* clone() const +[more] META_StateAttribute(PolygonOffset, POLYGONOFFSET)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
    -[more]virtual const Type getType() const +[more]inline void setFactor(const float factor)
    -[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline const float getFactor() const
    -[more]inline void setFactor(const float factor) +[more]inline void setUnits(const float units)
    -[more]inline const float getFactor() const +[more]inline const float getUnits() const
    -[more]inline void setUnits(const float units) -
    -[more]inline const float getUnits() const -
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

    Protected Fields

    -[more]float _factor +[more]float _factor
    -[more]float _units +[more]float _units

    Protected Methods

    -[more]virtual ~PolygonOffset() +[more]virtual ~PolygonOffset()

    @@ -63,6 +60,20 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    ovirtual void compile(State&) const

    @@ -76,7 +87,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -110,59 +123,52 @@
    - +
    o PolygonOffset()

    - - -

    ovirtual Object* clone() const + + +
    o META_StateAttribute(PolygonOffset, POLYGONOFFSET)

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - -

    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

    - +

    oinline void setFactor(const float factor)

    - +

    oinline const float getFactor() const

    - +

    oinline void setUnits(const float units)

    - +

    oinline const float getUnits() const

    - +

    ovirtual void apply(State& state) const

    - +

    ovirtual ~PolygonOffset()

    - +

    ofloat _factor

    - +

    ofloat _units

    diff --git a/doc/doc++/osg/Quat.html b/doc/doc++/osg/Quat.html index 4feb93448..920d23731 100644 --- a/doc/doc++/osg/Quat.html +++ b/doc/doc++/osg/Quat.html @@ -13,98 +13,98 @@

    Public Fields

    -[more]Vec4 _fv +[more]Vec4 _fv

    Public Methods

    -[more] Quat() +[more] Quat()
    -[more] Quat( float x, float y, float z, float w ) +[more] Quat( float x, float y, float z, float w )
    -[more] Quat( const Vec4& v ) +[more] Quat( const Vec4& v )
    -[more]inline Vec4& asVec4() +[more]inline Vec4& asVec4()
    -[more]inline const Vec4& asVec4() const +[more]inline const Vec4& asVec4() const
    -[more]inline const Vec3 asVec3() const +[more]inline const Vec3 asVec3() const
    -[more]inline void set(const float x, const float y, const float z, const float w) +[more]inline void set(const float x, const float y, const float z, const float w)
    -[more]inline void set(const osg::Vec4& v) +[more]inline void set(const osg::Vec4& v)
    -[more]inline const Quat operator * (const float& rhs) const +[more]inline const Quat operator * (const float& rhs) const
    Multiply by scalar
    -[more]inline Quat& operator *= (const float& rhs) +[more]inline Quat& operator *= (const float& rhs)
    Unary multiply by scalar
    -[more]inline const Quat operator*(const Quat& rhs) const +[more]inline const Quat operator*(const Quat& rhs) const
    Binary multiply
    -[more]inline Quat& operator*=(const Quat& rhs) +[more]inline Quat& operator*=(const Quat& rhs)
    Unary multiply
    -[more]inline const Quat operator / (const float& rhs) const +[more]inline const Quat operator / (const float& rhs) const
    Divide by scalar
    -[more]inline Quat& operator /= (const float& rhs) +[more]inline Quat& operator /= (const float& rhs)
    Unary divide by scalar
    -[more]inline const Quat operator/(const Quat& denom) const +[more]inline const Quat operator/(const Quat& denom) const
    Binary divide
    -[more]inline Quat& operator/=(const Quat& denom) +[more]inline Quat& operator/=(const Quat& denom)
    Unary divide
    -[more]inline const Quat operator + (const Quat& rhs) const +[more]inline const Quat operator + (const Quat& rhs) const
    Binary addition
    -[more]inline Quat& operator += (const Quat& rhs) +[more]inline Quat& operator += (const Quat& rhs)
    Unary addition
    -[more]inline const Quat operator - (const Quat& rhs) const +[more]inline const Quat operator - (const Quat& rhs) const
    Binary subtraction
    -[more]inline Quat& operator -= (const Quat& rhs) +[more]inline Quat& operator -= (const Quat& rhs)
    Unary subtraction
    -[more]inline const Quat operator - () const +[more]inline const Quat operator - () const
    Negation operator - returns the negative of the quaternion.
    -[more]const float length() const +[more]const float length() const
    Length of the quaternion = sqrt( vec .
    -[more]const float length2() const +[more]const float length2() const
    Length of the quaternion = vec .
    -[more]inline const Quat conj() const +[more]inline const Quat conj() const
    Conjugate
    -[more]inline const Quat inverse() const +[more]inline const Quat inverse() const
    Multiplicative inverse method: q^(-1) = q^*/(qq^*)
    -[more]void makeRot( const float angle, const float x, const float y, const float z ) +[more]void makeRot( const float angle, const float x, const float y, const float z )
    -[more]void makeRot( const float angle, const Vec3& vec ) +[more]void makeRot( const float angle, const Vec3& vec )
    -[more]void makeRot( const Vec3& vec1, const Vec3& vec2 ) +[more]void makeRot( const Vec3& vec1, const Vec3& vec2 )
    Make a rotation Quat which will rotate vec1 to vec2.
    -[more]void getRot( float& angle, float& x, float& y, float& z ) const +[more]void getRot( float& angle, float& x, float& y, float& z ) const
    Return the angle and vector components represented by the quaternion
    -[more]void getRot( float& angle, Vec3& vec ) const +[more]void getRot( float& angle, Vec3& vec ) const
    Return the angle and vector represented by the quaternion
    -[more]void slerp( const float t, const Quat& from, const Quat& to) +[more]void slerp( const float t, const Quat& from, const Quat& to)
    Spherical Linear Interpolation.
    -[more]void set( const osg::Matrix& m ) +[more]void set( const osg::Matrix& m )
    Set quaternion to be equivalent to specified matrix
    -[more]void get( osg::Matrix& m ) const +[more]void get( osg::Matrix& m ) const
    Get the equivalent matrix for this quaternion

    @@ -117,137 +117,137 @@
    - +
    oVec4 _fv

    - +

    o Quat()

    - -

    o Quat( float x, float y, float z, float w ) + +
    o Quat( float x, float y, float z, float w )

    - +

    o Quat( const Vec4& v )

    - +

    oinline Vec4& asVec4()

    - +

    oinline const Vec4& asVec4() const

    - +

    oinline const Vec3 asVec3() const

    - -

    oinline void set(const float x, const float y, const float z, const float w) + +
    oinline void set(const float x, const float y, const float z, const float w)

    - +

    oinline void set(const osg::Vec4& v)

    - +

    oinline const Quat operator * (const float& rhs) const
    Multiply by scalar

    - +

    oinline Quat& operator *= (const float& rhs)
    Unary multiply by scalar

    - +

    oinline const Quat operator*(const Quat& rhs) const
    Binary multiply

    - +

    oinline Quat& operator*=(const Quat& rhs)
    Unary multiply

    - +

    oinline const Quat operator / (const float& rhs) const
    Divide by scalar

    - +

    oinline Quat& operator /= (const float& rhs)
    Unary divide by scalar

    - +

    oinline const Quat operator/(const Quat& denom) const
    Binary divide

    - +

    oinline Quat& operator/=(const Quat& denom)
    Unary divide

    - +

    oinline const Quat operator + (const Quat& rhs) const
    Binary addition

    - +

    oinline Quat& operator += (const Quat& rhs)
    Unary addition

    - +

    oinline const Quat operator - (const Quat& rhs) const
    Binary subtraction

    - +

    oinline Quat& operator -= (const Quat& rhs)
    Unary subtraction

    - +

    oinline const Quat operator - () const
    Negation operator - returns the negative of the quaternion. Basically just calls operator - () on the Vec4

    - +

    oconst float length() const
    Length of the quaternion = sqrt( vec . vec )

    - +

    oconst float length2() const
    Length of the quaternion = vec . vec

    - +

    oinline const Quat conj() const
    Conjugate

    - +

    oinline const Quat inverse() const
    Multiplicative inverse method: q^(-1) = q^*/(qq^*)

    - -

    ovoid makeRot( const float angle, const float x, const float y, const float z ) + +
    ovoid makeRot( const float angle, const float x, const float y, const float z )

    - +

    ovoid makeRot( const float angle, const Vec3& vec )

    - +

    ovoid makeRot( const Vec3& vec1, const Vec3& vec2 )
    Make a rotation Quat which will rotate vec1 to vec2. Generally take adot product to get the angle between these @@ -256,28 +256,28 @@ Watch out for the two special cases of when the vectors are co-incident or opposite in direction.

    - -

    ovoid getRot( float& angle, float& x, float& y, float& z ) const + +
    ovoid getRot( float& angle, float& x, float& y, float& z ) const
    Return the angle and vector components represented by the quaternion

    - +

    ovoid getRot( float& angle, Vec3& vec ) const
    Return the angle and vector represented by the quaternion

    - -

    ovoid slerp( const float t, const Quat& from, const Quat& to) + +
    ovoid slerp( const float t, const Quat& from, const Quat& to)
    Spherical Linear Interpolation. As t goes from 0 to 1, the Quat object goes from "from" to "to".

    - +

    ovoid set( const osg::Matrix& m )
    Set quaternion to be equivalent to specified matrix

    - +

    ovoid get( osg::Matrix& m ) const
    Get the equivalent matrix for this quaternion

    diff --git a/doc/doc++/osg/Referenced.html b/doc/doc++/osg/Referenced.html index e048f582b..9570c73ab 100644 --- a/doc/doc++/osg/Referenced.html +++ b/doc/doc++/osg/Referenced.html @@ -11,11 +11,11 @@

    Inheritance:

    - - - - - + + + + +
    @@ -23,30 +23,30 @@

    Public Methods

    -[more] Referenced() +[more] Referenced()
    -[more] Referenced(const Referenced&) +[more] Referenced(const Referenced&)
    -[more]inline Referenced& operator = (Referenced&) +[more]inline Referenced& operator = (Referenced&)
    -[more]inline void ref() const +[more]inline void ref() const
    increment the reference count by one, indicating that this object has another pointer which is referencing it
    -[more]inline void unref() const +[more]inline void unref() const
    decrement the reference count by one, indicating that a pointer to this object is referencing it.
    -[more]inline const int referenceCount() const +[more]inline const int referenceCount() const
    return the number pointers currently referencing this object.

    Protected Fields

    -[more]mutable int _refCount +[more]mutable int _refCount

    Protected Methods

    -[more]virtual ~Referenced() +[more]virtual ~Referenced()

    @@ -58,25 +58,25 @@
    - +
    o Referenced()

    - -

    o Referenced(const Referenced&) + +
    o Referenced(const Referenced&)

    - +

    oinline Referenced& operator = (Referenced&)

    - +

    oinline void ref() const
    increment the reference count by one, indicating that this object has another pointer which is referencing it

    - +

    oinline void unref() const
    decrement the reference count by one, indicating that a pointer to this object is referencing it. If the @@ -84,16 +84,16 @@ refence count goes to zero, it is assumed that this object is nolonger referenced and is automatically deleted.

    - +

    oinline const int referenceCount() const
    return the number pointers currently referencing this object.

    - +

    ovirtual ~Referenced()

    - +

    omutable int _refCount


    @@ -101,9 +101,11 @@ is nolonger referenced and is automatically deleted.
    State
    Object
    NodeVisitor
    +NodeCallback
    MemoryAdapter
    LineSegment
    ImpostorSpriteManager
    +FrameStamp
    Camera
    diff --git a/doc/doc++/osg/State.html b/doc/doc++/osg/State.html index 4dacd7c33..40ce3d681 100644 --- a/doc/doc++/osg/State.html +++ b/doc/doc++/osg/State.html @@ -23,56 +23,59 @@

    Public Methods

    -[more] State() +[more] State()
    -[more]virtual ~State() +[more]virtual ~State()
    -[more]void pushStateSet(const StateSet* dstate) +[more]void pushStateSet(const StateSet* dstate)
    push stateset onto state stack
    -[more]void popStateSet() +[more]void popStateSet()
    pop drawstate off state stack
    -[more]void reset() +[more]void reset()
    reset the state object to an empty stack
    -[more]inline const bool apply_mode(const StateAttribute::GLMode mode, const bool enabled) +[more]inline const bool apply_mode(const StateAttribute::GLMode mode, const bool enabled)
    apply an OpenGL mode if required.
    -[more]inline const bool apply_attribute(const StateAttribute* attribute) +[more]inline const bool apply_attribute(const StateAttribute* attribute)
    apply an attribute if required.
    -[more]void apply(const StateSet* dstate) +[more]void apply(const StateSet* dstate)
    apply stateset
    -[more]void apply() +[more]void apply()
    apply the state
    -[more]void have_applied(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value) +[more]void have_applied(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
    mode has been set externally, update state to reflect this setting
    -[more]void have_applied(const StateAttribute* attribute) +[more]void have_applied(const StateAttribute* attribute)
    attribute has been applied externally, update state to reflect this setting
    -[more]inline void setContextID(unsigned int contextID) +[more]inline void setContextID(unsigned int contextID)
    Set the current OpenGL context uniqueID.
    -[more]inline const unsigned int getContextID() const +[more]inline const unsigned int getContextID() const
    Get the current OpenGL context unique ID
    -[more]inline void setFrameNumber(unsigned int fn) -
    Set the frame number +[more]inline void setFrameStamp(FrameStamp* fs) +
    Set the frame stamp for the current frame
    -[more]inline unsigned int getFrameNumber() const -
    Get the frame number +[more]inline const FrameStamp* getFrameStamp() const +
    Set the frame stamp for the current frame
    -[more]inline void incrementFrameNumber() -
    Increment the frame number. +[more]inline void setCamera(Camera* camera) +
    Set the camera.
    -[more]void setFineGrainedErrorDetection(const bool flag) +[more]inline const Camera* getCamera() const +
    Get the camera +
    +[more]void setFineGrainedErrorDetection(const bool flag)
    Set the hint to OpenGL routines to do fine grained OpenGL error checking
    -[more]const bool getFineGrainedErrorDetection() const +[more]const bool getFineGrainedErrorDetection() const
    Get the hint to OpenGL routines to do fine grained OpenGL error checking

    @@ -105,60 +108,60 @@ Lazy state updating is used to minize state changes.
    - +
    o State()

    - +

    ovirtual ~State()

    - +

    ovoid pushStateSet(const StateSet* dstate)
    push stateset onto state stack

    - +

    ovoid popStateSet()
    pop drawstate off state stack

    - +

    ovoid reset()
    reset the state object to an empty stack

    - +

    oinline const bool apply_mode(const StateAttribute::GLMode mode, const bool enabled)
    apply an OpenGL mode if required.

    - +

    oinline const bool apply_attribute(const StateAttribute* attribute)
    apply an attribute if required.

    - +

    ovoid apply(const StateSet* dstate)
    apply stateset

    - +

    ovoid apply()
    apply the state

    - +

    ovoid have_applied(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
    mode has been set externally, update state to reflect this setting

    - +

    ovoid have_applied(const StateAttribute* attribute)
    attribute has been applied externally, update state to reflect this setting

    - +

    oinline void setContextID(unsigned int contextID)
    Set the current OpenGL context uniqueID. Note, it is the application developers responsiblity to @@ -168,68 +171,75 @@ help manage OpenGL display list and texture binds appropriate for each context.

    - +

    oinline const unsigned int getContextID() const
    Get the current OpenGL context unique ID

    - - -

    oinline void setFrameNumber(unsigned int fn) -
    Set the frame number + + +
    oinline void setFrameStamp(FrameStamp* fs) +
    Set the frame stamp for the current frame

    - - -

    oinline unsigned int getFrameNumber() const -
    Get the frame number + + +
    oinline const FrameStamp* getFrameStamp() const +
    Set the frame stamp for the current frame

    - - -

    oinline void incrementFrameNumber() -
    Increment the frame number. Done once per frame. + + +
    oinline void setCamera(Camera* camera) +
    Set the camera. Note, nothing is applied, the camera is just used +used in the State object to pass the current camera to Drawables +during rendering. +

    + + +

    oinline const Camera* getCamera() const +
    Get the camera

    - +

    ovoid setFineGrainedErrorDetection(const bool flag)
    Set the hint to OpenGL routines to do fine grained OpenGL error checking

    - +

    oconst bool getFineGrainedErrorDetection() const
    Get the hint to OpenGL routines to do fine grained OpenGL error checking

    - +
    o ModeStack()

    - +

    obool changed

    - +

    obool last_applied_value

    - +

    oValueVec valueVec

    - +
    o AttributeStack()

    - +

    obool changed

    - +

    oconst StateAttribute* last_applied_attribute

    - +

    oAttributeVec attributeVec

    diff --git a/doc/doc++/osg/StateAttribute.html b/doc/doc++/osg/StateAttribute.html index f97f7aafe..7fbbf0ef3 100644 --- a/doc/doc++/osg/StateAttribute.html +++ b/doc/doc++/osg/StateAttribute.html @@ -11,11 +11,11 @@

    Inheritance:

    - - - - - + + + + +
    @@ -23,50 +23,62 @@

    Public Methods

    -[more] StateAttribute() +[more] StateAttribute()
    -[more]virtual Object* clone() const = 0 +[more]virtual Object* clone() const = 0
    return a shallow copy of a node, with Object* return type
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual bool isSameKindAs(const Object* obj) const
    return true if this and obj are of the same kind of object
    -[more]virtual const char* className() const +[more]virtual const char* className() const
    return the name of the attribute's class type
    -[more]virtual const Type getType() const = 0 +[more]virtual const Type getType() const = 0
    return the Type idenitifer of the attribute's class type
    -[more]virtual void setStateSetModes(StateSet&, const GLModeValue) const +[more]virtual int compare(const StateAttribute& sa) const = 0 +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual void apply(State&) const = 0 +[more]bool operator < (const StateAttribute& rhs) const +
    +[more]bool operator == (const StateAttribute& rhs) const +
    +[more]bool operator != (const StateAttribute& rhs) const +
    +[more]virtual void setStateSetModes(StateSet&, const GLModeValue) const +
    +[more]virtual void apply(State&) const = 0
    apply the OpenGL state attributes.
    -[more]virtual void compile(State&) const +[more]virtual void compile(State&) const
    default to nothing to compile - all state is applied immediately.

    Public Members

    -[more]typedef GLenum GLMode +[more]typedef GLenum GLMode
    GLMode is the value used in glEnable/glDisable(mode)
    -[more]typedef unsigned int GLModeValue +[more]typedef unsigned int GLModeValue
    GLModeValue is used to specified whether an mode is enabled (ON) or disabled (OFF).
    -[more]typedef unsigned int OverrideValue +[more]typedef unsigned int OverrideValue
    Override is used to specified the override behavior of StateAttributes from from parent to children.
    -[more]enum Values +[more]enum Values
    list values which can be used in to set either GLModeValues or OverrideValues.
    -[more]enum Type +[more]typedef unsigned int Type +
    Type identifier to differentiate between different state types. +
    +[more]enum Types
    Values of StateAttribute::Type used to aid identification of diffenent StateAttribute subclasses.

    Protected Methods

    -[more]virtual ~StateAttribute() +[more]virtual ~StateAttribute()

    @@ -100,26 +112,26 @@
    - +
    otypedef GLenum GLMode
    GLMode is the value used in glEnable/glDisable(mode)

    - +

    otypedef unsigned int GLModeValue
    GLModeValue is used to specified whether an mode is enabled (ON) or disabled (OFF). GLMoveValue is also used to speficy the override behavior of modes from parent to children. See enum Value description for more details.

    - +

    otypedef unsigned int OverrideValue
    Override is used to specified the override behavior of StateAttributes from from parent to children. See enum Value description for more details.

    - +

    oenum Values
    list values which can be used in to set either GLModeValues or OverrideValues. When using in conjection with GLModeValues @@ -131,39 +143,44 @@ StateSet::setAttributeAndModes(..).

    - +
    o OFF
    means that associated GLMode and Override is disabled

    - +

    o ON
    means that associated GLMode is enabled and Override is disabled

    - +

    o OVERRIDE
    Overriding of GLMode's or StateAttributes is enabled

    - +

    o OVERRIDE_OFF
    means that associated GLMode is disabled and Override is enabled

    - +

    o OVERRIDE_ON
    means that associated GLMode and Override is enabled

    - +

    o INHERIT
    means that GLMode or StateAttribute should in inherited from above

    - -
    oenum Type + +
    otypedef unsigned int Type +
    Type identifier to differentiate between different state types. +

    + + +

    oenum Types
    Values of StateAttribute::Type used to aid identification of diffenent StateAttribute subclasses. Each subclass defines it own value in the virtual Type getType() method. When @@ -175,156 +192,209 @@ that types value.

    - +
    o ALPHAFUNC

    - +

    o ANTIALIAS

    - +

    o COLORTABLE

    - +

    o CULLFACE

    - +

    o FOG

    - +

    o FRONTFACE

    - - -

    o LIGHTING + + +
    o LIGHT +

    + + +

    o LIGHT_0 +

    + + +

    o LIGHT_1 +

    + + +

    o LIGHT_2 +

    + + +

    o LIGHT_3 +

    + + +

    o LIGHT_4 +

    + + +

    o LIGHT_5 +

    + + +

    o LIGHT_6 +

    + + +

    o LIGHT_7

    - +

    o MATERIAL

    - +

    o POINT

    - +

    o POLYGONMODE

    - +

    o POLYGONOFFSET

    - +

    o TEXENV

    - +

    o TEXGEN

    - +

    o TEXMAT

    - +

    o TEXTURE

    - +

    o TEXTURE_0

    - +

    o TEXTURE_1

    - +

    o TEXTURE_2

    - +

    o TEXTURE_3

    - +

    o TRANSPARENCY

    - +

    o STENCIL

    - +

    o COLORMASK

    - +

    o CLIPPLANE

    - +

    o CLIPPLANE_0

    - +

    o CLIPPLANE_1

    - +

    o CLIPPLANE_2

    - +

    o CLIPPLANE_3

    - +

    o CLIPPLANE_4

    - +

    o CLIPPLANE_5

    - +

    o DEPTH +

    + + +

    o VIEWPORT

    - +
    o StateAttribute()

    - +

    ovirtual Object* clone() const = 0
    return a shallow copy of a node, with Object* return type

    - +

    ovirtual bool isSameKindAs(const Object* obj) const
    return true if this and obj are of the same kind of object

    - +

    ovirtual const char* className() const
    return the name of the attribute's class type

    - -

    ovirtual const Type getType() const = 0 + +
    ovirtual const Type getType() const = 0
    return the Type idenitifer of the attribute's class type

    + + +

    ovirtual int compare(const StateAttribute& sa) const = 0 +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs +

    + + +

    obool operator < (const StateAttribute& rhs) const +

    + + +

    obool operator == (const StateAttribute& rhs) const +

    + + +

    obool operator != (const StateAttribute& rhs) const +

    - -

    ovirtual void setStateSetModes(StateSet&, const GLModeValue) const + +
    ovirtual void setStateSetModes(StateSet&, const GLModeValue) const

    - +

    ovirtual void apply(State&) const = 0
    apply the OpenGL state attributes. The global state for the current OpenGL context is passed @@ -332,17 +402,18 @@ in to allow the StateAttribute to obtain details on the the current context and state.

    - +

    ovirtual void compile(State&) const
    default to nothing to compile - all state is applied immediately.

    - +

    ovirtual ~StateAttribute()


    Direct child classes: -
    Transparency
    +
    Viewport
    +Transparency
    Texture
    TexMat
    TexGen
    diff --git a/doc/doc++/osg/StateSet.html b/doc/doc++/osg/StateSet.html index fbec20083..a8425010c 100644 --- a/doc/doc++/osg/StateSet.html +++ b/doc/doc++/osg/StateSet.html @@ -23,134 +23,122 @@

    Public Methods

    -[more] StateSet() +[more] StateSet()
    -[more]virtual Object* clone() const +[more]virtual Object* clone() const
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual bool isSameKindAs(const Object* obj) const
    -[more]virtual const char* className() const +[more]virtual const char* className() const
    -[more]void setGlobalDefaults() +[more]void setGlobalDefaults()
    set all the modes to on or off so that it defines a complete state, typically used for a default global state
    -[more]void setAllToInherit() +[more]void setAllToInherit()
    set all the modes to inherit, typically used to signifiy nodes which inherit all of their modes for the global state
    -[more]void setMode(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value) +[more]void setMode(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
    set this StateSet to contain specified GLMode and value
    -[more]void setModeToInherit(const StateAttribute::GLMode mode) +[more]void setModeToInherit(const StateAttribute::GLMode mode)
    set this StateSet to inherit specified GLMode type from parents.
    -[more]const StateAttribute::GLModeValue getMode(const StateAttribute::GLMode mode) const +[more]const StateAttribute::GLModeValue getMode(const StateAttribute::GLMode mode) const
    get specified GLModeValue for specified GLMode.
    -[more]inline ModeList& getModeList() +[more]inline ModeList& getModeList()
    return the list of all GLModes contained in this StateSet
    -[more]inline const ModeList& getModeList() const +[more]inline const ModeList& getModeList() const
    return the const list of all GLModes contained in this const StateSet
    -[more]void setAttribute(StateAttribute* attribute, const StateAttribute::OverrideValue value=StateAttribute::OFF) +[more]void setAttribute(StateAttribute* attribute, const StateAttribute::OverrideValue value=StateAttribute::OFF)
    set this StateSet to contain specified attribute and override flag
    -[more]void setAttributeAndModes(StateAttribute* attribute, const StateAttribute::GLModeValue value=StateAttribute::ON) +[more]void setAttributeAndModes(StateAttribute* attribute, const StateAttribute::GLModeValue value=StateAttribute::ON)
    set this StateSet to contain specified attribute and set the associated GLMode's to specifed value
    -[more]void setAttributeToInherit(const StateAttribute::Type type) +[more]void setAttributeToInherit(const StateAttribute::Type type)
    set this StateSet to inherit specified attribute type from parents.
    -[more]const StateAttribute* getAttribute(const StateAttribute::Type type) const +[more]const StateAttribute* getAttribute(const StateAttribute::Type type) const
    get specified StateAttribute for specified type.
    -[more]const RefAttributePair* getAttributePair(const StateAttribute::Type type) const +[more]const RefAttributePair* getAttributePair(const StateAttribute::Type type) const
    get specified RefAttributePair for specified type.
    -[more]inline AttributeList& getAttributeList() +[more]inline AttributeList& getAttributeList()
    return the list of all StateAttributes contained in this StateSet
    -[more]inline const AttributeList& getAttributeList() const +[more]inline const AttributeList& getAttributeList() const
    return the const list of all StateAttributes contained in this const StateSet
    -[more]const ModeVector getModeVector() const -
    get method which copies this StateSet's osg::GLModeValues's into a std::vector. -
    -[more]const AttributeVector getAttributeVector() const -
    get method which copies this StateSet's osg::StateAttribute's into a std::vector. -
    -[more]void setRenderingHint(const int hint) +[more]void setRenderingHint(const int hint)
    set the RenderingHint of the StateSet.
    -[more]inline const int getRenderingHint() const +[more]inline const int getRenderingHint() const
    get the RenderingHint of the StateSet
    -[more]void setRenderBinDetails(const int binNum, const std::string& binName, const RenderBinMode mode=USE_RENDERBIN_DETAILS) +[more]void setRenderBinDetails(const int binNum, const std::string& binName, const RenderBinMode mode=USE_RENDERBIN_DETAILS)
    set the render bin details
    -[more]void setRendingBinToInherit() +[more]void setRendingBinToInherit()
    set the render bin details to inherit
    -[more]inline const RenderBinMode getRenderBinMode() const +[more]inline const RenderBinMode getRenderBinMode() const
    get the render bin mode
    -[more]inline const bool useRenderBinDetails() const +[more]inline const bool useRenderBinDetails() const
    get whether the render bin details are set and should be used
    -[more]inline const int getBinNumber() const +[more]inline const int getBinNumber() const
    get the render bin number
    -[more]inline const std::string& getBinName() const +[more]inline const std::string& getBinName() const
    get the render bin name
    -[more]void compile(State& state) const +[more]void compile(State& state) const
    call compile on all StateAttributes contained within this StateSet

    Public Members

    -[more]typedef std::map<StateAttribute::GLMode,StateAttribute::GLModeValue> ModeList +[more]typedef std::map<StateAttribute::GLMode,StateAttribute::GLModeValue> ModeList
    a container to map GLModes to their respective GLModeValues
    -[more]typedef std::pair<ref_ptr<StateAttribute>,StateAttribute::OverrideValue> RefAttributePair +[more]typedef std::pair<ref_ptr<StateAttribute>,StateAttribute::OverrideValue> RefAttributePair
    simple pairing between an attribute and its override flag
    -[more]typedef std::map<StateAttribute::Type,RefAttributePair> AttributeList +[more]typedef std::map<StateAttribute::Type,RefAttributePair> AttributeList
    a container to map StateAttribyte::Types to their respective RefAttributePair
    -[more]typedef std::vector<std::pair<StateAttribute::GLMode,StateAttribute::GLModeValue> > ModeVector -
    tempory type def to support tempory method getModeVector +[more]enum RenderingHint
    -[more]typedef std::vector<const StateAttribute*> AttributeVector -
    tempory type def to support tempory method getAttributeVector -
    -[more]enum RenderingHint -
    -[more]enum RenderBinMode +[more]enum RenderBinMode

    Protected Fields

    -[more]ModeList _modeList +[more]ModeList _modeList
    -[more]AttributeList _attributeList +[more]AttributeList _attributeList
    -[more]int _renderingHint +[more]int _renderingHint
    -[more]RenderBinMode _binMode +[more]RenderBinMode _binMode
    -[more]int _binNum +[more]int _binNum
    -[more]std::string _binName +[more]std::string _binName

    Protected Methods

    -[more]virtual ~StateSet() +[more]virtual ~StateSet()
    -[more] StateSet(const StateSet&) +[more] StateSet(const StateSet&)
    -[more]StateSet& operator = (const StateSet&) +[more]StateSet& operator = (const StateSet&)

    @@ -187,159 +175,133 @@ in the graphics pipeline.
    - +
    o StateSet()

    - +

    ovirtual Object* clone() const

    - +

    ovirtual bool isSameKindAs(const Object* obj) const

    - +

    ovirtual const char* className() const

    - +

    ovoid setGlobalDefaults()
    set all the modes to on or off so that it defines a complete state, typically used for a default global state

    - +

    ovoid setAllToInherit()
    set all the modes to inherit, typically used to signifiy nodes which inherit all of their modes for the global state

    - +

    otypedef std::map<StateAttribute::GLMode,StateAttribute::GLModeValue> ModeList
    a container to map GLModes to their respective GLModeValues

    - +

    ovoid setMode(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
    set this StateSet to contain specified GLMode and value

    - +

    ovoid setModeToInherit(const StateAttribute::GLMode mode)
    set this StateSet to inherit specified GLMode type from parents. has the effect of deleting any GlMode of specified type from StateSet.

    - +

    oconst StateAttribute::GLModeValue getMode(const StateAttribute::GLMode mode) const
    get specified GLModeValue for specified GLMode. returns INHERIT if no GLModeValue is contained within StateSet.

    - -

    oinline ModeList& getModeList() + +
    oinline ModeList& getModeList()
    return the list of all GLModes contained in this StateSet

    - -

    oinline const ModeList& getModeList() const + +
    oinline const ModeList& getModeList() const
    return the const list of all GLModes contained in this const StateSet

    - +

    otypedef std::pair<ref_ptr<StateAttribute>,StateAttribute::OverrideValue> RefAttributePair
    simple pairing between an attribute and its override flag

    - -

    otypedef std::map<StateAttribute::Type,RefAttributePair> AttributeList + +
    otypedef std::map<StateAttribute::Type,RefAttributePair> AttributeList
    a container to map StateAttribyte::Types to their respective RefAttributePair

    - +

    ovoid setAttribute(StateAttribute* attribute, const StateAttribute::OverrideValue value=StateAttribute::OFF)
    set this StateSet to contain specified attribute and override flag

    - +

    ovoid setAttributeAndModes(StateAttribute* attribute, const StateAttribute::GLModeValue value=StateAttribute::ON)
    set this StateSet to contain specified attribute and set the associated GLMode's to specifed value

    - +

    ovoid setAttributeToInherit(const StateAttribute::Type type)
    set this StateSet to inherit specified attribute type from parents. has the effect of deleting any state attributes of specified type from StateSet.

    - +

    oconst StateAttribute* getAttribute(const StateAttribute::Type type) const
    get specified StateAttribute for specified type. returns NULL if no type is contained within StateSet.

    - -

    oconst RefAttributePair* getAttributePair(const StateAttribute::Type type) const + +
    oconst RefAttributePair* getAttributePair(const StateAttribute::Type type) const
    get specified RefAttributePair for specified type. returns NULL if no type is contained within StateSet.

    - -

    oinline AttributeList& getAttributeList() + +
    oinline AttributeList& getAttributeList()
    return the list of all StateAttributes contained in this StateSet

    - -

    oinline const AttributeList& getAttributeList() const + +
    oinline const AttributeList& getAttributeList() const
    return the const list of all StateAttributes contained in this const StateSet

    - - -

    otypedef std::vector<std::pair<StateAttribute::GLMode,StateAttribute::GLModeValue> > ModeVector -
    tempory type def to support tempory method getModeVector -

    - - -

    oconst ModeVector getModeVector() const -
    get method which copies this StateSet's osg::GLModeValues's into -a std::vector. method is overlaps on the propper get method - -getModeList and only exists to get round a crash under Windows. -Will be removed once problem is fixed. -

    - - -

    otypedef std::vector<const StateAttribute*> AttributeVector -
    tempory type def to support tempory method getAttributeVector -

    - - -

    oconst AttributeVector getAttributeVector() const -
    get method which copies this StateSet's osg::StateAttribute's into -a std::vector. method is overlaps on the propper get method - -getAttributeList and only exists to get round a crash under Windows. -Will be removed once problem is fixed. -

    - +

    oenum RenderingHint

    - +
    o DEFAULT_BIN

    - +

    o OPAQUE_BIN

    - +

    o TRANSPARENT_BIN

    - +
    ovoid setRenderingHint(const int hint)
    set the RenderingHint of the StateSet. RenderingHint is used by osgUtil::Renderer to determine which @@ -348,101 +310,101 @@ objects OPAQUE_BIN would typical used, which TRANSPARENT_BIN should be used for objects which need to be depth sorted.

    - +

    oinline const int getRenderingHint() const
    get the RenderingHint of the StateSet

    - +

    oenum RenderBinMode

    - +
    o INHERIT_RENDERBIN_DETAILS

    - +

    o USE_RENDERBIN_DETAILS

    - +

    o OVERRIDE_RENDERBIN_DETAILS

    - +

    o ENCLOSE_RENDERBIN_DETAILS

    - -
    ovoid setRenderBinDetails(const int binNum, const std::string& binName, const RenderBinMode mode=USE_RENDERBIN_DETAILS) + +
    ovoid setRenderBinDetails(const int binNum, const std::string& binName, const RenderBinMode mode=USE_RENDERBIN_DETAILS)
    set the render bin details

    - +

    ovoid setRendingBinToInherit()
    set the render bin details to inherit

    - -

    oinline const RenderBinMode getRenderBinMode() const + +
    oinline const RenderBinMode getRenderBinMode() const
    get the render bin mode

    - +

    oinline const bool useRenderBinDetails() const
    get whether the render bin details are set and should be used

    - +

    oinline const int getBinNumber() const
    get the render bin number

    - +

    oinline const std::string& getBinName() const
    get the render bin name

    - +

    ovoid compile(State& state) const
    call compile on all StateAttributes contained within this StateSet

    - +

    ovirtual ~StateSet()

    - -

    o StateSet(const StateSet&) + +
    o StateSet(const StateSet&)

    - +

    oStateSet& operator = (const StateSet&)

    - -

    oModeList _modeList + +
    oModeList _modeList

    - -

    oAttributeList _attributeList + +
    oAttributeList _attributeList

    - +

    oint _renderingHint

    - -

    oRenderBinMode _binMode + +
    oRenderBinMode _binMode

    - +

    oint _binNum

    - +

    ostd::string _binName

    diff --git a/doc/doc++/osg/Stencil.html b/doc/doc++/osg/Stencil.html index b124cf112..20d337388 100644 --- a/doc/doc++/osg/Stencil.html +++ b/doc/doc++/osg/Stencil.html @@ -23,72 +23,69 @@

    Public Methods

    -[more] Stencil() +[more] Stencil()
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more] META_StateAttribute(Stencil, STENCIL)
    -[more]virtual Object* clone() const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
    -[more]virtual const Type getType() const +[more]inline void setFunction(const Function func, int ref, uint mask)
    -[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline const Function getFunction() const
    -[more]inline void setFunction(const Function func, int ref, uint mask) +[more]inline const int getFunctionRef() const
    -[more]inline const Function getFunction() const +[more]inline const uint getFunctionMask() const
    -[more]inline const int getFunctionRef() const -
    -[more]inline const uint getFunctionMask() const -
    -[more]inline void setOperation(const Operation sfail, const Operation zfail, const Operation zpass) +[more]inline void setOperation(const Operation sfail, const Operation zfail, const Operation zpass)
    set the operations to apply when the various stencil and depth tests fail or pass.
    -[more]inline const Operation getStencilFailOperation() const +[more]inline const Operation getStencilFailOperation() const
    get the operation when the stencil test fails
    -[more]inline const Operation getStencilPassAndDepthFailOperation() const +[more]inline const Operation getStencilPassAndDepthFailOperation() const
    get the operation when the stencil test passes but the depth test fails
    -[more]inline const Operation getStencilPassAndDepthPassOperation() const +[more]inline const Operation getStencilPassAndDepthPassOperation() const
    get the operation when both the stencil test and the depth test pass
    -[more]inline void setWriteMask(uint mask) +[more]inline void setWriteMask(uint mask)
    -[more]inline const uint getWriteMask() const +[more]inline const uint getWriteMask() const
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

    Public Members

    -[more]enum Function +[more]enum Function
    -[more]enum Operation +[more]enum Operation

    Protected Fields

    -[more]Function _func +[more]Function _func
    -[more]int _funcRef +[more]int _funcRef
    -[more]uint _funcMask +[more]uint _funcMask
    -[more]Operation _sfail +[more]Operation _sfail
    -[more]Operation _zfail +[more]Operation _zfail
    -[more]Operation _zpass +[more]Operation _zpass
    -[more]uint _writeMask +[more]uint _writeMask

    Protected Methods

    -[more]virtual ~Stencil() +[more]virtual ~Stencil()

    @@ -96,6 +93,20 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    ovirtual void compile(State&) const

    @@ -109,7 +120,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -143,116 +156,109 @@
    - +
    o Stencil()

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const + + +
    o META_StateAttribute(Stencil, STENCIL)

    - - -

    ovirtual Object* clone() const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - -

    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

    - +

    oenum Function

    - +
    o NEVER

    - +

    o LESS

    - +

    o EQUAL

    - +

    o LEQUAL

    - +

    o GREATER

    - +

    o NOTEQUAL

    - +

    o GEQUAL

    - +

    o ALWAYS

    - -
    oinline void setFunction(const Function func, int ref, uint mask) + +
    oinline void setFunction(const Function func, int ref, uint mask)

    - -

    oinline const Function getFunction() const + +
    oinline const Function getFunction() const

    - +

    oinline const int getFunctionRef() const

    - +

    oinline const uint getFunctionMask() const

    - +

    oenum Operation

    - +
    o KEEP

    - +

    o ZERO

    - +

    o REPLACE

    - +

    o INCR

    - +

    o DECR

    - +

    o INVERT

    - -
    oinline void setOperation(const Operation sfail, const Operation zfail, const Operation zpass) + +
    oinline void setOperation(const Operation sfail, const Operation zfail, const Operation zpass)
    set the operations to apply when the various stencil and depth tests fail or pass. First paramater is to control the operation when the stencil test fails. The second paramter is to control the @@ -262,62 +268,62 @@ and depth pass. Ordering of parameter is the same as if using glStencilOp(,,).

    - -

    oinline const Operation getStencilFailOperation() const + +
    oinline const Operation getStencilFailOperation() const
    get the operation when the stencil test fails

    - -

    oinline const Operation getStencilPassAndDepthFailOperation() const + +
    oinline const Operation getStencilPassAndDepthFailOperation() const
    get the operation when the stencil test passes but the depth test fails

    - -

    oinline const Operation getStencilPassAndDepthPassOperation() const + +
    oinline const Operation getStencilPassAndDepthPassOperation() const
    get the operation when both the stencil test and the depth test pass

    - +

    oinline void setWriteMask(uint mask)

    - +

    oinline const uint getWriteMask() const

    - +

    ovirtual void apply(State& state) const

    - +

    ovirtual ~Stencil()

    - -

    oFunction _func + +
    oFunction _func

    - +

    oint _funcRef

    - +

    ouint _funcMask

    - -

    oOperation _sfail + +
    oOperation _sfail

    - -

    oOperation _zfail + +
    oOperation _zfail

    - -

    oOperation _zpass + +
    oOperation _zpass

    - +

    ouint _writeMask

    diff --git a/doc/doc++/osg/Switch.html b/doc/doc++/osg/Switch.html index 890a9c033..597bb01b8 100644 --- a/doc/doc++/osg/Switch.html +++ b/doc/doc++/osg/Switch.html @@ -23,40 +23,34 @@

    Public Methods

    -[more] Switch() +[more] Switch()
    -[more]virtual Object* clone() const +[more] META_Node(Switch)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual void traverse(NodeVisitor& nv)
    -[more]virtual const char* className() const -
    -[more]virtual void accept(NodeVisitor& nv) -
    -[more]virtual void traverse(NodeVisitor& nv) -
    -[more]inline void setValue(const int value) +[more]inline void setValue(const int value)
    Selects the active child Node or enables a special SwitchType mode.
    -[more]inline const int getValue() const +[more]inline const int getValue() const
    Returns the number of the active child Node or the SwitchType

    Public Members

    -[more]enum SwitchType +[more]enum SwitchType
    Special mode values for the Switch.

    Protected Fields

    -[more]int _value +[more]int _value
    The current Switch value.

    Protected Methods

    -[more]virtual ~Switch() +[more]virtual ~Switch()

    @@ -98,6 +92,14 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual void accept(NodeVisitor& nv) +
    ovirtual void ascend(NodeVisitor& nv)
    oinline void setName( const std::string& name ) @@ -106,7 +108,7 @@
    oinline const std::string& getName() const
    -oinline const ParentList& getParents() const +oinline const ParentList& getParents() const
    oinline Group* getParent(const int i)
    @@ -114,7 +116,15 @@
    oinline const int getNumParents() const
    -oinline void setUserData(void* data, MemoryAdapter* ma=0L) +ovoid setAppCallback(NodeCallback* nc) +
    +oinline NodeCallback* getAppCallback() +
    +oinline const NodeCallback* getAppCallback() const +
    +oinline const int getNumChildrenRequiringAppTraversal() const +
    +oinline void setUserData(void* data, MemoryAdapter* ma=0L)
    oinline void* getUserData()
    @@ -128,9 +138,9 @@
    oinline const NodeMask getNodeMask() const
    -oinline const DescriptionList& getDescriptions() const +oinline const DescriptionList& getDescriptions() const
    -oinline DescriptionList& getDescriptions() +oinline DescriptionList& getDescriptions()
    oinline const std::string& getDescription(const int i) const
    @@ -166,7 +176,11 @@
    ostd::string _name
    -oParentList _parents +oParentList _parents +
    +oref_ptr<NodeCallback> _appCallback +
    +oint _numChildrenRequiringAppTraversal
    ovoid* _userData
    @@ -174,11 +188,16 @@
    oNodeMask _nodeMask
    -oDescriptionList _descriptions +oDescriptionList _descriptions
    oref_ptr<StateSet> _dstate

    +

    +

    Protected Methods

    +ovoid setNumChildrenRequiringAppTraversal(const int num) +

    +

    Inherited from Object:

    @@ -213,7 +232,7 @@ to represent the different states of a traffic light.
    - +
    oenum SwitchType
    Special mode values for the Switch. Use these if you want to @@ -221,62 +240,50 @@ turn on/off all child nodes.

    - +
    o ALL_CHILDREN_ON
    Turn on all children.

    - +

    o ALL_CHILDREN_OFF
    Turn off all children.

    - +
    o Switch()

    - - -

    ovirtual Object* clone() const -

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual void accept(NodeVisitor& nv) + + +
    o META_Node(Switch)

    - +

    ovirtual void traverse(NodeVisitor& nv)

    - +

    oinline void setValue(const int value)
    Selects the active child Node or enables a special SwitchType mode.
    Parameters:
    value - the number of the active child -(first child == number 0) or SwitchType. Invalid values +(first child == number 0) or SwitchType. Invalid values will be ignored.

    - +

    oinline const int getValue() const
    Returns the number of the active child Node or the SwitchType

    - +

    ovirtual ~Switch()

    - +

    oint _value
    The current Switch value.

    diff --git a/doc/doc++/osg/TexEnv.html b/doc/doc++/osg/TexEnv.html index cafc810ce..4ad3e1163 100644 --- a/doc/doc++/osg/TexEnv.html +++ b/doc/doc++/osg/TexEnv.html @@ -23,36 +23,33 @@

    Public Methods

    -[more] TexEnv( void ) +[more] TexEnv( void )
    -[more]virtual Object* clone() const +[more] META_StateAttribute(TexEnv, TEXENV)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]void setMode( const Mode mode )
    -[more]virtual const Type getType() const +[more]const Mode getMode() const
    -[more]void setMode( const Mode mode ) -
    -[more]const Mode getMode() const -
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

    Public Members

    -[more]enum Mode +[more]enum Mode

    Protected Fields

    -[more]Mode _mode +[more]Mode _mode

    Protected Methods

    -[more]virtual ~TexEnv( void ) +[more]virtual ~TexEnv( void )

    @@ -60,7 +57,21 @@

    Public Methods

    -ovirtual void setStateSetModes(StateSet&, const GLModeValue) const +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    +ovirtual void setStateSetModes(StateSet&, const GLModeValue) const
    ovirtual void compile(State&) const

    @@ -75,7 +86,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -109,66 +122,59 @@
    - +
    o TexEnv( void )

    - - -

    ovirtual Object* clone() const + + +
    o META_StateAttribute(TexEnv, TEXENV)

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - +

    oenum Mode

    - +
    o DECAL

    - +

    o MODULATE

    - +

    o BLEND

    - +

    o REPLACE

    - -
    ovoid setMode( const Mode mode ) + +
    ovoid setMode( const Mode mode )

    - -

    oconst Mode getMode() const + +
    oconst Mode getMode() const

    - +

    ovirtual void apply(State& state) const

    - +

    ovirtual ~TexEnv( void )

    - -

    oMode _mode + +
    oMode _mode


    This class has no child classes.
    diff --git a/doc/doc++/osg/TexGen.html b/doc/doc++/osg/TexGen.html index 1c20ce68c..5a4cdcc21 100644 --- a/doc/doc++/osg/TexGen.html +++ b/doc/doc++/osg/TexGen.html @@ -23,53 +23,50 @@

    Public Methods

    -[more] TexGen( void ) +[more] TexGen( void )
    -[more]virtual Object* clone() const +[more] META_StateAttribute(TexGen, TEXGEN)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
    -[more]virtual const Type getType() const +[more]virtual void apply(State& state) const
    -[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]inline void setMode( const Mode mode )
    -[more]virtual void apply(State& state) const +[more]const Mode getMode() const
    -[more]inline void setMode( const Mode mode ) +[more]void setPlane(const Coord which, const Vec4& plane)
    -[more]const Mode getMode() const -
    -[more]void setPlane(const Coord which, const Vec4& plane) -
    -[more]const Vec4& getPlane(const Coord which) const +[more]const Vec4& getPlane(const Coord which) const

    Public Members

    -[more]enum Mode +[more]enum Mode
    -[more]enum Coord +[more]enum Coord

    Protected Fields

    -[more]Mode _mode +[more]Mode _mode
    -[more]Vec4 _plane_s +[more]Vec4 _plane_s
    additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,
    -[more]Vec4 _plane_t +[more]Vec4 _plane_t
    -[more]Vec4 _plane_r +[more]Vec4 _plane_r
    -[more]Vec4 _plane_q +[more]Vec4 _plane_q

    Protected Methods

    -[more]virtual ~TexGen( void ) +[more]virtual ~TexGen( void )

    @@ -77,6 +74,20 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    ovirtual void compile(State&) const

    @@ -90,7 +101,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -124,112 +137,105 @@
    - +
    o TexGen( void )

    - - -

    ovirtual Object* clone() const + + +
    o META_StateAttribute(TexGen, TEXGEN)

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - -

    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

    - +

    ovirtual void apply(State& state) const

    - +

    oenum Mode

    - +
    o OBJECT_LINEAR

    - +

    o EYE_LINEAR

    - +

    o SPHERE_MAP

    - -
    oinline void setMode( const Mode mode ) + +
    oinline void setMode( const Mode mode )

    - -

    oconst Mode getMode() const + +
    oconst Mode getMode() const

    - +

    oenum Coord

    - +
    o S

    - +

    o T

    - +

    o R

    - +

    o Q

    - -
    ovoid setPlane(const Coord which, const Vec4& plane) + +
    ovoid setPlane(const Coord which, const Vec4& plane)

    - -

    oconst Vec4& getPlane(const Coord which) const + +
    oconst Vec4& getPlane(const Coord which) const

    - +

    ovirtual ~TexGen( void )

    - -

    oMode _mode + +
    oMode _mode

    - +

    oVec4 _plane_s
    additional texgen coefficents for GL_OBJECT_PLANE or GL_EYE_PLANE,

    - +

    oVec4 _plane_t

    - +

    oVec4 _plane_r

    - +

    oVec4 _plane_q

    diff --git a/doc/doc++/osg/TexMat.html b/doc/doc++/osg/TexMat.html index be525afee..a0abbc151 100644 --- a/doc/doc++/osg/TexMat.html +++ b/doc/doc++/osg/TexMat.html @@ -23,37 +23,34 @@

    Public Methods

    -[more] TexMat( void ) +[more] TexMat( void )
    -[more]virtual Object* clone() const +[more] META_StateAttribute(TexMat, TEXMAT)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const -
    -[more]virtual const Type getType() const -
    -[more]inline void setMatrix(const Matrix& matrix) +[more]inline void setMatrix(const Matrix& matrix)
    Set the texture matrix
    -[more]inline Matrix& getMatrix() +[more]inline Matrix& getMatrix()
    Get the texture matrix
    -[more]inline const Matrix& getMatrix() const +[more]inline const Matrix& getMatrix() const
    Get the const texture matrix
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const
    apply as OpenGL texture matrix

    Protected Fields

    -[more]Matrix _matrix +[more]Matrix _matrix

    Protected Methods

    -[more]virtual ~TexMat( void ) +[more]virtual ~TexMat( void )

    @@ -61,7 +58,21 @@

    Public Methods

    -ovirtual void setStateSetModes(StateSet&, const GLModeValue) const +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    +ovirtual void setStateSetModes(StateSet&, const GLModeValue) const
    ovirtual void compile(State&) const

    @@ -76,7 +87,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -110,51 +123,44 @@
    - +
    o TexMat( void )

    - - -

    ovirtual Object* clone() const + + +
    o META_StateAttribute(TexMat, TEXMAT)

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - +

    oinline void setMatrix(const Matrix& matrix)
    Set the texture matrix

    - +

    oinline Matrix& getMatrix()
    Get the texture matrix

    - +

    oinline const Matrix& getMatrix() const
    Get the const texture matrix

    - +

    ovirtual void apply(State& state) const
    apply as OpenGL texture matrix

    - +

    ovirtual ~TexMat( void )

    - +

    oMatrix _matrix

    diff --git a/doc/doc++/osg/Texture.html b/doc/doc++/osg/Texture.html index cfb6361f5..62efb766f 100644 --- a/doc/doc++/osg/Texture.html +++ b/doc/doc++/osg/Texture.html @@ -23,168 +23,182 @@

    Public Methods

    -[more] Texture() +[more] Texture()
    -[more]virtual Object* clone() const +[more] META_StateAttribute(Texture, (Type)(TEXTURE_0+_textureUnit))
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& rhs) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
    -[more]virtual const Type getType() const -
    -[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const -
    -[more]void setImage(Image* image) +[more]void setImage(Image* image)
    Set the texture image.
    -[more]Image* getImage() +[more]Image* getImage()
    Get the texture image.
    -[more]inline const Image* getImage() const +[more]inline const Image* getImage() const
    Get the const texture image.
    -[more]void copyTexImage2D(State& state, int x, int y, int width, int height ) +[more]void copyTexImage2D(State& state, int x, int y, int width, int height )
    Copy pixels into a 2D texture imageAs per glCopyTexImage2D.
    -[more]void copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, int y, int width, int height ) +[more]void copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, int y, int width, int height )
    Copy a two-dimensional texture subimage.
    -[more]inline void setTextureUnit(const unsigned int textureUnit) +[more]inline void setTextureUnit(const unsigned int textureUnit)
    Set the texture unit.
    -[more]inline const unsigned int getTextureUnit() const +[more]inline const unsigned int getTextureUnit() const
    get the texture unit
    -[more]void setWrap(const WrapParameter which, const WrapMode wrap) +[more]void setWrap(const WrapParameter which, const WrapMode wrap)
    Set the texture wrap mode
    -[more]const WrapMode getWrap(const WrapParameter which) const +[more]const WrapMode getWrap(const WrapParameter which) const
    Get the texture wrap mode
    -[more]void setFilter(const FilterParameter which, const FilterMode filter) +[more]void setFilter(const FilterParameter which, const FilterMode filter)
    Set the texture filter mode
    -[more]const FilterMode getFilter(const FilterParameter which) const +[more]const FilterMode getFilter(const FilterParameter which) const
    Get the texture filter mode
    -[more]inline void setInternalFormatMode(const InternalFormatMode mode) +[more]inline void setInternalFormatMode(const InternalFormatMode mode)
    Set the internal format mode.
    -[more]inline const InternalFormatMode getInternalFormatMode() const +[more]inline const InternalFormatMode getInternalFormatMode() const
    Get the internal format mode
    -[more]inline void setInternalFormatValue(const int internalFormat) +[more]inline void setInternalFormatValue(const int internalFormat)
    Set the internal format to use when creating OpenGL textures.
    -[more]inline const int getInternalFormatValue() const +[more]inline const int getInternalFormatValue() const
    Get the internal format to use when creating OpenGL textures
    -[more]inline const uint getTextureObject(const uint contextID) const +[more]inline const uint getTextureObject(const uint contextID) const
    return the OpenGL texture object for specified context
    -[more]inline const uint getTextureObjectSize() const +[more]inline const uint getTextureObjectSize() const
    return the memory size of texture object.
    -[more]inline void setSubloadMode(const SubloadMode mode) +[more]inline void setSubloadMode(const SubloadMode mode)
    Set the texture subload mode.
    -[more]inline const SubloadMode getSubloadMode() const +[more]inline const SubloadMode getSubloadMode() const
    Get the texture subload mode.
    -[more]inline void setSubloadOffset(const int x, const int y) +[more]inline void setSubloadOffset(const int x, const int y)
    Set the texture subload offsets.
    -[more]inline void getSubloadOffset(int& x, int& y) const +[more]inline void getSubloadOffset(int& x, int& y) const
    Get the texture subload offsets.
    -[more]inline uint& getHandle(const uint contextID) const +[more]inline GLuint& getHandle(const uint contextID) const
    Get the handle to the texture object for the current context
    -[more]void dirtyTextureObject() +[more]void dirtyTextureObject()
    Force a recompile on next apply() of associated OpenGL texture objects
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const
    On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture
    -[more]virtual void compile(State& state) const +[more]virtual void compile(State& state) const
    Compile the texture mip maps.
    -[more]virtual void applyImmediateMode(State& state) const +[more]virtual void applyImmediateMode(State& state) const
    Method which does the creation of the texture itself, and does not set or use texture binding.
    -[more]static void deleteTextureObject(uint contextID, uint handle) +[more]static void deleteTextureObject(uint contextID, GLuint handle)
    use deleteTextureObject instead of glDeleteTextures to allow OpenGL texture objects to cached until they can be deleted by the OpenGL context in which they were created, specified by contextID
    -[more]static void flushDeletedTextureObjects(uint contextID) +[more]static void flushDeletedTextureObjects(uint contextID)
    flush all the cached display list which need to be deleted in the OpenGL context related to contextID

    Public Members

    -[more]enum WrapParameter +[more]enum WrapParameter
    -[more]enum WrapMode +[more]enum WrapMode
    -[more]enum FilterParameter +[more]enum FilterParameter
    -[more]enum FilterMode +[more]enum FilterMode
    -[more]enum InternalFormatMode +[more]enum InternalFormatMode
    -[more]enum SubloadMode +[more]enum SubloadMode

    Protected Fields

    -[more]mutable uint _textureObjectSize +[more]mutable uint _textureObjectSize
    -[more]mutable ref_ptr<Image> _image +[more]mutable ref_ptr<Image> _image
    -[more]unsigned int _textureUnit +[more]unsigned int _textureUnit
    -[more]WrapMode _wrap_s +[more]WrapMode _wrap_s
    -[more]WrapMode _wrap_t +[more]WrapMode _wrap_t
    -[more]WrapMode _wrap_r +[more]WrapMode _wrap_r
    -[more]FilterMode _min_filter +[more]FilterMode _min_filter
    -[more]FilterMode _mag_filter +[more]FilterMode _mag_filter
    -[more]InternalFormatMode _internalFormatMode +[more]InternalFormatMode _internalFormatMode
    -[more]int _internalFormatValue +[more]int _internalFormatValue
    -[more]mutable unsigned int _textureWidth +[more]mutable unsigned int _textureWidth
    -[more]mutable unsigned int _textureHeight +[more]mutable unsigned int _textureHeight
    -[more]SubloadMode _subloadMode +[more]SubloadMode _subloadMode
    -[more]unsigned int _subloadOffsX +[more]unsigned int _subloadOffsX
    -[more]unsigned int _subloadOffsY +[more]unsigned int _subloadOffsY

    Protected Methods

    -[more]virtual ~Texture() +[more]virtual ~Texture()

    Protected Members

    -[more]typedef std::vector<uint> TextureNameList mutable TextureNameList _handleList +[more]typedef std::vector<GLuint> TextureNameList mutable TextureNameList _handleList
    -[more]typedef std::vector<uint> ImageModifiedTag mutable ImageModifiedTag _modifiedTag +[more]typedef std::vector<uint> ImageModifiedTag mutable ImageModifiedTag _modifiedTag
    -[more]typedef std::map<uint,std::set<uint> >static DeletedTextureObjectCache DeletedTextureObjectCache s_deletedTextureObjectCache +[more]typedef std::map<uint,std::set<uint> >static DeletedTextureObjectCache DeletedTextureObjectCache s_deletedTextureObjectCache


    Inherited from StateAttribute:

    +

    +

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +

    +

    Public Members

    otypedef GLenum GLMode @@ -195,7 +209,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -229,55 +245,48 @@
    - +
    o Texture()

    - - -

    ovirtual Object* clone() const + + +
    o META_StateAttribute(Texture, (Type)(TEXTURE_0+_textureUnit))

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& rhs) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - -

    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

    - +

    ovoid setImage(Image* image)
    Set the texture image.

    - +

    oImage* getImage()
    Get the texture image.

    - +

    oinline const Image* getImage() const
    Get the const texture image.

    - -

    ovoid copyTexImage2D(State& state, int x, int y, int width, int height ) + +
    ovoid copyTexImage2D(State& state, int x, int y, int width, int height )
    Copy pixels into a 2D texture imageAs per glCopyTexImage2D. Creates an OpenGL texture object from the current OpenGL background framebuffer contents at pos \a x, \a y with width \a width and height \a height. \a width and \a height must be a power of two.

    - -

    ovoid copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, int y, int width, int height ) + +
    ovoid copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, int y, int width, int height )
    Copy a two-dimensional texture subimage. As per glCopyTexSubImage2D. Updates portion of an exisiting OpenGL texture object from the current OpenGL background framebuffer contents at pos \a x, \a y with width \a width and @@ -285,7 +294,7 @@ height \a height. \a width and \a height must be a power of two, and writing into the texture with offset \a xoffset and \a yoffset.

    - +

    oinline void setTextureUnit(const unsigned int textureUnit)
    Set the texture unit. Valid values are 0,1,2,3. @@ -293,175 +302,175 @@ Default value of texture unit is 0. note, multi-texturing not fully implemented yet... April 2001.

    - +

    oinline const unsigned int getTextureUnit() const
    get the texture unit

    - +

    oenum WrapParameter

    - +
    o WRAP_S

    - +

    o WRAP_T

    - +

    o WRAP_R

    - +
    oenum WrapMode

    - +
    o CLAMP

    - +

    o REPEAT

    - +

    o MIRROR

    - -
    ovoid setWrap(const WrapParameter which, const WrapMode wrap) + +
    ovoid setWrap(const WrapParameter which, const WrapMode wrap)
    Set the texture wrap mode

    - -

    oconst WrapMode getWrap(const WrapParameter which) const + +
    oconst WrapMode getWrap(const WrapParameter which) const
    Get the texture wrap mode

    - +

    oenum FilterParameter

    - +
    o MIN_FILTER

    - +

    o MAG_FILTER

    - +
    oenum FilterMode

    - +
    o LINEAR

    - +

    o LINEAR_MIPMAP_LINEAR

    - +

    o LINEAR_MIPMAP_NEAREST

    - +

    o NEAREST

    - +

    o NEAREST_MIPMAP_LINEAR

    - +

    o NEAREST_MIPMAP_NEAREST

    - +

    o ANISOTROPIC

    - -
    ovoid setFilter(const FilterParameter which, const FilterMode filter) + +
    ovoid setFilter(const FilterParameter which, const FilterMode filter)
    Set the texture filter mode

    - -

    oconst FilterMode getFilter(const FilterParameter which) const + +
    oconst FilterMode getFilter(const FilterParameter which) const
    Get the texture filter mode

    - +

    oenum InternalFormatMode

    - +
    o USE_IMAGE_DATA_FORMAT

    - +

    o USE_USER_DEFINED_FORMAT

    - +

    o USE_ARB_COMPRESSION

    - +

    o USE_S3TC_DXT1_COMPRESSION

    - +

    o USE_S3TC_DXT3_COMPRESSION

    - +

    o USE_S3TC_DXT5_COMPRESSION

    - -
    oinline void setInternalFormatMode(const InternalFormatMode mode) + +
    oinline void setInternalFormatMode(const InternalFormatMode mode)
    Set the internal format mode. Note, If the mode is set USE_IMAGE_DATA_FORMAT, USE_ARB_COMPRESSION, USE_S3TC_COMPRESSION the internalFormat is automatically selected, and will overwrite the previous _internalFormatValue.

    - -

    oinline const InternalFormatMode getInternalFormatMode() const + +
    oinline const InternalFormatMode getInternalFormatMode() const
    Get the internal format mode

    - -

    oinline void setInternalFormatValue(const int internalFormat) + +
    oinline void setInternalFormatValue(const int internalFormat)
    Set the internal format to use when creating OpenGL textures. Also sets the internalFormatMode to USE_USER_DEFINED_FORMAT.

    - +

    oinline const int getInternalFormatValue() const
    Get the internal format to use when creating OpenGL textures

    - +

    oinline const uint getTextureObject(const uint contextID) const
    return the OpenGL texture object for specified context

    - +

    oinline const uint getTextureObjectSize() const
    return the memory size of texture object. Texture object size can be used for estimating the cost of @@ -469,158 +478,158 @@ uploading the texture to graphics hardware, which inturn can be used for setting texture residence priorities.

    - +

    oenum SubloadMode

    - +
    o OFF

    - +

    o AUTO

    - +

    o IF_DIRTY

    - -
    oinline void setSubloadMode(const SubloadMode mode) + +
    oinline void setSubloadMode(const SubloadMode mode)
    Set the texture subload mode.

    - -

    oinline const SubloadMode getSubloadMode() const + +
    oinline const SubloadMode getSubloadMode() const
    Get the texture subload mode.

    - -

    oinline void setSubloadOffset(const int x, const int y) + +
    oinline void setSubloadOffset(const int x, const int y)
    Set the texture subload offsets.

    - -

    oinline void getSubloadOffset(int& x, int& y) const + +
    oinline void getSubloadOffset(int& x, int& y) const
    Get the texture subload offsets.

    - -

    oinline uint& getHandle(const uint contextID) const + +
    oinline GLuint& getHandle(const uint contextID) const
    Get the handle to the texture object for the current context

    - +

    ovoid dirtyTextureObject()
    Force a recompile on next apply() of associated OpenGL texture objects

    - +

    ovirtual void apply(State& state) const
    On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture

    - +

    ovirtual void compile(State& state) const
    Compile the texture mip maps. Implemented by simply calling apply().

    - +

    ovirtual void applyImmediateMode(State& state) const
    Method which does the creation of the texture itself, and does not set or use texture binding.

    - -

    ostatic void deleteTextureObject(uint contextID, uint handle) + +
    ostatic void deleteTextureObject(uint contextID, GLuint handle)
    use deleteTextureObject instead of glDeleteTextures to allow OpenGL texture objects to cached until they can be deleted by the OpenGL context in which they were created, specified by contextID

    - +

    ostatic void flushDeletedTextureObjects(uint contextID)
    flush all the cached display list which need to be deleted in the OpenGL context related to contextID

    - +

    ovirtual ~Texture()

    - -

    otypedef std::vector<uint> TextureNameList mutable TextureNameList _handleList + +
    otypedef std::vector<GLuint> TextureNameList mutable TextureNameList _handleList

    - +

    otypedef std::vector<uint> ImageModifiedTag mutable ImageModifiedTag _modifiedTag

    - +

    omutable uint _textureObjectSize

    - +

    omutable ref_ptr<Image> _image

    - +

    ounsigned int _textureUnit

    - -

    oWrapMode _wrap_s + +
    oWrapMode _wrap_s

    - -

    oWrapMode _wrap_t + +
    oWrapMode _wrap_t

    - -

    oWrapMode _wrap_r + +
    oWrapMode _wrap_r

    - -

    oFilterMode _min_filter + +
    oFilterMode _min_filter

    - -

    oFilterMode _mag_filter + +
    oFilterMode _mag_filter

    - -

    oInternalFormatMode _internalFormatMode + +
    oInternalFormatMode _internalFormatMode

    - +

    oint _internalFormatValue

    - +

    omutable unsigned int _textureWidth

    - +

    omutable unsigned int _textureHeight

    - -

    oSubloadMode _subloadMode + +
    oSubloadMode _subloadMode

    - +

    ounsigned int _subloadOffsX

    - +

    ounsigned int _subloadOffsY

    - +

    otypedef std::map<uint,std::set<uint> >static DeletedTextureObjectCache DeletedTextureObjectCache s_deletedTextureObjectCache

    diff --git a/doc/doc++/osg/Timer.html b/doc/doc++/osg/Timer.html index 2d09454ca..d457b58d9 100644 --- a/doc/doc++/osg/Timer.html +++ b/doc/doc++/osg/Timer.html @@ -13,23 +13,21 @@

    Public Methods

    -[more] Timer( void ) +[more] Timer()
    -[more] ~Timer( void ) +[more] ~Timer()
    -[more]pragmaoptimize ("", off)( void ) +[more]inline double delta_s( Timer_t t1, Timer_t t2 ) const
    -[more]pragmaoptimize("", on)(x) (".byte 0x0f, 0x31" : "=A" (x))( void ) +[more]inline double delta_m( Timer_t t1, Timer_t t2 ) const
    -[more]inline Timer_t tick( void ) +[more]inline double delta_u( Timer_t t1, Timer_t t2 ) const
    -[more]double delta_s( Timer_t t1, Timer_t t2 ) +[more]inline double delta_n( Timer_t t1, Timer_t t2 ) const
    -[more]double delta_m( Timer_t t1, Timer_t t2 ) +[more]inline Timer_t tick()
    -[more]Timer_t delta_u( Timer_t t1, Timer_t t2 ) -
    -[more]Timer_t delta_n( Timer_t t1, Timer_t t2 ) +[more]inline Timer_t tick( void )

    @@ -41,40 +39,36 @@
    - -
    o Timer( void ) + +
    o Timer()

    - -

    o ~Timer( void ) -

    - - -

    opragmaoptimize ("", off)( void ) -

    - - -

    opragmaoptimize("", on)(x) (".byte 0x0f, 0x31" : "=A" (x))( void ) -

    - - -

    oinline Timer_t tick( void ) + +
    o ~Timer()

    - -

    odouble delta_s( Timer_t t1, Timer_t t2 ) + +
    oinline double delta_s( Timer_t t1, Timer_t t2 ) const

    - -

    odouble delta_m( Timer_t t1, Timer_t t2 ) + +
    oinline double delta_m( Timer_t t1, Timer_t t2 ) const

    - -

    oTimer_t delta_u( Timer_t t1, Timer_t t2 ) + +
    oinline double delta_u( Timer_t t1, Timer_t t2 ) const

    - -

    oTimer_t delta_n( Timer_t t1, Timer_t t2 ) + +
    oinline double delta_n( Timer_t t1, Timer_t t2 ) const +

    + + +

    oinline Timer_t tick() +

    + + +

    oinline Timer_t tick( void )


    This class has no child classes.
    diff --git a/doc/doc++/osg/Transform.html b/doc/doc++/osg/Transform.html index bc8c2d52c..7a40a1081 100644 --- a/doc/doc++/osg/Transform.html +++ b/doc/doc++/osg/Transform.html @@ -23,43 +23,37 @@

    Public Methods

    -[more] Transform() +[more] Transform()
    -[more] Transform(const Matrix& matix) +[more] Transform(const Matrix& matix)
    -[more]virtual Object* clone() const +[more] META_Node(Transform)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]void setMatrix(const Matrix& mat )
    -[more]virtual const char* className() const +[more]inline Matrix& getMatrix()
    -[more]virtual void accept(NodeVisitor& nv) +[more]inline const Matrix& getMatrix() const
    -[more]void setMatrix(const Matrix& mat ) +[more]void preMult( const Matrix& mat )
    -[more]inline Matrix& getMatrix() +[more]void preScale( const float sx, const float sy, const float sz )
    -[more]inline const Matrix& getMatrix() const +[more]void preTranslate( const float tx, const float ty, const float tz )
    -[more]void preMult( const Matrix& mat ) -
    -[more]void preScale( const float sx, const float sy, const float sz ) -
    -[more]void preTranslate( const float tx, const float ty, const float tz ) -
    -[more]void preRotate( const float deg, const float x, const float y, const float z ) +[more]void preRotate( const float deg, const float x, const float y, const float z )

    Protected Fields

    -[more]ref_ptr<Matrix> _matrix +[more]ref_ptr<Matrix> _matrix

    Protected Methods

    -[more]virtual ~Transform() +[more]virtual ~Transform()
    -[more]virtual const bool computeBound() const +[more]virtual const bool computeBound() const

    @@ -98,6 +92,14 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual void accept(NodeVisitor& nv) +
    ovirtual void ascend(NodeVisitor& nv)
    oinline void setName( const std::string& name ) @@ -106,7 +108,7 @@
    oinline const std::string& getName() const
    -oinline const ParentList& getParents() const +oinline const ParentList& getParents() const
    oinline Group* getParent(const int i)
    @@ -114,7 +116,15 @@
    oinline const int getNumParents() const
    -oinline void setUserData(void* data, MemoryAdapter* ma=0L) +ovoid setAppCallback(NodeCallback* nc) +
    +oinline NodeCallback* getAppCallback() +
    +oinline const NodeCallback* getAppCallback() const +
    +oinline const int getNumChildrenRequiringAppTraversal() const +
    +oinline void setUserData(void* data, MemoryAdapter* ma=0L)
    oinline void* getUserData()
    @@ -128,9 +138,9 @@
    oinline const NodeMask getNodeMask() const
    -oinline const DescriptionList& getDescriptions() const +oinline const DescriptionList& getDescriptions() const
    -oinline DescriptionList& getDescriptions() +oinline DescriptionList& getDescriptions()
    oinline const std::string& getDescription(const int i) const
    @@ -166,7 +176,11 @@
    ostd::string _name
    -oParentList _parents +oParentList _parents +
    +oref_ptr<NodeCallback> _appCallback +
    +oint _numChildrenRequiringAppTraversal
    ovoid* _userData
    @@ -174,11 +188,16 @@
    oNodeMask _nodeMask
    -oDescriptionList _descriptions +oDescriptionList _descriptions
    oref_ptr<StateSet> _dstate

    +

    +

    Protected Methods

    +ovoid setNumChildrenRequiringAppTraversal(const int num) +

    +

    Inherited from Object:

    @@ -213,67 +232,55 @@ producing trakerball functionality or for animatiion.
    - +
    o Transform()

    - +

    o Transform(const Matrix& matix)

    - - -

    ovirtual Object* clone() const -

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual void accept(NodeVisitor& nv) + + +
    o META_Node(Transform)

    - +

    ovoid setMatrix(const Matrix& mat )

    - +

    oinline Matrix& getMatrix()

    - +

    oinline const Matrix& getMatrix() const

    - +

    ovoid preMult( const Matrix& mat )

    - +

    ovoid preScale( const float sx, const float sy, const float sz )

    - +

    ovoid preTranslate( const float tx, const float ty, const float tz )

    - -

    ovoid preRotate( const float deg, const float x, const float y, const float z ) + +
    ovoid preRotate( const float deg, const float x, const float y, const float z )

    - +

    ovirtual ~Transform()

    - +

    ovirtual const bool computeBound() const

    - +

    oref_ptr<Matrix> _matrix

    diff --git a/doc/doc++/osg/Transparency.html b/doc/doc++/osg/Transparency.html index b2f10218e..116a7e24b 100644 --- a/doc/doc++/osg/Transparency.html +++ b/doc/doc++/osg/Transparency.html @@ -23,46 +23,43 @@

    Public Methods

    -[more] Transparency() +[more] Transparency()
    -[more]virtual Object* clone() const +[more] META_StateAttribute(Transparency, TRANSPARENCY)
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
    -[more]virtual const Type getType() const +[more]inline void setFunction( const int source, const int destination )
    -[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const +[more]void setSource(const int source)
    -[more]inline void setFunction( const int source, const int destination ) +[more]inline const int getSource() const
    -[more]void setSource(const int source) +[more]void setDestination(const int destination)
    -[more]inline const int getSource() const +[more]inline const int getDestination() const
    -[more]void setDestination(const int destination) -
    -[more]inline const int getDestination() const -
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

    Public Members

    -[more]enum TransparencyMode +[more]enum TransparencyMode

    Protected Fields

    -[more]int _source_factor +[more]int _source_factor
    -[more]int _destination_factor +[more]int _destination_factor

    Protected Methods

    -[more]virtual ~Transparency() +[more]virtual ~Transparency()

    @@ -70,6 +67,20 @@

    Public Methods

    +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    ovirtual void compile(State&) const

    @@ -83,7 +94,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -117,113 +130,106 @@
    - +
    o Transparency()

    - - -

    ovirtual Object* clone() const + + +
    o META_StateAttribute(Transparency, TRANSPARENCY)

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - -

    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const + +
    ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

    - +

    oenum TransparencyMode

    - +
    o DST_ALPHA

    - +

    o DST_COLOR

    - +

    o ONE

    - +

    o ONE_MINUS_DST_ALPHA

    - +

    o ONE_MINUS_DST_COLOR

    - +

    o ONE_MINUS_SRC_ALPHA

    - +

    o ONE_MINUS_SRC_COLOR

    - +

    o SRC_ALPHA

    - +

    o SRC_ALPHA_SATURATE

    - +

    o SRC_COLOR

    - +

    o ZERO

    - +
    oinline void setFunction( const int source, const int destination )

    - +

    ovoid setSource(const int source)

    - +

    oinline const int getSource() const

    - +

    ovoid setDestination(const int destination)

    - +

    oinline const int getDestination() const

    - +

    ovirtual void apply(State& state) const

    - +

    ovirtual ~Transparency()

    - +

    oint _source_factor

    - +

    oint _destination_factor

    diff --git a/doc/doc++/osg/Vec2.html b/doc/doc++/osg/Vec2.html index 83dd94ee7..c8d7ce624 100644 --- a/doc/doc++/osg/Vec2.html +++ b/doc/doc++/osg/Vec2.html @@ -13,74 +13,74 @@

    Public Fields

    -[more]float _v[2] +[more]float _v[2]

    Public Methods

    -[more] Vec2() +[more] Vec2()
    -[more] Vec2(float x, float y) +[more] Vec2(float x, float y)
    -[more]const bool operator == (const Vec2& v) const +[more]const bool operator == (const Vec2& v) const
    -[more]const bool operator < (const Vec2& v) const +[more]const bool operator < (const Vec2& v) const
    -[more]inline float* ptr() +[more]inline float* ptr()
    -[more]inline const float* ptr() const +[more]inline const float* ptr() const
    -[more]inline void set( float x, float y ) +[more]inline void set( float x, float y )
    -[more]inline float& operator [] (int i) +[more]inline float& operator [] (int i)
    -[more]inline const float operator [] (int i) const +[more]inline const float operator [] (int i) const
    -[more]inline float& x() +[more]inline float& x()
    -[more]inline float& y() +[more]inline float& y()
    -[more]inline const float x() const +[more]inline const float x() const
    -[more]inline const float y() const +[more]inline const float y() const
    -[more]inline const float operator * (const Vec2& rhs) const +[more]inline const float operator * (const Vec2& rhs) const
    dot product
    -[more]inline const Vec2 operator * (const float& rhs) const +[more]inline const Vec2 operator * (const float& rhs) const
    multiply by scalar
    -[more]inline Vec2& operator *= (const float& rhs) +[more]inline Vec2& operator *= (const float& rhs)
    unary multiply by scalar
    -[more]inline const Vec2 operator / (const float& rhs) const +[more]inline const Vec2 operator / (const float& rhs) const
    divide by scalar
    -[more]inline Vec2& operator /= (const float& rhs) +[more]inline Vec2& operator /= (const float& rhs)
    unary divide by scalar
    -[more]inline const Vec2 operator + (const Vec2& rhs) const +[more]inline const Vec2 operator + (const Vec2& rhs) const
    binary vector add
    -[more]inline Vec2& operator += (const Vec2& rhs) +[more]inline Vec2& operator += (const Vec2& rhs)
    unary vector add.
    -[more]inline const Vec2 operator - (const Vec2& rhs) const +[more]inline const Vec2 operator - (const Vec2& rhs) const
    binary vector subract
    -[more]inline Vec2& operator -= (const Vec2& rhs) +[more]inline Vec2& operator -= (const Vec2& rhs)
    unary vector subract
    -[more]inline const Vec2 operator - () const +[more]inline const Vec2 operator - () const
    negation operator.
    -[more]inline const float length() const +[more]inline const float length() const
    Length of the vector = sqrt( vec .
    -[more]inline const float length2( void ) const +[more]inline const float length2( void ) const
    Length squared of the vector = vec .
    -[more]inline const float normalize() +[more]inline const float normalize()
    normalize the vector so that it has length unity returns the previous length of the vector

    @@ -97,124 +97,124 @@ BTW: Vec2 * float is okay
    - +
    o Vec2()

    - -

    o Vec2(float x, float y) + +
    o Vec2(float x, float y)

    - +

    ofloat _v[2]

    - +

    oconst bool operator == (const Vec2& v) const

    - +

    oconst bool operator < (const Vec2& v) const

    - +

    oinline float* ptr()

    - +

    oinline const float* ptr() const

    - -

    oinline void set( float x, float y ) + +
    oinline void set( float x, float y )

    - +

    oinline float& operator [] (int i)

    - +

    oinline const float operator [] (int i) const

    - +

    oinline float& x()

    - +

    oinline float& y()

    - +

    oinline const float x() const

    - +

    oinline const float y() const

    - +

    oinline const float operator * (const Vec2& rhs) const
    dot product

    - +

    oinline const Vec2 operator * (const float& rhs) const
    multiply by scalar

    - +

    oinline Vec2& operator *= (const float& rhs)
    unary multiply by scalar

    - +

    oinline const Vec2 operator / (const float& rhs) const
    divide by scalar

    - +

    oinline Vec2& operator /= (const float& rhs)
    unary divide by scalar

    - +

    oinline const Vec2 operator + (const Vec2& rhs) const
    binary vector add

    - +

    oinline Vec2& operator += (const Vec2& rhs)
    unary vector add. Slightly more efficient because no temporary intermediate object.

    - +

    oinline const Vec2 operator - (const Vec2& rhs) const
    binary vector subract

    - +

    oinline Vec2& operator -= (const Vec2& rhs)
    unary vector subract

    - +

    oinline const Vec2 operator - () const
    negation operator. Returns the negative of the Vec2

    - +

    oinline const float length() const
    Length of the vector = sqrt( vec . vec )

    - +

    oinline const float length2( void ) const
    Length squared of the vector = vec . vec

    - +

    oinline const float normalize()
    normalize the vector so that it has length unity returns the previous length of the vector diff --git a/doc/doc++/osg/Vec3.html b/doc/doc++/osg/Vec3.html index 8ddb18cab..35e2c6057 100644 --- a/doc/doc++/osg/Vec3.html +++ b/doc/doc++/osg/Vec3.html @@ -13,81 +13,81 @@

    Public Fields

    -[more]float _v[3] +[more]float _v[3]

    Public Methods

    -[more] Vec3() +[more] Vec3()
    -[more] Vec3(float x, float y, float z) +[more] Vec3(float x, float y, float z)
    -[more]inline const bool operator == (const Vec3& v) const +[more]inline const bool operator == (const Vec3& v) const
    -[more]inline const bool operator < (const Vec3& v) const +[more]inline const bool operator < (const Vec3& v) const
    -[more]inline float* ptr() +[more]inline float* ptr()
    -[more]inline const float* ptr() const +[more]inline const float* ptr() const
    -[more]inline void set( float x, float y, float z) +[more]inline void set( float x, float y, float z)
    -[more]inline float& operator [] (int i) +[more]inline float& operator [] (int i)
    -[more]inline const float operator [] (int i) const +[more]inline const float operator [] (int i) const
    -[more]inline float& x() +[more]inline float& x()
    -[more]inline float& y() +[more]inline float& y()
    -[more]inline float& z() +[more]inline float& z()
    -[more]inline const float x() const +[more]inline const float x() const
    -[more]inline const float y() const +[more]inline const float y() const
    -[more]inline const float z() const +[more]inline const float z() const
    -[more]inline float operator * (const Vec3& rhs) const +[more]inline float operator * (const Vec3& rhs) const
    dot product
    -[more]inline const Vec3 operator ^ (const Vec3& rhs) const +[more]inline const Vec3 operator ^ (const Vec3& rhs) const
    cross product
    -[more]inline const Vec3 operator * (const float& rhs) const +[more]inline const Vec3 operator * (const float& rhs) const
    multiply by scalar
    -[more]inline Vec3& operator *= (const float& rhs) +[more]inline Vec3& operator *= (const float& rhs)
    unary multiply by scalar
    -[more]inline const Vec3 operator / (const float& rhs) const +[more]inline const Vec3 operator / (const float& rhs) const
    divide by scalar
    -[more]inline Vec3& operator /= (const float& rhs) +[more]inline Vec3& operator /= (const float& rhs)
    unary divide by scalar
    -[more]inline const Vec3 operator + (const Vec3& rhs) const +[more]inline const Vec3 operator + (const Vec3& rhs) const
    binary vector add
    -[more]inline Vec3& operator += (const Vec3& rhs) +[more]inline Vec3& operator += (const Vec3& rhs)
    unary vector add.
    -[more]inline const Vec3 operator - (const Vec3& rhs) const +[more]inline const Vec3 operator - (const Vec3& rhs) const
    binary vector subract
    -[more]inline Vec3& operator -= (const Vec3& rhs) +[more]inline Vec3& operator -= (const Vec3& rhs)
    unary vector subract
    -[more]inline const Vec3 operator - () const +[more]inline const Vec3 operator - () const
    negation operator.
    -[more]inline const float length() const +[more]inline const float length() const
    Length of the vector = sqrt( vec .
    -[more]inline const float length2() const +[more]inline const float length2() const
    Length squared of the vector = vec .
    -[more]inline const float normalize() +[more]inline const float normalize()
    normalize the vector so that it has length unity returns the previous length of the vector

    @@ -104,137 +104,137 @@ Vec3 * float is okay
    - +
    o Vec3()

    - -

    o Vec3(float x, float y, float z) + +
    o Vec3(float x, float y, float z)

    - +

    ofloat _v[3]

    - +

    oinline const bool operator == (const Vec3& v) const

    - +

    oinline const bool operator < (const Vec3& v) const

    - +

    oinline float* ptr()

    - +

    oinline const float* ptr() const

    - -

    oinline void set( float x, float y, float z) + +
    oinline void set( float x, float y, float z)

    - +

    oinline float& operator [] (int i)

    - +

    oinline const float operator [] (int i) const

    - +

    oinline float& x()

    - +

    oinline float& y()

    - +

    oinline float& z()

    - +

    oinline const float x() const

    - +

    oinline const float y() const

    - +

    oinline const float z() const

    - +

    oinline float operator * (const Vec3& rhs) const
    dot product

    - +

    oinline const Vec3 operator ^ (const Vec3& rhs) const
    cross product

    - +

    oinline const Vec3 operator * (const float& rhs) const
    multiply by scalar

    - +

    oinline Vec3& operator *= (const float& rhs)
    unary multiply by scalar

    - +

    oinline const Vec3 operator / (const float& rhs) const
    divide by scalar

    - +

    oinline Vec3& operator /= (const float& rhs)
    unary divide by scalar

    - +

    oinline const Vec3 operator + (const Vec3& rhs) const
    binary vector add

    - +

    oinline Vec3& operator += (const Vec3& rhs)
    unary vector add. Slightly more efficient because no temporary intermediate object

    - +

    oinline const Vec3 operator - (const Vec3& rhs) const
    binary vector subract

    - +

    oinline Vec3& operator -= (const Vec3& rhs)
    unary vector subract

    - +

    oinline const Vec3 operator - () const
    negation operator. Returns the negative of the Vec3

    - +

    oinline const float length() const
    Length of the vector = sqrt( vec . vec )

    - +

    oinline const float length2() const
    Length squared of the vector = vec . vec

    - +

    oinline const float normalize()
    normalize the vector so that it has length unity returns the previous length of the vector diff --git a/doc/doc++/osg/Vec4.html b/doc/doc++/osg/Vec4.html index fbbb0309c..9ce3f7646 100644 --- a/doc/doc++/osg/Vec4.html +++ b/doc/doc++/osg/Vec4.html @@ -13,82 +13,82 @@

    Public Fields

    -[more]float _v[4] +[more]float _v[4]

    Public Methods

    -[more] Vec4() +[more] Vec4()
    -[more] Vec4(float x, float y, float z, float w) +[more] Vec4(float x, float y, float z, float w)
    -[more]inline const bool operator == (const Vec4& v) const +[more]inline const bool operator == (const Vec4& v) const
    -[more]inline const bool operator < (const Vec4& v) const +[more]inline const bool operator < (const Vec4& v) const
    -[more]inline float* ptr() +[more]inline float* ptr()
    -[more]inline const float* ptr() const +[more]inline const float* ptr() const
    -[more]inline void set( float x, float y, float z, float w) +[more]inline void set( float x, float y, float z, float w)
    -[more]inline float& operator [] (const int i) +[more]inline float& operator [] (const int i)
    -[more]inline float operator [] (const int i) const +[more]inline float operator [] (const int i) const
    -[more]inline float& x() +[more]inline float& x()
    -[more]inline float& y() +[more]inline float& y()
    -[more]inline float& z() +[more]inline float& z()
    -[more]inline float& w() +[more]inline float& w()
    -[more]inline float x() const +[more]inline float x() const
    -[more]inline float y() const +[more]inline float y() const
    -[more]inline float z() const +[more]inline float z() const
    -[more]inline float w() const +[more]inline float w() const
    -[more]inline float operator * (const Vec4& rhs) const +[more]inline float operator * (const Vec4& rhs) const
    dot product
    -[more]inline Vec4 operator * (const float& rhs) const +[more]inline Vec4 operator * (const float& rhs) const
    multiply by scalar
    -[more]inline Vec4& operator *= (const float& rhs) +[more]inline Vec4& operator *= (const float& rhs)
    unary multiply by scalar
    -[more]inline Vec4 operator / (const float& rhs) const +[more]inline Vec4 operator / (const float& rhs) const
    divide by scalar
    -[more]inline Vec4& operator /= (const float& rhs) +[more]inline Vec4& operator /= (const float& rhs)
    unary divide by scalar
    -[more]inline Vec4 operator + (const Vec4& rhs) const +[more]inline Vec4 operator + (const Vec4& rhs) const
    binary vector add
    -[more]inline Vec4& operator += (const Vec4& rhs) +[more]inline Vec4& operator += (const Vec4& rhs)
    unary vector add.
    -[more]inline Vec4 operator - (const Vec4& rhs) const +[more]inline Vec4 operator - (const Vec4& rhs) const
    binary vector subract
    -[more]inline Vec4& operator -= (const Vec4& rhs) +[more]inline Vec4& operator -= (const Vec4& rhs)
    unary vector subract
    -[more]inline const Vec4 operator - () const +[more]inline const Vec4 operator - () const
    negation operator.
    -[more]inline const float length() const +[more]inline const float length() const
    Length of the vector = sqrt( vec .
    -[more]inline const float length2() const +[more]inline const float length2() const
    Length squared of the vector = vec .
    -[more]inline const float normalize() +[more]inline const float normalize()
    normalize the vector so that it has length unity returns the previous length of the vector

    @@ -105,140 +105,140 @@ Vec4 * float is okay
    - +
    o Vec4()

    - -

    o Vec4(float x, float y, float z, float w) + +
    o Vec4(float x, float y, float z, float w)

    - +

    ofloat _v[4]

    - +

    oinline const bool operator == (const Vec4& v) const

    - +

    oinline const bool operator < (const Vec4& v) const

    - +

    oinline float* ptr()

    - +

    oinline const float* ptr() const

    - -

    oinline void set( float x, float y, float z, float w) + +
    oinline void set( float x, float y, float z, float w)

    - +

    oinline float& operator [] (const int i)

    - +

    oinline float operator [] (const int i) const

    - +

    oinline float& x()

    - +

    oinline float& y()

    - +

    oinline float& z()

    - +

    oinline float& w()

    - +

    oinline float x() const

    - +

    oinline float y() const

    - +

    oinline float z() const

    - +

    oinline float w() const

    - +

    oinline float operator * (const Vec4& rhs) const
    dot product

    - +

    oinline Vec4 operator * (const float& rhs) const
    multiply by scalar

    - +

    oinline Vec4& operator *= (const float& rhs)
    unary multiply by scalar

    - +

    oinline Vec4 operator / (const float& rhs) const
    divide by scalar

    - +

    oinline Vec4& operator /= (const float& rhs)
    unary divide by scalar

    - +

    oinline Vec4 operator + (const Vec4& rhs) const
    binary vector add

    - +

    oinline Vec4& operator += (const Vec4& rhs)
    unary vector add. Slightly more efficient because no temporary intermediate object

    - +

    oinline Vec4 operator - (const Vec4& rhs) const
    binary vector subract

    - +

    oinline Vec4& operator -= (const Vec4& rhs)
    unary vector subract

    - +

    oinline const Vec4 operator - () const
    negation operator. Returns the negative of the Vec4

    - +

    oinline const float length() const
    Length of the vector = sqrt( vec . vec )

    - +

    oinline const float length2() const
    Length squared of the vector = vec . vec

    - +

    oinline const float normalize()
    normalize the vector so that it has length unity returns the previous length of the vector diff --git a/doc/doc++/osg/Viewport.html b/doc/doc++/osg/Viewport.html index ed736af69..db56cb9e1 100644 --- a/doc/doc++/osg/Viewport.html +++ b/doc/doc++/osg/Viewport.html @@ -23,48 +23,45 @@

    Public Methods

    -[more] Viewport() +[more] Viewport()
    -[more]virtual bool isSameKindAs(const Object* obj) const +[more] META_StateAttribute(Viewport, VIEWPORT)
    -[more]virtual Object* clone() const +[more]virtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
    -[more]virtual const char* className() const +[more]inline void setViewport(const int x, const int y, const int width, const int height)
    -[more]virtual const Type getType() const +[more]void getViewport(int& x, int& y, int& width, int& height)
    -[more]inline void setViewport(const int x, const int y, const int width, const int height) +[more]inline const int x() const
    -[more]void getViewport(int& x, int& y, int& width, int& height) +[more]inline const int y() const
    -[more]inline const int x() const +[more]inline const int width() const
    -[more]inline const int y() const +[more]inline const int height() const
    -[more]inline const int width() const -
    -[more]inline const int height() const -
    -[more]inline const float aspectRatio() const +[more]inline const float aspectRatio() const
    return the aspcetRatio of the viewport, which is equal to width/height
    -[more]virtual void apply(State& state) const +[more]virtual void apply(State& state) const

    Protected Fields

    -[more]int _x +[more]int _x
    -[more]int _y +[more]int _y
    -[more]int _width +[more]int _width
    -[more]int _height +[more]int _height

    Protected Methods

    -[more]virtual ~Viewport() +[more]virtual ~Viewport()

    @@ -72,7 +69,21 @@

    Public Methods

    -ovirtual void setStateSetModes(StateSet&, const GLModeValue) const +ovirtual Object* clone() const +
    +ovirtual bool isSameKindAs(const Object* obj) const +
    +ovirtual const char* className() const +
    +ovirtual const Type getType() const +
    +obool operator < (const StateAttribute& rhs) const +
    +obool operator == (const StateAttribute& rhs) const +
    +obool operator != (const StateAttribute& rhs) const +
    +ovirtual void setStateSetModes(StateSet&, const GLModeValue) const
    ovirtual void compile(State&) const

    @@ -87,7 +98,9 @@
    oenum Values
    -oenum Type +otypedef unsigned int Type +
    +oenum Types

    @@ -121,76 +134,69 @@
    - +
    o Viewport()

    - - -

    ovirtual bool isSameKindAs(const Object* obj) const + + +
    o META_StateAttribute(Viewport, VIEWPORT)

    - - -

    ovirtual Object* clone() const -

    - - -

    ovirtual const char* className() const -

    - - -

    ovirtual const Type getType() const + + +
    ovirtual int compare(const StateAttribute& sa) const +
    return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

    - -

    oinline void setViewport(const int x, const int y, const int width, const int height) + +
    oinline void setViewport(const int x, const int y, const int width, const int height)

    - -

    ovoid getViewport(int& x, int& y, int& width, int& height) + +
    ovoid getViewport(int& x, int& y, int& width, int& height)

    - +

    oinline const int x() const

    - +

    oinline const int y() const

    - +

    oinline const int width() const

    - +

    oinline const int height() const

    - +

    oinline const float aspectRatio() const
    return the aspcetRatio of the viewport, which is equal to width/height

    - +

    ovirtual void apply(State& state) const

    - +

    ovirtual ~Viewport()

    - +

    oint _x

    - +

    oint _y

    - +

    oint _width

    - +

    oint _height

    diff --git a/doc/doc++/osg/clampArray3BetweenRange.html b/doc/doc++/osg/clampArray3BetweenRange.html index fb2a2ef15..05e0cd68c 100644 --- a/doc/doc++/osg/clampArray3BetweenRange.html +++ b/doc/doc++/osg/clampArray3BetweenRange.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArray3BetweenRange

    (A& value,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if array4 elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
    +

    template<class A, class T>inline void osg::clampArray3BetweenRange

    (A& value,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if array4 elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.

    diff --git a/doc/doc++/osg/clampArray3GEQUAL.html b/doc/doc++/osg/clampArray3GEQUAL.html index 629cf4284..5bac036eb 100644 --- a/doc/doc++/osg/clampArray3GEQUAL.html +++ b/doc/doc++/osg/clampArray3GEQUAL.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArray3GEQUAL

    (A& value,
      const T minValue,
      const char* valueName)

    if array4 elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class A, class T>inline void osg::clampArray3GEQUAL

    (A& value,
      const T minValue,
      const char* valueName)

    if array4 elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampArray3LEQUAL.html b/doc/doc++/osg/clampArray3LEQUAL.html index 88a920f52..163fd0f0b 100644 --- a/doc/doc++/osg/clampArray3LEQUAL.html +++ b/doc/doc++/osg/clampArray3LEQUAL.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArray3LEQUAL

    (A& value,
      const T maxValue,
      const char* valueName)

    if array4 elements are is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class A, class T>inline void osg::clampArray3LEQUAL

    (A& value,
      const T maxValue,
      const char* valueName)

    if array4 elements are is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampArray4BetweenRange.html b/doc/doc++/osg/clampArray4BetweenRange.html index eb34e1e0d..334871615 100644 --- a/doc/doc++/osg/clampArray4BetweenRange.html +++ b/doc/doc++/osg/clampArray4BetweenRange.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArray4BetweenRange

    (A& value,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if array4 elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
    +

    template<class A, class T>inline void osg::clampArray4BetweenRange

    (A& value,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if array4 elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.

    diff --git a/doc/doc++/osg/clampArray4GEQUAL.html b/doc/doc++/osg/clampArray4GEQUAL.html index 21a10b543..d04477559 100644 --- a/doc/doc++/osg/clampArray4GEQUAL.html +++ b/doc/doc++/osg/clampArray4GEQUAL.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArray4GEQUAL

    (A& value,
      const T minValue,
      const char* valueName)

    if array4 elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class A, class T>inline void osg::clampArray4GEQUAL

    (A& value,
      const T minValue,
      const char* valueName)

    if array4 elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampArray4LEQUAL.html b/doc/doc++/osg/clampArray4LEQUAL.html index c21e5c49f..5090b77cc 100644 --- a/doc/doc++/osg/clampArray4LEQUAL.html +++ b/doc/doc++/osg/clampArray4LEQUAL.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArray4LEQUAL

    (A& value,
      const unsigned int first,
      const unsigned int last,
      const T maxValue,
      const char* valueName)

    if array4 elements are is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class A, class T>inline void osg::clampArray4LEQUAL

    (A& value,
      const unsigned int first,
      const unsigned int last,
      const T maxValue,
      const char* valueName)

    if array4 elements are is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampArrayElementBetweenRange.html b/doc/doc++/osg/clampArrayElementBetweenRange.html index b30c0dd19..396c6386b 100644 --- a/doc/doc++/osg/clampArrayElementBetweenRange.html +++ b/doc/doc++/osg/clampArrayElementBetweenRange.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArrayElementBetweenRange

    (A& value,
      const unsigned int i,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if array element value[i] is between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
    +

    template<class A, class T>inline void osg::clampArrayElementBetweenRange

    (A& value,
      const unsigned int i,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if array element value[i] is between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.

    diff --git a/doc/doc++/osg/clampArrayElementGEQUAL.html b/doc/doc++/osg/clampArrayElementGEQUAL.html index c30c68c2b..3aa0246c7 100644 --- a/doc/doc++/osg/clampArrayElementGEQUAL.html +++ b/doc/doc++/osg/clampArrayElementGEQUAL.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArrayElementGEQUAL

    (A& value,
      const unsigned int i,
      const T minValue,
      const char* valueName)

    if array element value[i] is greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class A, class T>inline void osg::clampArrayElementGEQUAL

    (A& value,
      const unsigned int i,
      const T minValue,
      const char* valueName)

    if array element value[i] is greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampArrayElementLEQUAL.html b/doc/doc++/osg/clampArrayElementLEQUAL.html index 7fed7ef3e..d55e9b3f5 100644 --- a/doc/doc++/osg/clampArrayElementLEQUAL.html +++ b/doc/doc++/osg/clampArrayElementLEQUAL.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArrayElementLEQUAL

    (A& value,
      const unsigned int i,
      const T maxValue,
      const char* valueName)

    if array element value[i] is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class A, class T>inline void osg::clampArrayElementLEQUAL

    (A& value,
      const unsigned int i,
      const T maxValue,
      const char* valueName)

    if array element value[i] is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampArrayElementsBetweenRange.html b/doc/doc++/osg/clampArrayElementsBetweenRange.html index 73937741c..fbe7478e8 100644 --- a/doc/doc++/osg/clampArrayElementsBetweenRange.html +++ b/doc/doc++/osg/clampArrayElementsBetweenRange.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArrayElementsBetweenRange

    (A& value,
      const unsigned int first,
      const unsigned int last,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if array elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
    +

    template<class A, class T>inline void osg::clampArrayElementsBetweenRange

    (A& value,
      const unsigned int first,
      const unsigned int last,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if array elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.

    diff --git a/doc/doc++/osg/clampArrayElementsGEQUAL.html b/doc/doc++/osg/clampArrayElementsGEQUAL.html index 4855db0ec..a5970f090 100644 --- a/doc/doc++/osg/clampArrayElementsGEQUAL.html +++ b/doc/doc++/osg/clampArrayElementsGEQUAL.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArrayElementsGEQUAL

    (A& value,
      const unsigned int first,
      const unsigned int last,
      const T minValue,
      const char* valueName)

    if array elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class A, class T>inline void osg::clampArrayElementsGEQUAL

    (A& value,
      const unsigned int first,
      const unsigned int last,
      const T minValue,
      const char* valueName)

    if array elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampArrayElementsLEQUAL.html b/doc/doc++/osg/clampArrayElementsLEQUAL.html index fdc7a560d..0137ed960 100644 --- a/doc/doc++/osg/clampArrayElementsLEQUAL.html +++ b/doc/doc++/osg/clampArrayElementsLEQUAL.html @@ -7,7 +7,7 @@ -

    template<class A, class T>inline void osg::clampArrayElementsLEQUAL

    (A& value,
      const unsigned int first,
      const unsigned int last,
      const T maxValue,
      const char* valueName)

    if array elements are less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class A, class T>inline void osg::clampArrayElementsLEQUAL

    (A& value,
      const unsigned int first,
      const unsigned int last,
      const T maxValue,
      const char* valueName)

    if array elements are less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampBetweenRange.html b/doc/doc++/osg/clampBetweenRange.html index ca5c0dc8b..962308212 100644 --- a/doc/doc++/osg/clampBetweenRange.html +++ b/doc/doc++/osg/clampBetweenRange.html @@ -7,7 +7,7 @@ -

    template<class T>inline void osg::clampBetweenRange

    (T& value,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if value is between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
    +

    template<class T>inline void osg::clampBetweenRange

    (T& value,
      const T minValue,
      const T maxValue,
      const char* valueName)

    if value is between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.

    diff --git a/doc/doc++/osg/clampGEQUAL.html b/doc/doc++/osg/clampGEQUAL.html index 2868db348..dbed848cd 100644 --- a/doc/doc++/osg/clampGEQUAL.html +++ b/doc/doc++/osg/clampGEQUAL.html @@ -7,7 +7,7 @@ -

    template<class T>inline void osg::clampGEQUAL

    (T& value,
      const T minValue,
      const char* valueName)

    if value is greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class T>inline void osg::clampGEQUAL

    (T& value,
      const T minValue,
      const char* valueName)

    if value is greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/clampLEQUAL.html b/doc/doc++/osg/clampLEQUAL.html index c7287ce15..2def19edb 100644 --- a/doc/doc++/osg/clampLEQUAL.html +++ b/doc/doc++/osg/clampLEQUAL.html @@ -7,7 +7,7 @@ -

    template<class T>inline void osg::clampLEQUAL

    (T& value,
      const T maxValue,
      const char* valueName)

    if value is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
    +

    template<class T>inline void osg::clampLEQUAL

    (T& value,
      const T maxValue,
      const char* valueName)

    if value is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped

    diff --git a/doc/doc++/osg/createGeodeForImage.2.html b/doc/doc++/osg/createGeodeForImage.2.html index b4cd1f10b..b336aa63d 100644 --- a/doc/doc++/osg/createGeodeForImage.2.html +++ b/doc/doc++/osg/createGeodeForImage.2.html @@ -7,7 +7,7 @@ -

    SG_EXPORT extern Geode* osg::createGeodeForImage

    (Image* image,
      const float s,
      const float t)

    Convenience function to be used by images loaders to generate a valid geode to return for readNode().
    +

    SG_EXPORT extern Geode* osg::createGeodeForImage

    (Image* image,
      const float s,
      const float t)

    Convenience function to be used by images loaders to generate a valid geode to return for readNode().

    diff --git a/doc/doc++/osg/for_each_triangle.html b/doc/doc++/osg/for_each_triangle.html index 8c411568a..7f2c0ec13 100644 --- a/doc/doc++/osg/for_each_triangle.html +++ b/doc/doc++/osg/for_each_triangle.html @@ -7,7 +7,7 @@ -

    template<class T> void osg::for_each_triangle

    (GeoSet& gset,
      T& op)

    Template function for iterating through a GeoSet operating on triangles with templated functor.
    +

    template<class T> void osg::for_each_triangle

    (GeoSet& gset,
      T& op)

    Template function for iterating through a GeoSet operating on triangles with templated functor.

    diff --git a/doc/doc++/osg/index.html b/doc/doc++/osg/index.html index c872b45a8..f502dd7c6 100644 --- a/doc/doc++/osg/index.html +++ b/doc/doc++/osg/index.html @@ -61,6 +61,7 @@
  • OSG_DRAWABLE
  • OSG_EXPORT
  • OSG_FOG +
  • OSG_FRAMESTAMP
  • OSG_FRONTFACE
  • OSG_GEODE
  • OSG_GEOSET @@ -79,6 +80,7 @@
  • OSG_MEMORYADAPTER
  • OSG_MEM_PTR
  • OSG_NODE +
  • OSG_NODECALLBACK
  • OSG_NODEVISITOR
  • OSG_NOTIFY
  • OSG_OBJECT @@ -106,6 +108,7 @@
  • OSG_VEC3
  • OSG_VEC4
  • OSG_VERSION +
  • OSG_VIEWPORT
  • SG_EXPORT:
    • SG_EXPORT diff --git a/doc/doc++/osg/mem_ptr.html b/doc/doc++/osg/mem_ptr.html index 36e3291f0..c1811d1ef 100644 --- a/doc/doc++/osg/mem_ptr.html +++ b/doc/doc++/osg/mem_ptr.html @@ -7,47 +7,47 @@ -

      template<class T> class osg::mem_ptr

      Smart pointer for handling memory pointers via associated memory adapter
      +

      template<class T> class osg::mem_ptr

      Smart pointer for handling memory pointers via associated memory adapter

      Public Methods

      -[more] mem_ptr() +[more] mem_ptr()
      -[more] mem_ptr(T* t, MemoryAdapter* ma) +[more] mem_ptr(T* t, MemoryAdapter* ma)
      -[more] mem_ptr(const mem_ptr& rp) +[more] mem_ptr(const mem_ptr& rp)
      -[more] ~mem_ptr() +[more] ~mem_ptr()
      -[more]inline mem_ptr& operator = (const mem_ptr& rp) +[more]inline mem_ptr& operator = (const mem_ptr& rp)
      -[more]inline void set(T* t, MemoryAdapter* ma) +[more]inline void set(T* t, MemoryAdapter* ma)
      -[more]inline const bool operator == (const mem_ptr& rp) const +[more]inline const bool operator == (const mem_ptr& rp) const
      -[more]inline const bool operator == (const T* ptr) const +[more]inline const bool operator == (const T* ptr) const
      -[more]inline const bool operator != (const mem_ptr& rp) const +[more]inline const bool operator != (const mem_ptr& rp) const
      -[more]inline const bool operator != (const T* ptr) const +[more]inline const bool operator != (const T* ptr) const
      -[more]inline T& operator*() +[more]inline T& operator*()
      -[more]inline const T& operator*() const +[more]inline const T& operator*() const
      -[more]inline T* operator->() +[more]inline T* operator->()
      -[more]inline const T* operator->() const +[more]inline const T* operator->() const
      -[more]inline const bool operator!() const +[more]inline const bool operator!() const
      -[more]inline const bool valid() const +[more]inline const bool valid() const
      -[more]inline T* get() +[more]inline T* get()
      -[more]inline const T* get() const +[more]inline const T* get() const

      @@ -59,76 +59,76 @@
      - +
      o mem_ptr()

      - -

      o mem_ptr(T* t, MemoryAdapter* ma) + +
      o mem_ptr(T* t, MemoryAdapter* ma)

      - -

      o mem_ptr(const mem_ptr& rp) + +
      o mem_ptr(const mem_ptr& rp)

      - +

      o ~mem_ptr()

      - +

      oinline mem_ptr& operator = (const mem_ptr& rp)

      - -

      oinline void set(T* t, MemoryAdapter* ma) + +
      oinline void set(T* t, MemoryAdapter* ma)

      - +

      oinline const bool operator == (const mem_ptr& rp) const

      - -

      oinline const bool operator == (const T* ptr) const + +
      oinline const bool operator == (const T* ptr) const

      - +

      oinline const bool operator != (const mem_ptr& rp) const

      - -

      oinline const bool operator != (const T* ptr) const + +
      oinline const bool operator != (const T* ptr) const

      - -

      oinline T& operator*() + +
      oinline T& operator*()

      - -

      oinline const T& operator*() const + +
      oinline const T& operator*() const

      - -

      oinline T* operator->() + +
      oinline T* operator->()

      - -

      oinline const T* operator->() const + +
      oinline const T* operator->() const

      - +

      oinline const bool operator!() const

      - +

      oinline const bool valid() const

      - -

      oinline T* get() + +
      oinline T* get()

      - -

      oinline const T* get() const + +
      oinline const T* get() const


      This class has no child classes.
      diff --git a/doc/doc++/osg/notify.html b/doc/doc++/osg/notify.html index f076a26ac..58a2e0dc3 100644 --- a/doc/doc++/osg/notify.html +++ b/doc/doc++/osg/notify.html @@ -7,7 +7,7 @@ -

      inline ostream& osg::notify

      (const NotifySeverity severity=INFO)

      notify messaging function for providing fatal through to verbose debugging messages.
      +

      inline ostream& osg::notify

      (const NotifySeverity severity=INFO)

      notify messaging function for providing fatal through to verbose debugging messages.

      diff --git a/doc/doc++/osg/osg.html b/doc/doc++/osg/osg.html index b32fe337b..b0d6cb775 100644 --- a/doc/doc++/osg/osg.html +++ b/doc/doc++/osg/osg.html @@ -23,49 +23,49 @@ class SG_EXPORT BoundingBox class SG_EXPORT BoundingSphere
      General purpose bounding sphere class for enclosing nodes/objects/vertices.
      -template<class T>inline void clampGEQUAL(T& value, const T minValue, const char* valueName) +template<class T>inline void clampGEQUAL(T& value, const T minValue, const char* valueName)
      if value is greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class T>inline void clampLEQUAL(T& value, const T maxValue, const char* valueName) +template<class T>inline void clampLEQUAL(T& value, const T maxValue, const char* valueName)
      if value is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class T>inline void clampBetweenRange(T& value, const T minValue, const T maxValue, const char* valueName) +template<class T>inline void clampBetweenRange(T& value, const T minValue, const T maxValue, const char* valueName)
      if value is between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
      -template<class A, class T>inline void clampArrayElementGEQUAL(A& value, const unsigned int i, const T minValue, const char* valueName) +template<class A, class T>inline void clampArrayElementGEQUAL(A& value, const unsigned int i, const T minValue, const char* valueName)
      if array element value[i] is greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class A, class T>inline void clampArrayElementLEQUAL(A& value, const unsigned int i, const T maxValue, const char* valueName) +template<class A, class T>inline void clampArrayElementLEQUAL(A& value, const unsigned int i, const T maxValue, const char* valueName)
      if array element value[i] is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class A, class T>inline void clampArrayElementBetweenRange(A& value, const unsigned int i, const T minValue, const T maxValue, const char* valueName) +template<class A, class T>inline void clampArrayElementBetweenRange(A& value, const unsigned int i, const T minValue, const T maxValue, const char* valueName)
      if array element value[i] is between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
      -template<class A, class T>inline void clampArrayElementsGEQUAL(A& value, const unsigned int first, const unsigned int last, const T minValue, const char* valueName) +template<class A, class T>inline void clampArrayElementsGEQUAL(A& value, const unsigned int first, const unsigned int last, const T minValue, const char* valueName)
      if array elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class A, class T>inline void clampArrayElementsLEQUAL(A& value, const unsigned int first, const unsigned int last, const T maxValue, const char* valueName) +template<class A, class T>inline void clampArrayElementsLEQUAL(A& value, const unsigned int first, const unsigned int last, const T maxValue, const char* valueName)
      if array elements are less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class A, class T>inline void clampArrayElementsBetweenRange(A& value, const unsigned int first, const unsigned int last, const T minValue, const T maxValue, const char* valueName) +template<class A, class T>inline void clampArrayElementsBetweenRange(A& value, const unsigned int first, const unsigned int last, const T minValue, const T maxValue, const char* valueName)
      if array elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
      -template<class A, class T>inline void clampArray3GEQUAL(A& value, const T minValue, const char* valueName) +template<class A, class T>inline void clampArray3GEQUAL(A& value, const T minValue, const char* valueName)
      if array4 elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class A, class T>inline void clampArray3LEQUAL(A& value, const T maxValue, const char* valueName) +template<class A, class T>inline void clampArray3LEQUAL(A& value, const T maxValue, const char* valueName)
      if array4 elements are is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class A, class T>inline void clampArray3BetweenRange(A& value, const T minValue, const T maxValue, const char* valueName) +template<class A, class T>inline void clampArray3BetweenRange(A& value, const T minValue, const T maxValue, const char* valueName)
      if array4 elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
      -template<class A, class T>inline void clampArray4GEQUAL(A& value, const T minValue, const char* valueName) +template<class A, class T>inline void clampArray4GEQUAL(A& value, const T minValue, const char* valueName)
      if array4 elements are greater than or equal to minValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class A, class T>inline void clampArray4LEQUAL(A& value, const unsigned int first, const unsigned int last, const T maxValue, const char* valueName) +template<class A, class T>inline void clampArray4LEQUAL(A& value, const unsigned int first, const unsigned int last, const T maxValue, const char* valueName)
      if array4 elements are is less than or equal to maxValue do nothing - legal value, otherise clamp value to specified maximum value and return warning with valueName specifying which variable was clamped
      -template<class A, class T>inline void clampArray4BetweenRange(A& value, const T minValue, const T maxValue, const char* valueName) +template<class A, class T>inline void clampArray4BetweenRange(A& value, const T minValue, const T maxValue, const char* valueName)
      if array4 elements are between or equal to minValue and maxValue do nothing - legal value, otherise clamp value to specified to range and return warning with valueName specifying which variable was clamped.
      class SG_EXPORT Camera: public osg::Referenced @@ -92,6 +92,9 @@ class SG_EXPORT Drawable: public Fog: public StateAttribute
      Fog - encapsulates OpenGL fog state.
      +class SG_EXPORT FrameStamp: public Referenced +
      Class which encapsulates the frame number, reference time and calander time of specific frame, used to synchonize operations on the scene graph and other machines when using a graphics cluster. +
      class SG_EXPORT FrontFace: public StateAttribute
      Class to specifies the orientation of front-facing polygons
      @@ -101,7 +104,7 @@ class SG_EXPORT Geode: public GeoSet: public Drawable
      Encapsulates OpenGL drawing primitives, geometry and optional binding of normal, color and texture coordinates.
      -template<class T> void for_each_triangle(GeoSet& gset, T& op) +template<class T> void for_each_triangle(GeoSet& gset, T& op)
      Template function for iterating through a GeoSet operating on triangles with templated functor.
      SG_EXPORT extern const bool isGLExtensionSupported(const char* extension) @@ -119,7 +122,7 @@ class SG_EXPORT Image: public Geode* createGeodeForImage(Image* image)
      Convenience function to be used by images loaders to generate a valid geode to return for readNode().
      -SG_EXPORT extern Geode* createGeodeForImage(Image* image, const float s, const float t) +SG_EXPORT extern Geode* createGeodeForImage(Image* image, const float s, const float t)
      Convenience function to be used by images loaders to generate a valid geode to return for readNode().
      class SG_EXPORT Impostor: public LOD @@ -147,23 +150,27 @@ class SG_EXPORT Material: public Material - encapsulates OpenGL glMaterial state
      class SG_EXPORT Matrix: public Object -
      4x4 Matrix for storage & manipulation of transformations in scene graph.
      -[more]inline Vec3 operator * (const Vec3& v, const Matrix& m) +[more]inline Vec3 operator* (const Vec3& v, const Matrix& m )
      -[more]inline Vec4 operator * (const Vec4& v, const Matrix& m) +[more]inline Vec4 operator* (const Vec4& v, const Matrix& m )
      -[more]inline ostream& operator << (ostream& output, const Matrix& matrix) +[more]inline ostream& operator<< (ostream& os, const Matrix& m )
      class SG_EXPORT MemoryAdapter: public Referenced
      Class for adapting the memory management of external data.
      -template<class T> class mem_ptr +template<class T> class mem_ptr
      Smart pointer for handling memory pointers via associated memory adapter
      +#define META_Node(name) +
      META_Node macro define the standard clone, isSameKindAs, className and accept methods. +
      class SG_EXPORT Node: public Object
      Base class for all internal nodes in the scene graph.
      +class SG_EXPORT NodeCallback: public Referenced +
      class SG_EXPORT NodeVisitor: public Referenced
      Visitor for type safe operations on osg::Node's.
      @@ -185,16 +192,19 @@ SG_EXPORT extern NotifySeverity initNotifyLevel()
      initialize notify level.
      -inline ostream& notify(const NotifySeverity severity=INFO) +inline ostream& notify(const NotifySeverity severity=INFO)
      notify messaging function for providing fatal through to verbose debugging messages.
      +#define META_Object(name) +
      META_Object macro define the standard clone, isSameKindAs and className methods. +
      class SG_EXPORT Object: public Referenced
      Base class/standard interface for objects which require IO support, cloning and reference counting.
      class SG_EXPORT Plane
      A plane class.
      -[more]inline ostream& operator << (ostream& output, const Plane& pl) +[more]inline ostream& operator << (ostream& output, const Plane& pl)
      class SG_EXPORT Point: public StateAttribute
      Point - encapsulates the OpenGL point smmothing and size state @@ -208,12 +218,12 @@ class SG_EXPORT PolygonOffset: public < class SG_EXPORT Quat
      A quaternion class.
      -[more]inline ostream& operator << (ostream& output, const Quat& vec) +[more]inline ostream& operator << (ostream& output, const Quat& vec)
      class SG_EXPORT Referenced
      Base class from providing referencing counted objects
      -template<class T> class ref_ptr +template<class T> class ref_ptr
      Smart pointer for handling referenced counted objects
      #define OSG_GL_DEBUG(message) @@ -222,6 +232,15 @@ template<class T> class State: public Referenced
      State class for managing a state stack.
      +#define META_StateAttribute(name,type) +
      META_StateAttribute macro define the standard clone, isSameKindAs, className and getType methods. +
      +#define COMPARE_StateAttribute_Types(TYPE,rhs_attribute) +
      COMPARE_StateAttribute_Types macro is a helper for implementing the StatateAtribute::compare() method +
      +#define COMPARE_StateAttribute_Parameter(parameter) +
      COMPARE_StateAttribute_Parameter macro is a helper for implementing the StatateAtribute::compare() method. +
      class SG_EXPORT StateAttribute: public Object
      Base class for state attribues
      @@ -249,37 +268,39 @@ class SG_EXPORT Texture: public Timer
      A high resolution, low latency time stamper
      +[more]pragmaoptimize("", on) (x)(".byte 0x0f, 0x31" : "=A" (x)) +
      class SG_EXPORT Transform: public Group
      Transform - is group which all children are transformed by the the Transform's osg::Matrix.
      class SG_EXPORT Transparency: public StateAttribute
      Transparancy - encapsulates the OpenGL transparancy state
      -[more]#define M_E +[more]#define M_E
      -[more]#define M_LOG2E +[more]#define M_LOG2E
      -[more]#define M_LOG10E +[more]#define M_LOG10E
      -[more]#define M_LN2 +[more]#define M_LN2
      -[more]#define M_LN10 +[more]#define M_LN10
      -[more]#define M_PI +[more]#define M_PI
      -[more]#define M_PI_2 +[more]#define M_PI_2
      -[more]#define M_PI_4 +[more]#define M_PI_4
      -[more]#define M_1_PI +[more]#define M_1_PI
      -[more]#define M_2_PI +[more]#define M_2_PI
      -[more]#define M_2_SQRTPI +[more]#define M_2_SQRTPI
      -[more]#define M_SQRT2 +[more]#define M_SQRT2
      -[more]#define M_SQRT1_2 +[more]#define M_SQRT1_2
      class Vec2
      General purpose float pair, uses include representation of texture coordinates. @@ -287,10 +308,13 @@ class Vec2 class Vec3
      General purpose float triple for use as vertices, vectors and normals.
      -[more]inline ostream& operator << (ostream& output, const Vec3& vec) +[more]inline ostream& operator << (ostream& output, const Vec3& vec)
      class Vec4
      General purpose float quad, uses include representation of colour coordinates. +
      +class SG_EXPORT Viewport: public StateAttribute +
      Encapsulte OpenGL glViewport
  • @@ -299,80 +323,84 @@ class Vec4

    Documentation

    - - -
    oinline Vec3 operator * (const Vec3& v, const Matrix& m) -

    - + -

    oinline Vec4 operator * (const Vec4& v, const Matrix& m) +
    oinline Vec3 operator* (const Vec3& v, const Matrix& m )

    - + -

    oinline ostream& operator << (ostream& output, const Matrix& matrix) +
    oinline Vec4 operator* (const Vec4& v, const Matrix& m ) +

    + + +

    oinline ostream& operator<< (ostream& os, const Matrix& m )

    - +

    oinline ostream& operator << (ostream& output, const Plane& pl)

    - +

    oinline ostream& operator << (ostream& output, const Quat& vec)

    + + +

    opragmaoptimize("", on) (x)(".byte 0x0f, 0x31" : "=A" (x)) +

    - +

    o#define M_E

    - +

    o#define M_LOG2E

    - +

    o#define M_LOG10E

    - +

    o#define M_LN2

    - +

    o#define M_LN10

    - +

    o#define M_PI

    - +

    o#define M_PI_2

    - +

    o#define M_PI_4

    - +

    o#define M_1_PI

    - +

    o#define M_2_PI

    - +

    o#define M_2_SQRTPI

    - +

    o#define M_SQRT2

    - +

    o#define M_SQRT1_2

    - +

    oinline ostream& operator << (ostream& output, const Vec3& vec)

    Alphabetic index HTML hierarchy of classes or Java


    diff --git a/doc/doc++/osg/ref_ptr.html b/doc/doc++/osg/ref_ptr.html index b9a188611..be360c83a 100644 --- a/doc/doc++/osg/ref_ptr.html +++ b/doc/doc++/osg/ref_ptr.html @@ -7,51 +7,51 @@ -

    template<class T> class osg::ref_ptr

    Smart pointer for handling referenced counted objects
    +

    template<class T> class osg::ref_ptr

    Smart pointer for handling referenced counted objects

    Public Methods

    -[more] ref_ptr() +[more] ref_ptr()
    -[more] ref_ptr(T* t) +[more] ref_ptr(T* t)
    -[more] ref_ptr(const ref_ptr& rp) +[more] ref_ptr(const ref_ptr& rp)
    -[more] ~ref_ptr() +[more] ~ref_ptr()
    -[more]inline ref_ptr& operator = (const ref_ptr& rp) +[more]inline ref_ptr& operator = (const ref_ptr& rp)
    -[more]inline ref_ptr& operator = (T* ptr) +[more]inline ref_ptr& operator = (T* ptr)
    -[more]inline const bool operator == (const ref_ptr& rp) const +[more]inline const bool operator == (const ref_ptr& rp) const
    -[more]inline const bool operator == (const T* ptr) const +[more]inline const bool operator == (const T* ptr) const
    -[more]inline const bool operator != (const ref_ptr& rp) const +[more]inline const bool operator != (const ref_ptr& rp) const
    -[more]inline const bool operator != (const T* ptr) const +[more]inline const bool operator != (const T* ptr) const
    -[more]inline const bool operator < (const ref_ptr& rp) const +[more]inline const bool operator < (const ref_ptr& rp) const
    -[more]inline const bool operator < (const T* ptr) const +[more]inline const bool operator < (const T* ptr) const
    -[more]inline T& operator*() +[more]inline T& operator*()
    -[more]inline const T& operator*() const +[more]inline const T& operator*() const
    -[more]inline T* operator->() +[more]inline T* operator->()
    -[more]inline const T* operator->() const +[more]inline const T* operator->() const
    -[more]inline const bool operator!() const +[more]inline const bool operator!() const
    -[more]inline const bool valid() const +[more]inline const bool valid() const
    -[more]inline T* get() +[more]inline T* get()
    -[more]inline const T* get() const +[more]inline const T* get() const

    @@ -63,84 +63,84 @@
    - +
    o ref_ptr()

    - -

    o ref_ptr(T* t) + +
    o ref_ptr(T* t)

    - -

    o ref_ptr(const ref_ptr& rp) + +
    o ref_ptr(const ref_ptr& rp)

    - +

    o ~ref_ptr()

    - +

    oinline ref_ptr& operator = (const ref_ptr& rp)

    - -

    oinline ref_ptr& operator = (T* ptr) + +
    oinline ref_ptr& operator = (T* ptr)

    - +

    oinline const bool operator == (const ref_ptr& rp) const

    - -

    oinline const bool operator == (const T* ptr) const + +
    oinline const bool operator == (const T* ptr) const

    - +

    oinline const bool operator != (const ref_ptr& rp) const

    - -

    oinline const bool operator != (const T* ptr) const + +
    oinline const bool operator != (const T* ptr) const

    - +

    oinline const bool operator < (const ref_ptr& rp) const

    - -

    oinline const bool operator < (const T* ptr) const + +
    oinline const bool operator < (const T* ptr) const

    - -

    oinline T& operator*() + +
    oinline T& operator*()

    - -

    oinline const T& operator*() const + +
    oinline const T& operator*() const

    - -

    oinline T* operator->() + +
    oinline T* operator->()

    - -

    oinline const T* operator->() const + +
    oinline const T* operator->() const

    - +

    oinline const bool operator!() const

    - +

    oinline const bool valid() const

    - -

    oinline T* get() + +
    oinline T* get()

    - -

    oinline const T* get() const + +
    oinline const T* get() const


    This class has no child classes.
    diff --git a/doc/doc++/osgGLUT/Viewer.html b/doc/doc++/osgGLUT/Viewer.html index f46ca07a8..23d945f88 100644 --- a/doc/doc++/osgGLUT/Viewer.html +++ b/doc/doc++/osgGLUT/Viewer.html @@ -56,13 +56,13 @@
    [more]long initClock()
    -[more]float clockSeconds() +[more]double clockSeconds()
    [more]osg::Timer_t updateFrameTick()
    -[more]float frameSeconds() +[more]double frameSeconds()
    -[more]float frameRate() +[more]double frameRate()
    [more]void help(ostream& fout)
    @@ -148,6 +148,8 @@ [more]osg::Timer_t _lastFrameTick
    [more]osg::Timer_t _frameTick +
    +[more]osg::ref_ptr<osg::FrameStamp> _frameStamp

    @@ -280,7 +282,7 @@ only available for backwards compatibility.

    -

    ofloat clockSeconds() +
    odouble clockSeconds()

    @@ -288,11 +290,11 @@ only available for backwards compatibility.

    -

    ofloat frameSeconds() +
    odouble frameSeconds()

    -

    ofloat frameRate() +
    odouble frameRate()

    @@ -585,6 +587,10 @@ only available for backwards compatibility.

    oosg::Timer_t frameTick() +

    + + +

    oosg::ref_ptr<osg::FrameStamp> _frameStamp


    This class has no child classes.
    diff --git a/doc/doc++/osgUtil/CameraManipulator.html b/doc/doc++/osgUtil/CameraManipulator.html index 7406e23ee..caab0eaf0 100644 --- a/doc/doc++/osgUtil/CameraManipulator.html +++ b/doc/doc++/osgUtil/CameraManipulator.html @@ -22,35 +22,35 @@

    Public Methods

    -[more] CameraManipulator() +[more] CameraManipulator()
    -[more]virtual ~CameraManipulator() +[more]virtual ~CameraManipulator()
    -[more]virtual void setCamera(osg::Camera*) +[more]virtual void setCamera(osg::Camera*)
    attach a camera to the manipulator to be used for specifying view
    -[more]virtual const osg::Camera* getCamera() const +[more]virtual const osg::Camera* getCamera() const
    get the attached a camera
    -[more]virtual void setNode(osg::Node*) +[more]virtual void setNode(osg::Node*)
    Attach a node to the manipulator.
    -[more]virtual const osg::Node* getNode() const +[more]virtual const osg::Node* getNode() const
    Return node if attached
    -[more]virtual void home(const GUIEventAdapter&, GUIActionAdapter&) +[more]virtual void home(const GUIEventAdapter&, GUIActionAdapter&)
    Move the camera to the default position.
    -[more]virtual void init(const GUIEventAdapter&, GUIActionAdapter&) +[more]virtual void init(const GUIEventAdapter&, GUIActionAdapter&)
    Start/restart the manipulator
    -[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Handle events, return true if handled, false otherwise

    Protected Fields

    -[more]osg::ref_ptr<osg::Camera> _camera +[more]osg::ref_ptr<osg::Camera> _camera

    @@ -64,25 +64,25 @@
    - +
    o CameraManipulator()

    - +

    ovirtual ~CameraManipulator()

    - +

    ovirtual void setCamera(osg::Camera*)
    attach a camera to the manipulator to be used for specifying view

    - +

    ovirtual const osg::Camera* getCamera() const
    get the attached a camera

    - +

    ovirtual void setNode(osg::Node*)
    Attach a node to the manipulator. Automatically detaches previously attached node. @@ -90,28 +90,28 @@ setNode(NULL) detaches previously nodes. Is ignored by manipulators which do not require a reference model.

    - +

    ovirtual const osg::Node* getNode() const
    Return node if attached

    - +

    ovirtual void home(const GUIEventAdapter&, GUIActionAdapter&)
    Move the camera to the default position. May be ignored by manipulators if home functionality is not appropriate.

    - +

    ovirtual void init(const GUIEventAdapter&, GUIActionAdapter&)
    Start/restart the manipulator

    - +

    ovirtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Handle events, return true if handled, false otherwise

    - +

    oosg::ref_ptr<osg::Camera> _camera


    diff --git a/doc/doc++/osgUtil/CullViewState.html b/doc/doc++/osgUtil/CullViewState.html index b103b9ad8..87c4c9fff 100644 --- a/doc/doc++/osgUtil/CullViewState.html +++ b/doc/doc++/osgUtil/CullViewState.html @@ -23,44 +23,44 @@

    Public Fields

    -[more]osg::ref_ptr<osg::Matrix> _matrix +[more]osg::ref_ptr<osg::Matrix> _matrix
    -[more]osg::ref_ptr<osg::Matrix> _inverse +[more]osg::ref_ptr<osg::Matrix> _inverse
    -[more]osg::Vec3 _eyePoint +[more]osg::Vec3 _eyePoint
    -[more]osg::Vec3 _centerPoint +[more]osg::Vec3 _centerPoint
    -[more]osg::Vec3 _lookVector +[more]osg::Vec3 _lookVector
    -[more]osg::Vec3 _upVector +[more]osg::Vec3 _upVector
    -[more]unsigned int _bbCornerFar +[more]unsigned int _bbCornerFar
    -[more]unsigned int _bbCornerNear +[more]unsigned int _bbCornerNear
    -[more]float _ratio2 +[more]float _ratio2
    -[more]osg::ClippingVolume _clippingVolume +[more]osg::ClippingVolume _clippingVolume

    Public Methods

    -[more] CullViewState() +[more] CullViewState()
    -[more]typedef unsigned intinline CullingMode bool isCulled(const osg::BoundingSphere& sp, CullingMode& mode) const +[more]typedef unsigned intinline CullingMode bool isCulled(const osg::BoundingSphere& sp, CullingMode& mode) const
    -[more]inline bool isCulled(const osg::BoundingBox& bb, CullingMode mode) const +[more]inline bool isCulled(const osg::BoundingBox& bb, CullingMode mode) const

    Public Members

    -[more]enum +[more]enum

    Protected Methods

    -[more] ~CullViewState() +[more] ~CullViewState()

    @@ -73,105 +73,105 @@ coordinates, during the cull traversal
    - +
    o CullViewState()

    - +

    oosg::ref_ptr<osg::Matrix> _matrix

    - +

    oosg::ref_ptr<osg::Matrix> _inverse

    - +

    oosg::Vec3 _eyePoint

    - +

    oosg::Vec3 _centerPoint

    - +

    oosg::Vec3 _lookVector

    - +

    oosg::Vec3 _upVector

    - +

    ounsigned int _bbCornerFar

    - +

    ounsigned int _bbCornerNear

    - +

    ofloat _ratio2

    - +

    oosg::ClippingVolume _clippingVolume

    - +

    oenum

    - +
    o NO_CULLING

    - +

    o FRUSTUM_LEFT_CULLING

    - +

    o FRUSTUM_RIGHT_CULLING

    - +

    o FRUSTUM_BOTTOM_CULLING

    - +

    o FRUSTUM_TOP_CULLING

    - +

    o FRUSTUM_NEAR_CULLING

    - +

    o FRUSTUM_FAR_CULLING

    - +

    o VIEW_FRUSTUM_CULLING

    - +

    o SMALL_FEATURE_CULLING

    - +

    o ENALBE_ALL_CULLING

    - +
    otypedef unsigned intinline CullingMode bool isCulled(const osg::BoundingSphere& sp, CullingMode& mode) const

    - +

    oinline bool isCulled(const osg::BoundingBox& bb, CullingMode mode) const

    - +

    o ~CullViewState()

    diff --git a/doc/doc++/osgUtil/CullVisitor.html b/doc/doc++/osgUtil/CullVisitor.html index afe367824..1dd92d69c 100644 --- a/doc/doc++/osgUtil/CullVisitor.html +++ b/doc/doc++/osgUtil/CullVisitor.html @@ -23,205 +23,200 @@

    Public Methods

    -[more] CullVisitor() +[more] CullVisitor()
    -[more]virtual ~CullVisitor() +[more]virtual ~CullVisitor()
    -[more]void reset() +[more]virtual void reset()
    -[more]virtual void apply(osg::Node&) +[more]virtual void apply(osg::Node&)
    -[more]virtual void apply(osg::Geode& node) +[more]virtual void apply(osg::Geode& node)
    -[more]virtual void apply(osg::Billboard& node) +[more]virtual void apply(osg::Billboard& node)
    -[more]virtual void apply(osg::LightSource& node) +[more]virtual void apply(osg::LightSource& node)
    -[more]virtual void apply(osg::Group& node) +[more]virtual void apply(osg::Group& node)
    -[more]virtual void apply(osg::Transform& node) +[more]virtual void apply(osg::Transform& node)
    -[more]virtual void apply(osg::Switch& node) +[more]virtual void apply(osg::Switch& node)
    -[more]virtual void apply(osg::LOD& node) +[more]virtual void apply(osg::LOD& node)
    -[more]virtual void apply(osg::Impostor& node) +[more]virtual void apply(osg::Impostor& node)
    -[more]void setCamera(const osg::Camera& camera) +[more]void setCamera(const osg::Camera& camera)
    -[more]const osg::Camera* getCamera() const +[more]const osg::Camera* getCamera() const
    -[more]void setLODBias(const float bias) +[more]void setLODBias(const float bias)
    -[more]const float getLODBias() const +[more]const float getLODBias() const
    -[more]void setImpostorsActive(const bool active) +[more]void setImpostorsActive(const bool active)
    Switch the creation of Impostors on or off.
    -[more]const bool getImpostorsActive() const +[more]const bool getImpostorsActive() const
    Get whether impostors are active or not.
    -[more]void setImpostorPixelErrorThreshold(const float numPixels) +[more]void setImpostorPixelErrorThreshold(const float numPixels)
    Set the impostor error threshold.
    -[more]const float getImpostorPixelErrorThreshold() const +[more]const float getImpostorPixelErrorThreshold() const
    Get the impostor error threshold
    -[more]void setDepthSortImpostorSprites(const bool doDepthSort) +[more]void setDepthSortImpostorSprites(const bool doDepthSort)
    Set whether ImpsotorSprite's should be placed in a depth sorted bin for rendering
    -[more]const bool setDepthSortImpostorSprites() const +[more]const bool setDepthSortImpostorSprites() const
    Get whether ImpsotorSprite's are depth sorted bin for rendering
    -[more]void setNumberOfFrameToKeepImpostorSprites(const int numFrames) +[more]void setNumberOfFrameToKeepImpostorSprites(const int numFrames)
    Set the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled
    -[more]const int getNumberOfFrameToKeepImpostorSprites() const +[more]const int getNumberOfFrameToKeepImpostorSprites() const
    Get the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled
    -[more]void setTransparencySortMode(TransparencySortMode tsm) +[more]void setTransparencySortMode(TransparencySortMode tsm)
    -[more]void setCullingMode(CullViewState::CullingMode mode) +[more]void setCullingMode(CullViewState::CullingMode mode)
    Sets the current CullingMode
    -[more]CullViewState::CullingMode getCullingMode() const +[more]CullViewState::CullingMode getCullingMode() const
    Returns the current CullingMode
    -[more]void setViewport(int x, int y, int width, int height) +[more]void setViewport(osg::Viewport* viewport)
    Set the viewport.
    -[more]void getViewport(int& x, int& y, int& width, int& height) +[more]const osg::Viewport* getViewport() const +
    Get the const viewport. +
    +[more]osg::Viewport* getViewport()
    Get the viewport.
    -[more]inline void setFrameNumber(const int fn) -
    Set the frame number +[more]void pushCullViewState(const osg::Matrix* matrix=NULL)
    -[more]inline const int getFrameNumber() const -
    Get the frame number +[more]void popCullViewState()
    -[more]void pushCullViewState(const osg::Matrix* matrix=NULL) -
    -[more]void popCullViewState() -
    -[more]inline void pushStateSet(const osg::StateSet* ss) +[more]inline void pushStateSet(const osg::StateSet* ss)
    Push state set on the current state group.
    -[more]inline void popStateSet() +[more]inline void popStateSet()
    Pop the top state set and hence associated state group.
    -[more]void setRenderGraph(RenderGraph* rg) +[more]void setRenderGraph(RenderGraph* rg)
    -[more]RenderGraph* getRenderGraph() +[more]RenderGraph* getRenderGraph()
    -[more]void setRenderStage(RenderStage* rg) +[more]void setRenderStage(RenderStage* rg)
    -[more]RenderStage* getRenderStage() +[more]RenderStage* getRenderStage()
    -[more]const float getCalculatedNearPlane() const +[more]const float getCalculatedNearPlane() const
    -[more]const float getCalculatedFarPlane() const +[more]const float getCalculatedFarPlane() const

    Public Members

    -[more]enum TransparencySortMode +[more]enum TransparencySortMode

    Protected Fields

    -[more]int _frameNumber +[more]osg::ref_ptr<CullViewState> _tvs
    -[more]osg::ref_ptr<CullViewState> _tvs +[more]osg::ref_ptr<CullViewState> _cvs
    -[more]osg::ref_ptr<CullViewState> _cvs +[more]osg::ref_ptr<RenderGraph> _rootRenderGraph
    -[more]osg::ref_ptr<RenderGraph> _rootRenderGraph +[more]RenderGraph* _currentRenderGraph
    -[more]RenderGraph* _currentRenderGraph +[more]osg::ref_ptr<RenderStage> _rootRenderStage
    -[more]osg::ref_ptr<RenderStage> _rootRenderStage +[more]RenderBin* _currentRenderBin
    -[more]RenderBin* _currentRenderBin +[more]std::vector<CullViewState::CullingMode> _cullingModeStack
    -[more]std::vector<CullViewState::CullingMode> _cullingModeStack +[more]float _LODBias
    -[more]float _LODBias +[more]float _calculated_znear
    -[more]float _calculated_znear +[more]float _calculated_zfar
    -[more]float _calculated_zfar +[more]osg::ref_ptr<const osg::Camera> _camera
    -[more]osg::ref_ptr<const osg::Camera> _camera +[more]TransparencySortMode _tsm
    -[more]TransparencySortMode _tsm +[more]osg::ref_ptr<osg::Viewport> _viewport
    -[more]int _view[4] +[more]bool _impostorActive
    -[more]bool _impostorActive +[more]bool _depthSortImpostorSprites
    -[more]bool _depthSortImpostorSprites +[more]float _impostorPixelErrorThreshold
    -[more]float _impostorPixelErrorThreshold +[more]int _numFramesToKeepImpostorSprites
    -[more]int _numFramesToKeepImpostorSprites +[more]unsigned int _currentReuseMatrixIndex
    -[more]unsigned int _currentReuseMatrixIndex +[more]unsigned int _currentReuseRenderLeafIndex
    -[more]unsigned int _currentReuseRenderLeafIndex -
    -[more]osg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager +[more]osg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager

    Protected Methods

    -[more] CullVisitor(const CullVisitor&) +[more] CullVisitor(const CullVisitor&)
    prevent unwanted copy construction
    -[more]CullVisitor& operator = (const CullVisitor&) +[more]CullVisitor& operator = (const CullVisitor&)
    prevent unwanted copy operator
    -[more]inline osg::Matrix* getCurrentMatrix() +[more]inline osg::Matrix* getCurrentMatrix()
    -[more]inline osg::Matrix* getInverseCurrentMatrix() +[more]inline osg::Matrix* getInverseCurrentMatrix()
    -[more]inline const osg::Vec3& getEyeLocal() const +[more]inline const osg::Vec3& getEyeLocal() const
    -[more]inline const osg::Vec3& getCenterLocal() const +[more]inline const osg::Vec3& getCenterLocal() const
    -[more]inline const osg::Vec3& getLookVectorLocal() const +[more]inline const osg::Vec3& getLookVectorLocal() const
    -[more]inline bool isCulled(const osg::BoundingSphere& sp, CullViewState::CullingMode& mode) const +[more]inline bool isCulled(const osg::BoundingSphere& sp, CullViewState::CullingMode& mode) const
    -[more]inline const bool isCulled(const osg::BoundingBox& bb, const CullViewState::CullingMode mode) const +[more]inline const bool isCulled(const osg::BoundingBox& bb, const CullViewState::CullingMode mode) const
    -[more]void updateCalculatedNearFar(const osg::BoundingBox& bb) +[more]void updateCalculatedNearFar(const osg::BoundingBox& bb)
    -[more]void updateCalculatedNearFar(const osg::Vec3& pos) +[more]void updateCalculatedNearFar(const osg::Vec3& pos)
    -[more]inline void addDrawable(osg::Drawable* drawable, osg::Matrix* matrix) +[more]inline void addDrawable(osg::Drawable* drawable, osg::Matrix* matrix)
    Add a drawable to current render graph
    -[more]inline void addDrawableAndDepth(osg::Drawable* drawable, osg::Matrix* matrix, const float depth) +[more]inline void addDrawableAndDepth(osg::Drawable* drawable, osg::Matrix* matrix, const float depth)
    Add a drawable and depth to current render graph
    -[more]inline void addLight(osg::Light* light, osg::Matrix* matrix) +[more]inline void addLight(osg::Light* light, osg::Matrix* matrix)
    Add a light to current render graph
    -[more]osg::ImpostorSprite* createImpostorSprite(osg::Impostor& node) +[more]osg::ImpostorSprite* createImpostorSprite(osg::Impostor& node)
    create an impostor sprite by setting up a pre-rendering stage to generate the impostor texture.
    -[more]inline osg::Matrix* createOrReuseMatrix() +[more]inline osg::Matrix* createOrReuseMatrix()
    -[more]inline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f) +[more]inline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f)

    Protected Members

    -[more]typedef std::vector< osg::ref_ptr<CullViewState> > CullViewStateStack CullViewStateStack _viewStateStack +[more]typedef std::vector< osg::ref_ptr<CullViewState> > CullViewStateStack CullViewStateStack _viewStateStack
    -[more]typedef std::vector< osg::ref_ptr<osg::Matrix> > MatrixList MatrixList _reuseMatrixList +[more]typedef std::vector< osg::ref_ptr<osg::Matrix> > MatrixList MatrixList _reuseMatrixList
    -[more]typedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList RenderLeafList _reuseRenderLeafList +[more]typedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList RenderLeafList _reuseRenderLeafList

    @@ -239,71 +234,71 @@ from the eye to the one nearest the eye.
    - +
    o CullVisitor()

    - +

    ovirtual ~CullVisitor()

    - -

    ovoid reset() + +
    ovirtual void reset()

    - +

    ovirtual void apply(osg::Node&)

    - +

    ovirtual void apply(osg::Geode& node)

    - +

    ovirtual void apply(osg::Billboard& node)

    - +

    ovirtual void apply(osg::LightSource& node)

    - +

    ovirtual void apply(osg::Group& node)

    - +

    ovirtual void apply(osg::Transform& node)

    - +

    ovirtual void apply(osg::Switch& node)

    - +

    ovirtual void apply(osg::LOD& node)

    - +

    ovirtual void apply(osg::Impostor& node)

    - +

    ovoid setCamera(const osg::Camera& camera)

    - +

    oconst osg::Camera* getCamera() const

    - +

    ovoid setLODBias(const float bias)

    - +

    oconst float getLODBias() const

    - +

    ovoid setImpostorsActive(const bool active)
    Switch the creation of Impostors on or off. Setting active to false forces the CullVisitor to use the Impostor @@ -312,103 +307,98 @@ CullVisitor to create the appropriate pre-rendering stages which render to the ImpostorSprite's texture.

    - +

    oconst bool getImpostorsActive() const
    Get whether impostors are active or not.

    - +

    ovoid setImpostorPixelErrorThreshold(const float numPixels)
    Set the impostor error threshold. Used in calculation of whether impostors remain valid.

    - +

    oconst float getImpostorPixelErrorThreshold() const
    Get the impostor error threshold

    - +

    ovoid setDepthSortImpostorSprites(const bool doDepthSort)
    Set whether ImpsotorSprite's should be placed in a depth sorted bin for rendering

    - +

    oconst bool setDepthSortImpostorSprites() const
    Get whether ImpsotorSprite's are depth sorted bin for rendering

    - +

    ovoid setNumberOfFrameToKeepImpostorSprites(const int numFrames)
    Set the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled

    - +

    oconst int getNumberOfFrameToKeepImpostorSprites() const
    Get the number of frames that an ImpsotorSprite's is kept whilst not being beyond, before being recycled

    - +

    oenum TransparencySortMode

    - +
    o LOOK_VECTOR_DISTANCE

    - +

    o OBJECT_EYE_POINT_DISTANCE

    - -
    ovoid setTransparencySortMode(TransparencySortMode tsm) + +
    ovoid setTransparencySortMode(TransparencySortMode tsm)

    - +

    ovoid setCullingMode(CullViewState::CullingMode mode)
    Sets the current CullingMode

    - +

    oCullViewState::CullingMode getCullingMode() const
    Returns the current CullingMode

    - -

    ovoid setViewport(int x, int y, int width, int height) + +
    ovoid setViewport(osg::Viewport* viewport)
    Set the viewport. Used to enable the CullVisitor can make decision -such as based on viewport dimensions,. +such as based on viewport dimensions.

    - -

    ovoid getViewport(int& x, int& y, int& width, int& height) + +
    oconst osg::Viewport* getViewport() const +
    Get the const viewport. +

    + + +

    oosg::Viewport* getViewport()
    Get the viewport.

    - - -

    oinline void setFrameNumber(const int fn) -
    Set the frame number -

    - - -

    oinline const int getFrameNumber() const -
    Get the frame number -

    - +

    ovoid pushCullViewState(const osg::Matrix* matrix=NULL)

    - +

    ovoid popCullViewState()

    - +

    oinline void pushStateSet(const osg::StateSet* ss)
    Push state set on the current state group. If the state exists in a child state group of the current @@ -418,205 +408,201 @@ it to the current state group then move the current state group pointer to the new state group.

    - +

    oinline void popStateSet()
    Pop the top state set and hence associated state group. Move the current state group to the parent of the popped state group.

    - +

    ovoid setRenderGraph(RenderGraph* rg)

    - +

    oRenderGraph* getRenderGraph()

    - +

    ovoid setRenderStage(RenderStage* rg)

    - +

    oRenderStage* getRenderStage()

    - +

    oconst float getCalculatedNearPlane() const

    - +

    oconst float getCalculatedFarPlane() const

    - -

    o CullVisitor(const CullVisitor&) + +
    o CullVisitor(const CullVisitor&)
    prevent unwanted copy construction

    - +

    oCullVisitor& operator = (const CullVisitor&)
    prevent unwanted copy operator

    - +

    oinline osg::Matrix* getCurrentMatrix()

    - +

    oinline osg::Matrix* getInverseCurrentMatrix()

    - +

    oinline const osg::Vec3& getEyeLocal() const

    - +

    oinline const osg::Vec3& getCenterLocal() const

    - +

    oinline const osg::Vec3& getLookVectorLocal() const

    - +

    oinline bool isCulled(const osg::BoundingSphere& sp, CullViewState::CullingMode& mode) const

    - +

    oinline const bool isCulled(const osg::BoundingBox& bb, const CullViewState::CullingMode mode) const

    - +

    ovoid updateCalculatedNearFar(const osg::BoundingBox& bb)

    - +

    ovoid updateCalculatedNearFar(const osg::Vec3& pos)

    - +

    oinline void addDrawable(osg::Drawable* drawable, osg::Matrix* matrix)
    Add a drawable to current render graph

    - +

    oinline void addDrawableAndDepth(osg::Drawable* drawable, osg::Matrix* matrix, const float depth)
    Add a drawable and depth to current render graph

    - +

    oinline void addLight(osg::Light* light, osg::Matrix* matrix)
    Add a light to current render graph

    - +

    oosg::ImpostorSprite* createImpostorSprite(osg::Impostor& node)
    create an impostor sprite by setting up a pre-rendering stage to generate the impostor texture.

    - - -

    oint _frameNumber -

    - +

    otypedef std::vector< osg::ref_ptr<CullViewState> > CullViewStateStack CullViewStateStack _viewStateStack

    - +

    oosg::ref_ptr<CullViewState> _tvs

    - +

    oosg::ref_ptr<CullViewState> _cvs

    - +

    oosg::ref_ptr<RenderGraph> _rootRenderGraph

    - +

    oRenderGraph* _currentRenderGraph

    - +

    oosg::ref_ptr<RenderStage> _rootRenderStage

    - +

    oRenderBin* _currentRenderBin

    - +

    ostd::vector<CullViewState::CullingMode> _cullingModeStack

    - +

    ofloat _LODBias

    - +

    ofloat _calculated_znear

    - +

    ofloat _calculated_zfar

    - +

    oosg::ref_ptr<const osg::Camera> _camera

    - -

    oTransparencySortMode _tsm + +
    oTransparencySortMode _tsm

    - - -

    oint _view[4] + + +
    oosg::ref_ptr<osg::Viewport> _viewport

    - +

    obool _impostorActive

    - +

    obool _depthSortImpostorSprites

    - +

    ofloat _impostorPixelErrorThreshold

    - +

    oint _numFramesToKeepImpostorSprites

    - +

    otypedef std::vector< osg::ref_ptr<osg::Matrix> > MatrixList MatrixList _reuseMatrixList

    - +

    ounsigned int _currentReuseMatrixIndex

    - +

    oinline osg::Matrix* createOrReuseMatrix()

    - +

    otypedef std::vector< osg::ref_ptr<RenderLeaf> > RenderLeafList RenderLeafList _reuseRenderLeafList

    - +

    ounsigned int _currentReuseRenderLeafIndex

    - +

    oinline RenderLeaf* createOrReuseRenderLeaf(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f)

    - +

    oosg::ref_ptr<osg::ImpostorSpriteManager> _impostorSpriteManager

    diff --git a/doc/doc++/osgUtil/DepthSortedBin.html b/doc/doc++/osgUtil/DepthSortedBin.html index c2ed5a0d7..5afadc3f1 100644 --- a/doc/doc++/osgUtil/DepthSortedBin.html +++ b/doc/doc++/osgUtil/DepthSortedBin.html @@ -22,40 +22,40 @@

    Public Methods

    -[more] DepthSortedBin() +[more] DepthSortedBin()
    -[more]virtual osg::Object* clone() const +[more]virtual osg::Object* clone() const
    -[more]virtual bool isSameKindAs(const osg::Object* obj) const +[more]virtual bool isSameKindAs(const osg::Object* obj) const
    -[more]virtual const char* className() const +[more]virtual const char* className() const
    -[more]virtual void reset() +[more]virtual void reset()
    -[more]virtual void sort_local() +[more]virtual void sort_local()
    -[more]virtual void draw_local(osg::State& state, RenderLeaf*& previous) +[more]virtual void draw_local(osg::State& state, RenderLeaf*& previous)
    -[more]void setDrawOrder(const DrawOrder drawOrder) +[more]void setDrawOrder(const DrawOrder drawOrder)
    -[more]const DrawOrder getDrawOrder() const +[more]const DrawOrder getDrawOrder() const

    Public Members

    -[more]enum DrawOrder +[more]enum DrawOrder

    Protected Fields

    -[more]DrawOrder _drawOrder +[more]DrawOrder _drawOrder
    -[more]RenderLeafList _renderLeafList +[more]RenderLeafList _renderLeafList

    Protected Methods

    -[more]virtual ~DepthSortedBin() +[more]virtual ~DepthSortedBin()

    @@ -106,65 +106,65 @@
    - +
    o DepthSortedBin()

    - +

    ovirtual osg::Object* clone() const

    - +

    ovirtual bool isSameKindAs(const osg::Object* obj) const

    - +

    ovirtual const char* className() const

    - +

    ovirtual void reset()

    - +

    ovirtual void sort_local()

    - +

    ovirtual void draw_local(osg::State& state, RenderLeaf*& previous)

    - +

    oenum DrawOrder

    - +
    o FRONT_TO_BACK

    - +

    o BACK_TO_FRONT

    - -
    ovoid setDrawOrder(const DrawOrder drawOrder) + +
    ovoid setDrawOrder(const DrawOrder drawOrder)

    - -

    oconst DrawOrder getDrawOrder() const + +
    oconst DrawOrder getDrawOrder() const

    - +

    ovirtual ~DepthSortedBin()

    - -

    oDrawOrder _drawOrder + +
    oDrawOrder _drawOrder

    - +

    oRenderLeafList _renderLeafList

    diff --git a/doc/doc++/osgUtil/DisplayListVisitor.html b/doc/doc++/osgUtil/DisplayListVisitor.html index 079093797..92e12d2d1 100644 --- a/doc/doc++/osgUtil/DisplayListVisitor.html +++ b/doc/doc++/osgUtil/DisplayListVisitor.html @@ -23,44 +23,44 @@

    Public Methods

    -[more] DisplayListVisitor(DisplayListMode mode=SWITCH_ON_DISPLAY_LISTS) +[more] DisplayListVisitor(DisplayListMode mode=SWITCH_ON_DISPLAY_LISTS)
    Construct a CompileGeoSetsVisior to traverse all child, with set specfied display list mode.
    -[more]void setDisplayListMode(DisplayListMode mode) +[more]void setDisplayListMode(DisplayListMode mode)
    Set the operational mode of how the visitor should set up osg::GeoSet's
    -[more]DisplayListMode getDisplayListMode() const +[more]DisplayListMode getDisplayListMode() const
    Get the operational mode
    -[more]void setState(osg::State* state) +[more]void setState(osg::State* state)
    Set the State to use during traversal.
    -[more]osg::State* getState() +[more]osg::State* getState()
    -[more]virtual void apply(osg::Node& node) +[more]virtual void apply(osg::Node& node)
    Simply traverse using standard NodeVisitor traverse method
    -[more]virtual void apply(osg::Geode& node) +[more]virtual void apply(osg::Geode& node)
    For each Geode visited set the display list usage according to the _displayListMode

    Public Members

    -[more]enum DisplayListMode +[more]enum DisplayListMode
    Operation modes of the DisplayListVisitor

    Protected Fields

    -[more]DisplayListMode _displayListMode +[more]DisplayListMode _displayListMode
    -[more]osg::ref_ptr<osg::State> _localState +[more]osg::ref_ptr<osg::State> _localState
    local state is created in constructor and used as the default state during traversal
    -[more]osg::ref_ptr<osg::State> _externalState +[more]osg::ref_ptr<osg::State> _externalState
    external state is used to override the default state
    -[more]osg::ref_ptr<osg::State> _activeState +[more]osg::ref_ptr<osg::State> _activeState
    active state is equal to _externalState when it is valid, otherwise defaults to _localState

    @@ -89,81 +89,81 @@ or uses OpenGL calls so if safe to use before a valid OpenGL context has been se
    - +
    oenum DisplayListMode
    Operation modes of the DisplayListVisitor

    - +
    o SWITCH_ON_AND_COMPILE_DISPLAY_LISTS

    - +

    o COMPILE_ON_DISPLAY_LISTS

    - +

    o SWITCH_ON_DISPLAY_LISTS

    - +

    o SWITCH_OFF_DISPLAY_LISTS

    - -
    o DisplayListVisitor(DisplayListMode mode=SWITCH_ON_DISPLAY_LISTS) + +
    o DisplayListVisitor(DisplayListMode mode=SWITCH_ON_DISPLAY_LISTS)
    Construct a CompileGeoSetsVisior to traverse all child, with set specfied display list mode. Default mode is to gset->setUseDisplayList(true).

    - -

    ovoid setDisplayListMode(DisplayListMode mode) + +
    ovoid setDisplayListMode(DisplayListMode mode)
    Set the operational mode of how the visitor should set up osg::GeoSet's

    - -

    oDisplayListMode getDisplayListMode() const + +
    oDisplayListMode getDisplayListMode() const
    Get the operational mode

    - +

    ovoid setState(osg::State* state)
    Set the State to use during traversal.

    - +

    oosg::State* getState()

    - +

    ovirtual void apply(osg::Node& node)
    Simply traverse using standard NodeVisitor traverse method

    - +

    ovirtual void apply(osg::Geode& node)
    For each Geode visited set the display list usage according to the _displayListMode

    - -

    oDisplayListMode _displayListMode + +
    oDisplayListMode _displayListMode

    - +

    oosg::ref_ptr<osg::State> _localState
    local state is created in constructor and used as the default state during traversal

    - +

    oosg::ref_ptr<osg::State> _externalState
    external state is used to override the default state

    - +

    oosg::ref_ptr<osg::State> _activeState
    active state is equal to _externalState when it is valid, otherwise defaults to _localState

    diff --git a/doc/doc++/osgUtil/DriveManipulator.html b/doc/doc++/osgUtil/DriveManipulator.html index c2a982072..709fb8b27 100644 --- a/doc/doc++/osgUtil/DriveManipulator.html +++ b/doc/doc++/osgUtil/DriveManipulator.html @@ -22,23 +22,23 @@

    Public Methods

    -[more] DriveManipulator() +[more] DriveManipulator()
    -[more]virtual ~DriveManipulator() +[more]virtual ~DriveManipulator()
    -[more]virtual void setNode(osg::Node*) +[more]virtual void setNode(osg::Node*)
    Attach a node to the manipulator.
    -[more]virtual const osg::Node* getNode() const +[more]virtual const osg::Node* getNode() const
    Return node if attached
    -[more]virtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Move the camera to the default position.
    -[more]virtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Start/restart the manipulator
    -[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
    handle events, return true if handled, false otherwise

    @@ -68,15 +68,15 @@
    - +
    o DriveManipulator()

    - +

    ovirtual ~DriveManipulator()

    - +

    ovirtual void setNode(osg::Node*)
    Attach a node to the manipulator. Automatically detaches previously attached node. @@ -84,33 +84,33 @@ setNode(NULL) detaches previously nodes. Is ignored by manipulators which do not require a reference model.

    - +

    ovirtual const osg::Node* getNode() const
    Return node if attached

    - +

    ovirtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Move the camera to the default position. May be ignored by manipulators if home functionality is not appropriate.

    - +

    ovirtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Start/restart the manipulator

    - +

    ovirtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
    handle events, return true if handled, false otherwise

    - +
    o USE_MOUSE_Y_FOR_SPEED

    - +

    o USE_MOUSE_BUTTONS_FOR_SPEED

    diff --git a/doc/doc++/osgUtil/FlightManipulator.html b/doc/doc++/osgUtil/FlightManipulator.html index 92d15465e..1e2e27859 100644 --- a/doc/doc++/osgUtil/FlightManipulator.html +++ b/doc/doc++/osgUtil/FlightManipulator.html @@ -22,32 +22,32 @@

    Public Methods

    -[more] FlightManipulator() +[more] FlightManipulator()
    -[more]virtual ~FlightManipulator() +[more]virtual ~FlightManipulator()
    -[more]virtual void setNode(osg::Node*) +[more]virtual void setNode(osg::Node*)
    Attach a node to the manipulator.
    -[more]virtual const osg::Node* getNode() const +[more]virtual const osg::Node* getNode() const
    Return node if attached
    -[more]virtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Move the camera to the default position.
    -[more]virtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Start/restart the manipulator
    -[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
    handle events, return true if handled, false otherwise
    -[more]void setYawControlMode(YawControlMode ycm) +[more]void setYawControlMode(YawControlMode ycm)
    Set the yaw control between no yaw and yawing when banked

    Public Members

    -[more]enum YawControlMode +[more]enum YawControlMode

    @@ -76,15 +76,15 @@
    - +
    o FlightManipulator()

    - +

    ovirtual ~FlightManipulator()

    - +

    ovirtual void setNode(osg::Node*)
    Attach a node to the manipulator. Automatically detaches previously attached node. @@ -92,43 +92,43 @@ setNode(NULL) detaches previously nodes. Is ignored by manipulators which do not require a reference model.

    - +

    ovirtual const osg::Node* getNode() const
    Return node if attached

    - +

    ovirtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Move the camera to the default position. May be ignored by manipulators if home functionality is not appropriate.

    - +

    ovirtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us)
    Start/restart the manipulator

    - +

    ovirtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
    handle events, return true if handled, false otherwise

    - +

    oenum YawControlMode

    - +
    o YAW_AUTOMATICALLY_WHEN_BANKED

    - +

    o NO_AUTOMATIC_YAW

    - -
    ovoid setYawControlMode(YawControlMode ycm) + +
    ovoid setYawControlMode(YawControlMode ycm)
    Set the yaw control between no yaw and yawing when banked

    diff --git a/doc/doc++/osgUtil/GUIActionAdapter.html b/doc/doc++/osgUtil/GUIActionAdapter.html index dfcd61ca1..cb0fff571 100644 --- a/doc/doc++/osgUtil/GUIActionAdapter.html +++ b/doc/doc++/osgUtil/GUIActionAdapter.html @@ -13,11 +13,11 @@

    Public Methods

    -[more]virtual void requestRedraw() = 0 +[more]virtual void requestRedraw() = 0
    -[more]virtual void requestContinuousUpdate(bool needed=true) = 0 +[more]virtual void requestContinuousUpdate(bool needed=true) = 0
    -[more]virtual void requestWarpPointer(int x, int y) = 0 +[more]virtual void requestWarpPointer(int x, int y) = 0

    @@ -56,15 +56,15 @@ neutral mouse position is required, i.e when mimicking a aircrafts joystick. - +
    ovirtual void requestRedraw() = 0

    - +

    ovirtual void requestContinuousUpdate(bool needed=true) = 0

    - +

    ovirtual void requestWarpPointer(int x, int y) = 0

    diff --git a/doc/doc++/osgUtil/GUIEventAdapter.html b/doc/doc++/osgUtil/GUIEventAdapter.html index 71ce35d49..b1e4e517c 100644 --- a/doc/doc++/osgUtil/GUIEventAdapter.html +++ b/doc/doc++/osgUtil/GUIEventAdapter.html @@ -23,52 +23,52 @@

    Public Methods

    -[more] GUIEventAdapter() +[more] GUIEventAdapter()
    -[more]virtual EventType getEventType() const = 0 +[more]virtual EventType getEventType() const = 0
    Get the EventType of the GUI event
    -[more]virtual int getKey() const = 0 +[more]virtual int getKey() const = 0
    key pressed, return -1 if inappropriate for this event.
    -[more]virtual int getButton() const = 0 +[more]virtual int getButton() const = 0
    button pressed/released, return -1 if inappropriate for this event
    -[more]virtual int getXmin() const = 0 +[more]virtual int getXmin() const = 0
    window minimum x.
    -[more]virtual int getXmax() const = 0 +[more]virtual int getXmax() const = 0
    window maximum x.
    -[more]virtual int getYmin() const = 0 +[more]virtual int getYmin() const = 0
    window minimum y.
    -[more]virtual int getYmax() const = 0 +[more]virtual int getYmax() const = 0
    window maximum y.
    -[more]virtual int getX() const = 0 +[more]virtual int getX() const = 0
    current mouse x position
    -[more]virtual int getY() const = 0 +[more]virtual int getY() const = 0
    current mouse y position
    -[more]virtual unsigned int getButtonMask() const = 0 +[more]virtual unsigned int getButtonMask() const = 0
    current mouse button state
    -[more]virtual float time() const = 0 +[more]virtual float time() const = 0
    time in seconds of event.

    Public Members

    -[more]enum MouseButtonMask +[more]enum MouseButtonMask
    -[more]enum EventType +[more]enum EventType

    Protected Methods

    -[more]virtual ~GUIEventAdapter() +[more]virtual ~GUIEventAdapter()
    Force users to create on heap, so that multiple referencing is safe

    @@ -86,122 +86,122 @@ Toolkit see osgGLUT::GLUTEventAdapter.
    - +
    o GUIEventAdapter()

    - +

    oenum MouseButtonMask

    - +
    o LEFT_BUTTON

    - +

    o MIDDLE_BUTTON

    - +

    o RIGHT_BUTTON

    - +
    oenum EventType

    - +
    o PUSH

    - +

    o RELEASE

    - +

    o DRAG

    - +

    o MOVE

    - +

    o KEYBOARD

    - +

    o FRAME

    - +

    o RESIZE

    - +

    o NONE

    - -
    ovirtual EventType getEventType() const = 0 + +
    ovirtual EventType getEventType() const = 0
    Get the EventType of the GUI event

    - +

    ovirtual int getKey() const = 0
    key pressed, return -1 if inappropriate for this event.

    - +

    ovirtual int getButton() const = 0
    button pressed/released, return -1 if inappropriate for this event

    - +

    ovirtual int getXmin() const = 0
    window minimum x.

    - +

    ovirtual int getXmax() const = 0
    window maximum x.

    - +

    ovirtual int getYmin() const = 0
    window minimum y.

    - +

    ovirtual int getYmax() const = 0
    window maximum y.

    - +

    ovirtual int getX() const = 0
    current mouse x position

    - +

    ovirtual int getY() const = 0
    current mouse y position

    - +

    ovirtual unsigned int getButtonMask() const = 0
    current mouse button state

    - +

    ovirtual float time() const = 0
    time in seconds of event.

    - +

    ovirtual ~GUIEventAdapter()
    Force users to create on heap, so that multiple referencing is safe

    diff --git a/doc/doc++/osgUtil/GUIEventHandler.html b/doc/doc++/osgUtil/GUIEventHandler.html index 2e90e1c2b..da0dd36f0 100644 --- a/doc/doc++/osgUtil/GUIEventHandler.html +++ b/doc/doc++/osgUtil/GUIEventHandler.html @@ -22,7 +22,7 @@

    Public Methods

    -[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) = 0 +[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) = 0
    Handle events, return true if handled, false otherwise

    @@ -34,7 +34,7 @@
    - +
    ovirtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) = 0
    Handle events, return true if handled, false otherwise

    diff --git a/doc/doc++/osgUtil/General.html b/doc/doc++/osgUtil/General.html index 8e5109b0b..bf5c245e4 100644 --- a/doc/doc++/osgUtil/General.html +++ b/doc/doc++/osgUtil/General.html @@ -10,14 +10,17 @@
    +o#define +OSGUTIL_APPVISITOR
    + o#define OSGUTIL_CAMERAMANIPULATOR
    o#define OSGUTIL_CULLVIEWSTATE
    -o#define -OSGUTIL_NEWCULLVISITOR
    +o#define +OSGUTIL_CULLVISITOR
    o#define OSGUTIL_DEPTHSORTEDBIN
    @@ -58,6 +61,9 @@ o#define OSGUTIL_INTERSECTVISITOR
    +o#define +OSGUTIL_OPTIMIZESTATEVISITOR
    + o#define OSGUTIL_RENDERBIN
    diff --git a/doc/doc++/osgUtil/HIER.html b/doc/doc++/osgUtil/HIER.html index 3df636192..6e9c0bbcd 100644 --- a/doc/doc++/osgUtil/HIER.html +++ b/doc/doc++/osgUtil/HIER.html @@ -9,6 +9,7 @@

    Hierarchy of Classes

      +
    • osgUtil::AppVisitor
    • osgUtil::CullViewState
    • osgUtil::CullVisitor
    • osgUtil::DisplayListVisitor @@ -29,6 +30,7 @@
    • osgUtil::InsertImpostorsVisitor
    • osgUtil::IntersectState
    • osgUtil::IntersectVisitor +
    • osgUtil::OptimizeStateVisitor
    • osgUtil::RegisterRenderBinProxy
    • osgUtil::RenderBin
        diff --git a/doc/doc++/osgUtil/HIERjava.html b/doc/doc++/osgUtil/HIERjava.html index 5cb98b740..6cc184ee5 100644 --- a/doc/doc++/osgUtil/HIERjava.html +++ b/doc/doc++/osgUtil/HIERjava.html @@ -9,6 +9,13 @@

        Hierarchy of classes

          + + + + + + + @@ -78,6 +85,13 @@ + + + + + + + diff --git a/doc/doc++/osgUtil/Hit.html b/doc/doc++/osgUtil/Hit.html index b9be68f93..f34bb072d 100644 --- a/doc/doc++/osgUtil/Hit.html +++ b/doc/doc++/osgUtil/Hit.html @@ -22,40 +22,40 @@

          Public Fields

          -[more]float _ratio +[more]float _ratio
          -[more]osg::LineSegment* _originalLineSegment +[more]osg::LineSegment* _originalLineSegment
          -[more]osg::LineSegment* _localLineSegment +[more]osg::LineSegment* _localLineSegment
          -[more]osg::NodePath _nodePath +[more]osg::NodePath _nodePath
          -[more]osg::Geode* _geode +[more]osg::Geode* _geode
          -[more]osg::GeoSet* _geoset +[more]osg::GeoSet* _geoset
          -[more]osg::Matrix* _matrix +[more]osg::Matrix* _matrix
          -[more]VecIndexList _vecIndexList +[more]VecIndexList _vecIndexList
          -[more]int _primitiveIndex +[more]int _primitiveIndex
          -[more]osg::Vec3 _intersectPoint +[more]osg::Vec3 _intersectPoint
          -[more]osg::Vec3 _intersectNormal +[more]osg::Vec3 _intersectNormal

          Public Methods

          -[more] Hit() +[more] Hit()
          -[more] Hit(const Hit& hit) +[more] Hit(const Hit& hit)
          -[more] ~Hit() +[more] ~Hit()
          -[more]Hit& operator = (const Hit& hit) +[more]Hit& operator = (const Hit& hit)
          -[more]typedef std::vector<int> VecIndexList bool operator < (const Hit& hit) const +[more]typedef std::vector<int> VecIndexList bool operator < (const Hit& hit) const

          @@ -66,67 +66,67 @@
          - +
          o Hit()

          - -

          o Hit(const Hit& hit) + +
          o Hit(const Hit& hit)

          - +

          o ~Hit()

          - +

          oHit& operator = (const Hit& hit)

          - +

          otypedef std::vector<int> VecIndexList bool operator < (const Hit& hit) const

          - +

          ofloat _ratio

          - +

          oosg::LineSegment* _originalLineSegment

          - +

          oosg::LineSegment* _localLineSegment

          - +

          oosg::NodePath _nodePath

          - +

          oosg::Geode* _geode

          - +

          oosg::GeoSet* _geoset

          - +

          oosg::Matrix* _matrix

          - +

          oVecIndexList _vecIndexList

          - +

          oint _primitiveIndex

          - +

          oosg::Vec3 _intersectPoint

          - +

          oosg::Vec3 _intersectNormal

          diff --git a/doc/doc++/osgUtil/InsertImpostorsVisitor.html b/doc/doc++/osgUtil/InsertImpostorsVisitor.html index 60e14d44d..cc57c074b 100644 --- a/doc/doc++/osgUtil/InsertImpostorsVisitor.html +++ b/doc/doc++/osgUtil/InsertImpostorsVisitor.html @@ -23,45 +23,45 @@

          Public Methods

          -[more] InsertImpostorsVisitor() +[more] InsertImpostorsVisitor()
          default to traversing all children
          -[more]void setImpostorThresholdRatio(const float ratio) +[more]void setImpostorThresholdRatio(const float ratio)
          -[more]const float getImpostorThresholdRatio() const +[more]const float getImpostorThresholdRatio() const
          -[more]void setMaximumNumberOfNestedImpostors(const unsigned int num) +[more]void setMaximumNumberOfNestedImpostors(const unsigned int num)
          -[more]const unsigned int getMaximumNumberOfNestedImpostors() const +[more]const unsigned int getMaximumNumberOfNestedImpostors() const
          -[more]void reset() +[more]void reset()
          empty visitor, make it ready for next traversal
          -[more]virtual void apply(osg::Node& node) +[more]virtual void apply(osg::Node& node)
          -[more]virtual void apply(osg::Group& node) +[more]virtual void apply(osg::Group& node)
          -[more]virtual void apply(osg::LOD& node) +[more]virtual void apply(osg::LOD& node)
          -[more]virtual void apply(osg::Impostor& node) +[more]virtual void apply(osg::Impostor& node)
          -[more]void insertImpostors() +[more]void insertImpostors()

          Protected Fields

          -[more]LODList _lodList +[more]LODList _lodList
          -[more]float _impostorThresholdRatio +[more]float _impostorThresholdRatio
          -[more]unsigned int _maximumNumNestedImpostors +[more]unsigned int _maximumNumNestedImpostors
          -[more]unsigned int _numNestedImpostors +[more]unsigned int _numNestedImpostors

          Protected Members

          -[more]typedef std::vector< osg::LOD* > LODList GroupList _groupList +[more]typedef std::vector< osg::LOD* > LODList GroupList _groupList

          @@ -74,69 +74,69 @@ For example of usage see src/Demos/osgimpostor.
          - +
          o InsertImpostorsVisitor()
          default to traversing all children

          - +

          ovoid setImpostorThresholdRatio(const float ratio)

          - +

          oconst float getImpostorThresholdRatio() const

          - +

          ovoid setMaximumNumberOfNestedImpostors(const unsigned int num)

          - +

          oconst unsigned int getMaximumNumberOfNestedImpostors() const

          - +

          ovoid reset()
          empty visitor, make it ready for next traversal

          - +

          ovirtual void apply(osg::Node& node)

          - +

          ovirtual void apply(osg::Group& node)

          - +

          ovirtual void apply(osg::LOD& node)

          - +

          ovirtual void apply(osg::Impostor& node)

          - +

          ovoid insertImpostors()

          - +

          otypedef std::vector< osg::LOD* > LODList GroupList _groupList

          - +

          oLODList _lodList

          - +

          ofloat _impostorThresholdRatio

          - +

          ounsigned int _maximumNumNestedImpostors

          - +

          ounsigned int _numNestedImpostors

          diff --git a/doc/doc++/osgUtil/IntersectState.html b/doc/doc++/osgUtil/IntersectState.html index 32225705f..d99c44b03 100644 --- a/doc/doc++/osgUtil/IntersectState.html +++ b/doc/doc++/osgUtil/IntersectState.html @@ -22,30 +22,30 @@

          Public Fields

          -[more]osg::Matrix* _matrix +[more]osg::Matrix* _matrix
          -[more]osg::Matrix* _inverse +[more]osg::Matrix* _inverse

          Public Methods

          -[more] IntersectState() +[more] IntersectState()
          -[more]bool isCulled(const osg::BoundingSphere& bs, LineSegmentmentMask& segMaskOut) +[more]bool isCulled(const osg::BoundingSphere& bs, LineSegmentmentMask& segMaskOut)
          -[more]bool isCulled(const osg::BoundingBox& bb, LineSegmentmentMask& segMaskOut) +[more]bool isCulled(const osg::BoundingBox& bb, LineSegmentmentMask& segMaskOut)

          Public Members

          -[more]typedef std::vector< std::pair<osg::LineSegment*,osg::LineSegment*> > LineSegmentList LineSegmentList _segList +[more]typedef std::vector< std::pair<osg::LineSegment*,osg::LineSegment*> > LineSegmentList LineSegmentList _segList
          -[more]typedef std::vector<LineSegmentmentMask> LineSegmentmentMaskStack LineSegmentmentMaskStack _segmentMaskStack +[more]typedef std::vector<LineSegmentmentMask> LineSegmentmentMaskStack LineSegmentmentMaskStack _segmentMaskStack

          Protected Methods

          -[more] ~IntersectState() +[more] ~IntersectState()

          @@ -56,35 +56,35 @@
          - +
          o IntersectState()

          - +

          oosg::Matrix* _matrix

          - +

          oosg::Matrix* _inverse

          - +

          otypedef std::vector< std::pair<osg::LineSegment*,osg::LineSegment*> > LineSegmentList LineSegmentList _segList

          - +

          otypedef std::vector<LineSegmentmentMask> LineSegmentmentMaskStack LineSegmentmentMaskStack _segmentMaskStack

          - +

          obool isCulled(const osg::BoundingSphere& bs, LineSegmentmentMask& segMaskOut)

          - +

          obool isCulled(const osg::BoundingBox& bb, LineSegmentmentMask& segMaskOut)

          - +

          o ~IntersectState()

          diff --git a/doc/doc++/osgUtil/IntersectVisitor.html b/doc/doc++/osgUtil/IntersectVisitor.html index f9a3ecf35..ec57cacb3 100644 --- a/doc/doc++/osgUtil/IntersectVisitor.html +++ b/doc/doc++/osgUtil/IntersectVisitor.html @@ -23,73 +23,73 @@

          Public Methods

          -[more] IntersectVisitor() +[more] IntersectVisitor()
          -[more]virtual ~IntersectVisitor() +[more]virtual ~IntersectVisitor()
          -[more]void reset() +[more]void reset()
          -[more]void addLineSegment(osg::LineSegment* seg) +[more]void addLineSegment(osg::LineSegment* seg)
          Add a line segment to use for intersection testing during scene traversal
          -[more]void setHitReportingMode(HitReportingMode hrm) +[more]void setHitReportingMode(HitReportingMode hrm)
          Set the mode of how hits should reported back from a traversal
          -[more]HitReportingMode getHitReportingMode() +[more]HitReportingMode getHitReportingMode()
          Get the mode of how hits should reported back from a traversal
          -[more]typedef std::map<osg::LineSegment*,HitList > LineSegmentHitListMap HitList& getHitList(osg::LineSegment* seg) +[more]typedef std::map<osg::LineSegment*,HitList > LineSegmentHitListMap HitList& getHitList(osg::LineSegment* seg)
          -[more]int getNumHits(osg::LineSegment* seg) +[more]int getNumHits(osg::LineSegment* seg)
          -[more]bool hits() +[more]bool hits()
          -[more]virtual void apply(osg::Node&) +[more]virtual void apply(osg::Node&)
          -[more]virtual void apply(osg::Geode& node) +[more]virtual void apply(osg::Geode& node)
          -[more]virtual void apply(osg::Billboard& node) +[more]virtual void apply(osg::Billboard& node)
          -[more]virtual void apply(osg::Group& node) +[more]virtual void apply(osg::Group& node)
          -[more]virtual void apply(osg::Transform& node) +[more]virtual void apply(osg::Transform& node)
          -[more]virtual void apply(osg::Switch& node) +[more]virtual void apply(osg::Switch& node)
          -[more]virtual void apply(osg::LOD& node) +[more]virtual void apply(osg::LOD& node)

          Public Members

          -[more]enum HitReportingMode +[more]enum HitReportingMode
          Modes to control how IntersectVisitor reports hits.

          Protected Fields

          -[more]osg::NodePath _nodePath +[more]osg::NodePath _nodePath
          -[more]HitReportingMode _hitReportingMode +[more]HitReportingMode _hitReportingMode
          -[more]LineSegmentHitListMap _segHitList +[more]LineSegmentHitListMap _segHitList

          Protected Methods

          -[more]bool intersect(osg::GeoSet& gset) +[more]bool intersect(osg::GeoSet& gset)
          -[more]void pushMatrix(const osg::Matrix& matrix) +[more]void pushMatrix(const osg::Matrix& matrix)
          -[more]void popMatrix() +[more]void popMatrix()
          -[more]bool enterNode(osg::Node& node) +[more]bool enterNode(osg::Node& node)
          -[more]void leaveNode() +[more]void leaveNode()

          Protected Members

          -[more]typedef std::vector<osg::ref_ptr<IntersectState> > IntersectStateStack IntersectStateStack _intersectStateStack +[more]typedef std::vector<osg::ref_ptr<IntersectState> > IntersectStateStack IntersectStateStack _intersectStateStack

          @@ -103,121 +103,121 @@ pratical functionality!
          - +
          o IntersectVisitor()

          - +

          ovirtual ~IntersectVisitor()

          - +

          ovoid reset()

          - +

          ovoid addLineSegment(osg::LineSegment* seg)
          Add a line segment to use for intersection testing during scene traversal

          - +

          oenum HitReportingMode
          Modes to control how IntersectVisitor reports hits.

          - +
          o ONLY_NEAREST_HIT

          - +

          o ALL_HITS

          - -
          ovoid setHitReportingMode(HitReportingMode hrm) + +
          ovoid setHitReportingMode(HitReportingMode hrm)
          Set the mode of how hits should reported back from a traversal

          - -

          oHitReportingMode getHitReportingMode() + +
          oHitReportingMode getHitReportingMode()
          Get the mode of how hits should reported back from a traversal

          - +

          otypedef std::map<osg::LineSegment*,HitList > LineSegmentHitListMap HitList& getHitList(osg::LineSegment* seg)

          - +

          oint getNumHits(osg::LineSegment* seg)

          - +

          obool hits()

          - +

          ovirtual void apply(osg::Node&)

          - +

          ovirtual void apply(osg::Geode& node)

          - +

          ovirtual void apply(osg::Billboard& node)

          - +

          ovirtual void apply(osg::Group& node)

          - +

          ovirtual void apply(osg::Transform& node)

          - +

          ovirtual void apply(osg::Switch& node)

          - +

          ovirtual void apply(osg::LOD& node)

          - +

          obool intersect(osg::GeoSet& gset)

          - +

          ovoid pushMatrix(const osg::Matrix& matrix)

          - +

          ovoid popMatrix()

          - +

          obool enterNode(osg::Node& node)

          - +

          ovoid leaveNode()

          - +

          otypedef std::vector<osg::ref_ptr<IntersectState> > IntersectStateStack IntersectStateStack _intersectStateStack

          - +

          oosg::NodePath _nodePath

          - -

          oHitReportingMode _hitReportingMode + +
          oHitReportingMode _hitReportingMode

          - +

          oLineSegmentHitListMap _segHitList

          diff --git a/doc/doc++/osgUtil/RegisterRenderBinProxy.html b/doc/doc++/osgUtil/RegisterRenderBinProxy.html index a6b65a6c8..84825739f 100644 --- a/doc/doc++/osgUtil/RegisterRenderBinProxy.html +++ b/doc/doc++/osgUtil/RegisterRenderBinProxy.html @@ -13,14 +13,14 @@

          Public Methods

          -[more] RegisterRenderBinProxy() +[more] RegisterRenderBinProxy()
          -[more] ~RegisterRenderBinProxy() +[more] ~RegisterRenderBinProxy()

          Protected Fields

          -[more]osg::ref_ptr<T> _rb +[more]osg::ref_ptr<T> _rb

          @@ -32,15 +32,15 @@
          - +
          o RegisterRenderBinProxy()

          - +

          o ~RegisterRenderBinProxy()

          - +

          oosg::ref_ptr<T> _rb

          diff --git a/doc/doc++/osgUtil/RenderBin.html b/doc/doc++/osgUtil/RenderBin.html index fef2331a2..3386e1a1b 100644 --- a/doc/doc++/osgUtil/RenderBin.html +++ b/doc/doc++/osgUtil/RenderBin.html @@ -23,59 +23,59 @@

          Public Fields

          -[more]int _binNum +[more]int _binNum
          -[more]RenderBin* _parent +[more]RenderBin* _parent
          -[more]RenderStage* _stage +[more]RenderStage* _stage
          -[more]RenderBinList _bins +[more]RenderBinList _bins
          -[more]RenderGraphList _renderGraphList +[more]RenderGraphList _renderGraphList

          Public Methods

          -[more]typedef std::map< int, osg::ref_ptr<RenderBin> >static RenderBinList RenderBin* createRenderBin(const std::string& binName) +[more]typedef std::map< int, osg::ref_ptr<RenderBin> >static RenderBinList RenderBin* createRenderBin(const std::string& binName)
          -[more]static void addRenderBinPrototype(RenderBin* proto) +[more]static void addRenderBinPrototype(RenderBin* proto)
          -[more]static void removeRenderBinPrototype(RenderBin* proto) +[more]static void removeRenderBinPrototype(RenderBin* proto)
          -[more] RenderBin() +[more] RenderBin()
          -[more]virtual osg::Object* clone() const +[more]virtual osg::Object* clone() const
          -[more]virtual bool isSameKindAs(const osg::Object* obj) const +[more]virtual bool isSameKindAs(const osg::Object* obj) const
          -[more]virtual const char* className() const +[more]virtual const char* className() const
          -[more]virtual void reset() +[more]virtual void reset()
          -[more]RenderBin* find_or_insert(int binNum, const std::string& binName) +[more]RenderBin* find_or_insert(int binNum, const std::string& binName)
          -[more]void addRenderGraph(RenderGraph* rg) +[more]void addRenderGraph(RenderGraph* rg)
          -[more]void sort() +[more]void sort()
          -[more]virtual void sort_local() +[more]virtual void sort_local()
          -[more]virtual void draw(osg::State& state, RenderLeaf*& previous) +[more]virtual void draw(osg::State& state, RenderLeaf*& previous)
          -[more]virtual void draw_local(osg::State& state, RenderLeaf*& previous) +[more]virtual void draw_local(osg::State& state, RenderLeaf*& previous)
          -[more]void getPrims(Statistics* primStats) +[more]void getPrims(Statistics* primStats)
          extract stats for current draw list.

          Public Members

          -[more]typedef std::map< std::string, osg::ref_ptr<RenderBin> >static RenderBinPrototypeList RenderBinPrototypeList s_renderBinPrototypeList +[more]typedef std::map< std::string, osg::ref_ptr<RenderBin> >static RenderBinPrototypeList RenderBinPrototypeList s_renderBinPrototypeList

          Protected Methods

          -[more]virtual ~RenderBin() +[more]virtual ~RenderBin()

          @@ -88,92 +88,92 @@ RenderBin base class
          - +
          otypedef std::map< int, osg::ref_ptr<RenderBin> >static RenderBinList RenderBin* createRenderBin(const std::string& binName)

          - +

          ostatic void addRenderBinPrototype(RenderBin* proto)

          - +

          ostatic void removeRenderBinPrototype(RenderBin* proto)

          - +

          o RenderBin()

          - +

          ovirtual osg::Object* clone() const

          - +

          ovirtual bool isSameKindAs(const osg::Object* obj) const

          - +

          ovirtual const char* className() const

          - +

          ovirtual void reset()

          - +

          oRenderBin* find_or_insert(int binNum, const std::string& binName)

          - +

          ovoid addRenderGraph(RenderGraph* rg)

          - +

          ovoid sort()

          - +

          ovirtual void sort_local()

          - +

          ovirtual void draw(osg::State& state, RenderLeaf*& previous)

          - +

          ovirtual void draw_local(osg::State& state, RenderLeaf*& previous)

          - +

          ovoid getPrims(Statistics* primStats)
          extract stats for current draw list.

          - +

          oint _binNum

          - +

          oRenderBin* _parent

          - +

          oRenderStage* _stage

          - +

          oRenderBinList _bins

          - +

          oRenderGraphList _renderGraphList

          - +

          otypedef std::map< std::string, osg::ref_ptr<RenderBin> >static RenderBinPrototypeList RenderBinPrototypeList s_renderBinPrototypeList

          - +

          ovirtual ~RenderBin()


          diff --git a/doc/doc++/osgUtil/RenderGraph.html b/doc/doc++/osgUtil/RenderGraph.html index 25e96a538..7712e70c8 100644 --- a/doc/doc++/osgUtil/RenderGraph.html +++ b/doc/doc++/osgUtil/RenderGraph.html @@ -22,50 +22,50 @@

          Public Fields

          -[more]osg::ref_ptr<const osg::StateSet> _stateset +[more]osg::ref_ptr<const osg::StateSet> _stateset
          -[more]int _depth +[more]int _depth
          -[more]ChildList _children +[more]ChildList _children
          -[more]LeafList _leaves +[more]LeafList _leaves

          Public Methods

          -[more] RenderGraph() +[more] RenderGraph()
          -[more] RenderGraph(RenderGraph* parent, const osg::StateSet* stateset) +[more] RenderGraph(RenderGraph* parent, const osg::StateSet* stateset)
          -[more] ~RenderGraph() +[more] ~RenderGraph()
          -[more]inline const bool empty() const +[more]inline const bool empty() const
          return true if all of drawables, lights and chilren are empty
          -[more]inline const bool leaves_empty() const +[more]inline const bool leaves_empty() const
          -[more]void reset() +[more]void reset()
          reset the internal contents of a RenderGraph, including deleting all children
          -[more]void clean() +[more]void clean()
          recursively clean the RenderGraph of all its drawables, lights and depths.
          -[more]void prune() +[more]void prune()
          recursively prune the RenderGraph of empty children
          -[more]inline RenderGraph* find_or_insert(const osg::StateSet* stateset) +[more]inline RenderGraph* find_or_insert(const osg::StateSet* stateset)
          -[more]inline void addLeaf(RenderLeaf* leaf) +[more]inline void addLeaf(RenderLeaf* leaf)
          add a render leaf
          -[more]static inline void moveRenderGraph(osg::State& state, RenderGraph* sg_curr, RenderGraph* sg_new) +[more]static inline void moveRenderGraph(osg::State& state, RenderGraph* sg_curr, RenderGraph* sg_new)
          -[more]inline static void moveToRootRenderGraph(osg::State& state, RenderGraph* sg_curr) +[more]inline static void moveToRootRenderGraph(osg::State& state, RenderGraph* sg_curr)

          Public Members

          -[more]typedef std::vector< osg::ref_ptr<RenderLeaf> > LeafList RenderGraph* _parent +[more]typedef std::vector< osg::ref_ptr<RenderLeaf> > LeafList RenderGraph* _parent

          @@ -76,77 +76,77 @@
          - +
          otypedef std::vector< osg::ref_ptr<RenderLeaf> > LeafList RenderGraph* _parent

          - +

          oosg::ref_ptr<const osg::StateSet> _stateset

          - +

          oint _depth

          - +

          oChildList _children

          - +

          oLeafList _leaves

          - +

          o RenderGraph()

          - -

          o RenderGraph(RenderGraph* parent, const osg::StateSet* stateset) + +
          o RenderGraph(RenderGraph* parent, const osg::StateSet* stateset)

          - +

          o ~RenderGraph()

          - +

          oinline const bool empty() const
          return true if all of drawables, lights and chilren are empty

          - +

          oinline const bool leaves_empty() const

          - +

          ovoid reset()
          reset the internal contents of a RenderGraph, including deleting all children

          - +

          ovoid clean()
          recursively clean the RenderGraph of all its drawables, lights and depths. Leaves children intact, and ready to be populated again.

          - +

          ovoid prune()
          recursively prune the RenderGraph of empty children

          - +

          oinline RenderGraph* find_or_insert(const osg::StateSet* stateset)

          - +

          oinline void addLeaf(RenderLeaf* leaf)
          add a render leaf

          - +

          ostatic inline void moveRenderGraph(osg::State& state, RenderGraph* sg_curr, RenderGraph* sg_new)

          - +

          oinline static void moveToRootRenderGraph(osg::State& state, RenderGraph* sg_curr)

          diff --git a/doc/doc++/osgUtil/RenderLeaf.html b/doc/doc++/osgUtil/RenderLeaf.html index 12ec6b02a..8110d2d3d 100644 --- a/doc/doc++/osgUtil/RenderLeaf.html +++ b/doc/doc++/osgUtil/RenderLeaf.html @@ -23,24 +23,24 @@

          Public Fields

          -[more]RenderGraph* _parent +[more]RenderGraph* _parent
          -[more]osg::Drawable* _drawable +[more]osg::Drawable* _drawable
          -[more]osg::ref_ptr<osg::Matrix> _matrix +[more]osg::ref_ptr<osg::Matrix> _matrix
          -[more]float _depth +[more]float _depth

          Public Methods

          -[more]inline RenderLeaf(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f) +[more]inline RenderLeaf(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f)
          -[more]inline void set(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f) +[more]inline void set(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f)
          -[more]inline void reset() +[more]inline void reset()
          -[more]virtual void render(osg::State& state, RenderLeaf* previous) +[more]virtual void render(osg::State& state, RenderLeaf* previous)

          @@ -52,35 +52,35 @@
          - +
          oinline RenderLeaf(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f)

          - +

          oinline void set(osg::Drawable* drawable, osg::Matrix* matrix, float depth=0.0f)

          - +

          oinline void reset()

          - +

          ovirtual void render(osg::State& state, RenderLeaf* previous)

          - +

          oRenderGraph* _parent

          - +

          oosg::Drawable* _drawable

          - +

          oosg::ref_ptr<osg::Matrix> _matrix

          - +

          ofloat _depth

          diff --git a/doc/doc++/osgUtil/RenderStage.html b/doc/doc++/osgUtil/RenderStage.html index 24822f05c..4e9639f81 100644 --- a/doc/doc++/osgUtil/RenderStage.html +++ b/doc/doc++/osgUtil/RenderStage.html @@ -23,111 +23,114 @@

          Public Fields

          -[more]DependencyList _dependencyList +[more]DependencyList _dependencyList
          -[more]osg::ref_ptr<osg::Camera> _camera +[more]osg::ref_ptr<osg::Camera> _camera
          -[more]GLint _view[4] +[more]osg::ref_ptr<osg::Viewport> _viewport
          -[more]GLbitfield _clearMask +[more]GLbitfield _clearMask
          -[more]osg::Vec4 _clearColor +[more]osg::Vec4 _clearColor
          -[more]osg::Vec4 _clearAccum +[more]osg::Vec4 _clearAccum
          -[more]double _clearDepth +[more]double _clearDepth
          -[more]int _clearStencil +[more]int _clearStencil
          -[more]mutable osg::ref_ptr<RenderStageLighting> _renderStageLighting +[more]mutable osg::ref_ptr<RenderStageLighting> _renderStageLighting

          Public Methods

          -[more] RenderStage() +[more] RenderStage()
          -[more]virtual osg::Object* clone() const +[more]virtual osg::Object* clone() const
          -[more]virtual bool isSameKindAs(const osg::Object* obj) const +[more]virtual bool isSameKindAs(const osg::Object* obj) const
          -[more]virtual const char* className() const +[more]virtual const char* className() const
          -[more]virtual void reset() +[more]virtual void reset()
          -[more]void setViewport(int x, int y, int width, int height) -
          Set the viewport of the scene view. +[more]void setViewport(osg::Viewport* viewport) +
          Set the viewport
          -[more]void getViewport(int& x, int& y, int& width, int& height) const -
          Get the viewport of the scene view. +[more]const osg::Viewport* getViewport() const +
          Get the const viewport.
          -[more]void setClearMask(const GLbitfield mask) +[more]osg::Viewport* getViewport() +
          Get the viewport. +
          +[more]void setClearMask(const GLbitfield mask)
          Set the clear mask used in glClear().
          -[more]const GLbitfield getClearMask() const +[more]const GLbitfield getClearMask() const
          Get the clear mask
          -[more]void setClearColor(const osg::Vec4& color) +[more]void setClearColor(const osg::Vec4& color)
          Set the clear color used in glClearColor().
          -[more]const osg::Vec4& getClearColor() const +[more]const osg::Vec4& getClearColor() const
          Get the clear color
          -[more]void setClearAccum(const osg::Vec4& color) +[more]void setClearAccum(const osg::Vec4& color)
          Set the clear accum used in glClearAccum().
          -[more]const osg::Vec4& getClearAccum() const +[more]const osg::Vec4& getClearAccum() const
          Get the clear accum
          -[more]void setClearDepth(const double depth) +[more]void setClearDepth(const double depth)
          Set the clear depth used in glClearDepth().
          -[more]const double getClearDepth() const +[more]const double getClearDepth() const
          Get the clear depth
          -[more]void setClearStencil(const int stencil) +[more]void setClearStencil(const int stencil)
          Set the clear stencil value used in glClearStencil().
          -[more]const int getClearStencil() const +[more]const int getClearStencil() const
          Get the clear color
          -[more]void setCamera(osg::Camera* camera) +[more]void setCamera(osg::Camera* camera)
          -[more]osg::Camera* getCamera() +[more]osg::Camera* getCamera()
          -[more]const osg::Camera* getCamera() const +[more]const osg::Camera* getCamera() const
          -[more]void setRenderStageLighting(RenderStageLighting* rsl) +[more]void setRenderStageLighting(RenderStageLighting* rsl)
          -[more]RenderStageLighting* getRenderStageLighting() const +[more]RenderStageLighting* getRenderStageLighting() const
          -[more]void setLightingMode(RenderStageLighting::Mode mode) +[more]void setLightingMode(RenderStageLighting::Mode mode)
          -[more]RenderStageLighting::Mode getLightingMode() const +[more]RenderStageLighting::Mode getLightingMode() const
          -[more]void setLight(osg::Light* light) +[more]void setLight(osg::Light* light)
          -[more]osg::Light* getLight() +[more]osg::Light* getLight()
          -[more]const osg::Light* getLight() const +[more]const osg::Light* getLight() const
          -[more]virtual void addLight(osg::Light* light, osg::Matrix* matrix) +[more]virtual void addLight(osg::Light* light, osg::Matrix* matrix)
          -[more]virtual void draw(osg::State& state, RenderLeaf*& previous) +[more]virtual void draw(osg::State& state, RenderLeaf*& previous)
          -[more]void addToDependencyList(RenderStage* rs) +[more]void addToDependencyList(RenderStage* rs)
          -[more]void getPrims(Statistics* primStats) +[more]void getPrims(Statistics* primStats)
          extract stats for current draw list.

          Public Members

          -[more]typedef std::vector< osg::ref_ptr<RenderStage> > DependencyList bool _stageDrawnThisFrame +[more]typedef std::vector< osg::ref_ptr<RenderStage> > DependencyList bool _stageDrawnThisFrame

          Protected Methods

          -[more]virtual ~RenderStage() +[more]virtual ~RenderStage()

          @@ -186,189 +189,194 @@ like multistage pixel shading or impostors.
          - +
          o RenderStage()

          - +

          ovirtual osg::Object* clone() const

          - +

          ovirtual bool isSameKindAs(const osg::Object* obj) const

          - +

          ovirtual const char* className() const

          - +

          ovirtual void reset()

          - -

          ovoid setViewport(int x, int y, int width, int height) -
          Set the viewport of the scene view. + +
          ovoid setViewport(osg::Viewport* viewport) +
          Set the viewport

          - -

          ovoid getViewport(int& x, int& y, int& width, int& height) const -
          Get the viewport of the scene view. + +
          oconst osg::Viewport* getViewport() const +
          Get the const viewport. +

          + + +

          oosg::Viewport* getViewport() +
          Get the viewport.

          - +

          ovoid setClearMask(const GLbitfield mask)
          Set the clear mask used in glClear(). Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT.

          - +

          oconst GLbitfield getClearMask() const
          Get the clear mask

          - +

          ovoid setClearColor(const osg::Vec4& color)
          Set the clear color used in glClearColor(). glClearColor is only called if mask & GL_COLOR_BUFFER_BIT is true

          - +

          oconst osg::Vec4& getClearColor() const
          Get the clear color

          - +

          ovoid setClearAccum(const osg::Vec4& color)
          Set the clear accum used in glClearAccum(). glClearAcumm is only called if mask & GL_ACCUM_BUFFER_BIT is true

          - +

          oconst osg::Vec4& getClearAccum() const
          Get the clear accum

          - +

          ovoid setClearDepth(const double depth)
          Set the clear depth used in glClearDepth(). Defaults to 1.0 glClearDepth is only called if mask & GL_DEPTH_BUFFER_BIT is true

          - +

          oconst double getClearDepth() const
          Get the clear depth

          - +

          ovoid setClearStencil(const int stencil)
          Set the clear stencil value used in glClearStencil(). Defaults to 1.0 glClearStencil is only called if mask & GL_STENCIL_BUFFER_BIT is true

          - +

          oconst int getClearStencil() const
          Get the clear color

          - +

          ovoid setCamera(osg::Camera* camera)

          - +

          oosg::Camera* getCamera()

          - +

          oconst osg::Camera* getCamera() const

          - +

          ovoid setRenderStageLighting(RenderStageLighting* rsl)

          - +

          oRenderStageLighting* getRenderStageLighting() const

          - +

          ovoid setLightingMode(RenderStageLighting::Mode mode)

          - +

          oRenderStageLighting::Mode getLightingMode() const

          - +

          ovoid setLight(osg::Light* light)

          - +

          oosg::Light* getLight()

          - +

          oconst osg::Light* getLight() const

          - +

          ovirtual void addLight(osg::Light* light, osg::Matrix* matrix)

          - +

          ovirtual void draw(osg::State& state, RenderLeaf*& previous)

          - +

          ovoid addToDependencyList(RenderStage* rs)

          - +

          ovoid getPrims(Statistics* primStats)
          extract stats for current draw list.

          - +

          otypedef std::vector< osg::ref_ptr<RenderStage> > DependencyList bool _stageDrawnThisFrame

          - +

          oDependencyList _dependencyList

          - +

          oosg::ref_ptr<osg::Camera> _camera

          - - -

          oGLint _view[4] + + +
          oosg::ref_ptr<osg::Viewport> _viewport

          - +

          oGLbitfield _clearMask

          - +

          oosg::Vec4 _clearColor

          - +

          oosg::Vec4 _clearAccum

          - +

          odouble _clearDepth

          - +

          oint _clearStencil

          - +

          omutable osg::ref_ptr<RenderStageLighting> _renderStageLighting

          - +

          ovirtual ~RenderStage()


          diff --git a/doc/doc++/osgUtil/RenderStageLighting.html b/doc/doc++/osgUtil/RenderStageLighting.html index 20a5f155b..8ec040993 100644 --- a/doc/doc++/osgUtil/RenderStageLighting.html +++ b/doc/doc++/osgUtil/RenderStageLighting.html @@ -23,48 +23,48 @@

          Public Fields

          -[more]Mode _lightingMode +[more]Mode _lightingMode
          -[more]osg::ref_ptr<osg::Light> _light +[more]osg::ref_ptr<osg::Light> _light
          -[more]LightList _lightList +[more]LightList _lightList

          Public Methods

          -[more] RenderStageLighting() +[more] RenderStageLighting()
          -[more]virtual osg::Object* clone() const +[more]virtual osg::Object* clone() const
          -[more]virtual bool isSameKindAs(const osg::Object* obj) const +[more]virtual bool isSameKindAs(const osg::Object* obj) const
          -[more]virtual const char* className() const +[more]virtual const char* className() const
          -[more]virtual void reset() +[more]virtual void reset()
          -[more]void setLightingMode(Mode mode) +[more]void setLightingMode(Mode mode)
          -[more]Mode getLightingMode() const +[more]Mode getLightingMode() const
          -[more]void setLight(osg::Light* light) +[more]void setLight(osg::Light* light)
          -[more]osg::Light* getLight() +[more]osg::Light* getLight()
          -[more]const osg::Light* getLight() const +[more]const osg::Light* getLight() const
          -[more]typedef std::vector< LightMatrixPair >virtual LightList void addLight(osg::Light* light, osg::Matrix* matrix) +[more]typedef std::vector< LightMatrixPair >virtual LightList void addLight(osg::Light* light, osg::Matrix* matrix)
          -[more]virtual void draw(osg::State& state, RenderLeaf*& previous) +[more]virtual void draw(osg::State& state, RenderLeaf*& previous)

          Public Members

          -[more]enum Mode +[more]enum Mode

          Protected Methods

          -[more]virtual ~RenderStageLighting() +[more]virtual ~RenderStageLighting()

          @@ -77,85 +77,85 @@ RenderBin base class
          - +
          o RenderStageLighting()

          - +

          ovirtual osg::Object* clone() const

          - +

          ovirtual bool isSameKindAs(const osg::Object* obj) const

          - +

          ovirtual const char* className() const

          - +

          ovirtual void reset()

          - +

          oenum Mode

          - +
          o HEADLIGHT

          - +

          o SKY_LIGHT

          - +

          o NO_SCENEVIEW_LIGHT

          - -
          ovoid setLightingMode(Mode mode) + +
          ovoid setLightingMode(Mode mode)

          - -

          oMode getLightingMode() const + +
          oMode getLightingMode() const

          - +

          ovoid setLight(osg::Light* light)

          - +

          oosg::Light* getLight()

          - +

          oconst osg::Light* getLight() const

          - +

          otypedef std::vector< LightMatrixPair >virtual LightList void addLight(osg::Light* light, osg::Matrix* matrix)

          - +

          ovirtual void draw(osg::State& state, RenderLeaf*& previous)

          - -

          oMode _lightingMode + +
          oMode _lightingMode

          - +

          oosg::ref_ptr<osg::Light> _light

          - +

          oLightList _lightList

          - +

          ovirtual ~RenderStageLighting()

          diff --git a/doc/doc++/osgUtil/RenderToTextureStage.html b/doc/doc++/osgUtil/RenderToTextureStage.html index 7e0b195a0..3e694d74f 100644 --- a/doc/doc++/osgUtil/RenderToTextureStage.html +++ b/doc/doc++/osgUtil/RenderToTextureStage.html @@ -23,31 +23,31 @@

          Public Methods

          -[more] RenderToTextureStage() +[more] RenderToTextureStage()
          -[more]virtual osg::Object* clone() const +[more]virtual osg::Object* clone() const
          -[more]virtual bool isSameKindAs(const osg::Object* obj) const +[more]virtual bool isSameKindAs(const osg::Object* obj) const
          -[more]virtual const char* className() const +[more]virtual const char* className() const
          -[more]virtual void reset() +[more]virtual void reset()
          -[more]void setTexture(osg::Texture* texture) +[more]void setTexture(osg::Texture* texture)
          -[more]osg::Texture* getTexture() +[more]osg::Texture* getTexture()
          -[more]virtual void draw(osg::State& state, RenderLeaf*& previous) +[more]virtual void draw(osg::State& state, RenderLeaf*& previous)

          Protected Fields

          -[more]osg::ref_ptr<osg::Texture> _texture +[more]osg::ref_ptr<osg::Texture> _texture

          Protected Methods

          -[more]virtual ~RenderToTextureStage() +[more]virtual ~RenderToTextureStage()

          @@ -59,7 +59,7 @@
          oosg::ref_ptr<osg::Camera> _camera
          -oGLint _view[4] +oosg::ref_ptr<osg::Viewport> _viewport
          oGLbitfield _clearMask
          @@ -76,9 +76,11 @@

          Public Methods

          -ovoid setViewport(int x, int y, int width, int height) +ovoid setViewport(osg::Viewport* viewport)
          -ovoid getViewport(int& x, int& y, int& width, int& height) const +oconst osg::Viewport* getViewport() const +
          +oosg::Viewport* getViewport()
          ovoid setClearMask(const GLbitfield mask)
          @@ -182,43 +184,43 @@ RenderBin base class
          - +
          o RenderToTextureStage()

          - +

          ovirtual osg::Object* clone() const

          - +

          ovirtual bool isSameKindAs(const osg::Object* obj) const

          - +

          ovirtual const char* className() const

          - +

          ovirtual void reset()

          - +

          ovoid setTexture(osg::Texture* texture)

          - +

          oosg::Texture* getTexture()

          - +

          ovirtual void draw(osg::State& state, RenderLeaf*& previous)

          - +

          ovirtual ~RenderToTextureStage()

          - +

          oosg::ref_ptr<osg::Texture> _texture

          diff --git a/doc/doc++/osgUtil/SceneView.html b/doc/doc++/osgUtil/SceneView.html index a05efcc0a..4ca843edf 100644 --- a/doc/doc++/osgUtil/SceneView.html +++ b/doc/doc++/osgUtil/SceneView.html @@ -23,169 +23,184 @@

          Public Methods

          -[more] SceneView() +[more] SceneView()
          Constrcut a default scene view
          -[more]void setSceneData(osg::Node* node) -
          Set the data which to view. -
          -[more]osg::Node* getSceneData() -
          Get the scene data which to view. -
          -[more]const osg::Node* getSceneData() const -
          Get the const scene data which to view. -
          -[more]void setViewport(int x, int y, int width, int height) -
          Set the viewport of the scene view. -
          -[more]void getViewport(int& x, int& y, int& width, int& height) -
          Get the viewport of the scene view. -
          -[more]void setDefaults() +[more]void setDefaults()
          Set scene view to use default global state, light, camera and render visitor
          -[more]void setBackgroundColor(const osg::Vec4& color) +[more]void setSceneData(osg::Node* node) +
          Set the data which to view. +
          +[more]osg::Node* getSceneData() +
          Get the scene data which to view. +
          +[more]const osg::Node* getSceneData() const +
          Get the const scene data which to view. +
          +[more]void setViewport(osg::Viewport* viewport) +
          Set the viewport of the scene view to use specfied osg::Viewport. +
          +[more]void setViewport(int x, int y, int width, int height) +
          Set the viewport of the scene view to specified dimensions. +
          +[more]const osg::Viewport* getViewport() const +
          Get the const viewport. +
          +[more]osg::Viewport* getViewport() +
          Get the viewport. +
          +[more]void getViewport(int& x, int& y, int& width, int& height) +
          Get the viewport of the scene view. +
          +[more]void setBackgroundColor(const osg::Vec4& color)
          Set the background color used in glClearColor().
          -[more]const osg::Vec4& getBackgroundColor() const +[more]const osg::Vec4& getBackgroundColor() const
          Get the background color
          -[more]void setGlobalState(osg::StateSet* state) +[more]void setGlobalState(osg::StateSet* state)
          -[more]osg::StateSet* getGlobalState() +[more]osg::StateSet* getGlobalState()
          -[more]const osg::StateSet* getGlobalState() const +[more]const osg::StateSet* getGlobalState() const
          -[more]void setLightingMode(LightingMode mode) +[more]void setLightingMode(LightingMode mode)
          -[more]LightingMode getLightingMode() const +[more]LightingMode getLightingMode() const
          -[more]void setLight(osg::Light* light) +[more]void setLight(osg::Light* light)
          -[more]osg::Light* getLight() +[more]osg::Light* getLight()
          -[more]const osg::Light* getLight() const +[more]const osg::Light* getLight() const
          -[more]void setCamera(osg::Camera* camera) +[more]void setCamera(osg::Camera* camera)
          -[more]osg::Camera* getCamera() +[more]osg::Camera* getCamera()
          -[more]const osg::Camera* getCamera() const +[more]const osg::Camera* getCamera() const
          -[more]void setState(osg::State* state) +[more]void setState(osg::State* state)
          -[more]osg::State* getState() +[more]osg::State* getState()
          -[more]const osg::State* getState() const +[more]const osg::State* getState() const
          -[more]void setAppVisitor(osg::NodeVisitor* av) +[more]void setAppVisitor(osg::NodeVisitor* av)
          -[more]osg::NodeVisitor* getAppVisitor() +[more]osg::NodeVisitor* getAppVisitor()
          -[more]const osg::NodeVisitor* getAppVisitor() const +[more]const osg::NodeVisitor* getAppVisitor() const
          -[more]void setCullVisitor(osgUtil::CullVisitor* cv) +[more]void setCullVisitor(osgUtil::CullVisitor* cv)
          -[more]osgUtil::CullVisitor* getCullVisitor() +[more]osgUtil::CullVisitor* getCullVisitor()
          -[more]const osgUtil::CullVisitor* getCullVisitor() const +[more]const osgUtil::CullVisitor* getCullVisitor() const
          -[more]void setRenderGraph(osgUtil::RenderGraph* rg) +[more]void setRenderGraph(osgUtil::RenderGraph* rg)
          -[more]osgUtil::RenderGraph* getRenderGraph() +[more]osgUtil::RenderGraph* getRenderGraph()
          -[more]const osgUtil::RenderGraph* getRenderGraph() const +[more]const osgUtil::RenderGraph* getRenderGraph() const
          -[more]void setRenderStage(osgUtil::RenderStage* rs) +[more]void setRenderStage(osgUtil::RenderStage* rs)
          -[more]osgUtil::RenderStage* getRenderStage() +[more]osgUtil::RenderStage* getRenderStage()
          -[more]const osgUtil::RenderStage* getRenderStage() const +[more]const osgUtil::RenderStage* getRenderStage() const
          -[more]void setLODBias(float bias) +[more]void setLODBias(float bias)
          -[more]float getLODBias() const +[more]float getLODBias() const
          -[more]void setCalcNearFar(bool calc) +[more]void setCalcNearFar(bool calc)
          Set to true if you want SceneView to automatically calculate values for the near/far clipping planes, each frame, set false to use camera's internal near and far planes.
          -[more]bool getCalcNearFar() const +[more]bool getCalcNearFar() const
          return true if SceneView automatically caclculates near and far clipping planes for each frame
          -[more]void setPrioritizeTextures(bool pt) +[more]void setPrioritizeTextures(bool pt)
          set whether the draw method should call renderer->prioritizeTexture
          -[more]bool getPrioritizeTextures() const +[more]bool getPrioritizeTextures() const
          get whether the draw method should call renderer->prioritizeTexture
          -[more]bool projectWindowIntoObject(const osg::Vec3& window, osg::Vec3& object) const +[more]bool projectWindowIntoObject(const osg::Vec3& window, osg::Vec3& object) const
          Calculate, via glUnProject, the object coordinates of a window point.
          -[more]bool projectWindowXYIntoObject(int x, int y, osg::Vec3& near_point, osg::Vec3& far_point) const +[more]bool projectWindowXYIntoObject(int x, int y, osg::Vec3& near_point, osg::Vec3& far_point) const
          Calculate, via glUnProject, the object coordinates of a window x,y when projected onto the near and far planes.
          -[more]bool projectObjectIntoWindow(const osg::Vec3& object, osg::Vec3& window) const +[more]bool projectObjectIntoWindow(const osg::Vec3& object, osg::Vec3& window) const
          Calculate, via glProject, the object coordinates of a window.
          -[more]virtual void app() +[more]inline void setFrameStamp(osg::FrameStamp* fs) +
          Set the frame stamp for the current frame +
          +[more]inline const osg::FrameStamp* getFrameStamp() const +
          Set the frame stamp for the current frame +
          +[more]virtual void app()
          do app traversal of attached scene graph using App NodeVisitor
          -[more]virtual void cull() +[more]virtual void cull()
          do cull traversal of attached scene graph using App CullVisitor
          -[more]virtual void draw() +[more]virtual void draw()
          do draw traversal of draw bins generated by cull traversal

          Public Members

          -[more]enum LightingMode +[more]enum LightingMode

          Protected Fields

          -[more]osg::ref_ptr<osg::Node> _sceneData +[more]osg::ref_ptr<osg::Node> _sceneData
          -[more]osg::ref_ptr<osg::StateSet> _globalState +[more]osg::ref_ptr<osg::StateSet> _globalState
          -[more]osg::ref_ptr<osg::Light> _light +[more]osg::ref_ptr<osg::Light> _light
          -[more]osg::ref_ptr<osg::Camera> _camera +[more]osg::ref_ptr<osg::Camera> _camera
          -[more]osg::ref_ptr<osg::State> _state +[more]osg::ref_ptr<osg::State> _state
          -[more]osg::ref_ptr<osg::NodeVisitor> _appVisitor +[more]osg::ref_ptr<osg::NodeVisitor> _appVisitor
          -[more]osg::ref_ptr<osgUtil::CullVisitor> _cullVisitor +[more]osg::ref_ptr<osgUtil::CullVisitor> _cullVisitor
          -[more]osg::ref_ptr<osgUtil::RenderGraph> _rendergraph +[more]osg::ref_ptr<osgUtil::RenderGraph> _rendergraph
          -[more]osg::ref_ptr<osgUtil::RenderStage> _renderStage +[more]osg::ref_ptr<osgUtil::RenderStage> _renderStage
          -[more]bool _need_compile +[more]osg::ref_ptr<osg::FrameStamp> _frameStamp
          -[more]bool _calc_nearfar +[more]bool _need_compile
          -[more]osg::Vec4 _backgroundColor +[more]bool _calc_nearfar
          -[more]double _near_plane +[more]osg::Vec4 _backgroundColor
          -[more]double _far_plane +[more]double _near_plane
          -[more]float _lodBias +[more]double _far_plane
          -[more]GLint _view[4] +[more]float _lodBias
          -[more]LightingMode _lightingMode +[more]osg::ref_ptr<osg::Viewport> _viewport
          -[more]bool _prioritizeTextures +[more]LightingMode _lightingMode
          -[more]int _frameNumber +[more]bool _prioritizeTextures

          Protected Methods

          -[more]virtual ~SceneView() +[more]virtual ~SceneView()

          @@ -200,210 +215,225 @@ methods for setting up the view and rendering it.
          - +
          o SceneView()
          Constrcut a default scene view

          + + +

          ovoid setDefaults() +
          Set scene view to use default global state, light, camera +and render visitor +

          - +

          ovoid setSceneData(osg::Node* node)
          Set the data which to view. The data will typically be an osg::Scene but can be any osg::Node type.

          - +

          oosg::Node* getSceneData()
          Get the scene data which to view. The data will typically be an osg::Scene but can be any osg::Node type.

          - +

          oconst osg::Node* getSceneData() const
          Get the const scene data which to view. The data will typically be an osg::Scene but can be any osg::Node type.

          - + +

          ovoid setViewport(osg::Viewport* viewport) +
          Set the viewport of the scene view to use specfied osg::Viewport. +

          + +

          ovoid setViewport(int x, int y, int width, int height) -
          Set the viewport of the scene view. +
          Set the viewport of the scene view to specified dimensions.

          - + +

          oconst osg::Viewport* getViewport() const +
          Get the const viewport. +

          + + +

          oosg::Viewport* getViewport() +
          Get the viewport. +

          + +

          ovoid getViewport(int& x, int& y, int& width, int& height)
          Get the viewport of the scene view.

          - - -

          ovoid setDefaults() -
          Set scene view to use default global state, light, camera -and render visitor -

          - +

          ovoid setBackgroundColor(const osg::Vec4& color)
          Set the background color used in glClearColor(). Defaults to an off blue color.

          - +

          oconst osg::Vec4& getBackgroundColor() const
          Get the background color

          - +

          ovoid setGlobalState(osg::StateSet* state)

          - +

          oosg::StateSet* getGlobalState()

          - +

          oconst osg::StateSet* getGlobalState() const

          - +

          oenum LightingMode

          - +
          o HEADLIGHT

          - +

          o SKY_LIGHT

          - +

          o NO_SCENEVIEW_LIGHT

          - -
          ovoid setLightingMode(LightingMode mode) + +
          ovoid setLightingMode(LightingMode mode)

          - -

          oLightingMode getLightingMode() const + +
          oLightingMode getLightingMode() const

          - +

          ovoid setLight(osg::Light* light)

          - +

          oosg::Light* getLight()

          - +

          oconst osg::Light* getLight() const

          - +

          ovoid setCamera(osg::Camera* camera)

          - +

          oosg::Camera* getCamera()

          - +

          oconst osg::Camera* getCamera() const

          - +

          ovoid setState(osg::State* state)

          - +

          oosg::State* getState()

          - +

          oconst osg::State* getState() const

          - +

          ovoid setAppVisitor(osg::NodeVisitor* av)

          - +

          oosg::NodeVisitor* getAppVisitor()

          - +

          oconst osg::NodeVisitor* getAppVisitor() const

          - +

          ovoid setCullVisitor(osgUtil::CullVisitor* cv)

          - +

          oosgUtil::CullVisitor* getCullVisitor()

          - +

          oconst osgUtil::CullVisitor* getCullVisitor() const

          - +

          ovoid setRenderGraph(osgUtil::RenderGraph* rg)

          - +

          oosgUtil::RenderGraph* getRenderGraph()

          - +

          oconst osgUtil::RenderGraph* getRenderGraph() const

          - +

          ovoid setRenderStage(osgUtil::RenderStage* rs)

          - +

          oosgUtil::RenderStage* getRenderStage()

          - +

          oconst osgUtil::RenderStage* getRenderStage() const

          - +

          ovoid setLODBias(float bias)

          - +

          ofloat getLODBias() const

          - +

          ovoid setCalcNearFar(bool calc)
          Set to true if you want SceneView to automatically calculate values for the near/far clipping planes, each frame, set false to use camera's internal near and far planes. Default value is true.

          - +

          obool getCalcNearFar() const
          return true if SceneView automatically caclculates near and far clipping planes for each frame

          - +

          ovoid setPrioritizeTextures(bool pt)
          set whether the draw method should call renderer->prioritizeTexture

          - +

          obool getPrioritizeTextures() const
          get whether the draw method should call renderer->prioritizeTexture

          - +

          obool projectWindowIntoObject(const osg::Vec3& window, osg::Vec3& object) const
          Calculate, via glUnProject, the object coordinates of a window point. Note, current implementation requires that SceneView::draw() has been previously called @@ -412,7 +442,7 @@ windows coordinates are calculated relative to the bottom left of the window. Returns true on successful projection.

          - +

          obool projectWindowXYIntoObject(int x, int y, osg::Vec3& near_point, osg::Vec3& far_point) const
          Calculate, via glUnProject, the object coordinates of a window x,y when projected onto the near and far planes. @@ -422,7 +452,7 @@ windows coordinates are calculated relative to the bottom left of the window. Returns true on successful projection.

          - +

          obool projectObjectIntoWindow(const osg::Vec3& object, osg::Vec3& window) const
          Calculate, via glProject, the object coordinates of a window. Note, current implementation requires that SceneView::draw() has been previously called @@ -432,100 +462,110 @@ whereas as window API's normally have the top left as the origin, so you may need to pass in (mouseX,window_height-mouseY,...). Returns true on successful projection.

          + + +

          oinline void setFrameStamp(osg::FrameStamp* fs) +
          Set the frame stamp for the current frame +

          + + +

          oinline const osg::FrameStamp* getFrameStamp() const +
          Set the frame stamp for the current frame +

          - +

          ovirtual void app()
          do app traversal of attached scene graph using App NodeVisitor

          - +

          ovirtual void cull()
          do cull traversal of attached scene graph using App CullVisitor

          - +

          ovirtual void draw()
          do draw traversal of draw bins generated by cull traversal

          - +

          ovirtual ~SceneView()

          - +

          oosg::ref_ptr<osg::Node> _sceneData

          - +

          oosg::ref_ptr<osg::StateSet> _globalState

          - +

          oosg::ref_ptr<osg::Light> _light

          - +

          oosg::ref_ptr<osg::Camera> _camera

          - +

          oosg::ref_ptr<osg::State> _state

          - +

          oosg::ref_ptr<osg::NodeVisitor> _appVisitor

          - +

          oosg::ref_ptr<osgUtil::CullVisitor> _cullVisitor

          - +

          oosg::ref_ptr<osgUtil::RenderGraph> _rendergraph

          - +

          oosg::ref_ptr<osgUtil::RenderStage> _renderStage

          + + +

          oosg::ref_ptr<osg::FrameStamp> _frameStamp +

          - +

          obool _need_compile

          - +

          obool _calc_nearfar

          - +

          oosg::Vec4 _backgroundColor

          - +

          odouble _near_plane

          - +

          odouble _far_plane

          - +

          ofloat _lodBias

          - - -

          oGLint _view[4] + + +
          oosg::ref_ptr<osg::Viewport> _viewport

          - -

          oLightingMode _lightingMode + +
          oLightingMode _lightingMode

          - +

          obool _prioritizeTextures -

          - - -

          oint _frameNumber


          This class has no child classes.
          diff --git a/doc/doc++/osgUtil/SceneViewManipulator.html b/doc/doc++/osgUtil/SceneViewManipulator.html index cdfe02138..c9a91e0c5 100644 --- a/doc/doc++/osgUtil/SceneViewManipulator.html +++ b/doc/doc++/osgUtil/SceneViewManipulator.html @@ -22,48 +22,48 @@

          Public Methods

          -[more] SceneViewManipulator() +[more] SceneViewManipulator()
          -[more]virtual ~SceneViewManipulator() +[more]virtual ~SceneViewManipulator()
          -[more]virtual void setSceneView(SceneView*) +[more]virtual void setSceneView(SceneView*)
          attach a scene view to the manipulator.
          -[more]virtual SceneView* getSceneView() +[more]virtual SceneView* getSceneView()
          get the attached a scene view
          -[more]virtual const SceneView* getSceneView() const +[more]virtual const SceneView* getSceneView() const
          get the attached a const scene view
          -[more]virtual void setCameraManipulator(CameraManipulator* cm) +[more]virtual void setCameraManipulator(CameraManipulator* cm)
          Set the camera manipulator on the object
          -[more]virtual CameraManipulator* getCameraManipulator() +[more]virtual CameraManipulator* getCameraManipulator()
          Get the camera manipulator on the object
          -[more]virtual const CameraManipulator* getCameraManipulator() const +[more]virtual const CameraManipulator* getCameraManipulator() const
          Get the const camera manipulator on the object
          -[more]virtual void setStateSetManipulator(StateSetManipulator* cm) +[more]virtual void setStateSetManipulator(StateSetManipulator* cm)
          Set the geostate manipulator on the object
          -[more]virtual StateSetManipulator* getStateSetManipulator() +[more]virtual StateSetManipulator* getStateSetManipulator()
          Get the geostate manipulator on the object
          -[more]virtual const StateSetManipulator* getStateSetManipulator() const +[more]virtual const StateSetManipulator* getStateSetManipulator() const
          Get the geostate manipulator on the object
          -[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
          Handle events, return true if handled, false otherwise

          Protected Fields

          -[more]osg::ref_ptr<SceneView> _sv +[more]osg::ref_ptr<SceneView> _sv
          -[more]osg::ref_ptr<CameraManipulator> _cm +[more]osg::ref_ptr<CameraManipulator> _cm
          -[more]osg::ref_ptr<StateSetManipulator> _gm +[more]osg::ref_ptr<StateSetManipulator> _gm

          @@ -77,73 +77,73 @@
          - +
          o SceneViewManipulator()

          - +

          ovirtual ~SceneViewManipulator()

          - +

          ovirtual void setSceneView(SceneView*)
          attach a scene view to the manipulator.

          - +

          ovirtual SceneView* getSceneView()
          get the attached a scene view

          - +

          ovirtual const SceneView* getSceneView() const
          get the attached a const scene view

          - +

          ovirtual void setCameraManipulator(CameraManipulator* cm)
          Set the camera manipulator on the object

          - +

          ovirtual CameraManipulator* getCameraManipulator()
          Get the camera manipulator on the object

          - +

          ovirtual const CameraManipulator* getCameraManipulator() const
          Get the const camera manipulator on the object

          - +

          ovirtual void setStateSetManipulator(StateSetManipulator* cm)
          Set the geostate manipulator on the object

          - +

          ovirtual StateSetManipulator* getStateSetManipulator()
          Get the geostate manipulator on the object

          - +

          ovirtual const StateSetManipulator* getStateSetManipulator() const
          Get the geostate manipulator on the object

          - +

          ovirtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
          Handle events, return true if handled, false otherwise

          - +

          oosg::ref_ptr<SceneView> _sv

          - +

          oosg::ref_ptr<CameraManipulator> _cm

          - +

          oosg::ref_ptr<StateSetManipulator> _gm

          diff --git a/doc/doc++/osgUtil/SmoothingVisitor.html b/doc/doc++/osgUtil/SmoothingVisitor.html index 69854f393..f3580f8e0 100644 --- a/doc/doc++/osgUtil/SmoothingVisitor.html +++ b/doc/doc++/osgUtil/SmoothingVisitor.html @@ -23,13 +23,13 @@

          Public Methods

          -[more] SmoothingVisitor() +[more] SmoothingVisitor()
          default to traversing all children
          -[more]static void smooth(osg::GeoSet& geoset) +[more]static void smooth(osg::GeoSet& geoset)
          smooth geoset by creating per vertex normals
          -[more]virtual void apply(osg::Geode& geode) +[more]virtual void apply(osg::Geode& geode)
          apply smoothing method to all geode geosets

          @@ -43,17 +43,17 @@ osg::GeoSet's which contains surface primitives
          - +
          o SmoothingVisitor()
          default to traversing all children

          - +

          ostatic void smooth(osg::GeoSet& geoset)
          smooth geoset by creating per vertex normals

          - +

          ovirtual void apply(osg::Geode& geode)
          apply smoothing method to all geode geosets

          diff --git a/doc/doc++/osgUtil/StateSetManipulator.html b/doc/doc++/osgUtil/StateSetManipulator.html index 528b1b36c..c1c47bc21 100644 --- a/doc/doc++/osgUtil/StateSetManipulator.html +++ b/doc/doc++/osgUtil/StateSetManipulator.html @@ -22,32 +22,32 @@

          Public Methods

          -[more] StateSetManipulator() +[more] StateSetManipulator()
          -[more]virtual ~StateSetManipulator() +[more]virtual ~StateSetManipulator()
          -[more]virtual void setStateSet(osg::StateSet*) +[more]virtual void setStateSet(osg::StateSet*)
          attach a geostate to the manipulator to be used for specifying view
          -[more]virtual osg::StateSet* getStateSet() +[more]virtual osg::StateSet* getStateSet()
          get the attached a geostate
          -[more]virtual const osg::StateSet* getStateSet() const +[more]virtual const osg::StateSet* getStateSet() const
          get the attached a geostate
          -[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
          Handle events, return true if handled, false otherwise

          Protected Fields

          -[more]osg::ref_ptr<osg::StateSet> _drawState +[more]osg::ref_ptr<osg::StateSet> _drawState
          -[more]bool _backface +[more]bool _backface
          -[more]bool _lighting +[more]bool _lighting
          -[more]bool _texture +[more]bool _texture

          @@ -61,47 +61,47 @@
          - +
          o StateSetManipulator()

          - +

          ovirtual ~StateSetManipulator()

          - +

          ovirtual void setStateSet(osg::StateSet*)
          attach a geostate to the manipulator to be used for specifying view

          - +

          ovirtual osg::StateSet* getStateSet()
          get the attached a geostate

          - +

          ovirtual const osg::StateSet* getStateSet() const
          get the attached a geostate

          - +

          ovirtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
          Handle events, return true if handled, false otherwise

          - +

          oosg::ref_ptr<osg::StateSet> _drawState

          - +

          obool _backface

          - +

          obool _lighting

          - +

          obool _texture

          diff --git a/doc/doc++/osgUtil/Statistics.html b/doc/doc++/osgUtil/Statistics.html index 556b29593..695b715a7 100644 --- a/doc/doc++/osgUtil/Statistics.html +++ b/doc/doc++/osgUtil/Statistics.html @@ -23,40 +23,40 @@

          Public Fields

          -[more]int numOpaque +[more]int numOpaque
          -[more]int nummat +[more]int nummat
          -[more]int nbins +[more]int nbins
          -[more]int nprims +[more]int nprims
          -[more]int nlights +[more]int nlights
          -[more]int numprimtypes[20] +[more]int numprimtypes[20]
          -[more]int primtypes[20] +[more]int primtypes[20]
          -[more]int primlens[20] +[more]int primlens[20]
          -[more]int primverts[20] +[more]int primverts[20]

          Public Methods

          -[more] Statistics() +[more] Statistics()
          -[more] ~Statistics() +[more] ~Statistics()
          -[more]void reset() +[more]void reset()
          -[more]virtual osg::Object* clone() const +[more]virtual osg::Object* clone() const
          -[more]virtual bool isSameKindAs(const osg::Object* obj) const +[more]virtual bool isSameKindAs(const osg::Object* obj) const
          -[more]virtual const char* className() const +[more]virtual const char* className() const
          -[more]void addstat(osg::GeoSet* gs) +[more]void addstat(osg::GeoSet* gs)

          @@ -70,67 +70,67 @@ the renderBin(s).
          - +
          o Statistics()

          - +

          o ~Statistics()

          - +

          ovoid reset()

          - +

          ovirtual osg::Object* clone() const

          - +

          ovirtual bool isSameKindAs(const osg::Object* obj) const

          - +

          ovirtual const char* className() const

          - +

          ovoid addstat(osg::GeoSet* gs)

          - +

          oint numOpaque

          - +

          oint nummat

          - +

          oint nbins

          - +

          oint nprims

          - +

          oint nlights

          - +

          oint numprimtypes[20]

          - +

          oint primtypes[20]

          - +

          oint primlens[20]

          - +

          oint primverts[20]

          diff --git a/doc/doc++/osgUtil/Tesselator.html b/doc/doc++/osgUtil/Tesselator.html index 3abba4cc1..3ebcd8d78 100644 --- a/doc/doc++/osgUtil/Tesselator.html +++ b/doc/doc++/osgUtil/Tesselator.html @@ -13,51 +13,51 @@

          Public Fields

          -[more]int _errorCode +[more]int _errorCode

          Public Methods

          -[more] Tesselator() +[more] Tesselator()
          -[more] ~Tesselator() +[more] ~Tesselator()
          -[more]void tesselate(osg::Vec3* coords, int numIndices, int* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE) +[more]void tesselate(osg::Vec3* coords, int numIndices, int* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE)
          -[more]void tesselate(osg::Vec3* coords, int numIndices, osg::ushort* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE) +[more]void tesselate(osg::Vec3* coords, int numIndices, osg::ushort* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE)
          -[more]void tesselate(osg::Vec3* coords, int numIndices, osg::uint* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE) +[more]void tesselate(osg::Vec3* coords, int numIndices, osg::uint* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE)
          -[more]typedef std::vector<osg::uint> IndexVec const IndexVec& getResult() const +[more]typedef std::vector<osg::uint> IndexVec const IndexVec& getResult() const
          -[more]void beginPrimitive(int primitiveType) +[more]void beginPrimitive(int primitiveType)
          -[more]void endPrimitive() +[more]void endPrimitive()

          Public Members

          -[more]enum InputBoundaryDirection +[more]enum InputBoundaryDirection
          -[more]struct VertexIndexSet +[more]struct VertexIndexSet

          Protected Fields

          -[more]CoordVec _coordVec +[more]CoordVec _coordVec
          -[more]IndexVec _tesselated_indices +[more]IndexVec _tesselated_indices
          -[more]int _currentPrimtiveType +[more]int _currentPrimtiveType
          -[more]IndexVec _acummulated_indices +[more]IndexVec _acummulated_indices

          Protected Methods

          -[more]typedef std::vector<VertexIndexSet> CoordVec void init() +[more]typedef std::vector<VertexIndexSet> CoordVec void init()
          -[more]void do_it() +[more]void do_it()

          @@ -72,121 +72,125 @@ a small set of code for doing this job better.
          - +
          o Tesselator()

          - +

          o ~Tesselator()

          - +

          oenum InputBoundaryDirection

          - +
          o CLOCK_WISE

          - +

          o COUNTER_CLOCK_WISE

          - -
          ovoid tesselate(osg::Vec3* coords, int numIndices, int* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE) + +
          ovoid tesselate(osg::Vec3* coords, int numIndices, int* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE)

          - -

          ovoid tesselate(osg::Vec3* coords, int numIndices, osg::ushort* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE) + +
          ovoid tesselate(osg::Vec3* coords, int numIndices, osg::ushort* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE)

          - -

          ovoid tesselate(osg::Vec3* coords, int numIndices, osg::uint* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE) + +
          ovoid tesselate(osg::Vec3* coords, int numIndices, osg::uint* indices, InputBoundaryDirection ibd=COUNTER_CLOCK_WISE)

          - +

          otypedef std::vector<osg::uint> IndexVec const IndexVec& getResult() const

          - +

          ovoid beginPrimitive(int primitiveType)

          - +

          ovoid endPrimitive()

          - +

          oint _errorCode

          - +

          ostruct VertexIndexSet

          - + +
          o VertexIndexSet() +

          + +

          o VertexIndexSet(Tesselator* tess, const osg::Vec3& vec, osg::uint index)

          - -

          o VertexIndexSet(const VertexIndexSet& vip) + +
          o VertexIndexSet(const VertexIndexSet& vip)

          - -

          oVertexIndexSet& operator = (const VertexIndexSet& vip) + +
          oVertexIndexSet& operator = (const VertexIndexSet& vip)

          - +

          ovoid set(Tesselator* tess, const osg::Vec3& vec, osg::uint index)

          - +

          ovoid accumulate()

          - +

          odouble _vertex[3]

          - +

          oTesselator* _Tesselator

          - +

          oosg::uint _index

          - -
          otypedef std::vector<VertexIndexSet> CoordVec void init() + +
          otypedef std::vector<VertexIndexSet> CoordVec void init()

          - +

          ovoid do_it()

          - +

          oCoordVec _coordVec

          - +

          oIndexVec _tesselated_indices

          - +

          oint _currentPrimtiveType

          - +

          oIndexVec _acummulated_indices


          This class has no child classes.
          -
          Friends:
          VertexIndexSet

          Alphabetic index HTML hierarchy of classes or Java


          +
          Friends:
          VertexIndexSet

          Alphabetic index HTML hierarchy of classes or Java



          This page was generated with the help of DOC++. diff --git a/doc/doc++/osgUtil/TrackballManipulator.html b/doc/doc++/osgUtil/TrackballManipulator.html index e5a59f8c3..568574d24 100644 --- a/doc/doc++/osgUtil/TrackballManipulator.html +++ b/doc/doc++/osgUtil/TrackballManipulator.html @@ -22,23 +22,23 @@

          Public Methods

          -[more] TrackballManipulator() +[more] TrackballManipulator()
          -[more]virtual ~TrackballManipulator() +[more]virtual ~TrackballManipulator()
          -[more]virtual void setNode(osg::Node*) +[more]virtual void setNode(osg::Node*)
          Attach a node to the manipulator.
          -[more]virtual const osg::Node* getNode() const +[more]virtual const osg::Node* getNode() const
          Return node if attached
          -[more]virtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us)
          Move the camera to the default position.
          -[more]virtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us)
          Start/restart the manipulator
          -[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us) +[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
          handle events, return true if handled, false otherwise

          @@ -68,15 +68,15 @@
          - +
          o TrackballManipulator()

          - +

          ovirtual ~TrackballManipulator()

          - +

          ovirtual void setNode(osg::Node*)
          Attach a node to the manipulator. Automatically detaches previously attached node. @@ -84,23 +84,23 @@ setNode(NULL) detaches previously nodes. Is ignored by manipulators which do not require a reference model.

          - +

          ovirtual const osg::Node* getNode() const
          Return node if attached

          - +

          ovirtual void home(const GUIEventAdapter& ea, GUIActionAdapter& us)
          Move the camera to the default position. May be ignored by manipulators if home functionality is not appropriate.

          - +

          ovirtual void init(const GUIEventAdapter& ea, GUIActionAdapter& us)
          Start/restart the manipulator

          - +

          ovirtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
          handle events, return true if handled, false otherwise

          diff --git a/doc/doc++/osgUtil/TriStripVisitor.html b/doc/doc++/osgUtil/TriStripVisitor.html index f8c5458bc..079144b4a 100644 --- a/doc/doc++/osgUtil/TriStripVisitor.html +++ b/doc/doc++/osgUtil/TriStripVisitor.html @@ -23,13 +23,13 @@

          Public Methods

          -[more] TriStripVisitor() +[more] TriStripVisitor()
          default to traversing all children
          -[more]static void stripify(osg::GeoSet& gset) +[more]static void stripify(osg::GeoSet& gset)
          convert mesh primitives in geoset into Tri Strips using NvTriStrip.
          -[more]virtual void apply(osg::Geode& geode) +[more]virtual void apply(osg::Geode& geode)
          apply stripify method to all geode geosets

          @@ -43,19 +43,19 @@ The current implemention is based up NVidia's NvTriStrip.
          - +
          o TriStripVisitor()
          default to traversing all children

          - +

          ostatic void stripify(osg::GeoSet& gset)
          convert mesh primitives in geoset into Tri Strips using NvTriStrip. Converts all primtive types except points and lines, linestrips which it leaves unchanged.

          - +

          ovirtual void apply(osg::Geode& geode)
          apply stripify method to all geode geosets

          diff --git a/doc/doc++/osgUtil/VisualsRequirementsVisitor.html b/doc/doc++/osgUtil/VisualsRequirementsVisitor.html index a8e6fa87d..72a9c8ee2 100644 --- a/doc/doc++/osgUtil/VisualsRequirementsVisitor.html +++ b/doc/doc++/osgUtil/VisualsRequirementsVisitor.html @@ -23,53 +23,53 @@

          Public Methods

          -[more] VisualsRequirementsVisitor() +[more] VisualsRequirementsVisitor()
          Default to traversing all children, and reqiresDoubleBuffer, requiresRGB and requiresDepthBuffer to true and with alpha and stencil off
          -[more]void setRequiresDoubleBuffer(const bool flag) +[more]void setRequiresDoubleBuffer(const bool flag)
          -[more]const bool requiresDoubleBuffer() const +[more]const bool requiresDoubleBuffer() const
          -[more]void setRequiresRGB(const bool flag) +[more]void setRequiresRGB(const bool flag)
          -[more]const bool requiresRGB() const +[more]const bool requiresRGB() const
          -[more]void setRequiresDepthBuffer(const bool flag) +[more]void setRequiresDepthBuffer(const bool flag)
          -[more]const bool requiresDepthBuffer() const +[more]const bool requiresDepthBuffer() const
          -[more]void setMinumumNumAlphaBits(const unsigned int bits) +[more]void setMinimumNumAlphaBits(const unsigned int bits)
          -[more]const unsigned int getMinumumNumAlphaBits() const +[more]const unsigned int getMinimumNumAlphaBits() const
          -[more]const bool requiresAlphaBuffer() const +[more]const bool requiresAlphaBuffer() const
          -[more]void setMinumumNumStencilBits(const unsigned int bits) +[more]void setMinimumNumStencilBits(const unsigned int bits)
          -[more]const unsigned int getMinumumNumStencilBits() const +[more]const unsigned int getMinimumNumStencilBits() const
          -[more]const bool requiresStencilBuffer() const +[more]const bool requiresStencilBuffer() const
          -[more]virtual void applyStateSet(osg::StateSet& stateset) +[more]virtual void applyStateSet(osg::StateSet& stateset)
          -[more]virtual void apply(osg::Node& node) +[more]virtual void apply(osg::Node& node)
          -[more]virtual void apply(osg::Geode& geode) +[more]virtual void apply(osg::Geode& geode)
          -[more]virtual void apply(osg::Impostor& impostor) +[more]virtual void apply(osg::Impostor& impostor)

          Protected Fields

          -[more]bool _requiresDoubleBuffer +[more]bool _requiresDoubleBuffer
          -[more]bool _requiresRBG +[more]bool _requiresRBG
          -[more]bool _requiresDepthBuffer +[more]bool _requiresDepthBuffer
          -[more]unsigned int _minimumNumberAlphaBits +[more]unsigned int _minimumNumberAlphaBits
          -[more]unsigned int _minimumNumberStencilBits +[more]unsigned int _minimumNumberStencilBits

          @@ -84,94 +84,94 @@ src/osgGLUT/Viewer.cpp's Viewer::open() method for an example how to use it. - +
          o VisualsRequirementsVisitor()
          Default to traversing all children, and reqiresDoubleBuffer, requiresRGB and requiresDepthBuffer to true and with alpha and stencil off

          - +

          ovoid setRequiresDoubleBuffer(const bool flag)

          - +

          oconst bool requiresDoubleBuffer() const

          - +

          ovoid setRequiresRGB(const bool flag)

          - +

          oconst bool requiresRGB() const

          - +

          ovoid setRequiresDepthBuffer(const bool flag)

          - +

          oconst bool requiresDepthBuffer() const

          - - -

          ovoid setMinumumNumAlphaBits(const unsigned int bits) + + +
          ovoid setMinimumNumAlphaBits(const unsigned int bits)

          - - -

          oconst unsigned int getMinumumNumAlphaBits() const + + +
          oconst unsigned int getMinimumNumAlphaBits() const

          - +

          oconst bool requiresAlphaBuffer() const

          - - -

          ovoid setMinumumNumStencilBits(const unsigned int bits) + + +
          ovoid setMinimumNumStencilBits(const unsigned int bits)

          - - -

          oconst unsigned int getMinumumNumStencilBits() const + + +
          oconst unsigned int getMinimumNumStencilBits() const

          - +

          oconst bool requiresStencilBuffer() const

          - +

          ovirtual void applyStateSet(osg::StateSet& stateset)

          - +

          ovirtual void apply(osg::Node& node)

          - +

          ovirtual void apply(osg::Geode& geode)

          - +

          ovirtual void apply(osg::Impostor& impostor)

          - +

          obool _requiresDoubleBuffer

          - +

          obool _requiresRBG

          - +

          obool _requiresDepthBuffer

          - +

          ounsigned int _minimumNumberAlphaBits

          - +

          ounsigned int _minimumNumberStencilBits

          diff --git a/doc/doc++/osgUtil/index.html b/doc/doc++/osgUtil/index.html index 38d32ebc8..a81d82d15 100644 --- a/doc/doc++/osgUtil/index.html +++ b/doc/doc++/osgUtil/index.html @@ -19,8 +19,10 @@

          Macros

            +
          • OSGUTIL_APPVISITOR
          • OSGUTIL_CAMERAMANIPULATOR
          • OSGUTIL_CULLVIEWSTATE +
          • OSGUTIL_CULLVISITOR
          • OSGUTIL_DEPTHSORTEDBIN
          • OSGUTIL_DISPLAYLISTVISITOR
          • OSGUTIL_DRIVEMANIPULATOR @@ -38,7 +40,7 @@
          • OSGUTIL_GUIEVENTHANDLER
          • OSGUTIL_INSERTIMPOSTORSVISITOR
          • OSGUTIL_INTERSECTVISITOR -
          • OSGUTIL_NEWCULLVISITOR +
          • OSGUTIL_OPTIMIZESTATEVISITOR
          • OSGUTIL_RENDERBIN
          • OSGUTIL_RENDERGRAPH
          • OSGUTIL_RENDERLEAF diff --git a/doc/doc++/osgUtil/osgUtil.html b/doc/doc++/osgUtil/osgUtil.html index 646c787f0..2570816bb 100644 --- a/doc/doc++/osgUtil/osgUtil.html +++ b/doc/doc++/osgUtil/osgUtil.html @@ -11,6 +11,9 @@

            +class OSGUTIL_EXPORT AppVisitor: public osg::NodeVisitor +
            Basic AppVisitor implementation for animating a scene. +
            class OSGUTIL_EXPORT CameraManipulator: public GUIEventHandler
            class OSGUTIL_EXPORT CullViewState: public osg::Referenced @@ -46,6 +49,9 @@ class OSGUTIL_EXPORT Hit: public osg::Referenced class OSGUTIL_EXPORT IntersectVisitor: public osg::NodeVisitor
            Basic visitor for ray based collisions of a scene.
            +class OSGUTIL_EXPORT OptimizeStateVisitor: public osg::NodeVisitor +
            Insert impostor nodes into scene graph. +
            class OSGUTIL_EXPORT RenderBin: public osg::Object
            RenderBin base class
            diff --git a/include/osg/AlphaFunc b/include/osg/AlphaFunc index 4b5a89982..d27ce809e 100644 --- a/include/osg/AlphaFunc +++ b/include/osg/AlphaFunc @@ -14,12 +14,23 @@ class SG_EXPORT AlphaFunc : public StateAttribute AlphaFunc(); - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual Object* clone() const { return new AlphaFunc(); } - virtual const char* className() const { return "AlphaFunc"; } - - virtual const Type getType() const { return ALPHAFUNC; } + META_StateAttribute(AlphaFunc,ALPHAFUNC); + + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(AlphaFunc,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_comparisonFunc) + COMPARE_StateAttribute_Parameter(_referenceValue) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_ALPHA_TEST,value); diff --git a/include/osg/Billboard b/include/osg/Billboard index a94728462..e39c5a638 100644 --- a/include/osg/Billboard +++ b/include/osg/Billboard @@ -22,11 +22,7 @@ class SG_EXPORT Billboard : public Geode Billboard(); - virtual Object* clone() const { return new Billboard(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Billboard"; } - virtual void accept(NodeVisitor& nv) { nv.apply(*this); } - + META_Node(Billboard); /** Set the axis about which all the billboard's drawable rotate. */ inline void setAxis(const Vec3& axis) { _axis = axis; } diff --git a/include/osg/Camera b/include/osg/Camera index 6320df06c..acdcc8388 100644 --- a/include/osg/Camera +++ b/include/osg/Camera @@ -6,6 +6,7 @@ #include #include #include +#include namespace osg { @@ -58,6 +59,9 @@ class SG_EXPORT Camera: public osg::Referenced void setPerspective(const double fovy,const double aspectRatio, const double zNear, const double zFar); + /** Set a sysmetical perspective projection using field of view.*/ + void setFOV(const double fovx,const double fovy, + const double zNear, const double zFar); /** Set the near and far clipping planes.*/ void setNearFar(const double zNear, const double zFar); @@ -65,16 +69,32 @@ class SG_EXPORT Camera: public osg::Referenced /** Use in combination with adjustAspectRatio, to control * the change in frustum clipping planes to account for * changes in windows aspect ratio,*/ - enum AdjustAxis + enum AdjustAspectRatioMode { ADJUST_VERTICAL, ADJUST_HORIZONTAL }; + /** Set the way that the vertical or horizontal dimensions of the window + * are adjusted on a resize. */ + void setAdjustAspectRatioMode(const AdjustAspectRatioMode aam) { _adjustAspectRatioMode = aam; } + + /** Get the way that the vertical or horizontal dimensions of the window + * are adjusted on a resize. */ + const AdjustAspectRatioMode getAdjustAspectRatioMode() const { return _adjustAspectRatioMode; } + /** Adjust the clipping planes to account for a new window aspcect ratio. * Typicall used after resizeing a window. Aspect ratio is defined as * width/height.*/ - void adjustAspectRatio(const double newAspectRatio, const AdjustAxis aa = ADJUST_HORIZONTAL); + void adjustAspectRatio(const double newAspectRatio) + { + adjustAspectRatio(newAspectRatio,_adjustAspectRatioMode); + } + + /** Adjust the clipping planes to account for a new window aspcect ratio. + * Typicall used after resizeing a window. Aspect ratio is defined as + * width/height.*/ + void adjustAspectRatio(const double newAspectRatio, const AdjustAspectRatioMode aa); const double left() const; const double right() const; @@ -223,11 +243,11 @@ class SG_EXPORT Camera: public osg::Referenced /** Map object coordinates into windows coordinates. * Equivilant to gluProject(...). */ - const bool project(const Vec3& obj,const int* viewport,Vec3& win) const; + const bool project(const Vec3& obj,const Viewport& viewport,Vec3& win) const; /** Map window coordinates into object coordinates. * Equivilant to gluUnProject(...). */ - const bool unproject(const Vec3& win,const int* viewport,Vec3& obj) const; + const bool unproject(const Vec3& win,const Viewport& viewport,Vec3& obj) const; protected: @@ -239,6 +259,9 @@ class SG_EXPORT Camera: public osg::Referenced // projection details. ProjectionType _projectionType; + // how the window dimensions should be altered during a window resize. + AdjustAspectRatioMode _adjustAspectRatioMode; + // note, in Frustum/Perspective mode these values are scaled // by the zNear from when they were initialised to ensure that // subsequent changes in zNear do not affect them. diff --git a/include/osg/ClipPlane b/include/osg/ClipPlane index f892f9e0c..cc1944399 100644 --- a/include/osg/ClipPlane +++ b/include/osg/ClipPlane @@ -14,17 +14,25 @@ class SG_EXPORT ClipPlane : public StateAttribute ClipPlane(); - /** return a shallow copy of a node, with Object* return type.*/ - virtual Object* clone() const { return new ClipPlane(); } - - /** return true if this and obj are of the same kind of object.*/ - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - - /** return the name of the node's class type.*/ - virtual const char* className() const { return "ClipPlane"; } - - virtual const Type getType() const { return (Type)(CLIPPLANE+_clipPlaneNum); } + META_StateAttribute(ClipPlane, (Type)(CLIPPLANE+_clipPlaneNum)); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(ClipPlane,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_clipPlaneNum) + COMPARE_StateAttribute_Parameter(_clipPlane[0]) + COMPARE_StateAttribute_Parameter(_clipPlane[1]) + COMPARE_StateAttribute_Parameter(_clipPlane[2]) + COMPARE_StateAttribute_Parameter(_clipPlane[3]) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode((GLMode)(GL_CLIP_PLANE0+_clipPlaneNum),value); @@ -62,7 +70,7 @@ class SG_EXPORT ClipPlane : public StateAttribute virtual ~ClipPlane(); - double* _clipPlane; + double _clipPlane[4]; unsigned int _clipPlaneNum; }; diff --git a/include/osg/ColorMask b/include/osg/ColorMask index 18e7a3771..ba5d85a5b 100644 --- a/include/osg/ColorMask +++ b/include/osg/ColorMask @@ -15,12 +15,25 @@ class SG_EXPORT ColorMask : public StateAttribute ColorMask(); - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual Object* clone() const { return new ColorMask(); } - virtual const char* className() const { return "ColorMask"; } - - virtual const Type getType() const { return COLORMASK; } + META_StateAttribute(ColorMask, COLORMASK); + + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(ColorMask,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_red) + COMPARE_StateAttribute_Parameter(_green) + COMPARE_StateAttribute_Parameter(_blue) + COMPARE_StateAttribute_Parameter(_alpha) + + return 0; // passed all the above comparison macro's, must be equal. + } + inline void setMask(bool red,bool green,bool blue,bool alpha) { _red = red; diff --git a/include/osg/CullFace b/include/osg/CullFace index a08fa6b47..22d000ced 100644 --- a/include/osg/CullFace +++ b/include/osg/CullFace @@ -14,12 +14,22 @@ class SG_EXPORT CullFace : public StateAttribute public : CullFace(); - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual Object* clone() const { return new CullFace(); } - virtual const char* className() const { return "CullFace"; } - - virtual const Type getType() const { return CULLFACE; } + + META_StateAttribute(CullFace, CULLFACE); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(CullFace,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_mode) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_CULL_FACE,value); diff --git a/include/osg/Depth b/include/osg/Depth index 7e1be73e1..6ba181687 100644 --- a/include/osg/Depth +++ b/include/osg/Depth @@ -15,12 +15,25 @@ class SG_EXPORT Depth : public StateAttribute Depth(); - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual Object* clone() const { return new Depth(); } - virtual const char* className() const { return "Depth"; } - - virtual const Type getType() const { return DEPTH; } + META_StateAttribute(Depth, DEPTH); + + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Depth,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_func) + COMPARE_StateAttribute_Parameter(_depthWriteMask) + COMPARE_StateAttribute_Parameter(_zNear) + COMPARE_StateAttribute_Parameter(_zFar) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_DEPTH_TEST,value); diff --git a/include/osg/Fog b/include/osg/Fog index ac9c34d80..846fde0a5 100644 --- a/include/osg/Fog +++ b/include/osg/Fog @@ -15,12 +15,26 @@ class SG_EXPORT Fog : public StateAttribute public : Fog(); - virtual Object* clone() const { return new Fog(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Fog"; } - virtual const Type getType() const { return FOG; } + META_StateAttribute(Fog,FOG); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Fog,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_mode) + COMPARE_StateAttribute_Parameter(_density) + COMPARE_StateAttribute_Parameter(_start) + COMPARE_StateAttribute_Parameter(_end) + COMPARE_StateAttribute_Parameter(_color) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_FOG,value); diff --git a/include/osg/FrontFace b/include/osg/FrontFace index 5b95a678b..0b22d2bee 100644 --- a/include/osg/FrontFace +++ b/include/osg/FrontFace @@ -13,12 +13,22 @@ class SG_EXPORT FrontFace : public StateAttribute public : FrontFace(); - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual Object* clone() const { return new FrontFace(); } - virtual const char* className() const { return "FrontFace"; } - - virtual const Type getType() const { return FRONTFACE; } + + META_StateAttribute(FrontFace, FRONTFACE); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(FrontFace,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_mode) + + return 0; // passed all the above comparison macro's, must be equal. + } + enum Mode { CLOCKWISE = GL_CW, COUNTER_CLOCKWISE = GL_CCW diff --git a/include/osg/Geode b/include/osg/Geode index dcbbbd3e2..8f214dd83 100644 --- a/include/osg/Geode +++ b/include/osg/Geode @@ -16,10 +16,7 @@ class SG_EXPORT Geode : public Node Geode(); - virtual Object* clone() const { return new Geode(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Geode"; } - virtual void accept(NodeVisitor& nv) { nv.apply(*this); } + META_Node(Geode); /** Add Drawable to Geode. * If gset is not NULL and is not contained in Geode then increment its @@ -58,7 +55,7 @@ class SG_EXPORT Geode : public Node /** return geoset at position i.*/ inline const Drawable* getDrawable( const int i ) const { return _drawables[i].get(); } - /** return true is geoset is contained within Geode.*/ + /** return true if geoset is contained within Geode.*/ inline const bool containsDrawable(const Drawable* gset) const { diff --git a/include/osg/Group b/include/osg/Group index 42b8bf65a..9197cdcc8 100644 --- a/include/osg/Group +++ b/include/osg/Group @@ -17,12 +17,9 @@ class SG_EXPORT Group : public Node typedef std::vector > ChildList; Group(); - - virtual Object* clone() const { return new Group(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Group"; } - virtual void accept(NodeVisitor& nv) { nv.apply(*this); } + META_Node(Group); + virtual void traverse(NodeVisitor& nv); /** Add Node to Group. diff --git a/include/osg/Impostor b/include/osg/Impostor index d777a5671..36ae1a410 100644 --- a/include/osg/Impostor +++ b/include/osg/Impostor @@ -49,10 +49,7 @@ class SG_EXPORT Impostor : public LOD public : Impostor(); - virtual Object* clone() const { return new Impostor(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Impostor"; } - virtual void accept(NodeVisitor& nv) { nv.apply(*this); } + META_Node(Impostor); typedef std::vector< ref_ptr > ImpostorSpriteList; diff --git a/include/osg/ImpostorSprite b/include/osg/ImpostorSprite index 34f6b52d1..fe134a729 100644 --- a/include/osg/ImpostorSprite +++ b/include/osg/ImpostorSprite @@ -6,6 +6,8 @@ #include #include #include +#include +#include namespace osg { @@ -91,7 +93,7 @@ class SG_EXPORT ImpostorSprite : public Drawable /** calculate the pixel error value for current camera position and object position.*/ - const float calcPixelError(const Camera& camera,const int* viewport,const osg::Matrix* matrix) const; + const float calcPixelError(const Camera& camera,const Viewport& viewport,const osg::Matrix* matrix) const; void setTexture(Texture* tex,int s,int t); @@ -165,8 +167,11 @@ class SG_EXPORT ImpostorSpriteManager : public Referenced ~ImpostorSpriteManager(); - ImpostorSprite* _first; - ImpostorSprite* _last; + ref_ptr _texenv; + ref_ptr _alphafunc; + + ImpostorSprite* _first; + ImpostorSprite* _last; }; diff --git a/include/osg/LOD b/include/osg/LOD index 7dd1d7014..13d581224 100644 --- a/include/osg/LOD +++ b/include/osg/LOD @@ -17,10 +17,8 @@ class SG_EXPORT LOD : public Group public : LOD() {} - virtual Object* clone() const { return new LOD(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "LOD"; } - virtual void accept(NodeVisitor& nv) { nv.apply(*this); } + META_Node(LOD); + virtual void traverse(NodeVisitor& nv); /** Sets the value of range list element index to range which diff --git a/include/osg/Light b/include/osg/Light index 663e2f695..ced8ff2d7 100644 --- a/include/osg/Light +++ b/include/osg/Light @@ -15,22 +15,31 @@ class SG_EXPORT Light : public StateAttribute Light(); - /** return a shallow copy of a node, with Object* return type.*/ - virtual Object* clone() const { return new Light(); } + META_StateAttribute(Light, (Type)(LIGHT_0+_lightnum)); - /** return true if this and obj are of the same kind of object.*/ - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - - /** return the name of the node's class type.*/ - virtual const char* className() const { return "Light"; } - - virtual const Type getType() const { return LIGHTING; } - - virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const { - ds.setMode((GLMode)(GL_LIGHT0+_lightnum),value); - } + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Light,sa) + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_lightnum) + COMPARE_StateAttribute_Parameter(_on) + COMPARE_StateAttribute_Parameter(_ambient) + COMPARE_StateAttribute_Parameter(_diffuse) + COMPARE_StateAttribute_Parameter(_specular) + COMPARE_StateAttribute_Parameter(_position) + COMPARE_StateAttribute_Parameter(_direction) + COMPARE_StateAttribute_Parameter(_constant_attenuation) + COMPARE_StateAttribute_Parameter(_linear_attenuation) + COMPARE_StateAttribute_Parameter(_quadratic_attenuation) + COMPARE_StateAttribute_Parameter(_spot_exponent) + COMPARE_StateAttribute_Parameter(_spot_cutoff) + + return 0; // passed all the above comparison macro's, must be equal. + } /** * Turn the light on. diff --git a/include/osg/LightSource b/include/osg/LightSource index da4019e60..63b3a7e51 100644 --- a/include/osg/LightSource +++ b/include/osg/LightSource @@ -14,10 +14,7 @@ class SG_EXPORT LightSource : public Node LightSource(); - virtual Object* clone() const { return new LightSource(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "LightSource"; } - virtual void accept(NodeVisitor& nv) { nv.apply(*this); } + META_Node(LightSource); /** Set the attached light.*/ inline void setLight(Light* light) { _light = light; } diff --git a/include/osg/Material b/include/osg/Material index 422d5b3f0..f126130f2 100644 --- a/include/osg/Material +++ b/include/osg/Material @@ -14,12 +14,37 @@ class SG_EXPORT Material : public StateAttribute Material(); - virtual Object* clone() const { return new Material(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - const char* className() const { return "Material"; } - virtual const Type getType() const { return MATERIAL; } + META_StateAttribute(Material, MATERIAL); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Material,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_colorMode) + COMPARE_StateAttribute_Parameter(_ambientFrontAndBack) + COMPARE_StateAttribute_Parameter(_ambientFront) + COMPARE_StateAttribute_Parameter(_ambientBack) + COMPARE_StateAttribute_Parameter(_diffuseFrontAndBack) + COMPARE_StateAttribute_Parameter(_diffuseFront) + COMPARE_StateAttribute_Parameter(_diffuseBack) + COMPARE_StateAttribute_Parameter(_specularFrontAndBack) + COMPARE_StateAttribute_Parameter(_specularFront) + COMPARE_StateAttribute_Parameter(_specularBack) + COMPARE_StateAttribute_Parameter(_emissionFrontAndBack) + COMPARE_StateAttribute_Parameter(_emissionFront) + COMPARE_StateAttribute_Parameter(_emissionBack) + COMPARE_StateAttribute_Parameter(_shininessFrontAndBack) + COMPARE_StateAttribute_Parameter(_shininessFront) + COMPARE_StateAttribute_Parameter(_shininessBack) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { // Have to think about the role of _colorMode diff --git a/include/osg/Matrix b/include/osg/Matrix index 0455d431d..7540c060b 100644 --- a/include/osg/Matrix +++ b/include/osg/Matrix @@ -14,113 +14,193 @@ using namespace std; namespace osg { -/** 4x4 Matrix for storage & manipulation of transformations in scene graph. - Provides basic maths operations, IO and via osg::Object reference counting. - You can directly load the matrix with OpenGL's LoadMatrixf() function via - the public member _mat as the matrix is stored in the OpenGL format. - Caution: The disadvantage of this feature is, that the matrix access is - 'transposed' if you compare it with the standard C/C++ 2d-array-access - convention . I.e. _mat[i][j] accesses the ith column of the jth row in the - 4x4 matrix. -*/ +class Quat; class SG_EXPORT Matrix : public Object { +// private: public: + float _mat[4][4]; + bool fully_realized; + + public: +// const char* name() { return "My Matrix "; } + META_Object(Matrix); + Matrix(); - Matrix(const Matrix& matrix); + Matrix( const Matrix& other ); + explicit Matrix( float const * const def ); Matrix( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33); - Matrix& operator = (const Matrix& matrix); + virtual ~Matrix() {} - virtual ~Matrix(); + Matrix& operator = (const Matrix& ); - virtual Object* clone() const { return new Matrix(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Matrix"; } + int compare(const Matrix& m) const { return memcmp(_mat,m._mat,sizeof(_mat)); } - void makeIdent(); + bool operator < (const Matrix& m) const { return compare(m)<0; } + bool operator == (const Matrix& m) const { return compare(m)==0; } + bool operator != (const Matrix& m) const { return compare(m)!=0; } - void set(const float* m); + inline float& operator()(int col, int row) { return _mat[row][col]; } + inline float operator()(int col, int row) const { return _mat[row][col]; } + void set( float const * const ); void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33); + const float * values() { return (const float *)_mat; } - void copy(const Matrix& matrix); + void makeIdent(); + void makeScale( const Vec3& ); + void makeScale( float, float, float ); + + void makeTrans( const Vec3& ); + void makeTrans( float, float, float ); + //TODO: original preTrans was optimized (M=Tr*M) + // but also has the assumption that M (this) is an affine transformation Matrix + // can I still do something to optimize the same case now? - void makeScale(float sx, float sy, float sz); - void preScale( float sx, float sy, float sz, const Matrix& m ); - void postScale( const Matrix& m, float sx, float sy, float sz ); - - void preScale( float sx, float sy, float sz ); - void postScale( float sx, float sy, float sz ); - + void makeRot( const Vec3& from, const Vec3& to ); + void makeRot( float angle, const Vec3& orientation ); + void makeRot( float angle, float x, float y, float z ); + void makeRot( const Quat& ); + void makeRot( float, float, float ); //Euler angles - void makeTrans( float tx, float ty, float tz ); - void preTrans( float tx, float ty, float tz, const Matrix& m ); - void postTrans( const Matrix& m, float tx, float ty, float tz ); - - void preTrans( float tx, float ty, float tz ); - void postTrans( float tx, float ty, float tz ); - + bool invert( const Matrix& ); + bool invertAffine( const Matrix& ); - /** - * Calc the rotation matrix which aligns vector \a old_vec with - * vector \a new_vec. Both \a old_vec and \a new_vec must have - * length 1.0. - */ - void makeRot( const Vec3& old_vec, const Vec3& new_vec ); + //basic utility functions to create new matrices or vectors + inline static Matrix scale( const Vec3& ); + inline static Matrix scale( float, float, float ); + inline static Matrix trans( const Vec3& ); + inline static Matrix trans( float, float, float ); + inline static Matrix rotate( const Vec3&, const Vec3& ); + inline static Matrix rotate( float, float, float, float ); + inline static Matrix rotate( const Quat& ); + + inline Vec3 preMult( const Vec3& v ) const; + inline Vec3 postMult( const Vec3& v ) const; + inline Vec3 operator* ( const Vec3& v ) const; + inline Vec4 preMult( const Vec4& v ) const; + inline Vec4 postMult( const Vec4& v ) const; + inline Vec4 operator* ( const Vec4& v ) const; + +//start of Deprecated methods - void makeRot( float deg, float x, float y, float z ); - void preRot( float deg, float x, float y, float z, const Matrix& m ); - void postRot( const Matrix& m, float deg, float x, float y, float z ); - - void preRot( float deg, float x, float y, float z ); - void postRot( float deg, float x, float y, float z ); - void setTrans( float tx, float ty, float tz ); void setTrans( const Vec3& v ); Vec3 getTrans() const { return Vec3(_mat[3][0],_mat[3][1],_mat[3][2]); } - - void preMult(const Matrix& m); - void postMult(const Matrix& m); - void mult(const Matrix& lhs,const Matrix& rhs); - Matrix operator * (const Matrix& m) const; + void copy( const Matrix& ); + void preScale( float sx, float sy, float sz, const Matrix& m ); + void postScale( const Matrix& m, float sx, float sy, float sz ); + void preScale( float sx, float sy, float sz ); + void postScale( float sx, float sy, float sz ); + + void preTrans( float tx, float ty, float tz, const Matrix& m ); + void postTrans( const Matrix& m, float tx, float ty, float tz ); + void preTrans( float tx, float ty, float tz); + void postTrans( float tx, float ty, float tz ); + + void preRot( float deg, float x, float y, float z, const Matrix& m ); + void postRot( const Matrix& m, float deg, float x, float y, float z ); + void preRot( float deg, float x, float y, float z ); + void postRot( float deg, float x, float y, float z ); /** apply apply an 3x3 transform of v*M[0..2,0..2] */ inline static Vec3 transform3x3(const Vec3& v,const Matrix& m); /** apply apply an 3x3 transform of M[0..2,0..2]*v */ inline static Vec3 transform3x3(const Matrix& m,const Vec3& v); + +//end of Deprecated methods - /** post multipy v. ie. (m*v) */ - inline Vec3 operator * (const Vec3& v) const; - /** pre multipy v. ie. (v*m) */ - friend inline Vec3 operator * (const Vec3& v,const Matrix& m); + // basic Matrix multiplication, our workhorse methods. + void mult( const Matrix&, const Matrix& ); + void preMult( const Matrix& ); + void postMult( const Matrix& ); - /** post multipy v. ie. (m*v) */ - inline Vec4 operator * (const Vec4& v) const; + // Helper class to optimize product expressions somewhat + class MatrixProduct { + public: + const Matrix& A; + const Matrix& B; - /** pre multipy v. ie. (v*m) */ - friend inline Vec4 operator * (const Vec4& v,const Matrix& m); + MatrixProduct( const Matrix& lhs, const Matrix& rhs ) : A(lhs), B(rhs) {} + }; - friend inline ostream& operator << (ostream& output, const Matrix& matrix); + inline MatrixProduct operator * ( const Matrix& other ) const + { return MatrixProduct(*this, other); } - bool invert(const Matrix& m); + inline void operator *= ( const Matrix& other ) + { if( this == &other ) { + Matrix temp(other); + postMult( temp ); + } + else postMult( other ); + } + inline void operator = ( const MatrixProduct& p ) + { + if( this == &(p.A)) postMult(p.B); + else if( this == &(p.B)) preMult(p.A); + else mult( p.A, p.B ); + } - public : - float _mat[4][4]; - - protected: + Matrix( const MatrixProduct& p ) //allows implicit evaluation of the product + { mult( p.A, p.B ); } }; -inline Vec3 Matrix::operator * (const Vec3& v) const +//static utility methods +inline Matrix Matrix::scale(float sx, float sy, float sz) +{ + Matrix m; + m.makeScale(sx,sy,sz); + return m; +} + +inline Matrix Matrix::scale(const Vec3& v ) +{ + return scale(v.x(), v.y(), v.z() ); +} + +inline Matrix Matrix::trans(float tx, float ty, float tz) +{ + Matrix m; + m.makeTrans(tx,ty,tz); + return m; +} + +inline Matrix Matrix::trans(const Vec3& v ) +{ + return trans(v.x(), v.y(), v.z() ); +} + +inline Matrix Matrix::rotate( const Quat& q ) +{ + Matrix m; + m.makeRot( q ); + return m; +} +inline Matrix Matrix::rotate(float angle, float x, float y, float z ) +{ + Matrix m; + m.makeRot(angle,x,y,z); + return m; +} + +inline Matrix Matrix::rotate(const Vec3& from, const Vec3& to ) +{ + Matrix m; + m.makeRot(from,to); + return m; +} + +inline Vec3 Matrix::postMult( const Vec3& v ) const { float d = 1.0f/(_mat[3][0]*v.x()+_mat[3][1]*v.y()+_mat[3][2]*v.z()+_mat[3][3]) ; return Vec3( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3])*d, @@ -128,16 +208,15 @@ inline Vec3 Matrix::operator * (const Vec3& v) const (_mat[2][0]*v.x() + _mat[2][1]*v.y() + _mat[2][2]*v.z() + _mat[2][3])*d) ; } - -inline Vec3 operator * (const Vec3& v,const Matrix& m) +inline Vec3 Matrix::preMult( const Vec3& v ) const { - float d = 1.0f/(m._mat[0][3]*v.x()+m._mat[1][3]*v.y()+m._mat[2][3]*v.z()+m._mat[3][3]) ; - return Vec3( (m._mat[0][0]*v.x() + m._mat[1][0]*v.y() + m._mat[2][0]*v.z() + m._mat[3][0])*d, - (m._mat[0][1]*v.x() + m._mat[1][1]*v.y() + m._mat[2][1]*v.z() + m._mat[3][1])*d, - (m._mat[0][2]*v.x() + m._mat[1][2]*v.y() + m._mat[2][2]*v.z() + m._mat[3][2])*d); + float d = 1.0f/(_mat[0][3]*v.x()+_mat[1][3]*v.y()+_mat[2][3]*v.z()+_mat[3][3]) ; + return Vec3( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0])*d, + (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1])*d, + (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2])*d); } -inline Vec4 Matrix::operator * (const Vec4& v) const +inline Vec4 Matrix::postMult( const Vec4& v ) const { return Vec4( (_mat[0][0]*v.x() + _mat[0][1]*v.y() + _mat[0][2]*v.z() + _mat[0][3]*v.w()), (_mat[1][0]*v.x() + _mat[1][1]*v.y() + _mat[1][2]*v.z() + _mat[1][3]*v.w()), @@ -145,15 +224,13 @@ inline Vec4 Matrix::operator * (const Vec4& v) const (_mat[3][0]*v.x() + _mat[3][1]*v.y() + _mat[3][2]*v.z() + _mat[3][3]*v.w())) ; } - -inline Vec4 operator * (const Vec4& v,const Matrix& m) +inline Vec4 Matrix::preMult( const Vec4& v ) const { - return Vec4( (m._mat[0][0]*v.x() + m._mat[1][0]*v.y() + m._mat[2][0]*v.z() + m._mat[3][0]*v.w()), - (m._mat[0][1]*v.x() + m._mat[1][1]*v.y() + m._mat[2][1]*v.z() + m._mat[3][1]*v.w()), - (m._mat[0][2]*v.x() + m._mat[1][2]*v.y() + m._mat[2][2]*v.z() + m._mat[3][2]*v.w()), - (m._mat[0][3]*v.x() + m._mat[1][3]*v.y() + m._mat[2][3]*v.z() + m._mat[3][3]*v.w())); + return Vec4( (_mat[0][0]*v.x() + _mat[1][0]*v.y() + _mat[2][0]*v.z() + _mat[3][0]*v.w()), + (_mat[0][1]*v.x() + _mat[1][1]*v.y() + _mat[2][1]*v.z() + _mat[3][1]*v.w()), + (_mat[0][2]*v.x() + _mat[1][2]*v.y() + _mat[2][2]*v.z() + _mat[3][2]*v.w()), + (_mat[0][3]*v.x() + _mat[1][3]*v.y() + _mat[2][3]*v.z() + _mat[3][3]*v.w())); } - inline Vec3 Matrix::transform3x3(const Vec3& v,const Matrix& m) { return Vec3( (m._mat[0][0]*v.x() + m._mat[1][0]*v.y() + m._mat[2][0]*v.z()), @@ -168,17 +245,40 @@ inline Vec3 Matrix::transform3x3(const Matrix& m,const Vec3& v) (m._mat[2][0]*v.x() + m._mat[2][1]*v.y() + m._mat[2][2]*v.z()) ) ; } -inline ostream& operator << (ostream& output, const Matrix& matrix) + +inline Vec3 operator* (const Vec3& v, const Matrix& m ) { - output << "{"<(obj)!=NULL; } \ - virtual const char* className() const { return #name; } - namespace osg { class Quat; @@ -32,7 +27,7 @@ class SG_EXPORT Matrix : public Object public: // const char* name() { return "My Matrix "; } - METAOBJ(Matrix) + META_Object(Matrix); Matrix(); Matrix( const Matrix& other ); @@ -46,6 +41,12 @@ class SG_EXPORT Matrix : public Object Matrix& operator = (const Matrix& ); + int compare(const Matrix& m) const { return memcmp(_mat,m._mat,sizeof(_mat)); } + + bool operator < (const Matrix& m) const { return compare(m)<0; } + bool operator == (const Matrix& m) const { return compare(m)==0; } + bool operator != (const Matrix& m) const { return compare(m)!=0; } + inline float& operator()(int col, int row) { return _mat[col][row]; } inline float operator()(int col, int row) const { return _mat[col][row]; } diff --git a/include/osg/Matrix.old b/include/osg/Matrix.old index 0455d431d..4dd94dd08 100644 --- a/include/osg/Matrix.old +++ b/include/osg/Matrix.old @@ -42,6 +42,12 @@ class SG_EXPORT Matrix : public Object virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } virtual const char* className() const { return "Matrix"; } + int compare(const Matrix& m) const { return memcmp(_mat,m._mat,sizeof(_mat)); } + + bool operator < (const Matrix& m) const { return compare(m)<0; } + bool operator == (const Matrix& m) const { return compare(m)==0; } + bool operator != (const Matrix& m) const { return compare(m)!=0; } + void makeIdent(); void set(const float* m); diff --git a/include/osg/Node b/include/osg/Node index 9601c190e..c17219b77 100644 --- a/include/osg/Node +++ b/include/osg/Node @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -15,6 +16,16 @@ namespace osg { class NodeVisitor; class Group; +/** META_Node macro define the standard clone, isSameKindAs, className + * and accept methods. Use when subclassing from Node to make it + * more convinient to define the required pure virtual methods.*/ +#define META_Node(name) \ + virtual Object* clone() const { return new name (); } \ + virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } \ + virtual const char* className() const { return #name; } \ + virtual void accept(NodeVisitor& nv) { if (nv.validNodeMask(*this)) nv.apply(*this); } \ + + /** Base class for all internal nodes in the scene graph. Provides interface for most common node operations (Composite Pattern). */ @@ -59,7 +70,7 @@ class SG_EXPORT Node : public Object inline const ParentList& getParents() const { return _parents; } /** Get the a copy of parent list of node. A copy is returned to - * prevent modifiaction of the parent list.*/ + * prevent modification of the parent list.*/ // inline ParentList getParents() { return _parents; } inline Group* getParent(const int i) { return _parents[i]; } @@ -77,9 +88,22 @@ class SG_EXPORT Node : public Object inline const int getNumParents() const { return _parents.size(); } + /** Set app node callback, called during app traversal. */ + void setAppCallback(NodeCallback* nc); + + /** Get app node callback, called during app traversal. */ + inline NodeCallback* getAppCallback() { return _appCallback.get(); } + + /** Get const app node callback, called during app traversal. */ + inline const NodeCallback* getAppCallback() const { return _appCallback.get(); } + + /** Get the number of Children of this node which require App traversal, + * since they have an AppCallback attached to them or their children.*/ + inline const int getNumChildrenRequiringAppTraversal() const { return _numChildrenRequiringAppTraversal; } + /** * Set user data. See MemoryAdapter documention for details - * of how to specify memory managament of _userData. + * of how to specify memory management of _userData. */ inline void setUserData(void* data,MemoryAdapter* ma=0L) { @@ -173,6 +197,11 @@ class SG_EXPORT Node : public Object ParentList _parents; friend Group; + ref_ptr _appCallback; + int _numChildrenRequiringAppTraversal; + + void setNumChildrenRequiringAppTraversal(const int num); + void* _userData; ref_ptr _memoryAdapter; diff --git a/include/osg/NodeVisitor b/include/osg/NodeVisitor index e18261b01..1b8a8bcf1 100644 --- a/include/osg/NodeVisitor +++ b/include/osg/NodeVisitor @@ -2,6 +2,7 @@ #define OSG_NODEVISITOR 1 #include +#include namespace osg { @@ -38,12 +39,62 @@ class SG_EXPORT NodeVisitor : public Referenced to each traversal.*/ virtual void reset() {} + + /** Set the traversal number. Typically used to denote the frame count.*/ + inline void setTraversalNumber(const int fn) { _traversalNumber = fn; } + + /** Get the traversal number. Typically used to denote the frame count.*/ + inline const int getTraversalNumber() const { return _traversalNumber; } + + /** Set the FrameStamp that this traversal is assoicated with.*/ + inline void setFrameStamp(FrameStamp* fs) { _frameStamp = fs; } + + /** Get the FrameStamp that this traversal is assoicated with.*/ + inline const FrameStamp* getFrameStamp() const { return _frameStamp.get(); } + + + /** Set the TraversalMask of this NodeVisitor. + * The TraversalMask is used by the NodeVisitor::validNodeMask() method + * to determine whether to operate on a node and its subgraph. + * validNodeMask() is called automaticaly in the Node::accept() method before + * any call to NodeVisitor::apply(), apply() is only ever called if validNodeMask + * returns true. Note, if NodeVisitor::_traversalMask is 0 then all operations + * will be swithced off for all nodes. Whereas setting both _traversalMask and + * _nodeMaskOverride to 0xffffffff will allow a visitor to work on all nodes + * regardless of their own Node::_nodeMask state.*/ + inline void setTraversalMask(const Node::NodeMask mask) { _traversalMask = mask; } + + /** Get the TraversalMask.*/ + inline const Node::NodeMask getTraversalMask() const { return _traversalMask; } + + /** Set the NodeMaskOverride mask. + * Used in validNodeMask() to determine whether to operate on a node or its + * subgraph, by OR'ing NodeVisitor::_nodeMaskOverride with the Node's own Node::_nodeMask. + * Typically used to force on nodes which may have + * been switched off by their own Node::_nodeMask.*/ + inline void setNodeMaskOverride(const Node::NodeMask mask) { _nodeMaskOverride = mask; } + + /** Get the NodeMaskOverride mask.*/ + inline const Node::NodeMask getNodeMaskOverride() const { return _nodeMaskOverride; } + + /** Method to called by Node and its subclass' Node::accept() method, if the result is true + * to be used to cull operations of nodes and their subgraphs. + * Return true if the result of a bit wise and of the NodeVisitor::_traversalMask + * with the bit or between NodeVistor::_nodeMaskOverride and the Node::_nodeMask. + * default values for _traversalMask is 0xffffffff, _nodeMaskOverride is 0x0, + * and osg::Node::_nodeMask is 0xffffffff. */ + inline const bool validNodeMask(const osg::Node& node) const + { + return (getTraversalMask() & (getNodeMaskOverride() | node.getNodeMask()))!=0; + } + /** Set the traversal mode for Node::traverse() to use when deciding which children of a node to traverse. If a NodeVisitor has been attached via setTraverseVisitor() and the new mode is not TRAVERSE_VISITOR then the attached visitor is detached. Default mode is TRAVERSE_NONE.*/ void setTraversalMode(const TraversalMode mode); + /** Get the traversal mode.*/ inline const TraversalMode getTraversalMode() const { return _traversalMode; } @@ -54,7 +105,7 @@ class SG_EXPORT NodeVisitor : public Referenced /** Get the traversal visitor, returns NULL if none is attached.*/ NodeVisitor* getTraversalVisitor() { return _traversalVisitor.get(); } - /** Inline method for passing handling traversal of a nodes. + /** Inline method for handling traversal of a nodes. If you intend to use the visitor for actively traversing the scene graph then make sure the accept() methods call this method unless they handle traversal directly.*/ @@ -80,8 +131,15 @@ class SG_EXPORT NodeVisitor : public Referenced protected: + int _traversalNumber; + + ref_ptr _frameStamp; + ref_ptr _traversalVisitor; + TraversalMode _traversalMode; + Node::NodeMask _traversalMask; + Node::NodeMask _nodeMaskOverride; }; diff --git a/include/osg/Object b/include/osg/Object index 95e953664..cc3f16dda 100644 --- a/include/osg/Object +++ b/include/osg/Object @@ -5,6 +5,16 @@ namespace osg { +/** META_Object macro define the standard clone, isSameKindAs and className methods. + * Use when subclassing from Object to make it more convinient to define + * the standard pure virtual clone, isSameKindAs and className methods + * which are required for all Object subclasses.*/ +#define META_Object(name) \ + virtual Object* clone() const { return new name (); } \ + virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } \ + virtual const char* className() const { return #name; } + + /** Base class/standard interface for objects which require IO support, cloning and reference counting. Based on GOF Composite, Prototype and Template Method patterns. diff --git a/include/osg/Point b/include/osg/Point index ffb77fde1..abebabe93 100644 --- a/include/osg/Point +++ b/include/osg/Point @@ -13,12 +13,24 @@ class SG_EXPORT Point : public StateAttribute public : Point(); - virtual Object* clone() const { return new Point(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Point"; } - virtual const Type getType() const { return POINT; } + META_StateAttribute(Point, POINT); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Point,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_size) + COMPARE_StateAttribute_Parameter(_fadeThresholdSize) + COMPARE_StateAttribute_Parameter(_distanceAttenuation) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_POINT_SMOOTH,value); diff --git a/include/osg/PolygonMode b/include/osg/PolygonMode index 6d481e620..cec34870f 100644 --- a/include/osg/PolygonMode +++ b/include/osg/PolygonMode @@ -13,11 +13,23 @@ class SG_EXPORT PolygonMode : public StateAttribute public : PolygonMode(); - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual Object* clone() const { return new PolygonMode(); } - virtual const char* className() const { return "PolygonMode"; } - - virtual const Type getType() const { return POLYGONMODE; } + + META_StateAttribute(PolygonMode, POLYGONMODE); + + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(PolygonMode,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_frontAndBack) + COMPARE_StateAttribute_Parameter(_modeFront) + COMPARE_StateAttribute_Parameter(_modeBack) + + return 0; // passed all the above comparison macro's, must be equal. + } enum Face { FRONT, diff --git a/include/osg/PolygonOffset b/include/osg/PolygonOffset index f77f633cd..3ef722482 100644 --- a/include/osg/PolygonOffset +++ b/include/osg/PolygonOffset @@ -12,11 +12,22 @@ class SG_EXPORT PolygonOffset : public StateAttribute public : PolygonOffset(); - virtual Object* clone() const { return new PolygonOffset(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "PolygonOffset"; } - virtual const Type getType() const { return POLYGONOFFSET; } + META_StateAttribute(PolygonOffset, POLYGONOFFSET); + + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(PolygonOffset,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_factor) + COMPARE_StateAttribute_Parameter(_units) + + return 0; // passed all the above comparison macro's, must be equal. + } virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { diff --git a/include/osg/State b/include/osg/State index b3b135cb6..372a480b7 100644 --- a/include/osg/State +++ b/include/osg/State @@ -5,6 +5,9 @@ #include #include +#include +#include + #include #include @@ -82,15 +85,21 @@ class SG_EXPORT State : public Referenced inline const unsigned int getContextID() const { return _contextID; } + /** Set the frame stamp for the current frame.*/ + inline void setFrameStamp(FrameStamp* fs) { _frameStamp = fs; } + + /** Set the frame stamp for the current frame.*/ + inline const FrameStamp* getFrameStamp() const { return _frameStamp.get(); } - /** Set the frame number.*/ - inline void setFrameNumber(unsigned int fn) { _frameNumber = fn; } - /** Get the frame number.*/ - inline unsigned int getFrameNumber() const { return _frameNumber; } + /** Set the camera. Note, nothing is applied, the camera is just used + * used in the State object to pass the current camera to Drawables + * during rendering. */ + inline void setCamera(Camera* camera) { _camera = camera; } + + /** Get the camera */ + inline const Camera* getCamera() const { return _camera.get(); } - /** Increment the frame number. Done once per frame.*/ - inline void incrementFrameNumber() { ++_frameNumber; } /** Set the hint to OpenGL routines to do fine grained OpenGL error checking.*/ @@ -101,8 +110,9 @@ class SG_EXPORT State : public Referenced private: - unsigned int _contextID; - unsigned int _frameNumber; + unsigned int _contextID; + ref_ptr _frameStamp; + ref_ptr _camera; typedef std::vector ValueVec; @@ -173,7 +183,8 @@ class SG_EXPORT State : public Referenced ModeMap _modeMap; AttributeMap _attributeMap; - StateSetStack _drawStateStack; + StateSetStack _drawStateStack; + bool _fineGrainedErrorDetection; diff --git a/include/osg/StateAttribute b/include/osg/StateAttribute index 13cae5a44..16015734e 100644 --- a/include/osg/StateAttribute +++ b/include/osg/StateAttribute @@ -4,12 +4,42 @@ #include #include +#include + namespace osg { // forward declare State & StateSet class State; class StateSet; +/** META_StateAttribute macro define the standard clone, isSameKindAs, + * className and getType methods. + * Use when subclassing from Object to make it more convinient to define + * the standard pure virtual methods which are required for all Object + * subclasses.*/ +#define META_StateAttribute(name,type) \ + virtual Object* clone() const { return new name (); } \ + virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } \ + virtual const char* className() const { return #name; } \ + virtual const Type getType() const { return type; } + +/** COMPARE_StateAttribute_Types macro is a helper for implementing the StatateAtribute::compare(..) method.*/ +#define COMPARE_StateAttribute_Types(TYPE,rhs_attribute) \ + if (this==&rhs_attribute) return 0;\ + const std::type_info* type_lhs = &typeid(*this);\ + const std::type_info* type_rhs = &typeid(rhs_attribute);\ + if (type_lhs->before(*type_rhs)) return -1;\ + if (*type_lhs != *type_rhs) return 1;\ + const TYPE& rhs = static_cast(rhs_attribute); + + +/** COMPARE_StateAttribute_Parameter macro is a helper for implementing the StatateAtribute::compare(..) method. + * Macro assumes that variable rhs has been corrected defined by code preceesing + * macro.*/ +#define COMPARE_StateAttribute_Parameter(parameter) \ + if (parameter*rhs.*/ + virtual int compare(const StateAttribute& sa) const = 0; + + bool operator < (const StateAttribute& rhs) const { return compare(rhs)<0; } + bool operator == (const StateAttribute& rhs) const { return compare(rhs)==0; } + bool operator != (const StateAttribute& rhs) const { return compare(rhs)!=0; } + virtual void setStateSetModes(StateSet&,const GLModeValue) const { diff --git a/include/osg/StateSet b/include/osg/StateSet index 09f68c55f..43209ec8b 100644 --- a/include/osg/StateSet +++ b/include/osg/StateSet @@ -83,22 +83,6 @@ class SG_EXPORT StateSet : public Object /** return the const list of all StateAttributes contained in this const StateSet.*/ inline const AttributeList& getAttributeList() const { return _attributeList; } - /** tempory type def to support tempory method getModeVector.*/ - typedef std::vector > ModeVector; - /** get method which copies this StateSet's osg::GLModeValues's into - * a std::vector. method is overlaps on the propper get method - - * getModeList and only exists to get round a crash under Windows. - * Will be removed once problem is fixed.*/ - const ModeVector getModeVector() const; - - /** tempory type def to support tempory method getAttributeVector.*/ - typedef std::vector AttributeVector; - /** get method which copies this StateSet's osg::StateAttribute's into - * a std::vector. method is overlaps on the propper get method - - * getAttributeList and only exists to get round a crash under Windows. - * Will be removed once problem is fixed.*/ - const AttributeVector getAttributeVector() const; - enum RenderingHint { DEFAULT_BIN = 0, diff --git a/include/osg/Stencil b/include/osg/Stencil index 405414ce6..77d184a5f 100644 --- a/include/osg/Stencil +++ b/include/osg/Stencil @@ -15,12 +15,28 @@ class SG_EXPORT Stencil : public StateAttribute Stencil(); - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual Object* clone() const { return new Stencil(); } - virtual const char* className() const { return "Stencil"; } - - virtual const Type getType() const { return STENCIL; } + + META_StateAttribute(Stencil, STENCIL); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Stencil,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_func) + COMPARE_StateAttribute_Parameter(_funcRef) + COMPARE_StateAttribute_Parameter(_funcMask) + COMPARE_StateAttribute_Parameter(_sfail) + COMPARE_StateAttribute_Parameter(_zfail) + COMPARE_StateAttribute_Parameter(_zpass) + COMPARE_StateAttribute_Parameter(_writeMask) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_STENCIL_TEST,value); diff --git a/include/osg/Switch b/include/osg/Switch index 6ff0efa06..24edea88b 100644 --- a/include/osg/Switch +++ b/include/osg/Switch @@ -27,10 +27,8 @@ class SG_EXPORT Switch : public Group Switch(); - virtual Object* clone() const { return new Switch(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Switch"; } - virtual void accept(NodeVisitor& nv) { nv.apply(*this); } + META_Node(Switch); + virtual void traverse(NodeVisitor& nv); /** diff --git a/include/osg/TexEnv b/include/osg/TexEnv index 3bd33c890..e136da009 100644 --- a/include/osg/TexEnv +++ b/include/osg/TexEnv @@ -12,11 +12,21 @@ class SG_EXPORT TexEnv : public StateAttribute public : TexEnv( void ); - virtual Object* clone() const { return new TexEnv(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual const char* className() const { return "TexEnv"; } - virtual const Type getType() const { return TEXENV; } + META_StateAttribute(TexEnv, TEXENV); + + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(TexEnv,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_mode) + + return 0; // passed all the above comparison macro's, must be equal. + } enum Mode { DECAL = GL_DECAL, diff --git a/include/osg/TexGen b/include/osg/TexGen index 3ec018d18..076ee82d9 100644 --- a/include/osg/TexGen +++ b/include/osg/TexGen @@ -13,12 +13,26 @@ class SG_EXPORT TexGen : public StateAttribute public : TexGen( void ); - virtual Object* clone() const { return new TexGen(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "TexGen"; } - - virtual const Type getType() const { return TEXGEN; } + + META_StateAttribute(TexGen, TEXGEN); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(TexGen,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_mode) + COMPARE_StateAttribute_Parameter(_plane_s) + COMPARE_StateAttribute_Parameter(_plane_s) + COMPARE_StateAttribute_Parameter(_plane_r) + COMPARE_StateAttribute_Parameter(_plane_q) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_TEXTURE_GEN_S,value); diff --git a/include/osg/TexMat b/include/osg/TexMat index acd65c61b..69dc24d3c 100644 --- a/include/osg/TexMat +++ b/include/osg/TexMat @@ -11,12 +11,22 @@ class SG_EXPORT TexMat : public StateAttribute { public : TexMat( void ); - virtual Object* clone() const { return new TexMat(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "TexMat"; } - virtual const Type getType() const { return TEXMAT; } + META_StateAttribute(TexMat, TEXMAT); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(TexMat,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_matrix) + + return 0; // passed all the above comparison macro's, must be equal. + } + /** Set the texture matrix */ inline void setMatrix(const Matrix& matrix) { _matrix = matrix; } diff --git a/include/osg/Texture b/include/osg/Texture index 62a9cfdca..9c4d33554 100644 --- a/include/osg/Texture +++ b/include/osg/Texture @@ -60,12 +60,12 @@ class SG_EXPORT Texture : public StateAttribute public : Texture(); - virtual Object* clone() const { return new Texture(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual const char* className() const { return "Texture"; } - virtual const Type getType() const { return (Type)(TEXTURE_0+_textureUnit); } + META_StateAttribute(Texture,(Type)(TEXTURE_0+_textureUnit)); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& rhs) const; + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_TEXTURE_2D,value); @@ -210,7 +210,7 @@ class SG_EXPORT Texture : public StateAttribute } /** Get the handle to the texture object for the current context.*/ - inline uint& getHandle(const uint contextID) const + inline GLuint& getHandle(const uint contextID) const { // pad out handle list if required. while (_handleList.size()<=contextID) @@ -240,7 +240,7 @@ class SG_EXPORT Texture : public StateAttribute * OpenGL texture objects to cached until they can be deleted * by the OpenGL context in which they were created, specified * by contextID.*/ - static void deleteTextureObject(uint contextID,uint handle); + static void deleteTextureObject(uint contextID,GLuint handle); /** flush all the cached display list which need to be deleted * in the OpenGL context related to contextID.*/ @@ -251,7 +251,7 @@ class SG_EXPORT Texture : public StateAttribute virtual ~Texture(); - typedef std::vector TextureNameList; + typedef std::vector TextureNameList; mutable TextureNameList _handleList; typedef std::vector ImageModifiedTag; diff --git a/include/osg/Timer b/include/osg/Timer index d88cc8c4c..694d21949 100644 --- a/include/osg/Timer +++ b/include/osg/Timer @@ -3,19 +3,20 @@ #include -#ifdef macintosh -//#define __TIMESIZE_DOUBLE__ -#include -#endif namespace osg { #ifdef WIN32 - typedef __int64 Timer_t; -#elif defined macintosh - typedef double Timer_t; + typedef __int64 Timer_t; +#elif defined(__linux) || defined(__FreeBSD__) + typedef unsigned long long Timer_t; +#elif defined(__sgi) + typedef unsigned long long Timer_t; +#elif defined(unix) + typedef unsigned long long Timer_t; #else - typedef unsigned long long Timer_t; + #include + typedef std::clock_t Timer_t; #endif /** A high resolution, low latency time stamper.*/ @@ -23,69 +24,108 @@ class SG_EXPORT Timer { public: - Timer( void ); - ~Timer( void ); + Timer(); + ~Timer() {} + inline Timer_t tick(); -#ifdef WIN32 - #pragma optimize("",off) - inline Timer_t tick( void ) - { - volatile Timer_t ts; - volatile unsigned int HighPart; - volatile unsigned int LowPart; - _asm - { - xor eax, eax // Used when QueryPerformanceCounter() - xor edx, edx // not supported or minimal overhead - _emit 0x0f // desired - _emit 0x31 // - mov HighPart,edx - mov LowPart,eax - } - //ts = LowPart | HighPart >> 32; - *((unsigned int*)&ts) = LowPart; - *((unsigned int*)&ts+1) = HighPart; - return ts; - } - #pragma optimize("",on) -#endif -#if defined(__linux) || defined(__FreeBSD__) - #define CLK(x) __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)) - inline Timer_t tick( void ) {Timer_t x;CLK(x);return x;} -#endif -#ifdef __sgi - inline Timer_t tick( void ) { return *clk; } -#endif - -#ifdef macintosh - // because __TIMESIZE_DOUBLE__ is defined - // clock resolution is now: 100000 CLOCKS_PER_SEC instead of 60 - inline Timer_t tick( void ) { return std::clock(); } -#endif - double delta_s( Timer_t t1, Timer_t t2 ); - double delta_m( Timer_t t1, Timer_t t2 ); - - Timer_t delta_u( Timer_t t1, Timer_t t2 ); - Timer_t delta_n( Timer_t t1, Timer_t t2 ); - + inline double delta_s( Timer_t t1, Timer_t t2 ) const { return (double)(t2 - t1)*_secsPerClick; } + inline double delta_m( Timer_t t1, Timer_t t2 ) const { return delta_s(t1,t2)*1e3; } + inline double delta_u( Timer_t t1, Timer_t t2 ) const { return delta_s(t1,t2)*1e6; } + inline double delta_n( Timer_t t1, Timer_t t2 ) const { return delta_s(t1,t2)*1e9; } private : - double microseconds_per_click; - double nanoseconds_per_click; - unsigned long *clk; - int cycleCntrSize; - static unsigned long dummy; - - static int inited; - static double cpu_mhz; - void init( void ); + double _secsPerClick; + bool _useStandardClock; + + #ifdef __sgi + unsigned long* _clockAddress; + int _cycleCntrSize; + static unsigned long _dummy; + #endif - - }; +#ifdef WIN32 + #include + #pragma optimize("",off) + inline Timer_t Timer::tick( void ) + { + if (_useStandardClock) return clock(); + + volatile Timer_t ts; + volatile unsigned int HighPart; + volatile unsigned int LowPart; + _asm + { + xor eax, eax // Used when QueryPerformanceCounter() + xor edx, edx // not supported or minimal overhead + _emit 0x0f // desired + _emit 0x31 // + mov HighPart,edx + mov LowPart,eax + } + //ts = LowPart | HighPart >> 32; + *((unsigned int*)&ts) = LowPart; + *((unsigned int*)&ts+1) = HighPart; + return ts; + } + #pragma optimize("",on) + +#elif defined(__linux) || defined(__FreeBSD__) + + #include + + #define CLK(x) __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)) + inline Timer_t Timer::tick() + { + if (_useStandardClock) + { + struct timeval tv; + gettimeofday(&tv, NULL); + return ((osg::Timer_t)tv.tv_sec)*1000000+(osg::Timer_t)tv.tv_usec; + } + else + { + Timer_t x;CLK(x);return x; + } + } + +#elif defined(__sgi) + + #include + inline Timer_t Timer::tick() + { + if (_useStandardClock) + { + struct timeval tv; + gettimeofday(&tv, NULL); + return ((osg::Timer_t)tv.tv_sec)*1000000+(osg::Timer_t)tv.tv_usec; + } + else + { + return *_sgiClockAddress; + } + } + +#elif defined(unix) + + #include + inline Timer_t Timer::tick() + { + struct timeval tv; + gettimeofday(&tv, NULL); + return ((osg::Timer_t)tv.tv_sec)*1000000+(osg::Timer_t)tv.tv_usec; + } + +#else + + // no choice, always use std::clock() + inline Timer_t Timer::tick( void ) { return std::clock(); } + +#endif + }; #endif diff --git a/include/osg/Transform b/include/osg/Transform index 9b886cb87..955163f9b 100644 --- a/include/osg/Transform +++ b/include/osg/Transform @@ -17,10 +17,7 @@ class SG_EXPORT Transform : public Group Transform(); Transform(const Matrix& matix); - virtual Object* clone() const { return new Transform(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } - virtual const char* className() const { return "Transform"; } - virtual void accept(NodeVisitor& nv) { nv.apply(*this); } + META_Node(Transform); void setMatrix(const Matrix& mat ); inline Matrix& getMatrix() { return *_matrix; } diff --git a/include/osg/Transparency b/include/osg/Transparency index 25ad381be..19859c354 100644 --- a/include/osg/Transparency +++ b/include/osg/Transparency @@ -12,12 +12,23 @@ class SG_EXPORT Transparency : public StateAttribute public : Transparency(); - virtual Object* clone() const { return new Transparency(); } - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual const char* className() const { return "Transparency"; } - - virtual const Type getType() const { return TRANSPARENCY; } + META_StateAttribute(Transparency,TRANSPARENCY); + + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Transparency,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_source_factor) + COMPARE_StateAttribute_Parameter(_destination_factor) + + return 0; // passed all the above comparison macro's, must be equal. + } + virtual void setStateSetModes(StateSet& ds,const GLModeValue value) const { ds.setMode(GL_BLEND,value); diff --git a/include/osg/Viewport b/include/osg/Viewport index 12a6dd953..b2daf7940 100644 --- a/include/osg/Viewport +++ b/include/osg/Viewport @@ -15,12 +15,25 @@ class SG_EXPORT Viewport : public StateAttribute Viewport(); - virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0L; } - virtual Object* clone() const { return new Viewport(); } - virtual const char* className() const { return "Viewport"; } - - virtual const Type getType() const { return VIEWPORT; } + + META_StateAttribute(Viewport,VIEWPORT); + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const + { + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Viewport,sa) + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_x) + COMPARE_StateAttribute_Parameter(_y) + COMPARE_StateAttribute_Parameter(_width) + COMPARE_StateAttribute_Parameter(_height) + + return 0; // passed all the above comparison macro's, must be equal. + } + inline void setViewport(const int x,const int y,const int width,const int height) { _x = x; diff --git a/include/osgGLUT/Viewer b/include/osgGLUT/Viewer index 232b24959..1eb881b08 100644 --- a/include/osgGLUT/Viewer +++ b/include/osgGLUT/Viewer @@ -72,14 +72,14 @@ class OSGGLUT_EXPORT Viewer : public osgUtil::GUIActionAdapter // initialize the clock. long initClock(); // time since initClock() in seconds. - float clockSeconds() { return _timer.delta_s(_initialTick,clockTick()); } + double clockSeconds() { return _timer.delta_s(_initialTick,clockTick()); } // update the number of ticks since the last frame update. osg::Timer_t updateFrameTick(); // time from the current frame update and the previous one in seconds. - float frameSeconds() { return _timer.delta_s(_lastFrameTick,_frameTick); } - float frameRate() { return 1.0f/frameSeconds(); } + double frameSeconds() { return _timer.delta_s(_lastFrameTick,_frameTick); } + double frameRate() { return 1.0/frameSeconds(); } void help(ostream& fout); @@ -176,6 +176,10 @@ class OSGGLUT_EXPORT Viewer : public osgUtil::GUIActionAdapter osg::Timer_t frameTick(); + osg::ref_ptr _frameStamp; + + + }; } diff --git a/include/osgUtil/CullVisitor b/include/osgUtil/CullVisitor index 8ae9806a4..8a14c1951 100644 --- a/include/osgUtil/CullVisitor +++ b/include/osgUtil/CullVisitor @@ -1,5 +1,5 @@ -#ifndef OSGUTIL_NEWCULLVISITOR -#define OSGUTIL_NEWCULLVISITOR 1 +#ifndef OSGUTIL_CULLVISITOR +#define OSGUTIL_CULLVISITOR 1 #include #include @@ -36,7 +36,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor CullVisitor(); virtual ~CullVisitor(); - void reset(); + virtual void reset(); virtual void apply(osg::Node&); virtual void apply(osg::Geode& node); @@ -100,33 +100,17 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor /** Returns the current CullingMode.*/ CullViewState::CullingMode getCullingMode() const; + /** Set the viewport. * Used to enable the CullVisitor can make decision - * such as based on viewport dimensions,.*/ - void setViewport(int x,int y,int width,int height) - { - _view[0] = x; - _view[1] = y; - _view[2] = width; - _view[3] = height; - } - + * such as based on viewport dimensions.*/ + void setViewport(osg::Viewport* viewport) { _viewport = viewport; } + + /** Get the const viewport. */ + const osg::Viewport* getViewport() const { return _viewport.get(); } + /** Get the viewport. */ - void getViewport(int& x,int& y,int& width,int& height) - { - x = _view[0]; - y = _view[1]; - width = _view[2]; - height = _view[3]; - } - - - /** Set the frame number.*/ - inline void setFrameNumber(const int fn) { _frameNumber = fn; } - - /** Get the frame number.*/ - inline const int getFrameNumber() const { return _frameNumber; } - + osg::Viewport* getViewport() { return _viewport.get(); } void pushCullViewState(const osg::Matrix* matrix=NULL); void popCullViewState(); @@ -276,8 +260,6 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor * to generate the impostor texture. */ osg::ImpostorSprite* createImpostorSprite(osg::Impostor& node); - int _frameNumber; - typedef std::vector< osg::ref_ptr > CullViewStateStack; CullViewStateStack _viewStateStack; osg::ref_ptr _tvs; @@ -301,7 +283,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor TransparencySortMode _tsm; // viewport x,y,width,height respectiveyly. - int _view[4]; + osg::ref_ptr _viewport; bool _impostorActive; bool _depthSortImpostorSprites; diff --git a/include/osgUtil/RenderStage b/include/osgUtil/RenderStage index a7dffd51c..bc757c89d 100644 --- a/include/osgUtil/RenderStage +++ b/include/osgUtil/RenderStage @@ -30,23 +30,15 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin virtual void reset(); - /** Set the viewport of the scene view. */ - void setViewport(int x,int y,int width,int height) - { - _view[0] = x; - _view[1] = y; - _view[2] = width; - _view[3] = height; - } - - /** Get the viewport of the scene view. */ - void getViewport(int& x,int& y,int& width,int& height) const - { - x = _view[0]; - y = _view[1]; - width = _view[2]; - height = _view[3]; - } + /** Set the viewport.*/ + void setViewport(osg::Viewport* viewport) { _viewport = viewport; } + + /** Get the const viewport. */ + const osg::Viewport* getViewport() const { return _viewport.get(); } + + /** Get the viewport. */ + osg::Viewport* getViewport() { return _viewport.get(); } + /** Set the clear mask used in glClear(..). @@ -132,7 +124,7 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin osg::ref_ptr _camera; // viewport x,y,width,height. - GLint _view[4]; + osg::ref_ptr _viewport; GLbitfield _clearMask; osg::Vec4 _clearColor; diff --git a/include/osgUtil/SceneView b/include/osgUtil/SceneView index 12d98cf00..67236e40e 100644 --- a/include/osgUtil/SceneView +++ b/include/osgUtil/SceneView @@ -5,6 +5,7 @@ #include #include #include +#include #include @@ -22,6 +23,11 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced /** Constrcut a default scene view.*/ SceneView(); + /** Set scene view to use default global state, light, camera + * and render visitor. + */ + void setDefaults(); + /** Set the data which to view. The data will typically be * an osg::Scene but can be any osg::Node type. */ @@ -36,28 +42,37 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced */ const osg::Node* getSceneData() const { return _sceneData.get(); } - /** Set the viewport of the scene view. */ + /** Set the viewport of the scene view to use specfied osg::Viewport. */ + void setViewport(osg::Viewport* viewport) + { + if (viewport) _viewport = viewport; + else + { + // ensure that _viewport is always valid. + _viewport = new osg::Viewport; + } + } + + /** Set the viewport of the scene view to specified dimensions. */ void setViewport(int x,int y,int width,int height) { - _view[0] = x; - _view[1] = y; - _view[2] = width; - _view[3] = height; + _viewport->setViewport(x,y,width,height); } + + /** Get the const viewport. */ + const osg::Viewport* getViewport() const { return _viewport.get(); } + + /** Get the viewport. */ + osg::Viewport* getViewport() { return _viewport.get(); } + /** Get the viewport of the scene view. */ void getViewport(int& x,int& y,int& width,int& height) { - x = _view[0]; - y = _view[1]; - width = _view[2]; - height = _view[3]; + _viewport->getViewport(x,y,width,height); } - /** Set scene view to use default global state, light, camera - * and render visitor. - */ - void setDefaults(); + /** Set the background color used in glClearColor(). Defaults to an off blue color.*/ @@ -155,6 +170,14 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced bool projectObjectIntoWindow(const osg::Vec3& object,osg::Vec3& window) const; + /** Set the frame stamp for the current frame.*/ + inline void setFrameStamp(osg::FrameStamp* fs) { _frameStamp = fs; } + + /** Set the frame stamp for the current frame.*/ + inline const osg::FrameStamp* getFrameStamp() const { return _frameStamp.get(); } + + + /** do app traversal of attached scene graph using App NodeVisitor.*/ virtual void app(); @@ -179,6 +202,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced osg::ref_ptr _rendergraph; osg::ref_ptr _renderStage; + osg::ref_ptr _frameStamp; bool _need_compile; bool _calc_nearfar; @@ -190,14 +214,12 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced float _lodBias; - // viewport x,y,width,height respectiveyly. - GLint _view[4]; + osg::ref_ptr _viewport; LightingMode _lightingMode; bool _prioritizeTextures; - int _frameNumber; }; }; diff --git a/include/osgUtil/Tesselator b/include/osgUtil/Tesselator index 6093feba7..c0fb05a78 100644 --- a/include/osgUtil/Tesselator +++ b/include/osgUtil/Tesselator @@ -44,6 +44,8 @@ class OSGUTIL_EXPORT Tesselator struct VertexIndexSet { + VertexIndexSet() {} + VertexIndexSet(Tesselator* tess,const osg::Vec3& vec,osg::uint index) { set(tess,vec,index); diff --git a/include/osgUtil/VisualsRequirementsVisitor b/include/osgUtil/VisualsRequirementsVisitor index 3a9ce34c9..a6846327c 100644 --- a/include/osgUtil/VisualsRequirementsVisitor +++ b/include/osgUtil/VisualsRequirementsVisitor @@ -39,16 +39,16 @@ class OSGUTIL_EXPORT VisualsRequirementsVisitor : public osg::NodeVisitor const bool requiresDepthBuffer() const { return _requiresDepthBuffer; } - void setMinumumNumAlphaBits(const unsigned int bits) { _minimumNumberAlphaBits = bits; } + void setMinimumNumAlphaBits(const unsigned int bits) { _minimumNumberAlphaBits = bits; } - const unsigned int getMinumumNumAlphaBits() const { return _minimumNumberAlphaBits; } + const unsigned int getMinimumNumAlphaBits() const { return _minimumNumberAlphaBits; } const bool requiresAlphaBuffer() const { return _minimumNumberAlphaBits!=0; } - void setMinumumNumStencilBits(const unsigned int bits) { _minimumNumberStencilBits = bits; } + void setMinimumNumStencilBits(const unsigned int bits) { _minimumNumberStencilBits = bits; } - const unsigned int getMinumumNumStencilBits() const { return _minimumNumberStencilBits; } + const unsigned int getMinimumNumStencilBits() const { return _minimumNumberStencilBits; } const bool requiresStencilBuffer() const { return _minimumNumberStencilBits!=0; } diff --git a/index.html b/index.html index e6f5bdca7..c67d010fd 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@
            Installation    Contents -of Distribution    Documentation   Plugin +of Distribution    Documentation   Plugin Dependencies   Data Sources   Contacts

            The Open Scene Graph (OSG) is an Open Source (LGPL), Standard C++, OpenGL diff --git a/src/Demos/Makefile b/src/Demos/Makefile index c900c2b63..871b5c577 100644 --- a/src/Demos/Makefile +++ b/src/Demos/Makefile @@ -1,7 +1,7 @@ #!smake SHELL=/bin/sh -DIRS = sgv osgconv osgcube osgreflect osgtexture osgimpostor osgviews hangglide +DIRS = sgv osgconv osgcube osgreflect osgtexture osgimpostor osgviews hangglide osgcluster all : for f in $(DIRS) ; do cd $$f; $(MAKE) || exit 1; cd ..; done diff --git a/src/Demos/osgcluster/osgcluster.cpp b/src/Demos/osgcluster/osgcluster.cpp index 35b696f99..5df3bf763 100644 --- a/src/Demos/osgcluster/osgcluster.cpp +++ b/src/Demos/osgcluster/osgcluster.cpp @@ -26,13 +26,15 @@ class CameraPacket { CameraPacket():_masterKilled(false) {} - void setPacket(const osg::Camera& camera,int tnum, double rtime) + void setPacket(const osg::Camera& camera,const osg::FrameStamp* frameStamp) { _eye = camera.getEyePoint(); _center = camera.getCenterPoint(); _up = camera.getUpVector(); - _traversalNumber = tnum; - _referenceTime = rtime; + if (frameStamp) + { + _frameStamp = *frameStamp; + } } void getCamera(osg::Camera& camera,float angle_offset=0.0f) @@ -50,8 +52,9 @@ class CameraPacket { void getSceneViewUpdate(osgUtil::SceneView& sv) { - sv.setTraversalNumber(_traversalNumber); - sv.setReferenceTime(_referenceTime); + // note pass a seperate reference counted FrameStamp + // rather than this frame stamp as it can get overwritten. + sv.setFrameStamp(new osg::FrameStamp(_frameStamp)); } void setMasterKilled(const bool flag) { _masterKilled = flag; } @@ -63,9 +66,12 @@ class CameraPacket { osg::Vec3 _up; bool _attachMatrix; osg::Matrix _matrix; - - int _traversalNumber; - double _referenceTime; + + // note don't use a ref_ptr as used elsewhere for FrameStamp + // since we don't want to copy the pointer - but the memory. + // FrameStamp doesn't have a private destructor to allow + // us to do this, even though its a reference counted object. + osg::FrameStamp _frameStamp; }; @@ -99,7 +105,7 @@ class MySceneView : public osgUtil::SceneView { { // need to broadcast my death. CameraPacket cp; - cp.setPacket(*getCamera(),getTraversalNumber(),getReferenceTime()); + cp.setPacket(*getCamera(),getFrameStamp()); cp.setMasterKilled(true); _bc.setBuffer(&cp, sizeof( CameraPacket )); @@ -119,7 +125,7 @@ class MySceneView : public osgUtil::SceneView { case(MASTER): { CameraPacket cp; - cp.setPacket(*getCamera(),getTraversalNumber(),getReferenceTime()); + cp.setPacket(*getCamera(),getFrameStamp()); _bc.setBuffer(&cp, sizeof( CameraPacket )); _bc.sync(); diff --git a/src/Demos/osgcube/osgcube.cpp b/src/Demos/osgcube/osgcube.cpp index ade9fba5a..9987d7948 100644 --- a/src/Demos/osgcube/osgcube.cpp +++ b/src/Demos/osgcube/osgcube.cpp @@ -1,11 +1,4 @@ // simple animation demo written by Graeme Harkness. -// note from Robert to Robert. The animiation techinque -// present here using glut timer callbacks is one -// approach, other approaches will soon be supported -// within the osg itself via an app cullback which -// can be attached to nodes themselves. This later -// method will be the prefered approach (have a look -// at osgreflect's app visitor for a clue.) #include @@ -25,48 +18,60 @@ // ---------------------------------------------------------------------- // Global variables - this is basically the stuff which will be animated // ---------------------------------------------------------------------- -osg::Transform* myTransform; -osg::GeoSet* cube; -int mytime=0; // in milliseconds -unsigned int dt=50; // in milliseconds -double omega=0.002; // in inverse milliseconds +class TransformCallback : public osg::NodeCallback{ -// ---------------------------------------------------------------- -// This is the callback function registered with GLUT to be called -// at a future time in the GLUT loop -// ---------------------------------------------------------------- -void timedCB( int delta_t ) -{ + public: - static float lastdx = 0; - static float lastdy = 0; - static float lastdz = 0; + TransformCallback(osg::Transform* node,float angularVelocity) + { + _nodeToOperateOn = node; + _angular_velocity = angularVelocity; + _previousTraversalNumber = -1; + _orig_t = _timer.tick(); + } - mytime+=dt; + virtual void operator() (osg::Node* node, osg::NodeVisitor* nv) + { + if (nv) + { + if (_nodeToOperateOn && node==_nodeToOperateOn) + { + // ensure that we do not operate on this node more than + // once during this traversal. This is an issue since node + // can be shared between multiple parents. + if (nv->getTraversalNumber()!=_previousTraversalNumber) + { + osg::Timer_t new_t = _timer.tick(); + float delta_angle = _angular_velocity*_timer.delta_s(_orig_t,new_t); + + osg::Matrix matrix; + matrix.makeRot(delta_angle,1.0f,1.0f,1.0f); + matrix.postTrans(1.0f,0.0f,0.0f); + matrix.postRot(delta_angle,0.0f,0.0f,1.0f); + + _nodeToOperateOn->setMatrix(matrix); - // --------------------------------------------------------- - // Update the Transform so that the cube will appear to oscillate - // --------------------------------------------------------- - double dx = 0.5 * cos( (double) omega * (double) mytime ); - double dy = 0.5 * sin( (double) omega * (double) mytime ); - double dz = 0.0; - myTransform->preTranslate( -lastdx, -lastdy, -lastdz ); - myTransform->preTranslate( (float) dx, (float) dy, dz ); - lastdx=dx; lastdy=dy; lastdz=dz; + _previousTraversalNumber = nv->getTraversalNumber(); + } + } + } + + // must continue subgraph traversal. + nv->traverse(*node); + + } + + protected: + + osg::Transform* _nodeToOperateOn; + float _angular_velocity; - // Graeme, commeted out this call as the cube itself remains static. - // cube->dirtyDisplayList(); - - // ------------------------------------------- - // If required, reschedule the timed callback - // ------------------------------------------- - if ( delta_t != 0 ) - { - glutTimerFunc( (unsigned int) delta_t, timedCB, delta_t ); - } -} + int _previousTraversalNumber; + osg::Timer _timer; + osg::Timer_t _orig_t; +}; osg::Geode* createCube() { @@ -75,7 +80,7 @@ osg::Geode* createCube() // ------------------------------------------- // Set up a new GeoSet which will be our cube // ------------------------------------------- - cube = new osg::GeoSet(); + osg::GeoSet* cube = new osg::GeoSet(); // set up the primitives cube->setPrimType( osg::GeoSet::POLYGON ); @@ -145,10 +150,7 @@ osg::Geode* createCube() osg::StateSet* cubeState = new osg::StateSet(); osg::Material* redMaterial = new osg::Material(); osg::Vec4 red( 1.0f, 0.0f, 0.0f, 1.0f ); - redMaterial->setEmission( osg::Material::FRONT_AND_BACK, red ); - redMaterial->setAmbient( osg::Material::FRONT_AND_BACK, red ); redMaterial->setDiffuse( osg::Material::FRONT_AND_BACK, red ); - redMaterial->setSpecular( osg::Material::FRONT_AND_BACK, red ); cubeState->setAttribute( redMaterial ); cube->setStateSet( cubeState ); @@ -164,23 +166,19 @@ int main( int argc, char **argv ) glutInit( &argc, argv ); - myTransform = new osg::Transform(); + osg::Transform* myTransform = new osg::Transform(); myTransform->addChild( createCube() ); + + // move node in a circle at 90 degrees a sec. + myTransform->setAppCallback(new TransformCallback(myTransform,90.0f)); - // --------------------------------------------------------------------- - // Register a timer callback with GLUT, in the first instance as a test - // This will call the function "timedCB(value)" after dt ms - // I have decided to use value as the time for the next scheduling - // If the last parameter=0 then don't reschedule the timer. - // --------------------------------------------------------------------- - glutTimerFunc( dt, timedCB, dt ); - + // create the viewer and the model to it. osgGLUT::Viewer viewer; viewer.addViewport( myTransform ); - // register trackball, flight and drive. + // register trackball maniupulators. viewer.registerCameraManipulator(new osgUtil::TrackballManipulator); - + viewer.open(); viewer.run(); diff --git a/src/Demos/osgreflect/osgreflect.cpp b/src/Demos/osgreflect/osgreflect.cpp index 8c3a4b6a7..a2d65afdd 100644 --- a/src/Demos/osgreflect/osgreflect.cpp +++ b/src/Demos/osgreflect/osgreflect.cpp @@ -41,55 +41,64 @@ // we apply them. -// create an app visitor, to be used on each frame update, -// the below app visitor rotates the loaded model. -class AppVisitor : public osg::NodeVisitor { +class TransformCallback : public osg::NodeCallback{ + public: - bool _haveDoneTransformTransform; - float _delta_angle; - float _angular_velocity; - osg::Vec3 _pivotPoint; - osg::Transform* _modifyTransform; - osg::Timer _timer; - osg::Timer_t _previous_t; - - AppVisitor() : osg::NodeVisitor(TRAVERSE_ALL_CHILDREN) + TransformCallback(osg::Transform* node,float angularVelocity) { - _haveDoneTransformTransform = true; - _modifyTransform = NULL; - _delta_angle = 0; - _angular_velocity = 45; //degrees a sec. + _nodeToOperateOn = node; + if (node) + { + _pivotPoint = node->getBound().center(); + } + + _angular_velocity = angularVelocity; + _previousTraversalNumber = -1; _previous_t = _timer.tick(); } - virtual void reset() + virtual void operator() (osg::Node* node, osg::NodeVisitor* nv) { - // set to no transform done so far in this new traversal. - _haveDoneTransformTransform = false; - - // update angle of rotation. - osg::Timer_t new_t = _timer.tick(); - _delta_angle = _angular_velocity*_timer.delta_s(_previous_t,new_t); - _previous_t = new_t; - - } - - virtual void apply(osg::Transform& visitor_dcs) - { - - if (&visitor_dcs == _modifyTransform && !_haveDoneTransformTransform) + if (nv) { - // update the specified dcs. - visitor_dcs.preTranslate(_pivotPoint[0],_pivotPoint[1],_pivotPoint[2]); - visitor_dcs.preRotate(_delta_angle,0.0f,0.0f,1.0f); - visitor_dcs.preTranslate(-_pivotPoint[0],-_pivotPoint[1],-_pivotPoint[2]); + if (_nodeToOperateOn && node==_nodeToOperateOn) + { + // ensure that we do not operate on this node more than + // once during this traversal. This is an issue since node + // can be shared between multiple parents. + if (nv->getTraversalNumber()!=_previousTraversalNumber) + { + osg::Timer_t new_t = _timer.tick(); + float delta_angle = _angular_velocity*_timer.delta_s(_previous_t,new_t); + _previous_t = new_t; - // set to true to prevent applying rotation more than once - // since the subgraph appears twice in the overall scene. - _haveDoneTransformTransform = true; + // update the specified dcs. + _nodeToOperateOn->preTranslate(_pivotPoint[0],_pivotPoint[1],_pivotPoint[2]); + _nodeToOperateOn->preRotate(delta_angle,0.0f,0.0f,1.0f); + _nodeToOperateOn->preTranslate(-_pivotPoint[0],-_pivotPoint[1],-_pivotPoint[2]); + + _previousTraversalNumber = nv->getTraversalNumber(); + } + } } + + // must continue subgraph traversal. + nv->traverse(*node); + + } + + protected: + + osg::Transform* _nodeToOperateOn; + float _angular_velocity; + osg::Vec3 _pivotPoint; + + int _previousTraversalNumber; + osg::Timer _timer; + osg::Timer_t _previous_t; + }; /* @@ -463,13 +472,7 @@ int main( int argc, char **argv ) osgGLUT::Viewer viewer; viewer.addViewport( rootNode ); - - // create and register the app visitor. - AppVisitor* appVisitor = new AppVisitor(); - appVisitor->_modifyTransform = loadedModelTransform; - appVisitor->_pivotPoint = bs.center(); - - viewer.getViewportSceneView(0)->setAppVisitor(appVisitor); + loadedModelTransform->setAppCallback(new TransformCallback(loadedModelTransform,45.0f)); // register trackball, flight and drive. viewer.registerCameraManipulator(new osgUtil::TrackballManipulator); diff --git a/src/Demos/sgv/sgv.cpp b/src/Demos/sgv/sgv.cpp index 4b330aef7..06cbd3f9e 100644 --- a/src/Demos/sgv/sgv.cpp +++ b/src/Demos/sgv/sgv.cpp @@ -15,7 +15,8 @@ #include #include -#include +#include + /* * Function to read several files (typically one) as specified on the command @@ -130,6 +131,18 @@ int main( int argc, char **argv ) osg::Timer_t after_load = timer.tick(); cout << "Time for load = "<accept(osv); + osv.optimize(); + #endif + + + // initialize the viewer. osgGLUT::Viewer viewer; viewer.addViewport( rootnode ); diff --git a/src/osg/Billboard.cpp b/src/osg/Billboard.cpp index 160095fd3..f7f289c8e 100644 --- a/src/osg/Billboard.cpp +++ b/src/osg/Billboard.cpp @@ -82,6 +82,7 @@ void Billboard::calcRotation(const Vec3& eye_local, const Vec3& pos_local,Matrix float ev_length = ev.length(); if (ev_length>0.0f) { + mat.makeIdent(); //float rotation_zrotation_z = atan2f(ev.x(),ev.y()); //mat.makeRot(rotation_z*180.0f/M_PI,0.0f,0.0f,1.0f); float inv = 1.0f/ev_length; diff --git a/src/osg/Camera.cpp b/src/osg/Camera.cpp index e78081fb5..a95efc658 100644 --- a/src/osg/Camera.cpp +++ b/src/osg/Camera.cpp @@ -11,6 +11,8 @@ using namespace osg; Camera::Camera() { + _adjustAspectRatioMode = ADJUST_HORIZONTAL; + // projection details. setPerspective(60,1.0,1.0,1000.0); @@ -117,6 +119,34 @@ void Camera::setPerspective(const double fovy,const double aspectRatio, _dirty = true; } +/** Set a sysmetical perspective projection using field of view.*/ +void Camera::setFOV(const double fovx,const double fovy, + const double zNear, const double zFar) +{ + _projectionType = PERSPECTIVE; + + // note, in Frustum/Perspective mode these values are scaled + // by the zNear from when they were initialised to ensure that + // subsequent changes in zNear do not affect them. + + // calculate the appropriate left, right etc. + double tan_fovx = tan(DEG2RAD(fovx*0.5)); + double tan_fovy = tan(DEG2RAD(fovy*0.5)); + _right = tan_fovx; + _left = -_right; + _top = tan_fovy; + _bottom = -_top; + + _zNear = zNear; + _zFar = zFar; + + notify(INFO)<<"osg::Camera::setFOV(fovx="< #include "osg/Geode" -#include - -#ifdef __sgi -using std::find; -using std::for_each; -#endif - #define square(x) ((x)*(x)) using namespace osg; diff --git a/src/osg/Group.cpp b/src/osg/Group.cpp index 23e83f2ba..85f1169c9 100644 --- a/src/osg/Group.cpp +++ b/src/osg/Group.cpp @@ -5,12 +5,6 @@ #include -// #ifdef __sgi -// using std::find; -// using std::for_each; -// using std::string; -// #endif - #define square(x) ((x)*(x)) using namespace osg; @@ -58,6 +52,16 @@ bool Group::addChild( Node *child ) dirtyBound(); + // could now require app traversal thanks to the new subgraph, + // so need to check and update if required. + if (child->getNumChildrenRequiringAppTraversal()>0 || + child->getAppCallback()) + { + setNumChildrenRequiringAppTraversal( + getNumChildrenRequiringAppTraversal()+1 + ); + } + return true; } else return false; @@ -73,10 +77,23 @@ bool Group::removeChild( Node *child ) ParentList::iterator pitr = std::find(child->_parents.begin(),child->_parents.end(),this); if (pitr!=child->_parents.end()) child->_parents.erase(pitr); + // could now require app traversal thanks to the new subgraph, + // so need to check and update if required. + // note, need to do this checking before the erase of the child + // otherwise child will be invalid. + if (child->getNumChildrenRequiringAppTraversal()>0 || + child->getAppCallback()) + { + setNumChildrenRequiringAppTraversal( + getNumChildrenRequiringAppTraversal()-1 + ); + } + // note ref_ptr<> automatically handles decrementing child's reference count. _children.erase(itr); dirtyBound(); + return true; } else return false; diff --git a/src/osg/ImpostorSprite.cpp b/src/osg/ImpostorSprite.cpp index d5ba472d3..b88e5ae82 100644 --- a/src/osg/ImpostorSprite.cpp +++ b/src/osg/ImpostorSprite.cpp @@ -41,7 +41,7 @@ ImpostorSprite::~ImpostorSprite() } } -const float ImpostorSprite::calcPixelError(const Camera& camera,const int* viewport,const osg::Matrix* matrix) const +const float ImpostorSprite::calcPixelError(const Camera& camera,const Viewport& viewport,const osg::Matrix* matrix) const { // find the maximum screen space pixel error between the control coords and the quad coners. float max_error_sqrd = 0.0f; @@ -139,6 +139,12 @@ void ImpostorSprite::setTexture(Texture* tex,int s,int t) ImpostorSpriteManager::ImpostorSpriteManager() { + _texenv = new TexEnv; + _texenv->setMode(TexEnv::REPLACE); + + _alphafunc = new osg::AlphaFunc; + _alphafunc->setFunction( AlphaFunc::GREATER, 0.000f ); + _first = NULL; _last = NULL; } @@ -250,8 +256,12 @@ ImpostorSprite* ImpostorSpriteManager::createOrReuseImpostorSprite(int s,int t,i stateset->setMode(GL_BLEND,osg::StateAttribute::ON); Texture* texture = new Texture; - stateset->setAttributeAndModes(texture,StateAttribute::ON); + stateset->setAttributeAndModes(texture,StateAttribute::ON); + stateset->setAttributeAndModes( _alphafunc.get(), StateAttribute::ON ); + stateset->setAttribute(_texenv.get()); + +/* TexEnv* texenv = new TexEnv; texenv->setMode(TexEnv::REPLACE); stateset->setAttribute(texenv); @@ -259,6 +269,8 @@ ImpostorSprite* ImpostorSpriteManager::createOrReuseImpostorSprite(int s,int t,i AlphaFunc* alphafunc = new osg::AlphaFunc; alphafunc->setFunction( AlphaFunc::GREATER, 0.000f ); stateset->setAttributeAndModes( alphafunc, StateAttribute::ON ); +*/ + // stateset->setMode( GL_ALPHA_TEST, StateAttribute::OFF ); diff --git a/src/osg/Makefile b/src/osg/Makefile index 965d3979b..d8c236d80 100644 --- a/src/osg/Makefile +++ b/src/osg/Makefile @@ -13,6 +13,7 @@ C++FILES = \ Depth.cpp \ Drawable.cpp\ Fog.cpp\ + FrameStamp.cpp\ FrontFace.cpp\ Geode.cpp\ GeoSet.cpp\ @@ -48,6 +49,7 @@ C++FILES = \ Transform.cpp\ Transparency.cpp\ Version.cpp\ + Viewport.cpp\ TARGET_BASENAME = osg @@ -69,6 +71,7 @@ TARGET_INCLUDE_FILES = \ osg/Drawable\ osg/Export\ osg/Fog\ + osg/FrameStamp\ osg/FrontFace\ osg/GL\ osg/GLExtensions\ @@ -86,6 +89,7 @@ TARGET_INCLUDE_FILES = \ osg/Matrix\ osg/MemoryAdapter\ osg/Node\ + osg/NodeCallback\ osg/NodeVisitor\ osg/Notify\ osg/Object\ @@ -112,6 +116,7 @@ TARGET_INCLUDE_FILES = \ osg/Vec3\ osg/Vec4\ osg/Version\ + osg/Viewport\ osg/mem_ptr\ osg/ref_ptr\ diff --git a/src/osg/Matrix.cpp b/src/osg/Matrix.cpp index d48060776..87e98c22b 100644 --- a/src/osg/Matrix.cpp +++ b/src/osg/Matrix.cpp @@ -1,418 +1,90 @@ -#include -#include - -#include #include +#include #include -#include +#include -#define square(x) ((x)*(x)) -#define DEG2RAD(x) ((x)*M_PI/180.0) -#define RAD2DEG(x) ((x)*180.0/M_PI) +#include //memcpy +#include //acos using namespace osg; -typedef struct quaternion_ + +#define DEG2RAD(x) ((x)*M_PI/180.0) +#define RAD2DEG(x) ((x)*180.0/M_PI) + + +//#define WARN_DEPRECATED +#define ANGLES_IN_DEGREES + +#define SET_ROW(row, v1, v2, v3, v4 ) \ + _mat[(row)][0] = (v1); \ + _mat[(row)][1] = (v2); \ + _mat[(row)][2] = (v3); \ + _mat[(row)][3] = (v4); + +#define INNER_PRODUCT(a,b,r,c) \ + ((a)._mat[r][0] * (b)._mat[0][c]) \ + +((a)._mat[r][1] * (b)._mat[1][c]) \ + +((a)._mat[r][2] * (b)._mat[2][c]) \ + +((a)._mat[r][3] * (b)._mat[3][c]) + + +Matrix::Matrix() : Object(), fully_realized(false) {} + +Matrix::Matrix( const Matrix& other ) : Object() { - double x ; - double y ; - double z ; - double w ; -} quaternion ; + set( (float const * const) other._mat ); +} -/* C = a(row).b(row) */ +Matrix::Matrix( float const * const def ) +{ + set( def ); +} -#define matrix_inner_product( a, b, row, col, C ) \ - { \ - (C)[row][col] = (a)[row][0] * (b)[0][col] + \ - (a)[row][1] * (b)[1][col] + \ - (a)[row][2] * (b)[2][col] + \ - (a)[row][3] * (b)[3][col]; \ - } - -/* C = a.b */ - -#define matrix_mult( a, b, C ) \ - { \ - matrix_inner_product( a, b, 0, 0, C ); \ - matrix_inner_product( a, b, 0, 1, C ); \ - matrix_inner_product( a, b, 0, 2, C ); \ - matrix_inner_product( a, b, 0, 3, C ); \ - matrix_inner_product( a, b, 1, 0, C ); \ - matrix_inner_product( a, b, 1, 1, C ); \ - matrix_inner_product( a, b, 1, 2, C ); \ - matrix_inner_product( a, b, 1, 3, C ); \ - matrix_inner_product( a, b, 2, 0, C ); \ - matrix_inner_product( a, b, 2, 1, C ); \ - matrix_inner_product( a, b, 2, 2, C ); \ - matrix_inner_product( a, b, 2, 3, C ); \ - matrix_inner_product( a, b, 3, 0, C ); \ - matrix_inner_product( a, b, 3, 1, C ); \ - matrix_inner_product( a, b, 3, 2, C ); \ - matrix_inner_product( a, b, 3, 3, C ); \ - } - -static void quaternion_matrix( quaternion *q, double mat[4][4] ) +Matrix::Matrix( float a00, float a01, float a02, float a03, + float a10, float a11, float a12, float a13, + float a20, float a21, float a22, float a23, + float a30, float a31, float a32, float a33) { - /* copied from Shoemake/ACM SIGGRAPH 89 */ - double xs, ys, zs, wx, wy, wz, xx, xy, xz, yy, yz, zz ; + SET_ROW(0, a00, a01, a02, a03 ) + SET_ROW(1, a10, a11, a12, a13 ) + SET_ROW(2, a20, a21, a22, a23 ) + SET_ROW(3, a30, a31, a32, a33 ) - xs = q->x + q->x; - ys = q->y + q->y; - zs = q->z + q->z; - - wx = q->w * xs ; wy = q->w * ys ; wz = q->w * zs ; - xx = q->x * xs ; xy = q->x * ys ; xz = q->x * zs ; - yy = q->y * ys ; yz = q->y * zs ; zz = q->z * zs ; - - mat[0][0] = 1.0 - ( yy + zz ) ; - mat[0][1] = xy - wz ; - mat[0][2] = xz + wy ; - mat[1][0] = xy + wz ; - mat[1][1] = 1.0 - ( xx + zz ) ; - mat[1][2] = yz - wx ; - mat[2][0] = xz - wy ; - mat[2][1] = yz + wx ; - mat[2][2] = 1.0 - ( xx + yy ) ; - - mat[0][3] = 0.0; - mat[1][3] = 0.0; - mat[2][3] = 0.0; - - mat[3][0] = 0.0; - mat[3][1] = 0.0; - mat[3][2] = 0.0; - mat[3][3] = 1.0; + fully_realized = true; } -Matrix::Matrix() -{ - makeIdent(); -} - - -Matrix::Matrix(const Matrix& matrix) : Object() -{ - memcpy(_mat,matrix._mat,sizeof(_mat)); -} - - -Matrix& Matrix::operator = (const Matrix& matrix) -{ - if (&matrix==this) return *this; - memcpy(_mat,matrix._mat,sizeof(_mat)); +Matrix& Matrix::operator = (const Matrix& other ) { + if( &other == this ) return *this; + set((const float*)other._mat); return *this; } - -Matrix::Matrix( -float a00, float a01, float a02, float a03, -float a10, float a11, float a12, float a13, -float a20, float a21, float a22, float a23, -float a30, float a31, float a32, float a33) -{ - _mat[0][0] = a00; - _mat[0][1] = a01; - _mat[0][2] = a02; - _mat[0][3] = a03; - - _mat[1][0] = a10; - _mat[1][1] = a11; - _mat[1][2] = a12; - _mat[1][3] = a13; - - _mat[2][0] = a20; - _mat[2][1] = a21; - _mat[2][2] = a22; - _mat[2][3] = a23; - - _mat[3][0] = a30; - _mat[3][1] = a31; - _mat[3][2] = a32; - _mat[3][3] = a33; +void Matrix::set( float const * const def ) { + memcpy( _mat, def, sizeof(_mat) ); + fully_realized = true; } -Matrix::~Matrix() +void Matrix::set( float a00, float a01, float a02, float a03, + float a10, float a11, float a12, float a13, + float a20, float a21, float a22, float a23, + float a30, float a31, float a32, float a33) { + SET_ROW(0, a00, a01, a02, a03 ) + SET_ROW(1, a10, a11, a12, a13 ) + SET_ROW(2, a20, a21, a22, a23 ) + SET_ROW(3, a30, a31, a32, a33 ) + + fully_realized = true; } - -void Matrix::makeIdent() -{ - _mat[0][0] = 1.0f; - _mat[0][1] = 0.0f; - _mat[0][2] = 0.0f; - _mat[0][3] = 0.0f; - - _mat[1][0] = 0.0f; - _mat[1][1] = 1.0f; - _mat[1][2] = 0.0f; - _mat[1][3] = 0.0f; - - _mat[2][0] = 0.0f; - _mat[2][1] = 0.0f; - _mat[2][2] = 1.0f; - _mat[2][3] = 0.0f; - - _mat[3][0] = 0.0f; - _mat[3][1] = 0.0f; - _mat[3][2] = 0.0f; - _mat[3][3] = 1.0f; -} - -void Matrix::set(const float* m) -{ - _mat[0][0] = m[0]; - _mat[0][1] = m[1]; - _mat[0][2] = m[2]; - _mat[0][3] = m[3]; - - _mat[1][0] = m[4]; - _mat[1][1] = m[5]; - _mat[1][2] = m[6]; - _mat[1][3] = m[7]; - - _mat[2][0] = m[8]; - _mat[2][1] = m[9]; - _mat[2][2] = m[10]; - _mat[2][3] = m[11]; - - _mat[3][0] = m[12]; - _mat[3][1] = m[13]; - _mat[3][2] = m[14]; - _mat[3][3] = m[15]; -} - - -void Matrix::set( - float a00, float a01, float a02, float a03, - float a10, float a11, float a12, float a13, - float a20, float a21, float a22, float a23, - float a30, float a31, float a32, float a33) -{ - _mat[0][0] = a00; - _mat[0][1] = a01; - _mat[0][2] = a02; - _mat[0][3] = a03; - - _mat[1][0] = a10; - _mat[1][1] = a11; - _mat[1][2] = a12; - _mat[1][3] = a13; - - _mat[2][0] = a20; - _mat[2][1] = a21; - _mat[2][2] = a22; - _mat[2][3] = a23; - - _mat[3][0] = a30; - _mat[3][1] = a31; - _mat[3][2] = a32; - _mat[3][3] = a33; -} - -void Matrix::copy(const Matrix& matrix) -{ - memcpy(_mat,matrix._mat,sizeof(_mat)); -} - - -void Matrix::makeScale(float sx, float sy, float sz) -{ - makeIdent(); - _mat[0][0] = sx; - _mat[1][1] = sy; - _mat[2][2] = sz; -} - - -void Matrix::preScale( float sx, float sy, float sz, const Matrix& m ) -{ - Matrix transMat; - transMat.makeScale(sx, sy, sz); - mult(transMat,m); -} - - -void Matrix::postScale( const Matrix& m, float sx, float sy, float sz ) -{ - Matrix transMat; - transMat.makeScale(sx, sy, sz); - mult(m,transMat); -} - - -void Matrix::preScale( float sx, float sy, float sz ) -{ - Matrix transMat; - transMat.makeScale(sx, sy, sz); - preMult(transMat); -} - - -void Matrix::postScale( float sx, float sy, float sz ) -{ - Matrix transMat; - transMat.makeScale(sx, sy, sz); - postMult(transMat); -} - - -void Matrix::makeTrans( float tx, float ty, float tz ) -{ - makeIdent(); - _mat[3][0] = tx; - _mat[3][1] = ty; - _mat[3][2] = tz; -} - - -void Matrix::preTrans( float tx, float ty, float tz, const Matrix& m ) -{ - Matrix transMat; - transMat.makeTrans(tx, ty, tz); - mult(transMat,m); -} - - -void Matrix::postTrans( const Matrix& m, float tx, float ty, float tz ) -{ - Matrix transMat; - transMat.makeTrans(tx, ty, tz); - mult(m,transMat); -} - - -void Matrix::preTrans( float tx, float ty, float tz ) -{ - _mat[3][0] = (tx * _mat[0][0]) + (ty * _mat[1][0]) + (tz * _mat[2][0]) + _mat[3][0]; - _mat[3][1] = (tx * _mat[0][1]) + (ty * _mat[1][1]) + (tz * _mat[2][1]) + _mat[3][1]; - _mat[3][2] = (tx * _mat[0][2]) + (ty * _mat[1][2]) + (tz * _mat[2][2]) + _mat[3][2]; - _mat[3][3] = (tx * _mat[0][3]) + (ty * _mat[1][3]) + (tz * _mat[2][3]) + _mat[3][3]; -} - - -void Matrix::postTrans( float tx, float ty, float tz ) -{ - Matrix transMat; - transMat.makeTrans(tx, ty, tz); - postMult(transMat); -} - -void Matrix::makeRot( const Vec3& old_vec, const Vec3& new_vec ) -{ - /* dot product == cos(angle old_vec<>new_vec). */ - double d = new_vec * old_vec; - if ( d < 0.9999 ) - { - double angle = acos( d ); - Vec3 rot_axis = new_vec ^ old_vec; - makeRot( RAD2DEG(angle), - rot_axis.x(), rot_axis.y(), rot_axis.z() ); - } - else - makeIdent(); -} - -void Matrix::makeRot( float deg, float x, float y, float z ) -{ - double __mat[4][4]; - quaternion q; - float d = sqrtf( square(x) + square(y) + square(z) ); - - if( d == 0 ) - return; - - float sin_HalfAngle = sinf( DEG2RAD(deg/2) ); - float cos_HalfAngle = cosf( DEG2RAD(deg/2) ); - - q.x = sin_HalfAngle * (x/d); - q.y = sin_HalfAngle * (y/d); - q.z = sin_HalfAngle * (z/d); - q.w = cos_HalfAngle; - - quaternion_matrix( &q, __mat ); - - for(int i=0;i<4;++i) - { - for(int j=0;j<4;++j) - { - _mat[i][j]=__mat[i][j]; - } - } -} - - -void Matrix::preRot( float deg, float x, float y, float z, const Matrix& m ) -{ - Matrix rotMat; - rotMat.makeRot( deg, x, y, z ); - mult(rotMat,m); -} - - -void Matrix::postRot( const Matrix& m, float deg, float x, float y, float z ) -{ - Matrix rotMat; - rotMat.makeRot( deg, x, y, z ); - mult(m,rotMat); -} - - -void Matrix::preRot( float deg, float x, float y, float z ) -{ - quaternion q; - double __mat[4][4]; - float res_mat[4][4]; - - float d = sqrtf( square(x) + square(y) + square(z) ); - - if( d == 0 ) - return; - - float sin_HalfAngle = sinf( DEG2RAD(deg/2) ); - float cos_HalfAngle = cosf( DEG2RAD(deg/2) ); - - q.x = sin_HalfAngle * (x/d); - q.y = sin_HalfAngle * (y/d); - q.z = sin_HalfAngle * (z/d); - q.w = cos_HalfAngle; - - quaternion_matrix( &q, __mat ); - matrix_mult( __mat, _mat, res_mat ); - memcpy( _mat, res_mat, sizeof( _mat ) ); -} - - -void Matrix::postRot( float deg, float x, float y, float z ) -{ - quaternion q; - double __mat[4][4]; - float res_mat[4][4]; - - float d = sqrtf( square(x) + square(y) + square(z) ); - - if( d == 0 ) - return; - - float sin_HalfAngle = sinf( DEG2RAD(deg/2) ); - float cos_HalfAngle = cosf( DEG2RAD(deg/2) ); - - q.x = sin_HalfAngle * (x/d); - q.y = sin_HalfAngle * (y/d); - q.z = sin_HalfAngle * (z/d); - q.w = cos_HalfAngle; - - quaternion_matrix( &q, __mat ); - matrix_mult( _mat, __mat , res_mat ); - memcpy( _mat, res_mat, sizeof( _mat ) ); -} - - void Matrix::setTrans( float tx, float ty, float tz ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::setTrans is deprecated."; +#endif _mat[3][0] = tx; _mat[3][1] = ty; _mat[3][2] = tz; @@ -421,62 +93,238 @@ void Matrix::setTrans( float tx, float ty, float tz ) void Matrix::setTrans( const Vec3& v ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::setTrans is deprecated."; +#endif _mat[3][0] = v[0]; _mat[3][1] = v[1]; _mat[3][2] = v[2]; } - -void Matrix::preMult(const Matrix& m) +void Matrix::makeIdent() { - Matrix tm; - matrix_mult( m._mat, _mat, tm._mat ); - *this = tm; + SET_ROW(0, 1, 0, 0, 0 ) + SET_ROW(1, 0, 1, 0, 0 ) + SET_ROW(2, 0, 0, 1, 0 ) + SET_ROW(3, 0, 0, 0, 1 ) + + fully_realized = true; } - -void Matrix::postMult(const Matrix& m) +void Matrix::makeScale( const Vec3& v ) { - Matrix tm; - matrix_mult( _mat, m._mat, tm._mat ); - *this = tm; + makeScale(v[0], v[1], v[2] ); } - -void Matrix::mult(const Matrix& lhs,const Matrix& rhs) +void Matrix::makeScale( float x, float y, float z ) { - if (&lhs==this || &rhs==this) - { - osg::Matrix tm; - matrix_mult( lhs._mat, rhs._mat, tm._mat ); - *this = tm; + SET_ROW(0, x, 0, 0, 0 ) + SET_ROW(1, 0, y, 0, 0 ) + SET_ROW(2, 0, 0, z, 0 ) + SET_ROW(3, 0, 0, 0, 1 ) + + fully_realized = true; +} + +void Matrix::makeTrans( const Vec3& v ) +{ + makeTrans( v[0], v[1], v[2] ); +} + +void Matrix::makeTrans( float x, float y, float z ) +{ + SET_ROW(0, 1, 0, 0, 0 ) + SET_ROW(1, 0, 1, 0, 0 ) + SET_ROW(2, 0, 0, 1, 0 ) + SET_ROW(3, x, y, z, 1 ) + + fully_realized = true; +} + +void Matrix::makeRot( const Vec3& from, const Vec3& to ) +{ + double d = from * to; // dot product == cos( angle between from & to ) + if( d < 0.9999 ) { + double angle = acos(d); +#ifdef ANGLES_IN_DEGREES + angle = RAD2DEG(angle); +#endif + Vec3 axis = to ^ from; //we know ((to) x (from)) is perpendicular to both + makeRot( angle, axis ); + } + else + makeIdent(); +} + +void Matrix::makeRot( float angle, const Vec3& axis ) +{ + makeRot( angle, axis.x(), axis.y(), axis.z() ); +} + +void Matrix::makeRot( float angle, float x, float y, float z ) { + float d = sqrt( x*x + y*y + z*z ); + if( d == 0 ) + return; + +#ifdef ANGLES_IN_DEGREES + angle = DEG2RAD(angle); +#endif + + float sin_half = sin( angle/2 ); + float cos_half = cos( angle/2 ); + + Quat q( sin_half * (x/d), + sin_half * (y/d), + sin_half * (z/d), + cos_half );//NOTE: original used a private quaternion made of doubles + makeRot( q ); // but Quat stores the values in a Vec4 made of floats. +} + +void Matrix::makeRot( const Quat& q ) { + // taken from Shoemake/ACM SIGGRAPH 89 + Vec4 v = q.asVec4(); + + double xs = 2 * v.x(); //assume q is already normalized? assert? + double ys = 2 * v.y(); // if not, xs = 2 * v.x() / d, ys = 2 * v.y() / d + double zs = 2 * v.z(); // and zs = 2 * v.z() /d where d = v.length2() + + double xx = xs * v.x(); + double xy = ys * v.x(); + double xz = zs * v.x(); + double yy = ys * v.y(); + double yz = zs * v.y(); + double zz = zs * v.z(); + double wx = xs * v.w(); + double wy = ys * v.w(); + double wz = zs * v.w(); + + SET_ROW(0, 1.0-(yy+zz), xy - wz, xz + wy, 0.0 ) + SET_ROW(1, xy + wz, 1.0-(xx+zz),yz - wx, 0.0 ) + SET_ROW(2, xz - wy, yz + wx, 1.0-(xx+yy),0.0 ) + SET_ROW(3, 0.0, 0.0, 0.0, 1.0 ) + + fully_realized = true; +} + +void Matrix::makeRot( float yaw, float pitch, float roll) +{ +#ifdef ANGLES_IN_DEGREES + yaw = DEG2RAD(yaw); + pitch = DEG2RAD(pitch); + roll = DEG2RAD(roll); +#endif + + // lifted straight from SOLID library v1.01 Quaternion.h + // available from http://www.win.tue.nl/~gino/solid/ + // and also distributed under the LGPL + float cosYaw = cos(yaw / 2); + float sinYaw = sin(yaw / 2); + float cosPitch = cos(pitch / 2); + float sinPitch = sin(pitch / 2); + float cosRoll = cos(roll / 2); + float sinRoll = sin(roll / 2); + Quat q(sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, + cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw, + cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw, + cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); + makeRot( q ); +} + +void Matrix::mult( const Matrix& lhs, const Matrix& rhs ) +{ +// PRECONDITION: We assume neither &lhs nor &rhs == this +// if it did, use preMult or postMult instead + _mat[0][0] = INNER_PRODUCT(lhs, rhs, 0, 0); + _mat[0][1] = INNER_PRODUCT(lhs, rhs, 0, 1); + _mat[0][2] = INNER_PRODUCT(lhs, rhs, 0, 2); + _mat[0][3] = INNER_PRODUCT(lhs, rhs, 0, 3); + _mat[1][0] = INNER_PRODUCT(lhs, rhs, 1, 0); + _mat[1][1] = INNER_PRODUCT(lhs, rhs, 1, 1); + _mat[1][2] = INNER_PRODUCT(lhs, rhs, 1, 2); + _mat[1][3] = INNER_PRODUCT(lhs, rhs, 1, 3); + _mat[2][0] = INNER_PRODUCT(lhs, rhs, 2, 0); + _mat[2][1] = INNER_PRODUCT(lhs, rhs, 2, 1); + _mat[2][2] = INNER_PRODUCT(lhs, rhs, 2, 2); + _mat[2][3] = INNER_PRODUCT(lhs, rhs, 2, 3); + _mat[3][0] = INNER_PRODUCT(lhs, rhs, 3, 0); + _mat[3][1] = INNER_PRODUCT(lhs, rhs, 3, 1); + _mat[3][2] = INNER_PRODUCT(lhs, rhs, 3, 2); + _mat[3][3] = INNER_PRODUCT(lhs, rhs, 3, 3); + fully_realized = true; +} + +void Matrix::preMult( const Matrix& other ) +{ + if( !fully_realized ) { + //act as if this were an identity Matrix + set((const float*)other._mat); + return; } - else + + // brute force method requiring a copy + //Matrix tmp(other* *this); + // *this = tmp; + + // more efficient method just use a float[4] for temporary storage. + float t[4]; + for(int col=0; col<4; ++col) { + t[0] = INNER_PRODUCT( other, *this, 0, col ); + t[1] = INNER_PRODUCT( other, *this, 1, col ); + t[2] = INNER_PRODUCT( other, *this, 2, col ); + t[3] = INNER_PRODUCT( other, *this, 3, col ); + _mat[0][col] = t[0]; + _mat[1][col] = t[1]; + _mat[2][col] = t[2]; + _mat[3][col] = t[3]; + } + +} + +void Matrix::postMult( const Matrix& other ) +{ + if( !fully_realized ) { + //act as if this were an identity Matrix + set((const float*)other._mat); + return; + } + // brute force method requiring a copy + //Matrix tmp(*this * other); + // *this = tmp; + + // more efficient method just use a float[4] for temporary storage. + float t[4]; + for(int row=0; row<4; ++row) { - matrix_mult( lhs._mat, rhs._mat, _mat ); + t[0] = INNER_PRODUCT( *this, other, row, 0 ); + t[1] = INNER_PRODUCT( *this, other, row, 1 ); + t[2] = INNER_PRODUCT( *this, other, row, 2 ); + t[3] = INNER_PRODUCT( *this, other, row, 3 ); + SET_ROW(row, t[0], t[1], t[2], t[3] ) } } +#undef SET_ROW +#undef INNER_PRODUCT -Matrix Matrix::operator * (const Matrix& m) const +bool Matrix::invert( const Matrix& _m ) { - Matrix tm; - matrix_mult( _mat,m._mat, tm._mat ); - return tm; -} - -bool Matrix::invert(const Matrix& invm) -{ - if (&invm==this) { - Matrix tm(invm); + if (&_m==this) + { + Matrix tm(_m); return invert(tm); } + /*if ( _m._mat[0][3] == 0.0 + && _m._mat[1][3] == 0.0 + && _m._mat[2][3] == 0.0 + && _m._mat[3][3] == 1.0 ) + { + return invertAffine( _m ); + }*/ // code lifted from VR Juggler. // not cleanly added, but seems to work. RO. - - const float* a = reinterpret_cast(invm._mat); + const float* a = reinterpret_cast(_m._mat); float* b = reinterpret_cast(_mat); int n = 4; @@ -491,7 +339,7 @@ bool Matrix::invert(const Matrix& invm) row[ i] = col[ i] = 0; } - /* Set working matrix */ + /* Set working Matrix */ for ( i = 0; i < n; i++ ) { for ( j = 0; j < n; j++ ) @@ -555,7 +403,7 @@ bool Matrix::invert(const Matrix& invm) } } - /* Assign invers to a matrix */ + /* Assign invers to a Matrix */ for ( i = 0; i < n; i++ ) for ( j = 0; j < n; j++ ) row[ i] = ( c[ j] == i ) ? r[j] : row[ i]; @@ -566,3 +414,154 @@ bool Matrix::invert(const Matrix& invm) return true; // It worked } + +const double PRECISION_LIMIT = 1.0e-15; + +bool Matrix::invertAffine( const Matrix& _m ) +{ + // adapted from Graphics Gems II. + // + // This method treats the Matrix as a block Matrix and calculates + // the inverse of one subMatrix, improving performance over something + // that inverts any non-singular Matrix: + // -1 + // -1 [ A 0 ] -1 [ A 0 ] + // M = [ ] = [ -1 ] + // [ C 1 ] [-CA 1 ] + // + // returns true if _m is nonsingular, and (*this) contains its inverse + // otherwise returns false. (*this unchanged) + + // assert( this->isAffine())? + double det_1, pos, neg, temp; + + pos = neg = 0.0; + +#define ACCUMULATE \ + { \ + if(temp >= 0.0) pos += temp; \ + else neg += temp; \ + } + + temp = _m._mat[0][0] * _m._mat[1][1] * _m._mat[2][2]; ACCUMULATE; + temp = _m._mat[0][1] * _m._mat[1][2] * _m._mat[2][0]; ACCUMULATE; + temp = _m._mat[0][2] * _m._mat[1][0] * _m._mat[2][1]; ACCUMULATE; + + temp = - _m._mat[0][2] * _m._mat[1][1] * _m._mat[2][0]; ACCUMULATE; + temp = - _m._mat[0][1] * _m._mat[1][0] * _m._mat[2][2]; ACCUMULATE; + temp = - _m._mat[0][0] * _m._mat[1][2] * _m._mat[2][1]; ACCUMULATE; + + det_1 = pos + neg; + + if( (det_1 == 0.0) || (abs(det_1/(pos-neg)) < PRECISION_LIMIT )) { + // _m has no inverse + notify(WARN) << "Matrix::invert(): Matrix has no inverse." << endl; + return false; + } + + // inverse is adj(A)/det(A) + det_1 = 1.0 / det_1; + + _mat[0][0] = (_m._mat[1][1] * _m._mat[2][2] - _m._mat[1][2] * _m._mat[2][1]) * det_1; + _mat[1][0] = (_m._mat[1][0] * _m._mat[2][2] - _m._mat[1][2] * _m._mat[2][0]) * det_1; + _mat[2][0] = (_m._mat[1][0] * _m._mat[2][1] - _m._mat[1][1] * _m._mat[2][0]) * det_1; + _mat[0][1] = (_m._mat[0][1] * _m._mat[2][2] - _m._mat[0][2] * _m._mat[2][1]) * det_1; + _mat[1][1] = (_m._mat[0][0] * _m._mat[2][2] - _m._mat[0][2] * _m._mat[2][0]) * det_1; + _mat[2][1] = (_m._mat[0][0] * _m._mat[2][1] - _m._mat[0][1] * _m._mat[2][0]) * det_1; + _mat[0][2] = (_m._mat[0][1] * _m._mat[1][2] - _m._mat[0][2] * _m._mat[1][1]) * det_1; + _mat[1][2] = (_m._mat[0][0] * _m._mat[1][2] - _m._mat[0][2] * _m._mat[1][0]) * det_1; + _mat[2][2] = (_m._mat[0][0] * _m._mat[1][1] - _m._mat[0][1] * _m._mat[1][0]) * det_1; + + // calculate -C * inv(A) + _mat[3][0] = -(_m._mat[3][0] * _mat[0][0] + _m._mat[3][1] * _mat[1][0] + _m._mat[3][2] * _mat[2][0] ); + _mat[3][1] = -(_m._mat[3][0] * _mat[0][1] + _m._mat[3][1] * _mat[1][1] + _m._mat[3][2] * _mat[2][1] ); + _mat[3][2] = -(_m._mat[3][0] * _mat[0][2] + _m._mat[3][1] * _mat[1][2] + _m._mat[3][2] * _mat[2][2] ); + + _mat[0][3] = 0.0; + _mat[1][3] = 0.0; + _mat[2][3] = 0.0; + _mat[3][3] = 1.0; + + fully_realized = true; + return true; +} + +//Deprecated methods +void Matrix::copy( const Matrix& other) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::copy is deprecated. Use = instead."; +#endif + (*this) = other; +} +void Matrix::preScale( float sx, float sy, float sz, const Matrix& m ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::preScale is deprecated. Use result = (Matrix::scale * m) instead."; +#endif + (*this) = ( scale(sx,sy,sz) * m ); +} +void Matrix::postScale( const Matrix& m, float sx, float sy, float sz ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::postScale is deprecated. Use result = (m * Matrix::scale()) instead."; +#endif + (*this) = ( m * scale(sx,sy,sz) ); +} +void Matrix::preScale( float sx, float sy, float sz ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::preScale is deprecated. Use M.preMult( Matrix::scale ) instead."; +#endif + preMult( scale(sx,sy,sz) ); +} +void Matrix::postScale( float sx, float sy, float sz ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::postScale is deprecated. Use M.postMult( Matrix::scale ) instead."; +#endif + postMult( scale(sx,sy,sz) ); +} +void Matrix::preTrans( float tx, float ty, float tz, const Matrix& m ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::preTrans is deprecated. Use result = Matrix::trans * m instead."; +#endif + (*this) = trans(tx,ty,tz) * m; +} +void Matrix::postTrans( const Matrix& m, float tx, float ty, float tz ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::postTrans is deprecated. Use result = m * Matrix::trans instead."; +#endif + (*this) = m * trans(tx,ty,tz); +} +void Matrix::preTrans( float tx, float ty, float tz ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::preTrans is deprecated. Use result = Matrix::trans * m instead."; +#endif + preMult( trans(tx,ty,tz) ); +} +void Matrix::postTrans( float sx, float sy, float sz ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::postTrans is deprecated. Use result = m * Matrix::trans instead."; +#endif + postMult( trans(sx,sy,sz) ); +} +void Matrix::preRot( float deg, float x, float y, float z, const Matrix& m ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::preRot is deprecated. Use result = Matrix::rot * m instead."; +#endif + (*this) = rotate(deg,x,y,z) * m; +} +void Matrix::postRot( const Matrix& m, float deg, float x, float y, float z ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::postRot is deprecated. Use result = m * Matrix::rotate instead."; +#endif + (*this) = m * rotate(deg,x,y,z); +} +void Matrix::preRot( float deg, float x, float y, float z ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::preRot is deprecated. Use m.preMult( Matrix::rotate ) instead."; +#endif + preMult( rotate(deg,x,y,z) ); +} +void Matrix::postRot( float deg, float x, float y, float z ) { +#ifdef WARN_DEPRECATED + notify(NOTICE) << "Matrix::postRot is deprecated. Use m.postMult( Matrix::rotate ) instead."; +#endif + postMult( rotate(deg,x,y,z) ); +} diff --git a/src/osg/Matrix.cpp.new b/src/osg/Matrix.cpp.new index 0eefc82ca..542a26e81 100644 --- a/src/osg/Matrix.cpp.new +++ b/src/osg/Matrix.cpp.new @@ -8,7 +8,12 @@ using namespace osg; +#define DEG2RAD(x) ((x)*M_PI/180.0) +#define RAD2DEG(x) ((x)*180.0/M_PI) + + #define WARN_DEPRECATED +#define ANGLES_IN_DEGREES Matrix::Matrix() : Object(), fully_realized(false) {} @@ -86,11 +91,10 @@ void Matrix::set( } #define SET_ROW(row, v1, v2, v3, v4 ) \ - _mat[0][(row)] = (v1); \ - _mat[1][(row)] = (v2); \ - _mat[2][(row)] = (v3); \ - _mat[3][(row)] = (v4); - + _mat[(row)][0] = (v1); \ + _mat[(row)][1] = (v2); \ + _mat[(row)][2] = (v3); \ + _mat[(row)][3] = (v4); void Matrix::makeIdent() { SET_ROW(0, 1, 0, 0, 0 ) @@ -119,10 +123,10 @@ void Matrix::makeTrans( const Vec3& v ) { } void Matrix::makeTrans( float x, float y, float z ) { - SET_ROW(0, 1, 0, 0, x ) - SET_ROW(1, 0, 1, 0, y ) - SET_ROW(2, 0, 0, 1, z ) - SET_ROW(3, 0, 0, 0, 1 ) + SET_ROW(0, 1, 0, 0, 0 ) + SET_ROW(1, 0, 1, 0, 0 ) + SET_ROW(2, 0, 0, 1, 0 ) + SET_ROW(3, x, y, z, 1 ) fully_realized = true; } @@ -131,6 +135,9 @@ void Matrix::makeRot( const Vec3& from, const Vec3& to ) { double d = from * to; // dot product == cos( angle between from & to ) if( d < 0.9999 ) { double angle = acos(d); +#ifdef ANGLES_IN_DEGREES + angle = RAD2DEG(angle); +#endif Vec3 axis = to ^ from; //we know ((to) x (from)) is perpendicular to both makeRot( angle, axis ); } @@ -138,7 +145,8 @@ void Matrix::makeRot( const Vec3& from, const Vec3& to ) { makeIdent(); } -void Matrix::makeRot( float angle, const Vec3& axis ) { +void Matrix::makeRot( float angle, const Vec3& axis ) +{ makeRot( angle, axis.x(), axis.y(), axis.z() ); } @@ -147,6 +155,10 @@ void Matrix::makeRot( float angle, float x, float y, float z ) { if( d == 0 ) return; +#ifdef ANGLES_IN_DEGREES + angle = DEG2RAD(angle); +#endif + float sin_half = sin( angle/2 ); float cos_half = cos( angle/2 ); @@ -175,15 +187,22 @@ void Matrix::makeRot( const Quat& q ) { double wy = ys * v.w(); double wz = zs * v.w(); - SET_ROW(0, 1.0-(yy+zz), xy - wz, xz + wz, 0.0 ) - SET_ROW(1, xy + wz, 1.0-(xx+zz),yz - wx, 0.0 ) - SET_ROW(2, xz - wy, yz + wx, 1.0-(xx+yy),0.0 ) + SET_ROW(0, 1.0-(yy+zz), xy + wz, xz - wy, 0.0 ) + SET_ROW(1, xy - wz, 1.0-(xx+zz),yz + wx, 0.0 ) + SET_ROW(2, xz + wz, yz - wx, 1.0-(xx+yy),0.0 ) SET_ROW(3, 0.0, 0.0, 0.0, 1.0 ) fully_realized = true; } -void Matrix::makeRot( float yaw, float pitch, float roll) { +void Matrix::makeRot( float yaw, float pitch, float roll) +{ +#ifdef ANGLES_IN_DEGREES + yaw = DEG2RAD(yaw); + pitch = DEG2RAD(pitch); + roll = DEG2RAD(roll); +#endif + // lifted straight from SOLID library v1.01 Quaternion.h // available from http://www.win.tue.nl/~gino/solid/ // and also distributed under the LGPL @@ -200,11 +219,11 @@ void Matrix::makeRot( float yaw, float pitch, float roll) { makeRot( q ); } -#define INNER_PRODUCT(a,b,c,r) \ - ((a)._mat[0][r] * (b)._mat[c][0]) \ - +((a)._mat[1][r] * (b)._mat[c][1]) \ - +((a)._mat[2][r] * (b)._mat[c][2]) \ - +((a)._mat[3][r] * (b)._mat[c][3]) +#define INNER_PRODUCT(a,b,r,c) \ + ((a)._mat[r][0] * (b)._mat[0][c]) \ + +((a)._mat[r][1] * (b)._mat[1][c]) \ + +((a)._mat[r][2] * (b)._mat[2][c]) \ + +((a)._mat[r][3] * (b)._mat[3][c]) void Matrix::mult( const Matrix& lhs, const Matrix& rhs ) { // PRECONDITION: We assume neither &lhs nor &rhs == this @@ -390,7 +409,7 @@ bool Matrix::invertAffine( const Matrix& _m ) { // returns true if _m is nonsingular, and (*this) contains its inverse // otherwise returns false. (*this unchanged) - // assert (this.isAffine()) ? + // assert( this->isAffine())? double det_1, pos, neg, temp; pos = neg = 0.0; @@ -487,72 +506,72 @@ void Matrix::copy( const Matrix& other) { void Matrix::preScale( float sx, float sy, float sz, const Matrix& m ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::preScale is deprecated. Use result = (Matrix::scale * m) instead."; - (*this) = ( scale(sx,sy,sz) * m ); #endif + (*this) = ( scale(sx,sy,sz) * m ); } void Matrix::postScale( const Matrix& m, float sx, float sy, float sz ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::postScale is deprecated. Use result = (m * Matrix::scale()) instead."; - (*this) = ( m * scale(sx,sy,sz) ); #endif + (*this) = ( m * scale(sx,sy,sz) ); } void Matrix::preScale( float sx, float sy, float sz ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::preScale is deprecated. Use M.preMult( Matrix::scale ) instead."; - preMult( scale(sx,sy,sz) ); #endif + preMult( scale(sx,sy,sz) ); } void Matrix::postScale( float sx, float sy, float sz ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::postScale is deprecated. Use M.postMult( Matrix::scale ) instead."; - postMult( scale(sx,sy,sz) ); #endif + postMult( scale(sx,sy,sz) ); } void Matrix::preTrans( float tx, float ty, float tz, const Matrix& m ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::preTrans is deprecated. Use result = Matrix::trans * m instead."; - (*this) = trans(tx,ty,tz) * m; #endif + (*this) = trans(tx,ty,tz) * m; } void Matrix::postTrans( const Matrix& m, float tx, float ty, float tz ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::postTrans is deprecated. Use result = m * Matrix::trans instead."; - (*this) = m * trans(tx,ty,tz); #endif + (*this) = m * trans(tx,ty,tz); } void Matrix::preTrans( float sx, float sy, float sz ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::preTrans is deprecated. Use result = Matrix::trans * m instead."; - preMult( trans(sx,sy,sz) ); #endif + preMult( trans(sx,sy,sz) ); } void Matrix::postTrans( float sx, float sy, float sz ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::postTrans is deprecated. Use result = m * Matrix::trans instead."; - postMult( trans(sx,sy,sz) ); #endif + postMult( trans(sx,sy,sz) ); } void Matrix::preRot( float deg, float x, float y, float z, const Matrix& m ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::preRot is deprecated. Use result = Matrix::rot * m instead."; - (*this) = rotate(deg,x,y,z) * m; #endif + (*this) = rotate(deg,x,y,z) * m; } void Matrix::postRot( const Matrix& m, float deg, float x, float y, float z ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::postRot is deprecated. Use result = m * Matrix::rotate instead."; - (*this) = m * rotate(deg,x,y,z); #endif + (*this) = m * rotate(deg,x,y,z); } void Matrix::preRot( float deg, float x, float y, float z ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::preRot is deprecated. Use m.preMult( Matrix::rotate ) instead."; - preMult( rotate(deg,x,y,z) ); #endif + preMult( rotate(deg,x,y,z) ); } void Matrix::postRot( float deg, float x, float y, float z ) { #ifdef WARN_DEPRECATED notify(NOTICE) << "Matrix::postRot is deprecated. Use m.postMult( Matrix::rotate ) instead."; - postMult( rotate(deg,x,y,z) ); #endif + postMult( rotate(deg,x,y,z) ); } diff --git a/src/osg/Node.cpp b/src/osg/Node.cpp index 01a0519d7..c65470c13 100644 --- a/src/osg/Node.cpp +++ b/src/osg/Node.cpp @@ -13,6 +13,8 @@ Node::Node() _bsphere_computed = false; _userData = NULL; _nodeMask = 0xffffffff; + + _numChildrenRequiringAppTraversal = 0; } @@ -24,7 +26,7 @@ Node::~Node() void Node::accept(NodeVisitor& nv) { - nv.apply(*this); + if (nv.validNodeMask(*this)) nv.apply(*this); } @@ -33,6 +35,83 @@ void Node::ascend(NodeVisitor& nv) std::for_each(_parents.begin(),_parents.end(),NodeAcceptOp(nv)); } +void Node::setAppCallback(NodeCallback* nc) +{ + // if no changes just return. + if (_appCallback==nc) return; + + // app callback has been changed, will need to update + // both _appCallback and possibly the numChildrenRequiringAppTraversal + // if the number of callbacks changes. + + + // update the parents numChildrenRequiringAppTraversal + // note, if _numChildrenRequiringAppTraversal!=0 then the + // parents won't be affected by any app callback change, + // so no need to inform them. + if (_numChildrenRequiringAppTraversal==0 && !_parents.empty()) + { + int delta = 0; + if (_appCallback.valid()) --delta; + if (nc) ++delta; + if (delta!=0) + { + // the number of callbacks has changed, need to pass this + // on to parents so they know whether app traversal is + // reqired on this subgraph. + for(ParentList::iterator itr =_parents.begin(); + itr != _parents.end(); + ++itr) + { + (*itr)->setNumChildrenRequiringAppTraversal( + (*itr)->getNumChildrenRequiringAppTraversal()+delta ); + } + + } + } + + // set the app callback itself. + _appCallback = nc; + +} + +void Node::setNumChildrenRequiringAppTraversal(const int num) +{ + // if no changes just return. + if (_numChildrenRequiringAppTraversal==num) return; + + // note, if _appCallback is set then the + // parents won't be affected by any changes to + // _numChildrenRequiringAppTraversal so no need to inform them. + if (!_appCallback && !_parents.empty()) + { + + // need to pass on changes to parents. + int delta = 0; + if (_numChildrenRequiringAppTraversal>0) --delta; + if (num>0) ++delta; + if (delta!=0) + { + // the number of callbacks has changed, need to pass this + // on to parents so they know whether app traversal is + // reqired on this subgraph. + for(ParentList::iterator itr =_parents.begin(); + itr != _parents.end(); + ++itr) + { + (*itr)->setNumChildrenRequiringAppTraversal( + (*itr)->getNumChildrenRequiringAppTraversal()+delta + ); + } + + } + } + + // finally update this objects value. + _numChildrenRequiringAppTraversal=num; + +} + const bool Node::computeBound() const { _bsphere.init(); diff --git a/src/osg/NodeVisitor.cpp b/src/osg/NodeVisitor.cpp index 72b87a3ae..9134d71cb 100644 --- a/src/osg/NodeVisitor.cpp +++ b/src/osg/NodeVisitor.cpp @@ -5,8 +5,12 @@ using namespace osg; NodeVisitor::NodeVisitor(TraversalMode tm) { + _traversalNumber = -1; + _traversalVisitor = NULL; _traversalMode = tm; + _traversalMask = 0xffffffff; + _nodeMaskOverride = 0x0; } diff --git a/src/osg/Point.cpp b/src/osg/Point.cpp index 0d212f253..88341c035 100644 --- a/src/osg/Point.cpp +++ b/src/osg/Point.cpp @@ -1,10 +1,6 @@ // Ideas and code borrowed from GLUT pointburst demo // written by Mark J. Kilgard -#ifdef WIN32 -#include -#endif - #include "osg/GL" #include "osg/GLExtensions" #include "osg/Point" diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 5ae95cb4f..3a14e7d56 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -8,7 +8,6 @@ using namespace osg; State::State() { _contextID = 0; - _frameNumber = 0; _fineGrainedErrorDetection = true; } diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index 807ab719f..0fe6077f2 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -155,31 +155,6 @@ void StateSet::compile(State& state) const } } - -const StateSet::ModeVector StateSet::getModeVector() const -{ - ModeVector vec; - for (ModeList::const_iterator itr = _modeList.begin(); - itr!=_modeList.end(); - ++itr) - { - vec.push_back(*itr); - } - return vec; -} - -const StateSet::AttributeVector StateSet::getAttributeVector() const -{ - AttributeVector vec; - for (AttributeList::const_iterator itr = _attributeList.begin(); - itr!=_attributeList.end(); - ++itr) - { - vec.push_back(itr->second.first.get()); - } - return vec; -} - void StateSet::setRenderingHint(const int hint) { _renderingHint = hint; diff --git a/src/osg/Texture.cpp b/src/osg/Texture.cpp index 137c9cdd1..d09abf3f4 100644 --- a/src/osg/Texture.cpp +++ b/src/osg/Texture.cpp @@ -46,6 +46,50 @@ Texture::~Texture() dirtyTextureObject(); } +int Texture::compare(const StateAttribute& sa) const +{ + // check the types are equal and then create the rhs variable + // used by the COMPARE_StateAttribute_Paramter macro's below. + COMPARE_StateAttribute_Types(Texture,sa) + + if (_image!=rhs._image) // smart pointer comparison. + { + if (_image.valid()) + { + if (rhs._image.valid()) + { + if (_image->getFileName()getFileName()) return -1; + else if (_image->getFileName()>rhs._image->getFileName()) return 1;; + } + else + { + return 1; // valid lhs._image is greater than null. + } + } + else if (rhs._image.valid()) + { + return -1; // valid rhs._image is greater than null. + } + } + + // compare each paramter in turn against the rhs. + COMPARE_StateAttribute_Parameter(_textureUnit) + COMPARE_StateAttribute_Parameter(_wrap_s) + COMPARE_StateAttribute_Parameter(_wrap_t) + COMPARE_StateAttribute_Parameter(_wrap_r) + COMPARE_StateAttribute_Parameter(_min_filter) + COMPARE_StateAttribute_Parameter(_mag_filter) + COMPARE_StateAttribute_Parameter(_internalFormatMode) + COMPARE_StateAttribute_Parameter(_internalFormatValue) + COMPARE_StateAttribute_Parameter(_textureWidth) + COMPARE_StateAttribute_Parameter(_textureHeight) + COMPARE_StateAttribute_Parameter(_subloadMode) + COMPARE_StateAttribute_Parameter(_subloadOffsX) + COMPARE_StateAttribute_Parameter(_subloadOffsY) + + return 0; // passed all the above comparison macro's, must be equal. +} + void Texture::setImage(Image* image) { // delete old texture objects. @@ -410,7 +454,7 @@ void Texture::applyImmediateMode(State& state) const * OpenGL texture objects to cached until they can be deleted * by the OpenGL context in which they were created, specified * by contextID.*/ -void Texture::deleteTextureObject(uint contextID,uint handle) +void Texture::deleteTextureObject(uint contextID,GLuint handle) { if (handle!=0) { @@ -443,7 +487,7 @@ void Texture::copyTexImage2D(State& state, int x, int y, int width, int height ) const uint contextID = state.getContextID(); // get the globj for the current contextID. - uint& handle = getHandle(contextID); + GLuint& handle = getHandle(contextID); if (handle) { @@ -484,7 +528,6 @@ void Texture::copyTexImage2D(State& state, int x, int y, int width, int height ) glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _wrap_t ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _min_filter ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _mag_filter ); -// glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glCopyTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, x, y, width, height, 0 ); @@ -515,7 +558,6 @@ void Texture::copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, i glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _wrap_t ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _min_filter ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _mag_filter ); -// glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glCopyTexSubImage2D( GL_TEXTURE_2D, 0, xoffset,yoffset, x, y, width, height); /* Redundant, delete later */ diff --git a/src/osg/Timer.cpp b/src/osg/Timer.cpp index 19c0c103c..dfce9b883 100644 --- a/src/osg/Timer.cpp +++ b/src/osg/Timer.cpp @@ -1,273 +1,203 @@ -#include +//#include #include #include -#ifndef macintosh -#include -#include -#endif - #include using namespace osg; -#ifdef WIN32 // [ +// follows are the constructors of the Timer class, once version +// for each OS combination. The order is WIN32, FreeBSD, Linux, IRIX, +// and the rest of the world. +// +// all the rest of the timer methods are implemented within the header. -#include -#include +#ifdef WIN32 -int Timer::inited = 0; -double Timer::cpu_mhz = 0.0; - -void Timer::init( void ) -{ - Timer_t start_time = tick(); - Sleep (1000); - Timer_t end_time = tick(); - cpu_mhz = (double)(end_time-start_time)*1e-6; - inited = 1; -} - - -Timer::Timer( void ) -{ - if( !inited ) init(); -} - - -Timer::~Timer( void ) -{ -} - - -double Timer::delta_s( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return (((double)delta/cpu_mhz)*1e-6); -} - - -double Timer::delta_m( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return (((double)delta/cpu_mhz)*1e-3); -} - - -Timer_t Timer::delta_u( Timer_t t0, Timer_t t1 ) -{ - return (Timer_t)((double)(t1 - t0)/cpu_mhz); -} - - -Timer_t Timer::delta_n( Timer_t t0, Timer_t t1 ) -{ - return (Timer_t)((double)(t1 - t0) * 1e3/cpu_mhz); -} -#endif // ] - -#if defined(__linux) || defined(__FreeBSD__) // [ - -# include -# if defined(__linux) -# include -# elif defined(__FreeBSD__) -# include -# include -# endif - -int Timer::inited = 0; -double Timer::cpu_mhz = 0.0; - -void Timer::init( void ) -{ -# if defined(__FreeBSD__) - int cpuspeed; - size_t len; - - len = sizeof(cpuspeed); - if (sysctlbyname("machdep.tsc_freq", &cpuspeed, &len, NULL, NULL) == -1) { - perror("sysctlbyname(machdep.tsc_freq)"); - return; - } - cpu_mhz = cpuspeed / 1e6; - -# elif defined(__linux) - char buff[128]; - FILE *fp = fopen( "/proc/cpuinfo", "r" ); - - while( fgets( buff, sizeof( buff ), fp ) > 0 ) + #include + #include + #include + #include + Timer::Timer() { - if( !strncmp( buff, "cpu MHz", strlen( "cpu MHz" ))) - { - char *ptr = buff; + _useStandardClock = false; + + if (_useStandardClock) + { + _secsPerClick = (1.0 / (double) CLOCKS_PER_SEC); + } + else + { - while( ptr && *ptr != ':' ) ptr++; - if( ptr ) - { - ptr++; - sscanf( ptr, "%lf", &cpu_mhz ); - } - break; - } + Timer_t start_time = tick(); + Sleep (1000); + Timer_t end_time = tick(); + + _secsPerClick = 1.0/(double)(end_time-start_time); + } } - fclose( fp ); -# endif - inited = 1; -} +#elif defined(__FreeBSD__) -Timer::Timer( void ) -{ - if( !inited ) init(); -} - - -Timer::~Timer( void ) -{ -} - - -double Timer::delta_s( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return ((double)delta/cpu_mhz*1e-6); -} - - -double Timer::delta_m( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return ((double)delta/cpu_mhz*1e-3); -} - - -Timer_t Timer::delta_u( Timer_t t0, Timer_t t1 ) -{ - return (Timer_t)((double)(t1 - t0)/cpu_mhz); -} - - -Timer_t Timer::delta_n( Timer_t t0, Timer_t t1 ) -{ - return (Timer_t)((double)(t1 - t0) * 1e3/cpu_mhz); -} -#endif // ] -#ifdef __sgi // [ - -#include -#include -#include -#include - -unsigned long Timer::dummy = 0; - -Timer::Timer( void ) -{ - __psunsigned_t phys_addr, raddr; - unsigned int cycleval; - volatile unsigned long counter_value, *iotimer_addr; - int fd, poffmask; - - poffmask = getpagesize() - 1; - phys_addr = syssgi( SGI_QUERY_CYCLECNTR, &cycleval ); - microseconds_per_click = (double)cycleval/1e6; - nanoseconds_per_click = (double)cycleval/1e3; - raddr = phys_addr & ~poffmask; - - clk = &dummy; - - if( (fd = open( "/dev/mmem", O_RDONLY )) < 0 ) + #include + #include + #include + #include + #include + Timer::Timer() { - perror( "/dev/mmem" ); - return; + _useStandardClock = false; + + if (_useStandardClock) + { + _secsPerClick = 1e-6; // gettimeofday()'s precision. + } + else + { + int cpuspeed; + size_t len; + + len = sizeof(cpuspeed); + if (sysctlbyname("machdep.tsc_freq", &cpuspeed, &len, NULL, NULL) == -1) + { + _useStandardClock = true; + perror("sysctlbyname(machdep.tsc_freq)"); + return; + } + + _secsPerClick = 1.0/cpuspeed; + } + } + +#elif defined(__linux) + + #include + #include + #include + #include + + Timer::Timer() + { + _useStandardClock = false; + + if (_useStandardClock) + { + _secsPerClick = 1e-6; // gettimeofday()'s precision. + } + else + { + char buff[128]; + FILE *fp = fopen( "/proc/cpuinfo", "r" ); + + double cpu_mhz=0.0f; + + while( fgets( buff, sizeof( buff ), fp ) > 0 ) + { + if( !strncmp( buff, "cpu MHz", strlen( "cpu MHz" ))) + { + char *ptr = buff; + + while( ptr && *ptr != ':' ) ptr++; + if( ptr ) + { + ptr++; + sscanf( ptr, "%lf", &cpu_mhz ); + } + break; + } + } + fclose( fp ); + + if (cpu_mhz==0.0f) + { + // error - no cpu_mhz found. + Timer_t start_time = tick(); + sleep (1); + Timer_t end_time = tick(); + _secsPerClick = 1.0/(double)(end_time-start_time); + } + else + { + _secsPerClick = 1e-6/cpu_mhz; + } + } } - iotimer_addr = (volatile unsigned long *)mmap( - (void *)0L, - (size_t)poffmask, - (int)PROT_READ, - (int)MAP_PRIVATE, fd, (off_t)raddr); +#elif defined(__sgi) - iotimer_addr = (unsigned long *)( - (__psunsigned_t)iotimer_addr + (phys_addr & poffmask) - ); + #include + #include + #include + #include + #include + #include - cycleCntrSize = syssgi( SGI_CYCLECNTR_SIZE ); + unsigned long Timer::_dummy = 0; - if( cycleCntrSize > 32 ) - ++iotimer_addr; + Timer::Timer( void ) + { + _useStandardClock = false; - clk = (unsigned long *)iotimer_addr; -} + if (_useStandardClock) + { + _secsPerClick = 1e-6; // gettimeofday()'s precision. + } + else + { + __psunsigned_t phys_addr, raddr; + unsigned int cycleval; + volatile unsigned long counter_value, *iotimer_addr; + int fd, poffmask; + + poffmask = getpagesize() - 1; + phys_addr = syssgi( SGI_QUERY_CYCLECNTR, &cycleval ); + raddr = phys_addr & ~poffmask; + + _clockAddress = &_dummy; + + if( (fd = open( "/dev/mmem", O_RDONLY )) < 0 ) + { + perror( "/dev/mmem" ); + return; + } + + iotimer_addr = (volatile unsigned long *)mmap( + (void *)0L, + (size_t)poffmask, + (int)PROT_READ, + (int)MAP_PRIVATE, fd, (off_t)raddr); + + iotimer_addr = (unsigned long *)( + (__psunsigned_t)iotimer_addr + (phys_addr & poffmask) + ); + + _cycleCntrSize = syssgi( SGI_CYCLECNTR_SIZE ); + + if( _cycleCntrSize > 32 ) + ++iotimer_addr; + + _clockAddress = (unsigned long *)iotimer_addr; + _secsPerClick = (double)(cycleval)* 1e-12; + } + } -Timer::~Timer( void ) -{ -} +#elif defined(unix) + Timer::Timer( void ) + { + _useStandardClock = true; + _secsPerClick = 1e-6; // gettimeofday()'s precision. + } -double Timer::delta_s( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return ((double)delta * microseconds_per_click*1e-6); -} +#else + // handle the rest of the OS world by just using the std::clock, -double Timer::delta_m( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return ((double)delta * microseconds_per_click*1e-3); -} + Timer::Timer( void ) + { + _useStandardClock = true; + _secsPerClick = (1.0 / (double) CLOCKS_PER_SEC); + } - -Timer_t Timer::delta_u( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return (Timer_t)((double)delta * microseconds_per_click); -} - -Timer_t Timer::delta_n( Timer_t t1, Timer_t t2 ) -{ - unsigned long delta = t2 - t1; - return (Timer_t )((double)delta * nanoseconds_per_click); -} - -#endif // ] - -#ifdef macintosh // [ - -Timer::Timer( void ) -{ - microseconds_per_click = (1.0 / (double) CLOCKS_PER_SEC) * 1e6; - nanoseconds_per_click = (1.0 / (double) CLOCKS_PER_SEC) * 1e9; -} - -Timer::~Timer( void ) -{ -} - -double Timer::delta_s( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return ((double)delta * microseconds_per_click*1e-6); -} - -double Timer::delta_m( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return ((double)delta * microseconds_per_click*1e-3); -} - -Timer_t Timer::delta_u( Timer_t t1, Timer_t t2 ) -{ - Timer_t delta = t2 - t1; - return (Timer_t)((double)delta * microseconds_per_click); -} - -Timer_t Timer::delta_n( Timer_t t1, Timer_t t2 ) -{ - unsigned long delta = t2 - t1; - return (Timer_t )((double)delta * nanoseconds_per_click); -} -#endif // ] +#endif diff --git a/src/osgGLUT/Viewer.cpp b/src/osgGLUT/Viewer.cpp index 1835dfa09..234dfc0c4 100644 --- a/src/osgGLUT/Viewer.cpp +++ b/src/osgGLUT/Viewer.cpp @@ -75,8 +75,8 @@ Viewer::Viewer() fullscreen = false; _is_open = 0; _saved_wx = wx = _saved_wy = wy = 0; - _saved_ww = ww = 1024, - _saved_wh = wh = 768; + _saved_ww = ww = 800, + _saved_wh = wh = 600; _title = "OSG Viewer"; @@ -119,6 +119,10 @@ Viewer::Viewer() frRate=0; // added by gwm to display fram Rate smoothed _focusedViewport = 0; // The viewport with mouse/keyboard focus + + + _frameStamp = new osg::FrameStamp; + } @@ -203,7 +207,9 @@ bool Viewer::open() Node* node = itr->sceneView->getSceneData(); if (node) node->accept(vrv); } - +#ifdef _DEBUG + vrv.setMinimumNumStencilBits(8); //gwm 12.8.01 to force stencils available for DC test +#endif // set up each render stage to clear the appropriate buffers. GLbitfield clear_mask=0; if (vrv.requiresRGB()) clear_mask |= GL_COLOR_BUFFER_BIT; @@ -322,11 +328,13 @@ float Viewer::app(unsigned int viewport) osg::Timer_t beforeApp = _timer.tick(); // do app traversal. + + getViewportSceneView(viewport)->setFrameStamp(_frameStamp.get()); getViewportSceneView(viewport)->app(); // update the camera manipulator. osg::ref_ptr ea = new GLUTEventAdapter; - ea->adaptFrame(clockSeconds()); + ea->adaptFrame(_frameStamp->getReferenceTime()); if (_viewportList[viewport]._cameraManipulator->handle(*ea,*this)) { @@ -757,7 +765,8 @@ void Viewer::showStats() int wid=ww, ht=wh; // temporary local screen size - must change during this section if (wid>0 && ht>0) { const int blsize=16; - char *clin=new char[wid/blsize+2]; // buffer to print + char *clin=new char[wid/blsize+2]; // buffer to print dc + char *ctext=new char[128]; // buffer to print details float mdc=0; GLubyte *buffer=new GLubyte[wid*ht]; if (buffer) { @@ -786,13 +795,14 @@ void Viewer::showStats() *clpt='\0'; displaytext(0,(int)(0.84f*vh-(j*12)/blsize),clin); // display average DC over the blsize box } - sprintf(clin, "Pixels hit %.1f Mean DC %.2f: %4d by %4d pixels.", mdc, mdc/(wid*ht), wid, ht); + sprintf(ctext, "Pixels hit %.1f Mean DC %.2f: %4d by %4d pixels.", mdc, mdc/(wid*ht), wid, ht); displaytext(0,(int)(0.86f*vh),clin); glEnable(GL_STENCIL_TEST); // re-enable stencil buffer counting delete [] buffer; } delete [] clin; + delete [] ctext; } } @@ -803,9 +813,12 @@ void Viewer::showStats() glPopMatrix(); } - void Viewer::display() { + + _frameStamp->setFrameNumber(_frameStamp->getFrameNumber()+1); + _frameStamp->setReferenceTime(clockSeconds()); + // application traverasal. times[2].timeApp=0.0f; @@ -828,7 +841,7 @@ void Viewer::display() } - glFinish(); + if (_printStats>1) glFinish(); times[2].frameend=updateFrameTick(); // absolute time @@ -841,9 +854,12 @@ void Viewer::display() times[1]=times[2]; } + glutSwapBuffers(); // moved after draw of stats & glFinish() to get accurate timing (excluding stat draw!) // cout << "Time elapsed "<<_timer.delta_s(_initialTick,_timer.tick())<1) glFinish(); + #ifdef SGV_USE_RTFS fs->frame(); #endif @@ -1028,14 +1044,19 @@ void Viewer::keyboard(unsigned char key, int x, int y) break; case 'p' : + if (_printStats==4) glDisable(GL_STENCIL_TEST); // switch off stencil counting _printStats++; //gwm jul 2001 range of possible outputs, 0-4 = !_printStats; if (_printStats>4) _printStats=0; if (_printStats==4) { // count depth complexity by incrementing the stencil buffer every // time a pixel is hit - glEnable(GL_STENCIL_TEST); - glStencilOp(GL_INCR ,GL_INCR ,GL_INCR); - } else { - glDisable(GL_STENCIL_TEST); + int nsten=0; // Number of stencil planes available + glGetIntegerv(GL_STENCIL_BITS , &nsten); + if (nsten>0) { + glEnable(GL_STENCIL_TEST); + glStencilOp(GL_INCR ,GL_INCR ,GL_INCR); + } else {// skip this option + _printStats++; + } } break; @@ -1409,11 +1430,11 @@ void Viewer::addViewport(osgUtil::SceneView* sv, void Viewer::addViewport(osg::Node* rootnode, float x, float y, float width, float height) { - osgUtil::SceneView *sceneView = new osgUtil::SceneView; - sceneView->setDefaults(); - sceneView->setSceneData(rootnode); + osgUtil::SceneView *sceneView = new osgUtil::SceneView; + sceneView->setDefaults(); + sceneView->setSceneData(rootnode); - addViewport( sceneView, x, y, width, height ); + addViewport( sceneView, x, y, width, height ); } void Viewer::init(osg::Node* rootnode) diff --git a/src/osgPlugins/osg/GeoSet.cpp b/src/osgPlugins/osg/GeoSet.cpp index ad481a017..dabfd4290 100644 --- a/src/osgPlugins/osg/GeoSet.cpp +++ b/src/osgPlugins/osg/GeoSet.cpp @@ -874,6 +874,7 @@ bool GeoSet_writeLocalData(const Object& obj, Output& fw) fw << (int)*itrRowData<<" "; itrRowData += 1; } + itrRowComp++; } fw << endl; diff --git a/src/osgPlugins/osg/StateSet.cpp b/src/osgPlugins/osg/StateSet.cpp index 86660d41a..7fbe1b73f 100644 --- a/src/osgPlugins/osg/StateSet.cpp +++ b/src/osgPlugins/osg/StateSet.cpp @@ -377,42 +377,6 @@ bool StateSet_writeLocalData(const Object& obj, Output& fw) } -#ifdef WIN32 - #define USE_VECTOR_VERSIONS -#endif - -#ifdef USE_VECTOR_VERSIONS - - StateSet::ModeVector modes = stateset.getModeVector(); - - for(StateSet::ModeVector::iterator mitr=modes.begin(); - mitr!=modes.end(); - ++mitr) - { - GLModeToGLNameMap::iterator nitr = s_GLModeToGLNameMap.find(mitr->first); - if (nitr!=s_GLModeToGLNameMap.end()) - { - fw.indent() << nitr->second << " " << StateSet_getModeStr(mitr->second) << endl; - } - else - { - // no name defined for GLMode so just pass its value to fw. - fw.indent() << "0x" << hex << (osg::uint)mitr->first << dec <<" " << StateSet_getModeStr(mitr->second) << endl; - } - - } - - StateSet::AttributeVector attributes = stateset.getAttributeVector(); - - for(StateSet::AttributeVector::iterator sitr=attributes.begin(); - sitr!=attributes.end(); - ++sitr) - { - fw.writeObject(*(*sitr)); - } - -#else - const StateSet::ModeList& ml = stateset.getModeList(); const StateSet::AttributeList& sl = stateset.getAttributeList(); @@ -439,8 +403,6 @@ bool StateSet_writeLocalData(const Object& obj, Output& fw) fw.writeObject(*(sitr->second.first)); } -#endif - return true; } diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index bdb07d98d..77b23b94a 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -80,8 +80,6 @@ class PrintVisitor : public NodeVisitor CullVisitor::CullVisitor() { - _frameNumber = 0; - // overide the default node visitor mode. setTraversalMode(NodeVisitor::TRAVERSE_ACTIVE_CHILDREN); @@ -109,10 +107,7 @@ CullVisitor::CullVisitor() _calculated_znear = FLT_MAX; _calculated_zfar = -FLT_MAX; - _view[0] = 0; - _view[1] = 0; - _view[2] = 1024; - _view[3] = 768; + _viewport = NULL; _impostorActive = true; _depthSortImpostorSprites = false; @@ -682,8 +677,14 @@ void CullVisitor::apply(Impostor& node) // traverse the appropriate child of the LOD. node.getChild(eval)->accept(*this); } - else + else if (!_viewport.valid()) { + // need to use impostor but no valid viewport is defined to simply + // default to using the LOD child as above. + node.getChild(eval)->accept(*this); + } + else + { // within the impostor distance threshold therefore attempt // to use impostor instead. @@ -695,7 +696,7 @@ void CullVisitor::apply(Impostor& node) if (impostorSprite) { // impostor found, now check to see if it is good enough to use - float error = impostorSprite->calcPixelError(*_camera,_view,matrix); + float error = impostorSprite->calcPixelError(*_camera,*_viewport,matrix); if (error>_impostorPixelErrorThreshold) { @@ -765,7 +766,7 @@ void CullVisitor::apply(Impostor& node) if (stateset) popStateSet(); // update frame number to show that impostor is in action. - impostorSprite->setLastFrameUsed(_frameNumber); + impostorSprite->setLastFrameUsed(getTraversalNumber()); } else @@ -1085,8 +1086,8 @@ ImpostorSprite* CullVisitor::createImpostorSprite(Impostor& node) // equivilant window coordinates by using the camera's project method. Vec3 c00_win; Vec3 c11_win; - _camera->project(c00_world,_view,c00_win); - _camera->project(c11_world,_view,c11_win); + _camera->project(c00_world,*_viewport,c00_win); + _camera->project(c11_world,*_viewport,c11_win); // adjust texture size to be nearest power of 2. @@ -1114,17 +1115,26 @@ ImpostorSprite* CullVisitor::createImpostorSprite(Impostor& node) int new_t = (int)(powf(2.0f,rounded_tp2)); // if dimension is bigger than window divide it down. - while (new_s>_view[2]) new_s /= 2; + while (new_s>_viewport->width()) new_s /= 2; // if dimension is bigger than window divide it down. - while (new_t>_view[3]) new_t /= 2; + while (new_t>_viewport->height()) new_t /= 2; - rtts->setViewport(_view[0],_view[1],new_s,new_t); + + // offset the impostor viewport from the center of the main window + // viewport as often the edges of the viewport might be obscured by + // other windows, which can cause image/reading writing problems. + int center_x = _viewport->x()+_viewport->width()/2; + int center_y = _viewport->y()+_viewport->height()/2; + + Viewport* viewport = new Viewport; + viewport->setViewport(center_x-new_s/2,center_y-new_t/2,new_s,new_t); + rtts->setViewport(viewport); // create the impostor sprite. ImpostorSprite* impostorSprite = - _impostorSpriteManager->createOrReuseImpostorSprite(new_s,new_t,_frameNumber-_numFramesToKeepImpostorSprites); + _impostorSpriteManager->createOrReuseImpostorSprite(new_s,new_t,getTraversalNumber()-_numFramesToKeepImpostorSprites); if (impostorSprite==NULL) return NULL; @@ -1143,7 +1153,7 @@ ImpostorSprite* CullVisitor::createImpostorSprite(Impostor& node) Texture* texture = impostorSprite->getTexture(); // update frame number to show that impostor is in action. - impostorSprite->setLastFrameUsed(_frameNumber); + impostorSprite->setLastFrameUsed(getTraversalNumber()); Vec3* coords = impostorSprite->getCoords(); Vec2* texcoords = impostorSprite->getTexCoords(); diff --git a/src/osgUtil/Makefile b/src/osgUtil/Makefile index 7093a4b4f..1cd85c5d6 100644 --- a/src/osgUtil/Makefile +++ b/src/osgUtil/Makefile @@ -2,6 +2,7 @@ include ../../Make/makedefs C++FILES = \ + AppVisitor.cpp\ CameraManipulator.cpp\ CullVisitor.cpp\ CullViewState.cpp\ @@ -12,6 +13,7 @@ C++FILES = \ IntersectVisitor.cpp\ InsertImpostorsVisitor.cpp\ NvTriStripObjects.cpp\ + OptimizeStateVisitor.cpp\ RenderBin.cpp\ RenderGraph.cpp\ RenderLeaf.cpp\ @@ -39,6 +41,7 @@ LIB = ../../lib/lib$(TARGET_BASENAME).so TARGET_LIB_FILES = lib$(TARGET_BASENAME).so TARGET_INCLUDE_FILES = \ + osgUtil/AppVisitor\ osgUtil/CameraManipulator\ osgUtil/CullVisitor\ osgUtil/CullViewState\ @@ -52,6 +55,7 @@ TARGET_INCLUDE_FILES = \ osgUtil/GUIEventHandler\ osgUtil/IntersectVisitor\ osgUtil/InsertImpostorsVisitor\ + osgUtil/OptimizeStateVisitor\ osgUtil/RenderBin\ osgUtil/RenderGraph\ osgUtil/RenderLeaf\ diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index 8e48aee06..165880482 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -1,3 +1,5 @@ +#include + #include using namespace osg; @@ -44,6 +46,12 @@ void RenderStage::draw(osg::State& state,RenderLeaf*& previous) { if (_stageDrawnThisFrame) return; + if (!_viewport) + { + notify(FATAL) << "Error: cannot drawm stage due to undefined viewport."<x(), _viewport->y(), _viewport->width(), _viewport->height() ); glEnable( GL_SCISSOR_TEST ); #endif - glViewport( _view[0], _view[1], _view[2], _view[3] ); + _viewport->apply(state); // glEnable( GL_DEPTH_TEST ); @@ -86,6 +94,10 @@ void RenderStage::draw(osg::State& state,RenderLeaf*& previous) glDisable( GL_SCISSOR_TEST ); #endif + // pass the camera we're about to set up to state, so that + // subsequent operatiosn know about it, such as for CLOD etc. + state.setCamera(_camera.get()); + // set up projection const Matrix& projectionMat = _camera->getProjectionMatrix(); glMatrixMode( GL_PROJECTION ); @@ -104,6 +116,7 @@ void RenderStage::draw(osg::State& state,RenderLeaf*& previous) // set up camera modelview. const Matrix& modelView = _camera->getModelViewMatrix(); glMultMatrixf((GLfloat*)modelView._mat); + if (getLightingMode()==RenderStageLighting::SKY_LIGHT && light) { diff --git a/src/osgUtil/RenderToTextureStage.cpp b/src/osgUtil/RenderToTextureStage.cpp index 471ee9594..7078348ab 100644 --- a/src/osgUtil/RenderToTextureStage.cpp +++ b/src/osgUtil/RenderToTextureStage.cpp @@ -27,6 +27,7 @@ void RenderToTextureStage::draw(osg::State& state,RenderLeaf*& previous) RenderStage::draw(state,previous); // now copy the rendered image to attached texture. - if (_texture.valid()) _texture->copyTexImage2D(state,_view[0],_view[1],_view[2],_view[3]); + if (_texture.valid()) + _texture->copyTexImage2D(state,_viewport->x(),_viewport->y(),_viewport->width(),_viewport->height()); } diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index b0ea80398..8a9c81b0e 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -25,12 +26,7 @@ SceneView::SceneView() _prioritizeTextures = false; - _view[0] = 0; - _view[1] = 0; - _view[2] = 1024; - _view[3] = 768; - - _frameNumber = 0; + _viewport = new Viewport; } @@ -58,6 +54,10 @@ void SceneView::setDefaults() _rendergraph = new osgUtil::RenderGraph; _renderStage = new osgUtil::RenderStage; + + _appVisitor = new osgUtil::AppVisitor; + + _cullVisitor = new osgUtil::CullVisitor; _cullVisitor->setRenderGraph(_rendergraph.get()); @@ -88,26 +88,43 @@ void SceneView::setDefaults() void SceneView::app() { - ++_frameNumber; - if (_sceneData.valid() && _appVisitor.valid()) { _appVisitor->reset(); + + _appVisitor->setFrameStamp(_frameStamp.get()); + + // use the frame number for the traversal number. + if (_frameStamp.valid()) + { + _appVisitor->setTraversalNumber(_frameStamp->getFrameNumber()); + } + _sceneData->accept(*_appVisitor.get()); } + + } void SceneView::cull() { if (!_sceneData) return; - _camera->adjustAspectRatio((GLfloat)_view[2]/(GLfloat) _view[3]); + _camera->adjustAspectRatio(_viewport->aspectRatio()); _rendergraph->clean(); _cullVisitor->reset(); + _cullVisitor->setFrameStamp(_frameStamp.get()); + + // use the frame number for the traversal number. + if (_frameStamp.valid()) + { + _cullVisitor->setTraversalNumber(_frameStamp->getFrameNumber()); + } + // comment out reset of rendergraph since clean is more efficient. // _rendergraph->reset(); @@ -115,14 +132,13 @@ void SceneView::cull() // reuse the structure on the rendergraph in the next frame. This // achieves a certain amount of frame cohereancy of memory allocation. - _cullVisitor->setFrameNumber(_frameNumber); _cullVisitor->setLODBias(_lodBias); _cullVisitor->setCamera(*_camera); - _cullVisitor->setViewport(_view[0],_view[1],_view[2],_view[3]); + _cullVisitor->setViewport(_viewport.get()); _renderStage->reset(); - _renderStage->setViewport(_view[0],_view[1],_view[2],_view[3]); + _renderStage->setViewport(_viewport.get()); _renderStage->setCamera(_camera.get()); _renderStage->setClearColor(_backgroundColor); _renderStage->setLight(_light.get()); @@ -207,6 +223,8 @@ void SceneView::draw() } // we in theory should be able to _state->reset(); + + _state->setFrameStamp(_frameStamp.get()); // note, to support multi-pipe systems the deletion of OpenGL display list // and texture objects is deferred until the OpenGL context is the correct @@ -233,7 +251,7 @@ void SceneView::draw() windows coordinates are calculated relative to the bottom left of the window.*/ bool SceneView::projectWindowIntoObject(const osg::Vec3& window,osg::Vec3& object) const { - return _camera->unproject(window,_view,object); + return _camera->unproject(window,*_viewport,object); } @@ -244,8 +262,8 @@ bool SceneView::projectWindowIntoObject(const osg::Vec3& window,osg::Vec3& objec windows coordinates are calculated relative to the bottom left of the window.*/ bool SceneView::projectWindowXYIntoObject(int x,int y,osg::Vec3& near_point,osg::Vec3& far_point) const { - bool result_near = _camera->unproject(Vec3(x,y,0.0f),_view,near_point); - bool result_far = _camera->unproject(Vec3(x,y,1.0f),_view,far_point); + bool result_near = _camera->unproject(Vec3(x,y,0.0f),*_viewport,near_point); + bool result_far = _camera->unproject(Vec3(x,y,1.0f),*_viewport,far_point); return result_near & result_far; } @@ -256,5 +274,5 @@ bool SceneView::projectWindowXYIntoObject(int x,int y,osg::Vec3& near_point,osg: windows coordinates are calculated relative to the bottom left of the window.*/ bool SceneView::projectObjectIntoWindow(const osg::Vec3& object,osg::Vec3& window) const { - return _camera->project(object,_view,window); + return _camera->project(object,*_viewport,window); }