OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConvexPlanarOccluder.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSG_CONVEXPLANAROCCLUDER
15 #define OSG_CONVEXPLANAROCCLUDER 1
16 
17 #include <osg/ConvexPlanarPolygon>
18 #include <osg/Object>
19 
20 namespace osg {
21 
22 class OccluderVolume;
23 
26 {
27 
28  public:
29 
32  Object(cpo,copyop),
33  _occluder(cpo._occluder),
34  _holeList(cpo._holeList) {}
35 
37 
38  void setOccluder(const ConvexPlanarPolygon& cpp) { _occluder = cpp; }
39 
40  ConvexPlanarPolygon& getOccluder() { return _occluder; }
41 
42  const ConvexPlanarPolygon& getOccluder() const { return _occluder; }
43 
44 
45 
46  typedef std::vector<ConvexPlanarPolygon> HoleList;
47 
48  void addHole(const ConvexPlanarPolygon& cpp) { _holeList.push_back(cpp); }
49 
50  void setHoleList(const HoleList& holeList) { _holeList=holeList; }
51 
52  HoleList& getHoleList() { return _holeList; }
53 
54  const HoleList& getHoleList() const { return _holeList; }
55 
56  protected:
57 
58  ~ConvexPlanarOccluder(); // {}
59 
61  HoleList _holeList;
62 
63 };
64 
65 } // end of namespace
66 
67 #endif
ConvexPlanarPolygon _occluder
#define OSG_EXPORT
Definition: Export.h:43
ConvexPlanarOccluder(const ConvexPlanarOccluder &cpo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
void setHoleList(const HoleList &holeList)
void setOccluder(const ConvexPlanarPolygon &cpp)
std::vector< ConvexPlanarPolygon > HoleList
#define META_Object(library, name)
Definition: Object.h:42
void addHole(const ConvexPlanarPolygon &cpp)
Definition: AlphaFunc.h:19
const ConvexPlanarPolygon & getOccluder() const
const HoleList & getHoleList() const
ConvexPlanarPolygon & getOccluder()