Rev 697 | Rev 739 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 697 | Rev 705 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | /// get a full access pointer to internal data
|
47 | /// get a full access pointer to internal data
|
48 | float *data() { return m_data; } |
48 | float *data() { return m_data; } |
49 | /// get pointer to the element after the last element (iterator style)
|
49 | /// get pointer to the element after the last element (iterator style)
|
50 | const float *end() const { return &m_data[m_size*m_size]; } |
50 | const float *end() const { return &m_data[m_size*m_size]; } |
51 | /// get pointer to data item with indices x and y
|
51 | /// get pointer to data item with indices x and y
|
52 | float *data(const int x, const int y) const { return m_data + index(x,y); } |
- | |
- | 52 | inline float *data(const int x, const int y) const { return m_data + index(x,y); } |
|
53 | void setData(const int x, const int y, const float value) { *data(x,y) = value; } |
53 | void setData(const int x, const int y, const float value) { *data(x,y) = value; } |
54 | /// get index (e.g. for data()[index]) for indices x and y
|
54 | /// get index (e.g. for data()[index]) for indices x and y
|
55 | int index(const int x, const int y) const { return y*m_size + x; } |
- | |
- | 55 | inline int index(const int x, const int y) const { return y*m_size + x; } |
|
- | 56 | /// retrieve the value of the stamp at given indices x and y
|
|
56 | inline float operator()(const int x, const int y) const { return *data(x,y); } |
57 | inline float operator()(const int x, const int y) const { return *data(x,y); } |
57 | inline float offsetValue(const int x, const int y, const int offset) const { return *data(x+offset, y+offset); } |
58 | inline float offsetValue(const int x, const int y, const int offset) const { return *data(x+offset, y+offset); } |
58 | const Stamp *reader() const { return m_reader; } |
59 | const Stamp *reader() const { return m_reader; } |
59 | void setReader(Stamp *reader) { m_reader = reader; setCrownRadius(reader->crownRadius()); /*calculates also the Area*/ } |
60 | void setReader(Stamp *reader) { m_reader = reader; setCrownRadius(reader->crownRadius()); /*calculates also the Area*/ } |
60 | 61 |