Skip to content

Commit

Permalink
Merge pull request xarray#14 from AdriCS/master
Browse files Browse the repository at this point in the history
Fix for issue xarray#13
  • Loading branch information
xarray committed Oct 27, 2014
2 parents e087535 + 0d779df commit 6cb9a58
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions cookbook/chapter2/ch02_03/bounding_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,6 @@ int main( int argc, char** argv )

osgViewer::Viewer viewer;
viewer.setSceneData( root.get() );

return viewer.run();
}
7 changes: 6 additions & 1 deletion cookbook/chapter3/ch03_03/NurbsSurface
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define H_COOKBOOK_CH3_NURBSSURFACE

#include <osg/Drawable>
#include <osg/Version>

class NurbsSurface : public osg::Drawable
{
Expand Down Expand Up @@ -43,8 +44,12 @@ public:
void setOrders( int s, int t ) { _sOrder = s; _tOrder = t; }
int getSOrder() const { return _sOrder; }
int getTOrder() const { return _tOrder; }


#if OSG_VERSION_GREATER_THAN(3,2,1)
virtual osg::BoundingBox computeBoundingBox() const;
#else
virtual osg::BoundingBox computeBound() const;
#endif

virtual void drawImplementation( osg::RenderInfo& renderInfo ) const;

Expand Down
4 changes: 4 additions & 0 deletions cookbook/chapter3/ch03_03/NurbsSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ NurbsSurface::~NurbsSurface()
{
}

#if OSG_VERSION_GREATER_THAN(3,2,1)
osg::BoundingBox NurbsSurface::computeBoundingBox() const
#else
osg::BoundingBox NurbsSurface::computeBound() const
#endif
{
osg::BoundingBox bb;
if ( _vertices.valid() )
Expand Down
8 changes: 7 additions & 1 deletion cookbook/chapter6/ch06_09/CloudBlock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define H_COOKBOOK_CH6_CLOUDBLOCK

#include <osg/Drawable>
#include <osg/Version>

class CloudBlock : public osg::Drawable
{
Expand Down Expand Up @@ -53,8 +54,13 @@ public:
void setCloudCells( const CloudCells& cells ) { _cells = cells; dirtyBound(); }
CloudCells& getCloudCells() { return _cells; }
const CloudCells& getCloudCells() const { return _cells; }


#if OSG_VERSION_GREATER_THAN(3,2,1)
virtual osg::BoundingBox computeBoundingBox() const;
#else
virtual osg::BoundingBox computeBound() const;
#endif

virtual void drawImplementation( osg::RenderInfo& renderInfo ) const;

protected:
Expand Down
4 changes: 4 additions & 0 deletions cookbook/chapter6/ch06_09/CloudBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ CloudBlock::CloudBlock( const CloudBlock& copy, const osg::CopyOp& copyop )
{
}

#if OSG_VERSION_GREATER_THAN(3,2,1)
osg::BoundingBox CloudBlock::computeBoundingBox() const
#else
osg::BoundingBox CloudBlock::computeBound() const
#endif
{
osg::BoundingBox bb;
for ( CloudCells::const_iterator itr=_cells.begin(); itr!=_cells.end(); ++itr )
Expand Down

0 comments on commit 6cb9a58

Please sign in to comment.