OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimImagePolygonEvent.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: See top level LICENSE.txt.
5 //
6 // Author: Garrett Potts (gpotts@imagelinks)
7 //
8 //*************************************************************************
9 // $Id: ossimImagePolygonEvent.h 13016 2008-06-10 16:06:58Z dburken $
10 #ifndef ossimImagePolygonEvent_HEADER
11 #define ossimImagePolygonEvent_HEADER
12 #include <vector>
13 #include <ossim/base/ossimEvent.h>
15 #include <ossim/base/ossimIpt.h>
16 #include <ossim/base/ossimDpt.h>
17 
18 
20 {
21 public:
22  ossimImagePolygonEvent(const std::vector<ossimIpt>& polygon,
23  ossimObject* obj=0)
25  thePolygon(polygon)
26  {
27  }
28 
29  ossimImagePolygonEvent(const std::vector<ossimDpt>& polygon,
30  ossimObject* obj=0)
32  thePolygon(polygon.size())
33  {
34  for (std::vector<ossimDpt>::size_type i = 0; i < polygon.size(); ++i)
35  {
36  thePolygon[i] = polygon[i];
37  }
38  }
39  virtual ossimObject* dup()const
40  {
41  return new ossimImagePolygonEvent(*this);
42  }
43 
44  const std::vector<ossimIpt>& getpolygon()const
45  {
46  return thePolygon;
47  }
48  const std::vector<ossimIpt>& getPolygon()const
49  {
50  return thePolygon;
51  }
52  void setPolygon(const std::vector<ossimIpt>& polygon)
53  {
54  thePolygon = polygon;
55  }
56  void setPolygon(const std::vector<ossimDpt>& polygon)
57  {
58  thePolygon.resize(polygon.size());
59  for (std::vector<ossimDpt>::size_type i = 0; i < polygon.size(); ++i)
60  {
61  thePolygon[i] = polygon[i];
62  }
63  }
64 
65 protected:
66  std::vector<ossimIpt> thePolygon;
67 
68 };
69 
70 #endif
#define OSSIMDLLEXPORT
void setPolygon(const std::vector< ossimDpt > &polygon)
std::vector< ossimIpt > thePolygon
ossimImagePolygonEvent(const std::vector< ossimDpt > &polygon, ossimObject *obj=0)
yy_size_t size
void setPolygon(const std::vector< ossimIpt > &polygon)
const std::vector< ossimIpt > & getPolygon() const
virtual ossimObject * dup() const
const std::vector< ossimIpt > & getpolygon() const
#define OSSIM_EVENT_AOI_POLYGON_ID
Definition: ossimEventIds.h:36
ossimImagePolygonEvent(const std::vector< ossimIpt > &polygon, ossimObject *obj=0)