5 #ifndef MERCATOR_SEGMENT_H
6 #define MERCATOR_SEGMENT_H
8 #include <Mercator/Mercator.h>
9 #include <Mercator/Matrix.h>
10 #include <Mercator/BasePoint.h>
12 #include <wfmath/vector.h>
13 #include <wfmath/axisbox.h>
27 typedef std::set<const TerrainMod *> ModList;
72 explicit Segment(
int x,
int y,
unsigned int resolution);
165 float get(
int x,
int y)
const {
170 WFMath::Vector<3> &normal)
const;
171 bool clipToSegment(
const WFMath::AxisBox<2> &bbox,
int &lx,
int &hx,
int &ly,
int &hy)
const;
184 WFMath::AxisBox<2>
getRect()
const;
187 WFMath::AxisBox<3>
getBox()
const;
198 const ModList& getMods()
const
202 int updateArea(
const Area* a);
207 void fill1d(
const BasePoint& l,
const BasePoint &h,
float *array)
const;
209 void fill2d(
const BasePoint& p1,
const BasePoint& p2,
210 const BasePoint& p3,
const BasePoint& p4);
212 float qRMD(WFMath::MTRand& rng,
float nn,
float fn,
float ff,
float nf,
213 float roughness,
float falloff,
int depth)
const;
223 #endif // MERCATOR_SEGMENT_H