* @brief Key component of the guiding libary which holds the spatio-directional guiding information * (e.g., approximation of the incoming radiance field) for a scene. * * This class is responsible for storing, learning and accessing the guiding information for a scene. * This information can be the incidence radiance field across the whole scene learned from several training * iterations dur
| 30 | * for the local incident radiance distribution. |
| 31 | */ |
| 32 | struct Field |
| 33 | { |
| 34 | /** |
| 35 | * @brief Creates a new guiding field. |
| 36 | * |
| 37 | * @param device The Device defining the compute architecture and optimization of the Field implementation. |
| 38 | * @param args The configuration of the Field (e.g., spatial or directional representation). |
| 39 | */ |
| 40 | Field(Device *device, const FieldConfig &args); |
| 41 | |
| 42 | /** |
| 43 | * @brief Creates/Loads a guiding field from a file. |
| 44 | * |
| 45 | * @param device The Device defining the compute architecture and optimization of the Field implementation. |
| 46 | * @param fieldFileName The location of the file the Field is loaded from. |
| 47 | */ |
| 48 | Field(Device *device, const std::string &fieldFileName); |
| 49 | |
| 50 | ~Field(); |
| 51 | |
| 52 | Field(const Field &) = delete; |
| 53 | |
| 54 | /** |
| 55 | * @brief Stores Field as serialized representation to file on disk |
| 56 | * |
| 57 | * @param fieldFileName path where to store serialized representation |
| 58 | * @return if field could be stored to file |
| 59 | */ |
| 60 | bool Store(const std::string &fieldFileName) const; |
| 61 | |
| 62 | /** |
| 63 | * @brief Sets the bounding box of the scenes. |
| 64 | * |
| 65 | * Sets the bounding box of the scene. This bounding box is used as |
| 66 | * bounds for the spatial subdivision structures for the surface and |
| 67 | * volume guiding fields. If no scene bounding box is set before |
| 68 | * @ref Update is called the first time the scene bounds are estimated |
| 69 | * using the first sample batch. |
| 70 | * @param bounds |
| 71 | */ |
| 72 | void SetSceneBounds(const pgl_box3f &bounds); |
| 73 | |
| 74 | /** |
| 75 | * @brief Get the bounding box of the scene/ |
| 76 | * |
| 77 | * The returned bounding box merges the bounds for the surface field and |
| 78 | * the volume field. |
| 79 | * |
| 80 | * @return pgl_box3f |
| 81 | */ |
| 82 | pgl_box3f GetSceneBounds() const; |
| 83 | |
| 84 | /** |
| 85 | * @brief Updates the current approximation of the surface and radiance fields. |
| 86 | * |
| 87 | * @param sampleStorage |
| 88 | */ |
| 89 | void Update(const SampleStorage &sampleStorage); |
nothing calls this directly
no outgoing calls
no test coverage detected