Blender V4.3
hiprt.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2023 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#ifdef WITH_HIPRT
6
7# include "bvh/hiprt.h"
8
9# include "scene/mesh.h"
10# include "scene/object.h"
11
12# include "util/foreach.h"
13# include "util/progress.h"
14
16
18
19BVHHIPRT::BVHHIPRT(const BVHParams &params,
20 const vector<Geometry *> &geometry,
21 const vector<Object *> &objects,
22 Device *in_device)
23 : BVH(params, geometry, objects),
24 hiprt_geom(0),
25 custom_primitive_bound(in_device, "Custom Primitive Bound", MEM_READ_ONLY),
26 triangle_index(in_device, "HIPRT Triangle Index", MEM_READ_ONLY),
27 vertex_data(in_device, "vertex_data", MEM_READ_ONLY),
28 device(in_device)
29{
30 triangle_mesh = {0};
31 custom_prim_aabb = {0};
32}
33
34BVHHIPRT::~BVHHIPRT()
35{
36 HIPRTDevice *hiprt_device = static_cast<HIPRTDevice *>(device);
37 hiprtContext hiprt_context = hiprt_device->get_hiprt_context();
38 custom_primitive_bound.free();
39 triangle_index.free();
40 vertex_data.free();
41 hiprtDestroyGeometry(hiprt_context, hiprt_geom);
42}
43
45
46#endif
Definition bvh/bvh.h:66
@ MEM_READ_ONLY
#define CCL_NAMESPACE_END
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]