| 23 | struct Tutorial : public TutorialApplication |
| 24 | { |
| 25 | Tutorial() |
| 26 | : TutorialApplication(NAME,FEATURES) |
| 27 | { |
| 28 | registerOption("time", [] (Ref<ParseStream> cin, const FileName& path) { |
| 29 | g_time = cin->getFloat(); |
| 30 | }, "--time <float>: time to render image at"); |
| 31 | |
| 32 | registerOption("time-steps", [] (Ref<ParseStream> cin, const FileName& path) { |
| 33 | g_num_time_steps = cin->getInt(); |
| 34 | if (g_num_time_steps < 2) throw std::runtime_error("at least 2 time steps have to be used"); |
| 35 | }, "--time-steps <int>: number of time steps to use"); |
| 36 | |
| 37 | registerOption("time-steps2", [] (Ref<ParseStream> cin, const FileName& path) { |
| 38 | g_num_time_steps2 = cin->getInt(); |
| 39 | if (g_num_time_steps2 < 2) throw std::runtime_error("at least 2 time steps have to be used"); |
| 40 | }, "--time-steps2 <int>: number of time steps to use"); |
| 41 | |
| 42 | /* set default camera */ |
| 43 | camera.from = Vec3fa(8,13,2.5); |
| 44 | camera.to = Vec3fa(0,0,2.5); |
| 45 | } |
| 46 | }; |
| 47 | } |
| 48 | |