34 #ifndef _LABELPOSITION_H
35 #define _LABELPOSITION_H
103 double alpha,
double cost,
117 bool isIn(
double *bbox );
124 bool isIntersect(
double *bbox );
131 bool isInside(
double *bbox );
142 void getBoundingBox(
double amin[2],
double amax[2] )
const;
145 double getDistanceToPoint(
double xp,
double yp );
148 bool isBorderCrossingLine(
PointSet* feat );
151 int getNumPointsInPolygon(
int npol,
double *xp,
double *yp );
154 void offsetPosition(
double xOffset,
double yOffset );
174 void setProblemIds(
int probFid,
int lpId )
176 probFeat = probFid;
id = lpId;
177 if ( nextPart ) nextPart->setProblemIds( probFid, lpId );
181 char* getLayerName()
const;
187 double getCost()
const;
190 void setCost(
double newCost ) { cost = newCost; }
200 double getX(
int i = 0 )
const;
205 double getY(
int i = 0 )
const;
214 double getAlpha()
const;
228 void removeFromIndex( RTree<LabelPosition*, double, 2, double> *
index );
229 void insertIntoIndex( RTree<LabelPosition*, double, 2, double> *
index );
242 static bool costShrink(
void *l,
void *r );
243 static bool costGrow(
void *l,
void *r );
258 static bool countOverlapCallback(
LabelPosition *lp,
void *ctx );
260 static bool countFullOverlapCallback(
LabelPosition *lp,
void *ctx );
262 static bool removeOverlapCallback(
LabelPosition *lp,
void *ctx );
265 static bool polygonObstacleCallback(
PointSet *feat,
void *ctx );