| 28 | : texture(texture), bounds(bounds) {} |
| 29 | |
| 30 | const Vec3fa at(const size_t x, const size_t y) |
| 31 | { |
| 32 | const size_t width = texture->width; |
| 33 | const size_t height = texture->height; |
| 34 | const Color4 c = texture->get(x,y); |
| 35 | const Vec2f p(x/float(width-1),y/float(height-1)); |
| 36 | const float px = p.x*(bounds.upper.x-bounds.lower.x) + bounds.lower.x; |
| 37 | const float py = c.r*(bounds.upper.y-bounds.lower.y) + bounds.lower.y; |
| 38 | const float pz = p.y*(bounds.upper.z-bounds.lower.z) + bounds.lower.z; |
| 39 | return Vec3fa(px,py,pz); |
| 40 | } |
| 41 | |
| 42 | const AffineSpace3fa get(Vec2f p) |
| 43 | { |
no test coverage detected