OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGeoAnnotationMultiEllipseObject.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 //
7 //*************************************************************************
8 // $Id: ossimGeoAnnotationMultiEllipseObject.cpp 23239 2015-04-08 01:02:44Z gpotts $
9 
15 
18  theProjectedObject(new ossimAnnotationMultiEllipseObject()),
19  theWidthHeight(1,1),
20  theFillFlag(false)
21 {
23 }
25 {
27  {
28  delete theProjectedObject;
30  }
31 }
33  const ossimDpt& widthHeight,
34  bool enableFill,
35  unsigned char r,
36  unsigned char g,
37  unsigned char b,
38  long thickness)
39  :ossimGeoAnnotationObject(r, g, b, thickness),
40  theProjectedObject(new ossimAnnotationMultiEllipseObject(widthHeight,enableFill, r, g, b, thickness )),
41  thePointList(pointList),
42  theWidthHeight(widthHeight),
43  theFillFlag(enableFill)
44 {
45 
46 }
47 
49  bool enableFill,
50  unsigned char r,
51  unsigned char g,
52  unsigned char b,
53  long thickness)
54  :ossimGeoAnnotationObject(r, g, b,thickness),
55  theProjectedObject(new ossimAnnotationMultiEllipseObject(widthHeight,enableFill, r, g, b, thickness )),
56  theWidthHeight(widthHeight),
57  theFillFlag(enableFill)
58 {
59 }
60 
63  theProjectedObject((ossimAnnotationMultiEllipseObject*)rhs.theProjectedObject->dup()),
64  thePointList(rhs.thePointList),
65  theWidthHeight(rhs.theWidthHeight),
66  theFillFlag(rhs.theFillFlag)
67 {
68 }
69 
71  ossimImageGeometry* projection)
72 {
73  const std::vector<ossimGpt>::size_type BOUNDS = thePointList.size();
75  for(std::vector<ossimGpt>::size_type i = 0; i < BOUNDS; ++i)
76  {
77  projection->worldToLocal(thePointList[(int)i], (*theProjectedObject)[(int)i]);
78 
79  }
81 }
82 
84 {
86  theFillFlag = fillFlag;
87 }
88 
90  unsigned char g,
91  unsigned char b)
92 {
95  {
97  }
98 }
99 
101 {
104  {
105  theProjectedObject->setThickness(thickness);
106  }
107 }
108 
109 
111  double /* y */)
112 {
114  << "ossimGeoAnnotationMultiEllipseObject::applyScale NOT IMPLEMENTED"
115  << endl;
116 }
117 
119 {
120  theProjectedObject->draw(anImage);
121 }
122 
124 {
125  return theProjectedObject->intersects(rect);
126 }
127 
129 {
130  theWidthHeight = widthHeight;
131  theProjectedObject->setWidthHeight(widthHeight);
132 }
133 
135 {
137  return out;
138 }
139 
141 {
143 }
144 
146 {
148 }
149 
151 {
152  return new ossimGeoAnnotationMultiEllipseObject(*this);
153 }
154 
156  const ossimDrect& /* rect */)const
157 {
159  << "ossimGeoAnnotationMultiEllipseObject::getNewClippedObject "
160  << "NOT IMPLEMENTED" << endl;
161  return (ossimAnnotationObject*)dup();
162 }
163 
165 {
166  thePointList.push_back(point);
167 }
168 
170  const ossimGpt& point)
171 {
172  thePointList[i] = point;
173 }
174 
176 {
177  if(newSize)
178  {
179  thePointList.resize(newSize);
180  }
181 }
virtual std::ostream & print(std::ostream &out) const
Generic print method.
virtual void setThickness(ossim_uint8 thickness)
virtual void getBoundingRect(ossimDrect &rect) const
virtual bool intersects(const ossimDrect &rect) const
virtual ossimDrect getBoundingRect() const
unsigned int ossim_uint32
virtual void setWidthHeight(const ossimDpt &widthHeight)
virtual void setColor(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
virtual void setColor(unsigned char r, unsigned char g, unsigned char b)
ossimAnnotationMultiEllipseObject * theProjectedObject
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
virtual void setWidthHeight(const ossimDpt &widthHeight)
virtual void transform(ossimImageGeometry *projection)
bool worldToLocal(const ossimGpt &world_pt, ossimDpt &local_pt) const
Exposes the 3D world-to-local image coordinate reverse projection.
virtual void draw(ossimRgbImage &anImage) const
virtual ossimAnnotationObject * getNewClippedObject(const ossimDrect &rect) const
virtual bool intersects(const ossimDrect &rect) const
virtual std::ostream & print(std::ostream &out) const
Generic print method.
unsigned char ossim_uint8
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
virtual void draw(ossimRgbImage &anImage) const
virtual void setPoint(int i, const ossimGpt &point)