openscenegraph
ConvexPlanarOccluder
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
18#include <osg/Object>
19
20namespace osg {
21
22class OccluderVolume;
23
26{
27
28 public:
29
31 ConvexPlanarOccluder(const ConvexPlanarOccluder& cpo,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
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
59
62
63};
64
65} // end of namespace
66
67#endif
Definition ConvexPlanarOccluder:26
HoleList _holeList
Definition ConvexPlanarOccluder:61
void setHoleList(const HoleList &holeList)
Definition ConvexPlanarOccluder:50
ConvexPlanarPolygon & getOccluder()
Definition ConvexPlanarOccluder:40
ConvexPlanarOccluder()
Definition ConvexPlanarOccluder:30
const ConvexPlanarPolygon & getOccluder() const
Definition ConvexPlanarOccluder:42
void setOccluder(const ConvexPlanarPolygon &cpp)
Definition ConvexPlanarOccluder:38
ConvexPlanarPolygon _occluder
Definition ConvexPlanarOccluder:60
ConvexPlanarOccluder(const ConvexPlanarOccluder &cpo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Definition ConvexPlanarOccluder:31
META_Object(osg, ConvexPlanarOccluder)
HoleList & getHoleList()
Definition ConvexPlanarOccluder:52
const HoleList & getHoleList() const
Definition ConvexPlanarOccluder:54
std::vector< ConvexPlanarPolygon > HoleList
Definition ConvexPlanarOccluder:46
void addHole(const ConvexPlanarPolygon &cpp)
Definition ConvexPlanarOccluder:48
Definition ConvexPlanarPolygon:25
Definition CopyOp:41
Definition Object:61
author: Julien Valentin 2017 (mp3butcher@hotmail.com)
Definition AlphaFunc:19
#define OSG_EXPORT
Definition osg/Export:39