MCPcopy Create free account
hub / github.com/RenderKit/embree / at

Method at

tutorials/convert/convert.cpp:30–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 15

runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
ReadAttributeFunction · 0.45
ReadChannelInfoFunction · 0.45
WriteChannelInfoFunction · 0.45
CompressZipFunction · 0.45
DecompressZipFunction · 0.45
CompressRleFunction · 0.45
DecompressRleFunction · 0.45

Calls 2

Vec3faClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected