12 double saturate = -1.,
26 void Add(
double x,
double y,
double weight = 1.,
bool bNormalize =
false) {
27 int x1 = (int)(x + 0.5);
28 int y1 = (int)(y + 0.5);
34 cout <<
"ERROR: x is out of bounds: " << x << endl;
37 if (y1 < 0 || y1 >
m_dens[0].isize()) {
38 cout <<
"ERROR: y is out of bounds: " << y << endl;
50 double pointsPerPixel) {
54 for (j=0; j<d.
isize(); j++) {
56 double x1 = where.first + pointsPerPixel*(double)i;
57 double y1 = where.second + pointsPerPixel*(double)(j+1);
58 double x2 = where.first + pointsPerPixel*(double)(i+1);
59 double y2 = where.second + pointsPerPixel*(double)j;
Definition: Whiteboard.h:154
double m_saturate
Definition: Density.h:81
color m_mi
Definition: Density.h:84
void Add(graphic *g)
Definition: Whiteboard.h:162
pair< double, double > xy_coords
Definition: Whiteboard.h:30
color m_hi
Definition: Density.h:85
int isize() const
Definition: SVector.h:19
File holding the base drawing classes of the whiteboard.
void Add(double x, double y, double weight=1., bool bNormalize=false)
Definition: Density.h:26
void Draw(ns_whiteboard::whiteboard &board, const ns_whiteboard::xy_coords &where, double pointsPerPixel)
Definition: Density.h:48
Definition: Whiteboard.h:319
Density(int nX, int nY, double saturate=-1., const color &low=color(0.99, 0.99, 0.99), const color &mid=color(0.99, 0.99, 0), const color &hi=color(0.99, 0., 0.))
Definition: Density.h:11
svec< svec< double > > m_dens
Definition: Density.h:80
color m_lo
Definition: Density.h:83
color GradientMult(double val, const color &neg, const color &pos, const color &back=color(0.99, 0.99, 0.99))
Definition: Color.h:106
double m_max
Definition: Density.h:82