40 C4FoWBeam(int32_t iLeftX, int32_t iLeftY, int32_t iRightX, int32_t iRightY)
41 : iLeftX(iLeftX), iLeftY(iLeftY), iRightX(iRightX), iRightY(iRightY),
42 iLeftEndY(0), iRightEndY(0),
49 int32_t iLeftX, iLeftY;
50 int32_t iRightX, iRightY;
51 int32_t iLeftEndY, iRightEndY;
63 inline int32_t
getLeftX(int32_t y)
const {
return iLeftX * y / iLeftY; }
64 inline int32_t
getRightX(int32_t y)
const {
return iRightX * y / iRightY; }
65 inline float getLeftXf(int32_t y)
const {
return (iLeftX * y) / float(iLeftY); }
66 inline float getRightXf(int32_t y)
const {
return (iRightX * y) / float(iRightY); }
78 bool isLeft(int32_t x, int32_t y)
const {
79 return iLeftX * y > x * iLeftY;
83 bool isRight(int32_t x, int32_t y)
const {
84 return iRightX * y < x * iRightY;
92 void SetLeft(int32_t x, int32_t y) { iLeftX = x; iLeftY = y; }
93 void SetRight(int32_t x, int32_t y) { iRightX = x; iRightY = y; }
123 void Clean(int32_t y);
127 void Dirty(int32_t y);
131 void Prune(int32_t y);
bool isInside(int32_t x, int32_t y) const
int32_t getRightX(int32_t y) const
bool EliminateRight(int32_t x, int32_t y)
float getLeftXf(int32_t y) const
C4FoWBeam(int32_t iLeftX, int32_t iLeftY, int32_t iRightX, int32_t iRightY)
int32_t getRightEndY() const
C4FoWBeam * getNext() const
int32_t getLeftEndX() const
bool isRight(int32_t x, int32_t y) const
void CompileFunc(StdCompiler *pComp)
int32_t getLeftEndY() const
void setNext(C4FoWBeam *next)
StdStrBuf getDesc() const
float getRightXf(int32_t y) const
bool MergeRight(int32_t x, int32_t y)
float getLeftEndXf() const
int32_t getLeftX(int32_t y) const
bool MergeLeft(int32_t x, int32_t y)
C4FoWBeam * Split(int32_t x, int32_t y)
void SetLeft(int32_t x, int32_t y)
float getRightEndXf() const
void SetRight(int32_t x, int32_t y)
int32_t getRightEndX() const
bool isLeft(int32_t x, int32_t y) const