4 #include <gtest/gtest.h>
6 #include "unittests_common.hh"
8 #include <OpenVolumeMesh/Attribs/StatusAttrib.hh>
11 using namespace Geometry;
15 generatePolyhedralMesh(mesh_);
17 for(
int i = 0; i < 1; ++i) {
25 generatePolyhedralMesh(mesh_);
27 EXPECT_EQ(12u, mesh_.n_vertices());
31 for(
int i = 0; i < 1; ++i) {
41 EXPECT_EQ(12u, v_prop3->n_elements());
43 EXPECT_EQ(2u, mesh_.n_vertex_props());
47 EXPECT_EQ(2u, mesh_.n_vertex_props());
49 EXPECT_FLOAT_EQ(1.4f, v_prop3[0]);
53 EXPECT_EQ(3u, mesh_.n_vertex_props());
56 mesh_.set_persistent(v_prop_d);
58 EXPECT_EQ(1u, mesh_.n_vertex_props());
62 EXPECT_EQ(13u, mesh_.n_vertices());
66 EXPECT_EQ(1u, mesh_.n_vertex_props());
70 EXPECT_EQ(40u, he_prop->n_elements());
74 EXPECT_EQ(42u, he_prop->n_elements());
79 generateHexahedralMesh(mesh_);
81 for(
int i = 0; i < 1; ++i) {
88 mesh_.set_persistent(v_prop);
93 EXPECT_FLOAT_EQ(24.5f, v_prop2[0]);
94 EXPECT_FLOAT_EQ(2.34f, v_prop2[11]);
99 generateHexahedralMesh(mesh_);
101 for(
int i = 0; i < 1; ++i) {
105 mesh_.set_persistent(v_prop);
108 EXPECT_EQ(1u, mesh_.n_vertex_props());
110 for(
int i = 0; i < 1; ++i) {
114 EXPECT_EQ(1u, mesh_.n_vertex_props());
116 mesh_.set_persistent(v_prop,
false);
119 EXPECT_EQ(0u, mesh_.n_vertex_props());
124 generateHexahedralMesh(mesh_);
129 EXPECT_EQ(1u, mesh_.n_cell_props());
131 mesh_.set_persistent(c_prop);
133 EXPECT_EQ(1u, mesh_.n_cell_props());
135 mesh_.set_persistent(c_prop2,
false);
137 EXPECT_EQ(1u, mesh_.n_cell_props());
142 generateHexahedralMesh(mesh_);
146 for(
int i = 0; i < 1; ++i) {
149 EXPECT_EQ(2u, mesh_.n_cell_props());
152 EXPECT_EQ(1u, mesh_.n_cell_props());
157 generatePolyhedralMesh(mesh_);
159 EXPECT_EQ(12u, mesh_.n_vertices());
VertexHandle add_vertex(const Point &_p)
Alias for new_vertex(const Point&).
Property classes for the different entity types.