Subversion Repositories public iLand

Rev

Rev 705 | Rev 779 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 705 Rev 739
Line 50... Line 50...
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
    inline 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
    inline 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 {  Q_ASSERT(y*m_size + x < m_size*m_size); return y*m_size + x; }
56
    /// retrieve the value of the stamp at given indices x and y
56
    /// retrieve the value of the stamp at given indices x and y
57
    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); }
58
    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); }
59
    const Stamp *reader() const { return m_reader; }
59
    const Stamp *reader() const { return m_reader; }
60
    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*/ }