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

Method get

tutorials/common/tutorial/tutorial.h:46–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 Ty get() const
47 {
48 if (values.size() == 0) return zero;
49 double t_begin = values[0].first-dt;
50
51 Ty sum(zero);
52 size_t num(0);
53 for (size_t i=0; i<values.size(); i++) {
54 if (values[i].first >= t_begin) {
55 sum += values[i].second;
56 num++;
57 }
58 }
59 if (num == 0) return 0;
60 else return sum/Ty(num);
61 }
62
63 std::deque<std::pair<double,Ty>> values;
64 size_t N;

Callers 13

set_sceneMethod · 0.45
displayFuncMethod · 0.45
mainMethod · 0.45
CommandLineMethod · 0.45
addMethod · 0.45
ISPCSceneMethod · 0.45
convertLightMethod · 0.45
ISPCInstanceMethod · 0.45
ISPCInstanceArrayMethod · 0.45
UpdateSceneFunction · 0.45
get1fFunction · 0.45
get3fFunction · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected