OpenSceneGraph/include/osg/ConvexPlanarOccluder
Robert Osfield 79aaac4e0c Renamed the ConvexPlaner* classes to ConvexPlanar* and changed all the various
classes that reference it.

Added MUST_READ_ME.txt to the VisualStudio directory.
2002-08-29 11:02:01 +00:00

64 lines
1.7 KiB
Plaintext

//C++ header - Open Scene Graph - Copyright (C) 1998-2002 Robert Osfield
//Distributed under the terms of the GNU Library General Public License (LGPL)
//as published by the Free Software Foundation.
#ifndef OSG_CONVEXPLANAROCCLUDER
#define OSG_CONVEXPLANAROCCLUDER 1
#include <osg/ConvexPlanarPolygon>
#include <osg/Object>
namespace osg {
class OccluderVolume;
/** A class for representing convex clipping volumes made up.
* When adding planes, their normals should point inwards (into the volume) */
class SG_EXPORT ConvexPlanarOccluder : public Object
{
public:
ConvexPlanarOccluder():Object() {}
ConvexPlanarOccluder(const ConvexPlanarOccluder& cpo,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
Object(cpo,copyop),
_occluder(cpo._occluder),
_holeList(cpo._holeList) {}
META_Object(osg,ConvexPlanarOccluder)
void setOccluder(const ConvexPlanarPolygon& cpp) { _occluder = cpp; }
ConvexPlanarPolygon& getOccluder() { return _occluder; }
const ConvexPlanarPolygon& getOccluder() const { return _occluder; }
typedef std::vector<ConvexPlanarPolygon> HoleList;
void addHole(const ConvexPlanarPolygon& cpp) { _holeList.push_back(cpp); }
HoleList& getHoleList() { return _holeList; }
const HoleList& getHoleList() const { return _holeList; }
void computeAttributes();
void computeBound(BoundingBox& bb) const;
void computeBound(BoundingSphere& bs) const;
protected:
~ConvexPlanarOccluder() {}
ConvexPlanarPolygon _occluder;
HoleList _holeList;
};
} // end of namespace
#endif