16 #ifndef C4FOWLIGHTSECTION_H
17 #define C4FOWLIGHTSECTION_H
67 void Prune(int32_t reach);
70 void Dirty(int32_t reach);
78 template <
class T> T transDX(T dx, T dy)
const;
79 template <
class T> T transDY(T dx, T dy)
const;
80 template <
class T> T transX(T x, T y)
const;
81 template <
class T> T transY(T x, T y)
const;
84 template <
class T> T rtransDX(T dx, T dy)
const;
85 template <
class T> T rtransDY(T dx, T dy)
const;
86 template <
class T> T rtransX(T x, T y)
const;
87 template <
class T> T rtransY(T x, T y)
const;
90 void transTriangles(std::list<C4FoWBeamTriangle> &triangles)
const;
94 C4Rect Rect(rtransX(r.
x, r.
y), rtransY(r.
x, r.
y),
100 bool isConsistent()
const;
106 inline int32_t RectLeftMostX(
const C4Rect &r)
const {
return r.
x; }
107 inline int32_t RectLeftMostY(
const C4Rect &r)
const {
return std::max(0, r.
x >= 0 ? r.
y + r.
Hgt : r.
y); }
112 inline int32_t RectRightMostX(
const C4Rect &r)
const {
return r.
x + r.
Wdt; }
113 inline int32_t RectRightMostY(
const C4Rect &r)
const {
return std::max(0, r.
x + r.
Wdt <= 0 ? r.
y + r.
Hgt : r.
y); }
115 inline void LightBallExtremePoint(
float x,
float y,
float dir,
float &lightX,
float &lightY)
const;
119 inline void LightBallRightMostPoint(
float x,
float y,
float &lightX,
float &lightY)
const;
123 inline void LightBallLeftMostPoint(
float x,
float y,
float &lightX,
float &lightY)
const;
127 C4FoWBeam *FindBeamLeftOf(int32_t x, int32_t y)
const;
void CompileFunc(StdCompiler *pComp)
C4FoWLightSection(C4FoWLight *pLight, int r)
void Prune(int32_t reach)
void Dirty(int32_t reach)
std::list< C4FoWBeamTriangle > CalculateTriangles(C4FoWRegion *region) const
void Invalidate(C4Rect r)