Blender V5.0
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
13
15
16BVHHIPRT::BVHHIPRT(const BVHParams &params,
17 const vector<Geometry *> &geometry,
18 const vector<Object *> &objects,
19 Device *in_device)
20 : BVH(params, geometry, objects),
21 hiprt_geom(nullptr),
22 custom_primitive_bound(in_device, "Custom Primitive Bound", MEM_READ_ONLY),
23 triangle_index(in_device, "HIPRT Triangle Index", MEM_READ_ONLY),
24 vertex_data(in_device, "vertex_data", MEM_READ_ONLY),
25 device(in_device)
26{
27 triangle_mesh = {nullptr};
28 custom_prim_aabb = {nullptr};
29}
30
31BVHHIPRT::~BVHHIPRT()
32{
33 custom_primitive_bound.free();
34 triangle_index.free();
35 vertex_data.free();
36 device->release_bvh(this);
37}
38
40
41#endif
Definition bvh/bvh.h:67
@ MEM_READ_ONLY
#define CCL_NAMESPACE_END
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]