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]; }
269 virtual void setRadius(
int index,
float radius)
274 radiusBottom = radius;
330 { ofs.
writeInt(GeoTessProfileType::EMPTY.ordinal());
345 virtual int findClosestRadiusIndex(
double radius)
const
346 {
return abs(radiusTop - radius) < abs(radiusBottom - radius) ? 1 : 0; }
356 virtual void setPointIndex(
int nodeIndex,
int pointIndex)
379 virtual int getPointIndex(
int nodeIndex)
const
389 virtual void getWeights(map<int, double>& weights,
390 double dkm,
double radius,
double hcoefficient)
const
399 virtual void getCoefficients(map<int, double>& coefficients,
double radius,
400 double horizontalCoefficient)
const
406 vector<int>& nodeIndexes, vector<double>& coefficients,
407 double& radius,
bool& allowOutOfRange)
410 nodeIndexes.push_back(0);
411 coefficients.push_back(NaN_DOUBLE);
431 #endif // PROFILEEMPTY_OBJECT_H