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
148 {
return GeoTessProfileType::EMPTY; };
154 {
return (GeoTessProfile::operator==(p) &&
164 int attributeIndex,
double radius,
165 bool allowRadiusOutOfRange)
const;
175 virtual double getValue(
int attributeIndex,
int nodeIndex)
const
176 {
return NaN_DOUBLE; }
188 virtual bool isNaN(
int nodeIndex,
int attributeIndex)
200 virtual double getValueTop(
int attributeIndex)
const
212 virtual double getValueBottom(
int attributeIndex)
const
221 virtual float getRadius(
int i)
const
222 {
return i == 0 ? radiusBottom : radiusTop; };
237 virtual float* getRadii()
238 {
float* fa =
new float [2]; fa[0] = radiusBottom; fa[1] = radiusTop;
return fa; };
259 virtual void setData(
const vector<GeoTessData*>& inData)
266 virtual void setRadii(
const vector<float>& newRadii)
267 { radiusBottom = newRadii[0]; radiusTop = newRadii[1]; }
318 { ofs.
writeInt(GeoTessProfileType::EMPTY.ordinal());
333 virtual int findClosestRadiusIndex(
double radius)
const
334 {
return abs(radiusTop - radius) < abs(radiusBottom - radius) ? 1 : 0; }
344 virtual void setPointIndex(
int nodeIndex,
int pointIndex)
367 virtual int getPointIndex(
int nodeIndex)
const
377 virtual void getWeights(map<int, double>& weights,
378 double dkm,
double radius,
double hcoefficient)
const
387 virtual void getCoefficients(map<int, double>& coefficients,
double radius,
388 double horizontalCoefficient)
const
394 vector<int>& nodeIndexes, vector<double>& coefficients,
395 double& radius,
bool& allowOutOfRange)
398 nodeIndexes.push_back(0);
399 coefficients.push_back(NaN_DOUBLE);
419 #endif // PROFILEEMPTY_OBJECT_H