36 #ifndef PROFILEEMPTY_OBJECT_H
37 #define PROFILEEMPTY_OBJECT_H
99 radiusTop(radTop), radiusBottom(radBot)
122 { radiusBottom = radii[rIndex++];
123 radiusTop = radii[rIndex++];
139 virtual int class_size()
const
150 {
return GeoTessProfileType::EMPTY; };
156 {
return (GeoTessProfile::operator==(p) &&
166 int attributeIndex,
double radius,
167 bool allowRadiusOutOfRange)
const;
177 virtual double getValue(
int attributeIndex,
int nodeIndex)
const
178 {
return NaN_DOUBLE; }
190 virtual bool isNaN(
int nodeIndex,
int attributeIndex)
202 virtual double getValueTop(
int attributeIndex)
const
214 virtual double getValueBottom(
int attributeIndex)
const
223 virtual float getRadius(
int i)
const
224 {
return i == 0 ? radiusBottom : radiusTop; };
239 virtual float* getRadii()
240 {
float* fa =
new float [2]; fa[0] = radiusBottom; fa[1] = radiusTop;
return fa; };
261 virtual void setData(
const vector<GeoTessData*>& inData)
268 virtual void setRadii(
const vector<float>& newRadii)
269 { radiusBottom = newRadii[0]; radiusTop = newRadii[1]; }
271 virtual void setRadius(
int index,
float radius)
276 radiusBottom = radius;
332 { ofs.
writeInt(GeoTessProfileType::EMPTY.ordinal());
347 virtual int findClosestRadiusIndex(
double radius)
const
348 {
return abs(radiusTop - radius) < abs(radiusBottom - radius) ? 1 : 0; }
358 virtual void setPointIndex(
int nodeIndex,
int pointIndex)
381 virtual int getPointIndex(
int nodeIndex)
const
391 virtual void getWeights(map<int, double>& weights,
392 double dkm,
double radius,
double hcoefficient)
const
401 virtual void getCoefficients(map<int, double>& coefficients,
double radius,
402 double horizontalCoefficient)
const
408 vector<int>& nodeIndexes, vector<double>& coefficients,
409 double& radius,
bool& allowOutOfRange)
412 nodeIndexes.push_back(0);
413 coefficients.push_back(NaN_DOUBLE);
433 #endif // PROFILEEMPTY_OBJECT_H