OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ossimGeoAnnotationLineObject Class Reference

#include <ossimGeoAnnotationLineObject.h>

Inheritance diagram for ossimGeoAnnotationLineObject:
ossimGeoAnnotationObject ossimAnnotationObject ossimObject ossimReferenced

Public Member Functions

 ossimGeoAnnotationLineObject (const ossimGpt &start, const ossimGpt &end, unsigned char r=255, unsigned char g=255, unsigned char b=255, long thickness=1)
 
 ossimGeoAnnotationLineObject (const ossimGeoAnnotationLineObject &rhs)
 
virtual ossimObjectdup () const
 
virtual void applyScale (double x, double y)
 
virtual void transform (ossimImageGeometry *projection)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool intersects (const ossimDrect &rect) const
 
virtual ossimAnnotationObjectgetNewClippedObject (const ossimDrect &rect) const
 
virtual void draw (ossimRgbImage &anImage) const
 
virtual void getBoundingRect (ossimDrect &rect) const
 
virtual void computeBoundingRect ()
 
- Public Member Functions inherited from ossimGeoAnnotationObject
 ossimGeoAnnotationObject (unsigned char r=255, unsigned char g=255, unsigned char b=255, long thickness=1)
 
 ossimGeoAnnotationObject (const ossimGeoAnnotationObject &rhs)
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Saves the current state of this object. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
- Public Member Functions inherited from ossimAnnotationObject
virtual ~ossimAnnotationObject ()
 
 ossimAnnotationObject (ossim_uint8 r=255, ossim_uint8 g=255, ossim_uint8 b=255, ossim_uint8 thickness=1)
 
virtual void applyScale (const ossimDpt &scale)
 
virtual ossimDrect getBoundingRect () const
 
virtual void setColor (ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
 
void getColor (ossim_uint8 &r, ossim_uint8 &g, ossim_uint8 &b) const
 
ossim_uint8 getThickness () const
 
virtual void setThickness (ossim_uint8 thickness)
 
virtual bool isPointWithin (const ossimDpt &imagePoint) const
 
virtual ossimString getName () const
 
virtual void setName (const ossimString &name)
 
ossim_uint32 getId () const
 
virtual ossim_uint32 setId ()
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Protected Member Functions

virtual ~ossimGeoAnnotationLineObject ()
 
- Protected Member Functions inherited from ossimGeoAnnotationObject
virtual ~ossimGeoAnnotationObject ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

ossimAnnotationLineObjecttheProjectedLineObject
 
ossimGpt theStart
 
ossimGpt theEnd
 
- Protected Attributes inherited from ossimAnnotationObject
ossim_uint8 theRed
 
ossim_uint8 theGreen
 
ossim_uint8 theBlue
 
ossim_uint8 theThickness
 
ossimString theName
 
ossim_uint32 theId
 

Additional Inherited Members

- Static Public Member Functions inherited from ossimAnnotationObject
static ossim_uint32 getNextId ()
 
static void restIdCounter ()
 
- Static Protected Attributes inherited from ossimAnnotationObject
static ossim_uint32 theIdCounter = 0
 

Detailed Description

Definition at line 17 of file ossimGeoAnnotationLineObject.h.

Constructor & Destructor Documentation

◆ ossimGeoAnnotationLineObject() [1/2]

ossimGeoAnnotationLineObject::ossimGeoAnnotationLineObject ( const ossimGpt start,
const ossimGpt end,
unsigned char  r = 255,
unsigned char  g = 255,
unsigned char  b = 255,
long  thickness = 1 
)

Referenced by dup().

◆ ossimGeoAnnotationLineObject() [2/2]

ossimGeoAnnotationLineObject::ossimGeoAnnotationLineObject ( const ossimGeoAnnotationLineObject rhs)

Definition at line 40 of file ossimGeoAnnotationLineObject.cpp.

◆ ~ossimGeoAnnotationLineObject()

ossimGeoAnnotationLineObject::~ossimGeoAnnotationLineObject ( )
protectedvirtual

Definition at line 50 of file ossimGeoAnnotationLineObject.cpp.

References theProjectedLineObject.

51 {
53  {
56  }
57 }
ossimAnnotationLineObject * theProjectedLineObject

Member Function Documentation

◆ applyScale()

void ossimGeoAnnotationLineObject::applyScale ( double  x,
double  y 
)
virtual

Implements ossimAnnotationObject.

Definition at line 64 of file ossimGeoAnnotationLineObject.cpp.

References ossimAnnotationLineObject::applyScale(), ossimGpt::latd(), ossimGpt::lond(), theEnd, theProjectedLineObject, theStart, x, and y.

65 {
68  theEnd.lond(theEnd.lond()*x);
69  theEnd.latd(theEnd.latd()*y);
70 
72  {
74  }
75 }
ossim_uint32 x
virtual void applyScale(double x, double y)
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
ossim_uint32 y
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
ossimAnnotationLineObject * theProjectedLineObject

◆ computeBoundingRect()

void ossimGeoAnnotationLineObject::computeBoundingRect ( )
virtual

◆ draw()

void ossimGeoAnnotationLineObject::draw ( ossimRgbImage anImage) const
virtual

Implements ossimAnnotationObject.

Definition at line 98 of file ossimGeoAnnotationLineObject.cpp.

References ossimAnnotationLineObject::draw(), and theProjectedLineObject.

99 {
100  theProjectedLineObject->draw(anImage);
101 }
virtual void draw(ossimRgbImage &anImage) const
ossimAnnotationLineObject * theProjectedLineObject

◆ dup()

ossimObject * ossimGeoAnnotationLineObject::dup ( ) const
virtual

Reimplemented from ossimObject.

Definition at line 59 of file ossimGeoAnnotationLineObject.cpp.

References ossimGeoAnnotationLineObject().

60 {
61  return new ossimGeoAnnotationLineObject(*this);
62 }
ossimGeoAnnotationLineObject(const ossimGpt &start, const ossimGpt &end, unsigned char r=255, unsigned char g=255, unsigned char b=255, long thickness=1)

◆ getBoundingRect()

void ossimGeoAnnotationLineObject::getBoundingRect ( ossimDrect rect) const
virtual

Implements ossimAnnotationObject.

Definition at line 126 of file ossimGeoAnnotationLineObject.cpp.

References ossimAnnotationLineObject::getBoundingRect(), and theProjectedLineObject.

127 {
129 }
virtual void getBoundingRect(ossimDrect &rect) const
ossimAnnotationLineObject * theProjectedLineObject

◆ getNewClippedObject()

ossimAnnotationObject * ossimGeoAnnotationLineObject::getNewClippedObject ( const ossimDrect rect) const
virtual

Will allocate a new object that is clipped to the passed. in rect. Look at derived classes to see if the object is actually clipped or not. A new object is returned if it clips to the rect else NULL should be returned it doesn't clip.

Implements ossimAnnotationObject.

Definition at line 113 of file ossimGeoAnnotationLineObject.cpp.

References ossimAnnotationLineObject::getNewClippedObject(), intersects(), and theProjectedLineObject.

114 {
115  if(intersects(rect))
116  {
118  {
120  }
121  }
122 
123  return (ossimAnnotationObject*)0;
124 }
virtual ossimAnnotationObject * getNewClippedObject(const ossimDrect &rect) const
virtual bool intersects(const ossimDrect &rect) const
ossimAnnotationLineObject * theProjectedLineObject

◆ intersects()

bool ossimGeoAnnotationLineObject::intersects ( const ossimDrect rect) const
virtual

Implements ossimAnnotationObject.

Definition at line 103 of file ossimGeoAnnotationLineObject.cpp.

References ossimAnnotationLineObject::intersects(), and theProjectedLineObject.

Referenced by getNewClippedObject().

104 {
106  {
107  return theProjectedLineObject->intersects(rect);
108  }
109 
110  return false;
111 }
virtual bool intersects(const ossimDrect &rect) const
ossimAnnotationLineObject * theProjectedLineObject

◆ print()

std::ostream & ossimGeoAnnotationLineObject::print ( std::ostream &  out) const
virtual

Generic print method.

Derived classes should re-implement as they see fit.

Returns
std::ostream&

Reimplemented from ossimAnnotationObject.

Definition at line 91 of file ossimGeoAnnotationLineObject.cpp.

References theEnd, and theStart.

92 {
93  out << "start ground: " << theStart << endl;
94  out << "end ground: " << theEnd << endl;
95  return out;
96 }

◆ transform()

void ossimGeoAnnotationLineObject::transform ( ossimImageGeometry projection)
virtual

Add the projection interface to all geographically defined objects.

Implements ossimGeoAnnotationObject.

Definition at line 77 of file ossimGeoAnnotationLineObject.cpp.

References ossimAnnotationLineObject::setLine(), theEnd, theProjectedLineObject, theStart, and ossimImageGeometry::worldToLocal().

78 {
79  if(projection)
80  {
81  ossimDpt projectedStart;
82  ossimDpt projectedEnd;
83 
84  projection->worldToLocal(theStart, projectedStart);
85  projection->worldToLocal(theEnd, projectedEnd);
86 
87  theProjectedLineObject->setLine(projectedStart, projectedEnd);
88  }
89 }
void setLine(const ossimDpt &start, const ossimDpt &end)
bool worldToLocal(const ossimGpt &world_pt, ossimDpt &local_pt) const
Exposes the 3D world-to-local image coordinate reverse projection.
ossimAnnotationLineObject * theProjectedLineObject

Member Data Documentation

◆ theEnd

ossimGpt ossimGeoAnnotationLineObject::theEnd
protected

Definition at line 45 of file ossimGeoAnnotationLineObject.h.

Referenced by applyScale(), print(), and transform().

◆ theProjectedLineObject

ossimAnnotationLineObject* ossimGeoAnnotationLineObject::theProjectedLineObject
protected

◆ theStart

ossimGpt ossimGeoAnnotationLineObject::theStart
protected

Definition at line 44 of file ossimGeoAnnotationLineObject.h.

Referenced by applyScale(), print(), and transform().


The documentation for this class was generated from the following files: