Blender V4.5
paint_test.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include "BKE_idtype.hh"
6#include "BKE_lib_id.hh"
7#include "BKE_paint_bvh.hh"
8
9#include "DNA_mesh_types.h"
10
12
13#include "testing/testing.h"
14
15namespace blender::bke::tests {
16class PaintBVHTest : public testing::Test {
17 public:
19
20 static void SetUpTestSuite()
21 {
23 }
24
25 void SetUp() override
26 {
27 cube_mesh = geometry::create_cuboid_mesh(float3(1.0, 1.0, 1.0), 10, 10, 10);
28 }
29
30 void TearDown() override
31 {
32 BKE_id_free(nullptr, cube_mesh);
33 }
34};
35
37{
39 EXPECT_GT(tree.nodes<pbvh::MeshNode>().size(), 0)
40 << "Paint BVH should have some non zero amount of nodes";
41}
42} // namespace blender::bke::tests
void BKE_idtype_init()
Definition idtype.cc:122
void BKE_id_free(Main *bmain, void *idv)
A BVH for high poly meshes.
static Tree from_mesh(const Mesh &mesh)
Definition pbvh.cc:233
KDTree_3d * tree
TEST_F(BKE_armature_find_selected_bones_test, some_bones_selected)
Mesh * create_cuboid_mesh(const float3 &size, int verts_x, int verts_y, int verts_z, const std::optional< StringRef > &uv_id)
VecBase< float, 3 > float3