This commit is contained in:
@@ -114,7 +114,7 @@ void ImpostorSprite::drawImplementation(osg::RenderInfo& renderInfo) const
|
||||
gl.End();
|
||||
}
|
||||
|
||||
osg::BoundingBox ImpostorSprite::computeBound() const
|
||||
osg::BoundingBox ImpostorSprite::computeBoundingBox() const
|
||||
{
|
||||
osg::BoundingBox bbox;
|
||||
bbox.expandBy(_coords[0]);
|
||||
|
||||
@@ -174,7 +174,7 @@ void LightPointDrawable::drawImplementation(osg::RenderInfo& renderInfo) const
|
||||
#endif
|
||||
}
|
||||
|
||||
osg::BoundingBox LightPointDrawable::computeBound() const
|
||||
osg::BoundingBox LightPointDrawable::computeBoundingBox() const
|
||||
{
|
||||
osg::BoundingBox bbox;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ class OSGSIM_EXPORT LightPointDrawable : public osg::Drawable
|
||||
public :
|
||||
|
||||
LightPointDrawable();
|
||||
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
LightPointDrawable(const LightPointDrawable&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
@@ -44,7 +44,7 @@ class OSGSIM_EXPORT LightPointDrawable : public osg::Drawable
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const LightPointDrawable*>(obj)!=NULL; }
|
||||
virtual const char* className() const { return "LightPointDrawable"; }
|
||||
|
||||
|
||||
|
||||
//typedef std::pair<unsigned int,osg::Vec3> ColorPosition;
|
||||
struct ColorPosition
|
||||
{
|
||||
@@ -53,7 +53,7 @@ class OSGSIM_EXPORT LightPointDrawable : public osg::Drawable
|
||||
ColorPosition() {}
|
||||
ColorPosition(unsigned int f,const osg::Vec3& s):first(f),second(s) {}
|
||||
};
|
||||
|
||||
|
||||
void reset();
|
||||
|
||||
inline unsigned int asRGBA(const osg::Vec4& color) const
|
||||
@@ -78,7 +78,7 @@ class OSGSIM_EXPORT LightPointDrawable : public osg::Drawable
|
||||
if (pointSize>=_sizedBlendedLightPointList.size()) _sizedBlendedLightPointList.resize(pointSize+1);
|
||||
_sizedBlendedLightPointList[pointSize].push_back(ColorPosition(asRGBA(color),position));
|
||||
}
|
||||
|
||||
|
||||
/** draw LightPoints. */
|
||||
virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
|
||||
|
||||
@@ -94,21 +94,21 @@ class OSGSIM_EXPORT LightPointDrawable : public osg::Drawable
|
||||
_simulationTimeInterval = osg::clampAbove(time-_simulationTime,0.0);
|
||||
_simulationTime = time;
|
||||
}
|
||||
|
||||
|
||||
double getSimulationTime() const { return _simulationTime; }
|
||||
double getSimulationTimeInterval() const { return _simulationTimeInterval; }
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
|
||||
virtual osg::BoundingBox computeBoundingBox() const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~LightPointDrawable() {}
|
||||
|
||||
|
||||
osg::Endian _endian;
|
||||
|
||||
|
||||
double _simulationTime;
|
||||
double _simulationTimeInterval;
|
||||
|
||||
|
||||
typedef std::vector<ColorPosition> LightPointList;
|
||||
typedef std::vector<LightPointList> SizedLightPointList;
|
||||
|
||||
@@ -122,7 +122,7 @@ class OSGSIM_EXPORT LightPointDrawable : public osg::Drawable
|
||||
osg::ref_ptr<osg::BlendFunc> _blendOneMinusSrcAlpha;
|
||||
osg::ref_ptr<osg::ColorMask> _colorMaskOff;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1248,7 +1248,7 @@ void OverlayNode::traverse_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeV
|
||||
osg::BoundingSphere bs;
|
||||
for(unsigned int i=0; i<camera->getNumChildren(); ++i)
|
||||
{
|
||||
bs.expandBy(camera->getChild(i)->getBound());
|
||||
bs.expandBy(static_cast<const osg::BoundingSphere&>(camera->getChild(i)->getBound()));
|
||||
}
|
||||
|
||||
if (bs.valid())
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
void drawImplementation(osg::RenderInfo& renderInfo) const;
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
virtual osg::BoundingBox computeBoundingBox() const;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -69,7 +69,7 @@ void SphereSegment::Surface::drawImplementation(osg::RenderInfo& renderInfo) con
|
||||
_ss->Surface_drawImplementation(*renderInfo.getState());
|
||||
}
|
||||
|
||||
osg:: BoundingBox SphereSegment::Surface::computeBound() const
|
||||
osg:: BoundingBox SphereSegment::Surface::computeBoundingBox() const
|
||||
{
|
||||
osg:: BoundingBox bbox;
|
||||
_ss->Surface_computeBound(bbox);
|
||||
@@ -114,7 +114,7 @@ protected:
|
||||
}
|
||||
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
virtual osg::BoundingBox computeBoundingBox() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -126,7 +126,7 @@ void SphereSegment::EdgeLine::drawImplementation(osg::RenderInfo& renderInfo) co
|
||||
_ss->EdgeLine_drawImplementation(*renderInfo.getState());
|
||||
}
|
||||
|
||||
osg::BoundingBox SphereSegment::EdgeLine::computeBound() const
|
||||
osg::BoundingBox SphereSegment::EdgeLine::computeBoundingBox() const
|
||||
{
|
||||
osg::BoundingBox bbox;
|
||||
_ss->EdgeLine_computeBound(bbox);
|
||||
@@ -167,7 +167,7 @@ protected:
|
||||
"Warning: unexpected call to osgSim::SphereSegment::Side() copy constructor"<<std::endl;
|
||||
}
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
virtual osg::BoundingBox computeBoundingBox() const;
|
||||
|
||||
private:
|
||||
SphereSegment* _ss;
|
||||
@@ -181,7 +181,7 @@ void SphereSegment::Side::drawImplementation(osg::RenderInfo& renderInfo) const
|
||||
_ss->Side_drawImplementation(*renderInfo.getState(), _planeOrientation, _BoundaryAngle);
|
||||
}
|
||||
|
||||
osg::BoundingBox SphereSegment::Side::computeBound() const
|
||||
osg::BoundingBox SphereSegment::Side::computeBoundingBox() const
|
||||
{
|
||||
osg::BoundingBox bbox;
|
||||
_ss->Side_computeBound(bbox, _planeOrientation, _BoundaryAngle);
|
||||
@@ -230,7 +230,7 @@ protected:
|
||||
//getOrCreateStateSet()->setAttributeAndModes(new osg::LineWidth(2.0),osg::StateAttribute::OFF);
|
||||
}
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
virtual osg::BoundingBox computeBoundingBox() const;
|
||||
|
||||
private:
|
||||
SphereSegment* _ss;
|
||||
@@ -242,7 +242,7 @@ void SphereSegment::Spoke::drawImplementation(osg::RenderInfo& renderInfo) const
|
||||
_ss->Spoke_drawImplementation(*renderInfo.getState(), _azAngle, _elevAngle);
|
||||
}
|
||||
|
||||
osg::BoundingBox SphereSegment::Spoke::computeBound() const
|
||||
osg::BoundingBox SphereSegment::Spoke::computeBoundingBox() const
|
||||
{
|
||||
osg::BoundingBox bbox;
|
||||
_ss->Spoke_computeBound(bbox, _azAngle, _elevAngle);
|
||||
@@ -1049,7 +1049,7 @@ class PolytopeVisitor : public osg::NodeVisitor
|
||||
{
|
||||
for(unsigned int i=0; i<node.getNumDrawables(); ++i)
|
||||
{
|
||||
if (_polytopeStack.back().second.contains(node.getDrawable(i)->getBound()))
|
||||
if (_polytopeStack.back().second.contains(node.getDrawable(i)->getBoundingBox()))
|
||||
{
|
||||
_hits.push_back(Hit(_polytopeStack.back().first,getNodePath(),node.getDrawable(i)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user