From f8636d8006d2fa8bd380fb8ff04e4b980c32a15c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 11 Feb 2009 10:41:55 +0000 Subject: [PATCH] Fixes for doxgen warnings --- include/osg/BoundingBox | 58 ++++++++++------------- include/osgAnimation/Vec3Packed | 3 +- include/osgTerrain/Terrain | 2 +- include/osgUtil/DrawElementTypeSimplifier | 2 +- include/osgWidget/Browser | 2 +- 5 files changed, 31 insertions(+), 36 deletions(-) diff --git a/include/osg/BoundingBox b/include/osg/BoundingBox index 47b7d9c5a..da52b10dd 100644 --- a/include/osg/BoundingBox +++ b/include/osg/BoundingBox @@ -173,11 +173,35 @@ class BoundingBoxImpl /** Expands this bounding box to include the given bounding box. * If this box is uninitialized, set it equal to bb. */ - void expandBy(const BoundingBoxImpl& bb); + void expandBy(const BoundingBoxImpl& bb) + { + if (!bb.valid()) return; + + if(bb._min.x()<_min.x()) _min.x() = bb._min.x(); + if(bb._max.x()>_max.x()) _max.x() = bb._max.x(); + + if(bb._min.y()<_min.y()) _min.y() = bb._min.y(); + if(bb._max.y()>_max.y()) _max.y() = bb._max.y(); + + if(bb._min.z()<_min.z()) _min.z() = bb._min.z(); + if(bb._max.z()>_max.z()) _max.z() = bb._max.z(); + } /** Expands this bounding box to include the given sphere. * If this box is uninitialized, set it to include sh. */ - void expandBy(const BoundingSphereImpl& sh); + void expandBy(const BoundingSphereImpl& sh) + { + if (!sh.valid()) return; + + if(sh._center.x()-sh._radius<_min.x()) _min.x() = sh._center.x()-sh._radius; + if(sh._center.x()+sh._radius>_max.x()) _max.x() = sh._center.x()+sh._radius; + + if(sh._center.y()-sh._radius<_min.y()) _min.y() = sh._center.y()-sh._radius; + if(sh._center.y()+sh._radius>_max.y()) _max.y() = sh._center.y()+sh._radius; + + if(sh._center.z()-sh._radius<_min.z()) _min.z() = sh._center.z()-sh._radius; + if(sh._center.z()+sh._radius>_max.z()) _max.z() = sh._center.z()+sh._radius; + } /** Returns the intersection of this bounding box and the specified bounding box. */ @@ -205,36 +229,6 @@ class BoundingBoxImpl } }; -template -void BoundingBoxImpl::expandBy(const BoundingBoxImpl& bb) -{ - if (!bb.valid()) return; - - if(bb._min.x()<_min.x()) _min.x() = bb._min.x(); - if(bb._max.x()>_max.x()) _max.x() = bb._max.x(); - - if(bb._min.y()<_min.y()) _min.y() = bb._min.y(); - if(bb._max.y()>_max.y()) _max.y() = bb._max.y(); - - if(bb._min.z()<_min.z()) _min.z() = bb._min.z(); - if(bb._max.z()>_max.z()) _max.z() = bb._max.z(); -} - -template -void BoundingBoxImpl::expandBy(const BoundingSphereImpl& sh) -{ - if (!sh.valid()) return; - - if(sh._center.x()-sh._radius<_min.x()) _min.x() = sh._center.x()-sh._radius; - if(sh._center.x()+sh._radius>_max.x()) _max.x() = sh._center.x()+sh._radius; - - if(sh._center.y()-sh._radius<_min.y()) _min.y() = sh._center.y()-sh._radius; - if(sh._center.y()+sh._radius>_max.y()) _max.y() = sh._center.y()+sh._radius; - - if(sh._center.z()-sh._radius<_min.z()) _min.z() = sh._center.z()-sh._radius; - if(sh._center.z()+sh._radius>_max.z()) _max.z() = sh._center.z()+sh._radius; -} - typedef BoundingBoxImpl BoundingBoxf; typedef BoundingBoxImpl BoundingBoxd; diff --git a/include/osgAnimation/Vec3Packed b/include/osgAnimation/Vec3Packed index 82c653177..0fae8e6e5 100644 --- a/include/osgAnimation/Vec3Packed +++ b/include/osgAnimation/Vec3Packed @@ -9,8 +9,9 @@ // the Free Software Foundation; either version 2.1 of the License, or (at // // your option) any later version. // //****************************************************************************// + /*****************************************************************************/ -/** Loads a core compressed keyframe instance. +/* Loads a core compressed keyframe instance. * * This function loads a core compressed keyframe instance from a data source. * diff --git a/include/osgTerrain/Terrain b/include/osgTerrain/Terrain index 9f7fa1c3a..2bdc312d8 100644 --- a/include/osgTerrain/Terrain +++ b/include/osgTerrain/Terrain @@ -64,7 +64,7 @@ class OSGTERRAIN_EXPORT Terrain : public osg::Group /** Get the const TerrainTile for a given TileID.*/ const TerrainTile* getTile(const TileID& tileID) const; - /** Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from..*/ + /** Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from.*/ void setTerrainTechniquePrototype(TerrainTechnique* technique) { _terrainTechnique = technique; } /** Get the TerrainTechnique prototype */ diff --git a/include/osgUtil/DrawElementTypeSimplifier b/include/osgUtil/DrawElementTypeSimplifier index 0737d9fd5..974772f85 100644 --- a/include/osgUtil/DrawElementTypeSimplifier +++ b/include/osgUtil/DrawElementTypeSimplifier @@ -32,7 +32,7 @@ class OSGUTIL_EXPORT DrawElementTypeSimplifierVisitor : public osg::NodeVisitor { public: - META_NodeVisitor("osgUtil","DrawElementTypeSimplifierVisitor") + META_NodeVisitor("osgUtil","DrawElementTypeSimplifierVisitor"); void apply(osg::Geode& node); }; diff --git a/include/osgWidget/Browser b/include/osgWidget/Browser index d19678cd9..d70263923 100644 --- a/include/osgWidget/Browser +++ b/include/osgWidget/Browser @@ -42,7 +42,7 @@ class OSGWIDGET_EXPORT BrowserManager : public osg::Object virtual ~BrowserManager(); - META_Object(osgWidget,BrowserManager) + META_Object(osgWidget,BrowserManager); std::string _application; };