Skip to content
Snippets Groups Projects
Commit e1d84617 authored by Karsten Rink's avatar Karsten Rink
Browse files

Merge pull request #364 from norihiro-w/add-getGeoType

add getGeoType() to GeoObject class and its child classes
parents 59594b47 55c410b3
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@
#ifndef GEOOBJECT_H_
#define GEOOBJECT_H_
#include "GeoType.h"
namespace GeoLib
{
class GeoObject
......@@ -23,6 +25,9 @@ class GeoObject
public:
GeoObject() {}
virtual ~GeoObject() {}
/// return a geometry type
virtual GEOTYPE getGeoType() const = 0;
};
} // end namespace GeoLib
......
......@@ -48,6 +48,9 @@ public:
GeoPoint (T const* x) :
MathLib::TemplatePoint<T>(x), GeoObject()
{}
/// return a geometry type
virtual GEOTYPE getGeoType() const {return GEOTYPE::POINT;}
};
typedef GeoLib::GeoPoint<double> Point;
......
......@@ -60,6 +60,9 @@ public:
virtual ~Polyline() {}
/// return a geometry type
virtual GEOTYPE getGeoType() const {return GEOTYPE::POLYLINE;}
/** write the points to the stream */
void write(std::ostream &os) const;
......
......@@ -38,6 +38,9 @@ public:
Surface (const std::vector<Point*> &pnt_vec);
virtual ~Surface ();
/// return a geometry type
virtual GEOTYPE getGeoType() const {return GEOTYPE::SURFACE;}
/**
* adds three indices describing a triangle and updates the bounding box
* */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment