33#include <NDEVR/DesignObject.h>
34#include <NDEVR/Triangle.h>
35#include <NDEVR/Polygon.h>
39 struct FilterDescription;
40 template<u
int01 t_dims,
class t_type>
83 , e_cartesian_grid_image
106 , e_has_closed_primitive
114 , e_normal_smoothing_angle
118 , e_preserve_primitive_order
119 , e_preserve_vertex_order
120 , e_no_auto_tree_creation
136 , e_circle_per_vertex
146 template<
class t_type>
149 m_base->geometry_table.get()[m_base->geometry_property_index[cast<uint04>(property)]].set(m_design_index, value);
153 case e_geometry_type:
155 uint01 val = getGeometryProperty<uint01>(Geometry::e_geometry_type);
156 lib_assert(
IsInvalid(val) || val < cast<uint01>(GeometryType::e_geometry_type_size),
"Bad geo type set");
163 template<
class t_type>
166 if (getGeometryProperty<t_type>(property) != type)
168 WLock wLock(lock_ptr);
169 setGeometryProperty(property, type);
170 updateModifiedTime();
173 template<
class t_type>
176 return m_base->geometry_table.get()[m_base->geometry_property_index[cast<uint04>(property)]].get<t_type>(m_design_index);
221 const void* lock =
nullptr;
250 if (!isValid() || !model.
isValid())
251 return isValid() == model.
isValid();
252 return (model.
uuid() == uuid());
256 if (!isValid() || !model.
isValid())
257 return isValid() != model.
isValid();
258 return (model.
uuid() != uuid());
274 return m_base->primitive_index_table.
get()[m_base->primitive_index_column];
278 return m_base->primitive_index_table.
get()[m_base->primitive_fan_column];
282 return m_base->primitive_index_table.
get()[m_base->primitive_fan_column];
286 return m_base->primitive_index_table.
get()[m_base->primitive_flag_column];
290 return m_base->primitive_index_table.
get()[m_base->primitive_flag_column];
294 return m_base->vertex_table.
get()[m_base->face_to_edge_column];
298 return m_base->vertex_table.
get()[m_base->face_to_edge_column];
303 return m_base->vertex_table.
get()[m_base->edge_to_face_column];
307 return m_base->vertex_table.
get()[m_base->edge_to_face_column];
311 return m_base->geometry_table.get()[m_base->primitive_property_mode_column[cast<uint04>(property)]].get<
PrimitiveMode>(m_design_index);
315 return mode(property) != PrimitiveMode::e_no_index;
319 return m_base->vertex_table->hasColumn(m_base->primitive_index_column);
323 return m_base->vertex_table->hasColumn(m_base->primitive_fan_column);
334 template<
class t_type>
337 lib_assert(index < indicesPerPrimitive(mode(property)) * primitiveCount(property),
"Bad index set");
338 const uint04 index_offset = indexOffset() + indexOffset(property) + index;
341 lib_assert(cast<uint04>(index_value) < vertexCount(),
"index for geometry out of range");
342 primitiveColumn().set(index_offset, index_value + t_type(vertexOffset()));
347 template<
class t_type>
350 lib_assert(index < primitiveCount(property),
"Bad index set");
351 const uint04 index_offset = indexOffset() + indexOffset(property);
355 lib_assert(index_value[
A] < vertexCount(),
"index for geometry out of range A");
356 lib_assert(index_value[
B] < vertexCount(),
"index for geometry out of range B");
357 index_value += cast<t_type>(vertexOffset());
363 switch (mode(property))
365 case PrimitiveMode::e_polyline:
366 column.
set(index_offset + index +
A, index_value[
A]);
367 column.
set(index_offset + index +
B, index_value[
B]);
369 case PrimitiveMode::e_lines:
370 column.
set(index_offset + 2 * index +
A, index_value[
A]);
371 column.
set(index_offset + 2 * index +
B, index_value[
B]);
374 lib_assert(
false,
"Unknown Primitive Mode for vertex<2>");
381 , fan_column(fan_column)
397 ref.
index_offset = indexOffset() + indexOffset(property);
400 ref.min_vertex_index = vertexOffset();
401 ref.max_vertex_index = ref.min_vertex_index + vertexCount();
402 ref.index_max_offset = primitiveCount(property);
404 ref.
mode = mode(property);
407 template<
class t_vec_type>
411 lib_assert(index < ref.index_max_offset,
"Index out of bounds");
412 for (
uint01 i = 0; i < 3; i++)
414 lib_assert(
IsInvalid(index_value) || index_value >= ref.min_vertex_index,
"Index out of bounds");
415 lib_assert(
IsInvalid(index_value) || index_value < ref.max_vertex_index,
"Index out of bounds");
420 template<
class t_vec_type>
424 lib_assert(index < ref.index_max_offset,
"Index out of bounds");
425 for (
uint01 i = 0; i < 3; i++)
427 lib_assert(
IsInvalid(index_value[i]) || index_value[i] >= ref.min_vertex_index,
"Index out of bounds");
428 lib_assert(
IsInvalid(index_value[i]) || index_value[i] < ref.max_vertex_index,
"Index out of bounds");
433 case PrimitiveMode::e_triangle:
438 case PrimitiveMode::e_triangle_strip:
443 case PrimitiveMode::e_triangle_fan:
448 ref.
column.
set(index_fan_location, index_value[
A]);
454 lib_assert(
false,
"Unknown Primitive Mode for vertex<3>");
457 template<
class t_vec_type>
460 lib_assert(index < ref.index_max_offset,
"Index out of bounds");
461 t_vec_type index_value;
464 case PrimitiveMode::e_lines:
468 case PrimitiveMode::e_polyline:
472 case PrimitiveMode::e_triangle:
477 case PrimitiveMode::e_triangle_strip:
482 case PrimitiveMode::e_triangle_fan:
493 ref.
column.
get(index_fan_location, index_value[
A]);
499 lib_assert(
false,
"Unknown Primitive Mode for vertex<3>");
503 template<
class t_type>
506 setPrimitiveVec<t_type>(property, index, index_value);
509 template<
class t_type>
512 setPrimitiveVec<t_type>(property, index, index_value);
518 case PrimitiveMode::e_no_index:
520 case PrimitiveMode::e_triangle:
522 case PrimitiveMode::e_lines:
528 template<
class t_type>
531 lib_assert(index < indicesPerPrimitive(mode(property)) * primitiveCount(property),
"Out of bounds index request");
532 const uint04 index_offset = indexOffset() + indexOffset(property);
533 t_type index_value = primitiveColumn().get<t_type>(index_offset + index);
536 return index_value - t_type(vertexOffset());
538 template<
class t_type>
541 uint04 primitive_count = primitiveCount(property);
542 if (primitive_count == 0)
544 lib_assert(index + 1 < vertexCount(),
"Out of bounds index request");
545 t_type index_value = { index, index + 1 };
551 const uint04 index_offset = indexOffset() + indexOffset(property);
553 switch (mode(property))
555 case PrimitiveMode::e_lines:
556 lib_assert(index < primitive_count,
"Out of bounds index request");
557 index_value = { column.
get<
uint04>(index_offset + 2 * index), column.
get<
uint04>(index_offset + 2 * index + 1) };
559 case PrimitiveMode::e_polyline:
560 lib_assert(index + 1 < primitive_count,
"Out of bounds index request");
561 index_value = { column.
get<
uint04>(index_offset + index), column.
get<
uint04>(index_offset + index + 1) };
569 return index_value - t_type(vertexOffset());
572 template<
class t_type>
575 lib_assert(index < primitiveCount(property),
"Out of bounds index request");
577 const uint04 index_offset = indexOffset() + indexOffset(property);
579 auto v_mode = mode(property);
582 case PrimitiveMode::e_triangle:
584 column.
get<
uint04>(index_offset + 3 * index + 0)
585 , column.
get<
uint04>(index_offset + 3 * index + 1)
586 , column.
get<
uint04>(index_offset + 3 * index + 2) };
588 case PrimitiveMode::e_triangle_strip:
589 index += index_offset;
592 case PrimitiveMode::e_triangle_fan:
594 uint04 index_fan_location = primitiveFanColumn().get<
uint04>(index + indexFanOffset());
600 , column.
get<
uint04>(index + index_offset - 1)
601 , column.
get<
uint04>(index + index_offset) };
608 return index_value - t_type(vertexOffset());
616 return lineIndices(primitive_property, 0, primitiveCount(primitive_property));
622 return triIndices(primitive_property, 0, primitiveCount(primitive_property));
630 return m_base->geometry_table.get()[m_base->index_mode_offset_column].get<
uint04>(m_design_index);
635 return m_base->geometry_table.get()[m_base->primitive_property_offset_column[cast<uint04>(property)]].get<
uint04>(m_design_index);
640 return m_base->geometry_table.get()[m_base->index_fan_offset_column].get<
uint04>(m_design_index);
645 return m_base->geometry_table.get()[m_base->index_fan_size_column].get<
uint04>(m_design_index);
647 template<
class t_type>
650 const uint04 primitive_count = primitiveCount(index_property);
651 setPrimitiveRange(index_property, indexOffset(index_property), primitive_count + 1);
652 setPrimitive(index_property, primitive_count, primitive);
653 return primitive_count;
657 const uint04 primitive_count = primitiveCount(index_property);
658 setPrimitiveRange(index_property, indexOffset(index_property), primitive_count + insersion_size);
659 return primitive_count;
667 return m_base->geometry_table.get()[m_base->index_mode_size_column].get<
uint04>(m_design_index);
671 return m_base->geometry_table.get()[m_base->primitive_property_size_column[cast<uint04>(property)]].get<
uint04>(m_design_index);
675 return indicesPerPrimitive(mode(property)) * primitiveCount(property);
682 const uint04 count = vertexCount();
683 setVertexSize(count + 1);
688 const uint04 count = vertexCount();
689 setVertexSize(count + size);
707 return m_base->geometry_table.get()[m_base->vertex_reserved_count_column].get<
uint04>(m_design_index);
711 return m_base->geometry_table.get()[m_base->vertex_offset_column].get<
uint04>(m_design_index);
715 return m_base->geometry_table.get()[m_base->vertex_count_column].get<
uint04>(m_design_index);
719 return m_base->geometry_table.get()[m_base->solid_vertex_offset_column].get<
uint04>(m_design_index);
723 return m_base->geometry_table.get()[m_base->solid_vertex_reserved_count_column].get<
uint04>(m_design_index);
727 return m_base->geometry_table.get()[m_base->solid_vertex_count_column].get<
uint04>(m_design_index);
734 return m_base->vertex_table->
get(property_index).label();
742 return propertyColumn(property_index).type();
745 template<
class t_type>
748 return createVertexProperty(property_name, GetTypeInfo<t_type>());
752 template<
class t_type>
755 return propertyColumn(property_index).get<t_type>(vertexOffset() + vertex_index);
757 template<
class t_type>
760 return propertyColumn(property).get<t_type>(vertexOffset() + vertex_index);
762 template<
class t_type>
765 return propertyColumn(property_index).get<t_type>(vertexOffset() + vertex_index, sub_index);
767 template<
class t_type>
770 return propertyColumn(property).get<t_type>(vertexOffset() + vertex_index, sub_index);
774 template<
class t_type>
777 lib_assert(index <= vertexCount(),
"Out of bounds vertex set");
778 propertyColumn(property).set(vertexOffset() + index, vector);
780 template<
class t_type>
783 lib_assert(index <= vertexCount(),
"Out of bounds vertex set");
784 propertyColumn(property).set(vertexOffset() + index, property_value);
786 template<
class t_type>
789 lib_assert(index <= vertexCount(),
"Out of bounds vertex set");
790 propertyColumn(property).set(vertexOffset() + index, sub_index, vector);
792 template<
class t_type>
795 lib_assert(index <= vertexCount(),
"Out of bounds vertex set");
796 propertyColumn(property).set(vertexOffset() + index, sub_index, vector);
798 template<
class t_type>
801 lib_assert(offset + vertices.
size() <= vertexCount(),
"Out of bounds vertex set");
802 uint04 vertex_offset = vertexOffset() + offset;
803 auto& col = propertyColumn(property);
806 col.set(vertex_offset + i, vertices[i]);
812 return m_base->vertex_table.
get()[property];
816 return m_base->vertex_table.
get()[property];
820 return mode(property) != VertexMode::e_no_vertex;
824 return m_base->geometry_table.get()[m_base->vertex_mode_column[cast<uint04>(property)]].get<
VertexMode>(m_design_index);
830 ,
VertexMode texture = VertexMode::e_no_vertex
831 ,
VertexMode tangent = VertexMode::e_no_vertex
832 ,
VertexMode bitangent = VertexMode::e_no_vertex
833 ,
VertexMode bones = VertexMode::e_no_vertex);
854 template<
class t_type>
857 const Buffer<uint04>& indices = getTreeIndices(primitive_property);
863 if (indices[i] < original_vals.
size())
864 sorted_vertices[i] = original_vals[indices[i]];
866 return sorted_vertices;
870 template<
class t_type>
873 lib_assert(index < vertexCount(),
"Out of bounds vertex set");
874 column(property).set(vertexOffset() + index, vector);
877 template<
class t_type>
880 lib_assert(index < vertexCount(),
"Out of bounds vertex set");
881 column(property).set(vertexOffset() + index, sub_index, vector);
884 template<
class t_type>
887 lib_assert(offset + vertices.
size() <= vertexCount(),
"Out of bounds vertex set");
888 uint04 vertex_offset = vertexOffset() + offset;
889 auto& col = column(property);
892 col.set(vertex_offset + i, vertices[i]);
896 template<
class t_type,
class t_matrix_type>
899 lib_assert(offset + vertices.
size() <= vertexCount(),
"Out of bounds vertex set");
900 uint04 vertex_offset = vertexOffset() + offset;
901 auto& col = column(property);
904 col.set(vertex_offset + i, matrix * vertices[i].
template as<t_type::NumberOfDimensions(), t_matrix_type>());
907 template<
class t_type>
910 lib_assert(offset + size <= vertexCount(),
"Out of bounds vertex set");
911 uint04 vertex_offset = vertexOffset() + offset;
912 auto& col = column(property);
913 for (
uint04 i = 0; i < size; i++)
915 col.set(vertex_offset + i, vertices[i]);
918 template<
class t_type>
921 lib_assert(index < vertexCount(),
"Out of bounds vertex get");
922 return column(property).get<t_type>(vertexOffset() + index);
924 template<u
int01 t_dims,
class t_type>
927 const Vector<2, uint04> line = primitive<Vector<2, uint04>>(primitive_property, line_index);
934 template<u
int01 t_dims,
class t_type>
937 const Vector<3, uint04> tri = primitive<Vector<3, uint04>>(primitive_property, tri_index);
947 return m_base->vertex_table->hasColumn(m_base->vertex_property_column[cast<uint04>(property)]);
949 template<
class t_type>
952 return propertyVertices<t_type>(property, 0, vertexCount());
954 template<
class t_type>
957 lib_assert(start + size <= vertexCount(),
"Out of bounds vertex selection");
958 const uint04 vertex_offset = vertexOffset();
959 return m_base->vertex_table.get()[property].getAll<t_type>(vertex_offset + start, size);
961 template<
class t_type>
964 return vertices<t_type>(property, 0, vertexCount());
966 template<
class t_type>
969 lib_assert(start + size <= vertexCount(),
"Out of bounds vertex selection");
970 const uint04 vertex_offset = vertexOffset();
971 return column(property).getAll<t_type>(vertex_offset + start, size);
974 template<
class t_type>
977 return vertices<t_type>(property, 0, vertexCount());
979 template<
class t_type>
982 lib_assert(start + size <= vertexCount(),
"Out of bounds vertex selection");
983 const uint04 vertex_offset = vertexOffset();
984 return propertyColumn(property).getAll<t_type>(vertex_offset + start, size);
987 template<u
int01 t_dims,
class t_type>
990 uint04 size = primitiveCount(primitive_property);
991 switch (mode(primitive_property))
993 case PrimitiveMode::e_lines:
995 case PrimitiveMode::e_polyline:
1002 for (
uint04 i = 0; i < size; ++i)
1003 lines.
add(lineSegment<t_dims, t_type>(primitive_property, vertex_property, i));
1006 template<u
int01 t_dims,
class t_type>
1009 return triangles<t_dims, t_type>(primitive_property, vertex_property, 0, primitiveCount(primitive_property));
1011 template<u
int01 t_dims,
class t_type>
1014 lib_assert(start + size <= primitiveCount(primitive_property),
"Out of bounds triangle selection");
1015 const uint04 index_offset = indexOffset() + indexOffset(primitive_property);
1017 const TableColumn& index_column = primitiveColumn();
1018 const TableColumn& fan_column = primitiveFanColumn();
1019 const TableColumn& vertex_column = column(vertex_property);
1022 for (
uint04 i = start; i < size + start; i++)
1027 case PrimitiveMode::e_triangle:
1029 index_column.
get<
uint04>(index_offset + 3 * i + 0)
1030 , index_column.
get<
uint04>(index_offset + 3 * i + 1)
1031 , index_column.
get<
uint04>(index_offset + 3 * i + 2) };
1033 case PrimitiveMode::e_triangle_strip:
1035 index_column.
get<
uint04>(i + index_offset + 0)
1036 , index_column.
get<
uint04>(i + index_offset + 1)
1037 , index_column.
get<
uint04>(i + index_offset + 2) };
1039 case PrimitiveMode::e_triangle_fan:
1041 const uint04 fan_offset = indexFanOffset();
1049 lib_assert(index_fan_location >= index_offset && index_fan_location - index_offset < primitiveCount(primitive_property),
"bad fan location");
1051 index_column.
get<
uint04>(index_fan_location)
1052 , index_column.
get<
uint04>(i + index_offset - 1)
1053 , index_column.
get<
uint04>(i + index_offset) };
1057 lib_assert(
false,
"Bad property fetch mode");
1075 template<u
int01 t_dims,
class t_type>
1078 return polygons<t_dims, t_type>(primitive_property, vertex_property, 0, primitiveCount(primitive_property));
1080 template<u
int01 t_dims,
class t_type>
1083 lib_assert(start + size <= primitiveCount(primitive_property),
"Out of bounds polygon selection");
1084 const uint04 index_offset = indexOffset() + indexOffset(primitive_property);
1087 const TableColumn& index_column = primitiveColumn();
1088 const TableColumn& vertex_column = column(vertex_property);
1092 case PrimitiveMode::e_triangle:
1093 case PrimitiveMode::e_triangle_strip:
1094 case PrimitiveMode::e_triangle_fan:
1096 const TableColumn& fan_column = primitiveFanColumn();
1097 const uint04 fan_offset = indexFanOffset();
1098 for (
uint04 i = start; i < size + start; i++)
1103 case PrimitiveMode::e_triangle:
1105 index_column.
get<
uint04>(index_offset + 3 * i + 0)
1106 , index_column.
get<
uint04>(index_offset + 3 * i + 1)
1107 , index_column.
get<
uint04>(index_offset + 3 * i + 2) };
1109 case PrimitiveMode::e_triangle_strip:
1111 index_column.
get<
uint04>(i + index_offset + 0)
1112 , index_column.
get<
uint04>(i + index_offset + 1)
1113 , index_column.
get<
uint04>(i + index_offset + 2) };
1115 case PrimitiveMode::e_triangle_fan:
1122 index_column.
get<
uint04>(index_fan_location)
1123 , index_column.
get<
uint04>(i + index_offset - 1)
1124 , index_column.
get<
uint04>(i + index_offset) };
1127 lib_assert(
false,
"Bad property fetch mode");
1139 case PrimitiveMode::e_polyline:
1142 for (
uint04 i = start; i < size + start; i++)
1169 template<u
int01 t_dims,
class t_type>
1172 uint04 primitive_count = primitiveCount(primitive_property);
1173 if(primitive_count == 0)
1174 return polylines<t_dims, t_type>(primitive_property, vertex_property, 0, vertexCount());
1176 return polylines<t_dims, t_type>(primitive_property, vertex_property, 0, primitiveCount(primitive_property));
1178 template<u
int01 t_dims,
class t_type>
1181 const uint04 primitive_count = primitiveCount(primitive_property);
1182 lib_assert(primitive_count == 0 || start + size <= primitive_count,
"Out of bounds polyline selection");
1183 const uint04 index_offset = primitive_count == 0 ? vertexOffset() : indexOffset() + indexOffset(primitive_property);
1185 const TableColumn& index_column = primitiveColumn();
1186 const TableColumn& vertex_column = column(vertex_property);
1190 case PrimitiveMode::e_triangle:
1191 case PrimitiveMode::e_triangle_strip:
1192 case PrimitiveMode::e_triangle_fan:
1194 if (primitive_count == 0)
1196 const TableColumn& fan_column = primitiveFanColumn();
1197 const uint04 fan_offset = indexFanOffset();
1198 for (
uint04 i = start; i < size + start; i++)
1203 case PrimitiveMode::e_triangle:
1205 index_column.
get<
uint04>(index_offset + 3 * i + 0)
1206 , index_column.
get<
uint04>(index_offset + 3 * i + 1)
1207 , index_column.
get<
uint04>(index_offset + 3 * i + 2) };
1209 case PrimitiveMode::e_triangle_strip:
1211 index_column.
get<
uint04>(i + index_offset + 0)
1212 , index_column.
get<
uint04>(i + index_offset + 1)
1213 , index_column.
get<
uint04>(i + index_offset + 2) };
1215 case PrimitiveMode::e_triangle_fan:
1222 index_column.
get<
uint04>(index_fan_location)
1223 , index_column.
get<
uint04>(i + index_offset - 1)
1224 , index_column.
get<
uint04>(i + index_offset) };
1227 lib_assert(
false,
"Bad property fetch mode");
1240 case PrimitiveMode::e_polyline:
1243 for (
uint04 i = start; i < size + start; i++)
1245 uint04 index = primitive_count > 0 ? index_column.
get<
uint04>(index_offset + i) : i + index_offset;
1258 polylines.
add(poly);
1265 polylines.
add(poly);
1268 case PrimitiveMode::e_lines:
1271 if (primitive_count == 0)
1273 for (
uint04 i = start; i < size + start; i++)
1276 if (primitive_count == 0)
1284 index_column.
get<
uint04>(index_offset + 2 * i + 0)
1285 , index_column.
get<
uint04>(index_offset + 2 * i + 1));
1297 polylines.
add(poly);
1312 return m_base->vertex_table.
get()[m_base->vertex_property_column[cast<uint04>(property)]];
1316 return m_base->vertex_table.
get()[m_base->vertex_property_column[cast<uint04>(property)]];
1321 return m_base->vertex_table->
get(property);
1325 return m_base->vertex_table->
get(property);
1329 m_base->geometry_table.get()[m_base->solid_vertex_count_column].set(m_design_index, count);
1333 m_base->geometry_table.get()[m_base->solid_vertex_reserved_count_column].set(m_design_index, count);
1337 m_base->geometry_table.get()[m_base->solid_vertex_offset_column].set(m_design_index, count);
1342 template<
class t_index_type,
class t_vec_type>
1345 lib_assert(index < primitiveCount(property),
"Bad index set");
1349 uint04 vertex_count = vertexCount();
1350 lib_assert(index_value[
A] < vertex_count,
"Bad vertex A");
1351 lib_assert(index_value[
B] < vertex_count,
"Bad vertex B");
1352 lib_assert(index_value[
C] < vertex_count,
"Bad vertex C");
1354 index_value += t_vec_type(vertexOffset());
1361 if (def.
mode == PrimitiveMode::e_triangle_fan)
1363 def.
column.
set(primitiveFanColumn().get<uint04>(index + indexFanOffset()), index_value[
A]);
1369 OptimizedSetPrimitiveVec(def, index, index_value);
1376 m_base->geometry_table.get()[m_base->index_mode_size_column].set(m_design_index, count);
1380 m_base->geometry_table.get()[m_base->index_fan_size_column].set(m_design_index, count);
1384 m_base->geometry_table.get()[m_base->primitive_property_size_column[cast<uint04>(property)]].set(m_design_index, count);
1388 m_base->geometry_table.get()[m_base->index_fan_offset_column].set(m_design_index, offset);
1392 m_base->geometry_table.get()[m_base->index_mode_offset_column].set(m_design_index, offset);
1396 m_base->geometry_table.get()[m_base->primitive_property_offset_column[cast<uint04>(property)]].set(m_design_index, offset);
1400 m_base->geometry_table.get()[m_base->primitive_property_mode_column[cast<uint04>(property)]].set(m_design_index, mode);
1405 m_base->geometry_table.get()[m_base->vertex_count_column].set(m_design_index, count);
1409 m_base->geometry_table.get()[m_base->vertex_reserved_count_column].set(m_design_index, count);
1413 m_base->geometry_table.get()[m_base->vertex_offset_column].set(m_design_index, count);
1420 lib_assert(vert_mode != e_index,
"Not yet supported");
1421 m_base->geometry_table.get()[m_base->vertex_mode_column[cast<uint04>(property)]].set(m_design_index, vert_mode);
1434 static const uint01 Dimensions = 0;
1435 static const bool Vector =
false;
1436 static const bool Buffer =
false;
1438 static const bool Pointer =
false;
1439 static const bool Unsigned =
false;
1440 static const bool Float =
false;
1441 static const bool Integer =
false;
1442 static const bool Number =
false;
1443 static const bool Enum =
false;
1444 static const bool String =
false;
1445 static const bool Color =
false;
1446 static const bool Boolean =
false;
1453 template<
class t_type>
1459 ,
m_column(geo.column(vertex_property))
1468 ,
m_column(geo.propertyColumn(vertex_property))
1513 template<u
int01 t_dims,
class t_type>
1530 for (
uint04 i = 0; i < 2; i++)
1544 for (
uint01 i = 0; i < 2; i++)
1578 template<u
int01 t_dims,
class t_type>
1604 for (
uint01 i = 0; i < 3; i++)
1617 for (
uint01 i = 0; i < 3; i++)
1654 void restoreAll(
const void* lock,
ProgressInfo* log =
nullptr,
bool restore_tree =
true,
bool restore_closed =
true,
bool restore_normals =
true,
bool restore_smooth =
true);
1677 struct hash<NDEVR::Geometry>
1682 std::size_t value = 0;
1684 value = value * 256 + (s[i + 0U] ^ s[i + 8U]);
#define lib_assert(expression, message)
Definition LibAssert.h:61
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:540
A bitset that stores 8 bits (elements with only two possible values: 0 or 1, true or false,...
Definition BitFlag.hpp:55
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:52
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
void add(t_type &&object)
Adds object to the end of the buffer.
Definition Buffer.hpp:186
constexpr t_index_type size() const
Definition Buffer.hpp:823
decltype(auto) last()
Definition Buffer.hpp:588
void setSize(t_index_type new_size)
Definition Buffer.hpp:803
decltype(auto) get(t_index_type index)
Definition Buffer.hpp:541
The core Color class in the NDEVR API. Colors can be defined in several ways. The ACIColor is compact...
Definition Color.h:41
Provides the underlying data storage for the NDEVR Scene Model heirarchy.
Definition DesignObjectBase.h:150
A low-level database object that can be used to access general stored properties within the NDEVR Mod...
Definition DesignObject.h:67
bool isValid() const
Definition DesignObject.h:355
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
A core class within the model heirarchy containing vertex-based data (Usually 3D data) within a set c...
Definition Geometry.h:64
void fillHolesByNeighbor(PrimitiveProperty property, const void *lock=nullptr, ProgressInfo *log=nullptr)
const TableColumn & column(VertexProperty property) const
Definition Geometry.h:1314
void splitDuplicateVertices()
void setVertexOffsetValue(uint04 count)
Definition Geometry.h:1411
void setSolidVertexOffsetValue(uint04 count)
Definition Geometry.h:1335
void updateSolidVertexColumns(bool invalidate_bounds=true, bool erase_kd_tree=true)
Buffer< t_type > getTreeSortedVertices(PrimitiveProperty primitive_property, VertexProperty vertex_property) const
Definition Geometry.h:855
void split(Geometry &other_geo, const Buffer< bool > &vertex_mask)
TreeMode
Definition Geometry.h:123
void normalExpansion(const Vector< 3, fltp04 > &expansion_vector)
Vector< 2, fltp08 > calculateHVLength(const Matrix< fltp08 > &mat) const
TableColumn & primitiveColumn()
void calculateIndexNeighborList(PrimitiveProperty primitive_property)
uint01 parity(const Matrix< fltp08 > &parent_matrix, PrimitiveMode mode) const
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getParents() const
static void OptimizedSetPrimitiveVec(const OptimizedPrimitiveDef &ref, uint04 index, t_vec_type index_value)
Definition Geometry.h:421
const TableColumn & primitiveFlagColumn() const
Definition Geometry.h:288
TableColumn & edgeToFaceColumn()
Definition Geometry.h:301
TableColumn & primitiveFlagColumn()
Definition Geometry.h:284
void setIndexFanCountValue(uint04 count)
Definition Geometry.h:1378
void removeTrees(VertexProperty vertex_property=VertexProperty::Position)
void removeVertices(const Buffer< bool > &selection_mask)
OptimizedPrimitiveDef optimizedPrimitiveDef(PrimitiveProperty property)
Definition Geometry.h:394
void setTransform(const Matrix< fltp08 > &transform)
bool primitiveIndexFlag(PrimitiveProperty property, uint04 primitive_index, PrimitiveBitFlags flag) const
uint04 numberOfParents() const
void setModeValue(VertexProperty property, VertexMode vert_mode)
Definition Geometry.h:1418
void updateModifiedTime(Time time=Time::SystemTime())
bool canBeClosedSolid(const void *lock=nullptr) const
Buffer< Triangle< t_dims, t_type > > triangles(PrimitiveProperty primitive_property, VertexProperty vertex_property, uint04 start, uint04 size) const
Definition Geometry.h:1012
fltp08 calculateLength(const Matrix< fltp08 > &transform) const
Buffer< Polyline< t_dims, t_type > > polylines(PrimitiveProperty primitive_property, VertexProperty vertex_property, uint04 start, uint04 size) const
Definition Geometry.h:1179
LineSegment< t_dims, t_type > lineSegment(PrimitiveProperty primitive_property, VertexProperty vertex_property, uint04 line_index) const
Definition Geometry.h:925
void setPrimitiveVec(PrimitiveProperty property, uint04 index, t_vec_type &index_value)
Definition Geometry.h:1343
void updateVertexColumns(bool invalidate_bounds=true, bool erase_kd_tree=true)
void calculateTangentSpace(bool calc_tan, bool calc_bitan)
void setPrimitive(PrimitiveProperty property, uint04 index, t_type index_value)
Definition Geometry.h:335
Model getParent(uint04 index) const
uint01 provokingPrimitiveOffset() const
const TableColumn & propertyColumn(const String &property) const
Definition Geometry.h:1323
void setGeometryProperty(GeometryProperty property, const t_type &value)
Definition Geometry.h:147
void removeTree(PrimitiveProperty property, VertexProperty vertex_property=VertexProperty::Position)
void removePrimitive(PrimitiveProperty property, Buffer< uint04 > vertices)
void updatePrimitiveColumn(PrimitiveProperty property, bool remove_tree=true)
void setVertexCountValue(uint04 count)
Vertex.
Definition Geometry.h:1403
static void OptimizedSetPrimitive(const OptimizedPrimitiveDef &ref, uint04 index, t_vec_type index_value)
Definition Geometry.h:408
void setThicknessMode(ThicknessMode mode)
uint04 vertexReservedCount() const
Definition Geometry.h:705
t_type vertex(VertexProperty property, uint04 index) const
Definition Geometry.h:919
TableColumn & primitiveFanColumn()
Definition Geometry.h:276
void setIndexFanOffsetValue(uint04 offset)
Definition Geometry.h:1386
static constexpr uint04 indicesPerPrimitive(PrimitiveMode property)
Definition Geometry.h:514
void setVertices(VertexProperty property, const Buffer< t_type > &vertices, uint04 offset=0)
Definition Geometry.h:885
uint04 addVertices(uint04 size)
Definition Geometry.h:686
TypeInfo vertexPropertyType(uint04 property_index) const
Definition Geometry.h:740
const Buffer< uint04 > & getTreeIndices(PrimitiveProperty primitive_property) const
void setPrimitive(PrimitiveProperty property, uint04 index, Vector< 2, t_type > index_value)
Definition Geometry.h:348
void setVerticesFlagAll(uint01 on_flags, uint01 off_flags)
Buffer< t_type > propertyVertices(uint04 property) const
Definition Geometry.h:950
void updateVertexColumns(uint04 index, uint04 size, bool invalidate_bounds=true, bool erase_kd_tree=true)
void removeVertices(Buffer< uint04 > vertices)
uint04 solidVertexOffset() const
Definition Geometry.h:717
bool hasProperty(VertexProperty property) const
Definition Geometry.h:818
void setTree(DynamicPointer< RTree< 3, fltp04 > > tree, PrimitiveProperty primitive_property, VertexProperty vertex_property=VertexProperty::Position) const
VertexMode
Definition Geometry.h:68
void setPrimitiveIndexFlag(PrimitiveProperty property, uint04 primitive_index, PrimitiveBitFlags flag, bool value)
uint04 indexOffset(PrimitiveProperty property) const
Definition Geometry.h:632
void updateTransform(const Matrix< fltp08 > &transform, const void *lock_ptr=nullptr)
void combine(const Geometry &geo, const Matrix< fltp08 > &conversion, Buffer< bool > vertex_mask)
uint04 vertexCount() const
Definition Geometry.h:713
void setRealThickness(fltp08 real_thickness, const Matrix< fltp08 > &transform, const void *lock, ProgressInfo *log=nullptr)
GeometryType getGeometryType() const
t_type vertexProperty(const String &property, uint04 vertex_index) const
Definition Geometry.h:758
uint04 indexFanCount() const
Definition Geometry.h:642
fltp08 calculateVolume(const Matrix< fltp08 > &parent_transform) const
Geometry(uint04 index, DesignObjectBase *base)
Buffer< t_type > vertices(VertexProperty property, uint04 start, uint04 size) const
Definition Geometry.h:967
void setupVertexTable(uint04 vertex_size, VertexMode position, VertexMode normal=VertexMode::e_no_vertex, VertexMode color=VertexMode::e_no_vertex, VertexMode texture=VertexMode::e_no_vertex, VertexMode tangent=VertexMode::e_no_vertex, VertexMode bitangent=VertexMode::e_no_vertex, VertexMode bones=VertexMode::e_no_vertex)
void setVertexProperty(uint04 property, uint04 index, uint04 sub_index, const t_type &vector)
Definition Geometry.h:787
void setGeometryType(GeometryType geometry_type)
void addToTree(uint04 start, uint04 size, PrimitiveProperty primitive_property, VertexProperty vertex_property) const
void setIndexCountValue(uint04 count)
Index.
Definition Geometry.h:1374
uint04 indexFanOffset() const
Definition Geometry.h:637
bool operator!=(const Geometry &model) const
Definition Geometry.h:254
void setPrimitive(PrimitiveProperty property, uint04 index, Triangle< 1, t_type > index_value)
Definition Geometry.h:510
bool hasIndexColumn() const
Definition Geometry.h:317
void updateGeometryProperty(GeometryProperty property, const t_type &type, const void *lock_ptr=nullptr)
Definition Geometry.h:164
t_type primitive(PrimitiveProperty property, typename std::enable_if< ObjectInfo< t_type >::Dimensions==3, uint04 >::type index) const
Definition Geometry.h:573
t_type primitive(PrimitiveProperty property, typename std::enable_if< ObjectInfo< t_type >::Dimensions==2, uint04 >::type index) const
Definition Geometry.h:539
static std::function< void(Geometry &geo, const Matrix< fltp08 > &matrix, const void *lock, ProgressInfo *log)> s_geometry_triangulation
Definition Geometry.h:1428
void laplacianSmoothing(const SmoothingParameters &properties)
uint01 parity(const Matrix< fltp04 > &parent_matrix, PrimitiveMode mode) const
TableColumn & propertyColumn(const String &property)
Definition Geometry.h:1319
void setPrimitiveRange(PrimitiveProperty mode, uint04 start, uint04 primitive_count)
void autoCalculateIndices(PrimitiveProperty property, const void *lock=nullptr, ProgressInfo *log=nullptr, const Matrix< fltp08 > &transform=Matrix< fltp08 >(1.0))
void removeParent(const Model &parent)
TableColumn & faceToEdgeColumn()
Definition Geometry.h:292
void removePrimitive(PrimitiveProperty property, const Buffer< bool > &selection_mask)
Buffer< Vector< 2, uint04 > > lineIndices(PrimitiveProperty primitive_property) const
Definition Geometry.h:614
Geometry(const DesignObject &obj)
Buffer< t_type > vertices(VertexProperty property) const
Definition Geometry.h:962
Buffer< uint04 > primitiveIndices(PrimitiveProperty primitive_property) const
bool vertexFlag(uint04 vertex_index, VertexFlags flag) const
Buffer< t_type > vertices(const String &property) const
Definition Geometry.h:975
void removePrimitive(PrimitiveProperty property, uint04 location)
uint04 primitiveCount(PrimitiveProperty property) const
Definition Geometry.h:669
bool hasVertexProperty(const String &property_name) const
uint04 primitiveIndexCount(PrimitiveProperty property) const
Definition Geometry.h:673
Buffer< Vector< 2, uint04 > > lineIndices(PrimitiveProperty primitive_property, uint04 start, uint04 size) const
void setVertexFlag(uint04 vertex, VertexFlags flag, bool value)
void setSolidVertexCountValue(uint04 count)
Definition Geometry.h:1327
void updateVertexColumn(VertexProperty property, uint04 index, uint04 size)
void combine(const Geometry &geo, const Matrix< fltp08 > &conversion=Matrix< fltp08 >(1.0))
void setVertexMode(VertexProperty property, VertexMode mode)
void calculateNormals(NormalMode mode, Angle< fltp08 > max_difference, const void *lock=nullptr, ProgressInfo *log=nullptr)
Geometry(DesignObjectBase *base)
void setVerticesFlags(const Buffer< bool > &selection_mask, BitFlag on_flags, BitFlag off_flags)
Bounds< 3, fltp08 > getBounds() const
bool vertexSelected(uint04 vertex) const
VertexMode mode(VertexProperty property) const
Definition Geometry.h:822
Buffer< LineSegment< t_dims, t_type > > lineSegments(PrimitiveProperty primitive_property, VertexProperty vertex_property) const
Definition Geometry.h:988
void updatePrimitiveColumns(bool remove_tree=true)
Buffer< uint04 > indices(PrimitiveProperty primitive_property, uint04 start, uint04 size) const
uint04 vertexOffset() const
Definition Geometry.h:709
bool hasIndexFanColumn() const
Definition Geometry.h:321
void setVerticesFlags(const Buffer< bool > &selection_mask, BitFlag selected_on_flags, BitFlag selected_off_flags, BitFlag unselected_on_flags, BitFlag unselected_off_flags, uint04 bitmask_offset=0)
Vector< 3, fltp08 > calculateAverageDirection(const Matrix< fltp08 > &mat) const
void setVertices(VertexProperty property, const Buffer< t_type > &vertices, const Matrix< t_matrix_type > &matrix, uint04 offset=0)
Definition Geometry.h:897
uint04 vertexPropertyCount() const
void setVertexProperty(const String &property, uint04 index, uint04 sub_index, const t_type &vector)
Definition Geometry.h:793
TableColumn & propertyColumn(uint04 property)
Definition Geometry.h:810
void setVertexProperty(uint04 property, uint04 index, const t_type &vector)
Definition Geometry.h:775
Buffer< LineSegment< 3, fltp08 > > faceEdges(uint04 index) const
void setVertices(VertexProperty property, const t_type *vertices, uint04 size, uint04 offset=0)
Definition Geometry.h:908
void setCountValue(PrimitiveProperty property, uint04 count)
Definition Geometry.h:1382
Buffer< Geometry, uint04, ObjectAllocator< DESIGN_PRIM > > explode() const
void setVertex(VertexProperty property, uint04 index, const t_type &vector)
Definition Geometry.h:871
ThicknessMode
Definition Geometry.h:130
void setVertex(VertexProperty property, uint04 index, uint04 sub_index, const t_type &vector)
Definition Geometry.h:878
void updateVertexColumn(VertexProperty property)
uint04 vertexPropertyIndex(const String &property_name) const
void optimizeVertexLocations()
t_type getGeometryProperty(GeometryProperty property) const
Definition Geometry.h:174
void setWindingMode(WindingMode mode, const void *lock=nullptr)
void copyTraitsFrom(const Geometry &geo)
void removeVertex(uint04 location)
void updateVertexColumn(const String &property)
fltp08 calculateSurfaceArea(const Matrix< fltp08 > &parent_transform) const
const TableColumn & faceToEdgeColumn() const
Definition Geometry.h:296
void removeVertices(uint04 mask_offset, const Buffer< bool > &selection_mask)
void removeDuplicateVertices(fltp08 epsilon, const void *lock, ProgressInfo *log=nullptr)
Buffer< Vector< 3, uint04 > > triIndices(PrimitiveProperty primitive_property, uint04 start, uint04 size) const
Buffer< Vector< 3, uint04 > > triIndices(PrimitiveProperty primitive_property) const
Definition Geometry.h:620
Vector< 2, fltp08 > calculateVolumeAndSurfaceArea(const Matrix< fltp08 > &transform, const void *lock) const
GeometryProperty
Definition Geometry.h:99
uint04 addPrimitive(PrimitiveProperty index_property, const t_type &primitive)
Definition Geometry.h:648
Triangle< t_dims, t_type > triangle(PrimitiveProperty primitive_property, VertexProperty vertex_property, uint04 tri_index) const
Definition Geometry.h:935
Plane< 3, fltp08 > calculatePlaneAtVertex(uint04 vertex_index) const
Buffer< Polygon< t_type, Vertex< t_dims, t_type > > > polygons(PrimitiveProperty primitive_property, VertexProperty vertex_property) const
Definition Geometry.h:1076
void setVertexProperties(const String &property, const Buffer< t_type > &vertices, uint04 offset=0)
Definition Geometry.h:799
void cotangentLaplacianSmoothing(const SmoothingParameters &properties)
bool hasTree(PrimitiveProperty primitive_property, VertexProperty vertex_property=VertexProperty::Position) const
Buffer< Polyline< t_dims, t_type > > polylines(PrimitiveProperty primitive_property, VertexProperty vertex_property) const
Definition Geometry.h:1170
void createDrapedMaterialCoordinates(const Matrix< fltp08 > &mat=Matrix< fltp08 >())
ThicknessMode thicknessMode() const
bool hasHoles(PrimitiveProperty property) const
void setVerticesFlag(const Buffer< uint04 > &vertices, VertexFlags flag, bool value)
void clearSmoothing(const SmoothingParameters &properties)
bool hasColumn(VertexProperty property) const
Definition Geometry.h:945
Buffer< uint04 > getSelectedVertices() const
void setVertexSize(uint04 size)
void removePrimitive(PrimitiveProperty property, uint04 location, uint04 size)
void setVertexProperty(const String &property, uint04 index, const t_type &property_value)
Definition Geometry.h:781
TableColumn & column(VertexProperty property)
Definition Geometry.h:1310
void setVertexReservedValue(uint04 count)
Definition Geometry.h:1407
void clearVerticesAndPrimitives()
Buffer< Buffer< uint04 > > polyIndices(PrimitiveProperty primitive_property) const
bool hasVertexProperty(const VertexProperty &property) const
void setIndexOffsetValue(uint04 offset)
Definition Geometry.h:1390
const String & vertexPropertyName(uint04 property_index) const
Definition Geometry.h:732
Time getAscModifiedTime(bool include_self, bool include_layer=false) const
Buffer< Buffer< uint04 > > polyIndices(PrimitiveProperty primitive_property, uint04 start, uint04 size) const
uint04 createVertexProperty(const String &property_name, const TypeInfo &type)
Ray< 3, fltp08 > surfaceNormal() const
void addFromParent(Model &parent)
Buffer< Polygon< t_type, Vertex< t_dims, t_type > > > polygons(PrimitiveProperty primitive_property, VertexProperty vertex_property, uint04 start, uint04 size) const
Definition Geometry.h:1081
void convertPolarToCartesian(const String &roll_column, const String &pitch_column, const String &distance_column)
static void SetTriangulationMethod(std::function< void(Geometry &geo, const Matrix< fltp08 > &matrix, const void *lock, ProgressInfo *log)> function)
t_type vertexProperty(uint04 property_index, uint04 vertex_index) const
Definition Geometry.h:753
void copyFrom(const Geometry &geo, bool copy_tree=true)
t_type vertexProperty(const String &property, uint04 vertex_index, uint04 sub_index) const
Definition Geometry.h:768
String getGeometryIcon() const
Buffer< t_type > vertices(const String &property, uint04 start, uint04 size) const
Definition Geometry.h:980
Vertex< 3, fltp08 > faceCenter(uint04 index) const
void setPrimitive(PrimitiveProperty property, uint04 index, Vector< 3, t_type > index_value)
Definition Geometry.h:504
void setPrimitiveMode(PrimitiveProperty property, PrimitiveMode mode)
PrimitiveMode mode(PrimitiveProperty property) const
Definition Geometry.h:309
void removeHoleFill(const void *lock=nullptr, ProgressInfo *log=nullptr)
const TableColumn & primitiveColumn() const
Definition Geometry.h:272
const TableColumn & edgeToFaceColumn() const
Definition Geometry.h:305
DynamicPointer< RTree< 3, fltp04 > > tree(PrimitiveProperty primitive_property, VertexProperty vertex_property=VertexProperty::Position) const
void addVertices(uint04 location, uint04 size)
Buffer< Triangle< t_dims, t_type > > triangles(PrimitiveProperty primitive_property, VertexProperty vertex_property) const
Definition Geometry.h:1007
void setVerticesFlag(const Buffer< bool > &selection_mask, VertexFlags flag, bool value)
void setOffsetValue(PrimitiveProperty property, uint04 offset)
Definition Geometry.h:1394
void setupIndexFanColumn()
static t_vec_type OptimizedGetPrimitiveVec(const OptimizedPrimitiveDef &ref, uint04 index)
Definition Geometry.h:458
void setNormalMode(NormalMode mode, Angle< fltp08 > max_sep_angle, const void *lock=nullptr, ProgressInfo *log=nullptr)
bool operator==(const Geometry &model) const
Definition Geometry.h:248
const TableColumn & primitiveFanColumn() const
Definition Geometry.h:280
t_type primitive(PrimitiveProperty property, typename std::enable_if< ObjectInfo< t_type >::Dimensions<=1, uint04 >::type index) const
Definition Geometry.h:529
bool hasParent(const Model &model) const
uint04 solidVertexCount() const
Definition Geometry.h:725
uint04 addPrimitives(PrimitiveProperty index_property, uint04 insersion_size)
Definition Geometry.h:655
void setVerticesFlagAll(VertexFlags flag, bool value)
uint04 indexOffset() const
Definition Geometry.h:628
void removeVertices(uint04 location, uint04 size)
void setSolidVertexReservedValue(uint04 count)
Definition Geometry.h:1331
void updateVertexColumn(const String &property, uint04 index, uint04 size)
Buffer< t_type > propertyVertices(uint04 property, uint04 start, uint04 size) const
Definition Geometry.h:955
uint04 addVertex()
Definition Geometry.h:680
uint04 primitiveIndexCount() const
Definition Geometry.h:665
const TableColumn & propertyColumn(uint04 property) const
Definition Geometry.h:814
void reservePrimitiveIndexSpace(uint04 index_size)
t_type vertexProperty(uint04 property_index, uint04 vertex_index, uint04 sub_index) const
Definition Geometry.h:763
uint04 createVertexProperty(const String &property_name)
Definition Geometry.h:746
uint04 solidVertexReservedCount() const
Definition Geometry.h:721
void setModeValue(PrimitiveProperty property, PrimitiveMode mode)
Definition Geometry.h:1398
bool hasProperty(PrimitiveProperty property) const
Definition Geometry.h:313
void closePolyline(PrimitiveProperty property)
Class to easily restore calculated data in a Geometry after a location altering process.
Definition Geometry.h:1643
void store(const Geometry &geo)
GeometryPositionModRestore(const Geometry &geo)
Definition Geometry.h:1647
void restoreNormals(const void *lock, ProgressInfo *log=nullptr)
String m_smoothing_algo
Definition Geometry.h:1665
fltp04 smoothing_angle
Definition Geometry.h:1664
NormalMode normal_mode
Definition Geometry.h:1663
bool m_has_tangent
Definition Geometry.h:1659
GeometryPositionModRestore()
Definition Geometry.h:1645
bool m_is_closed
Definition Geometry.h:1662
void restoreClosed(Geometry &geo, const void *lock, ProgressInfo *log=nullptr)
Geometry m_geo
Definition Geometry.h:1667
void restoreNormals(Geometry &geo, const void *lock, ProgressInfo *log=nullptr)
void restoreClosed(const void *lock, ProgressInfo *log=nullptr)
uint04 m_smoothing_times
Definition Geometry.h:1666
bool m_has_tree[cast< uint04 >(PrimitiveProperty::Index_Property_Size)]
Definition Geometry.h:1661
bool m_has_bitangent
Definition Geometry.h:1660
void restoreSmooth(const void *lock, ProgressInfo *log=nullptr)
void restoreAll(const void *lock, ProgressInfo *log=nullptr, bool restore_tree=true, bool restore_closed=true, bool restore_normals=true, bool restore_smooth=true)
A class to easily iterate each line segment over a Geometry of lines.
Definition Geometry.h:1515
bool isHidden(uint04 index) const
Definition Geometry.h:1563
VertexProperty m_vertex_property
Definition Geometry.h:1568
const uint04 m_vertex_offset
Definition Geometry.h:1573
LineIterator(PrimitiveProperty primitive_property, VertexProperty vertex_property, Geometry geo)
Definition Geometry.h:1517
Vector< 2, uint04 > rawIndex(uint04 index) const
Definition Geometry.h:1559
Vector< 2, uint04 > vertexIndex(uint04 index) const
Definition Geometry.h:1527
Geometry::OptimizedPrimitiveDef m_primitive_def
Definition Geometry.h:1569
uint04 size() const
Definition Geometry.h:1554
const TableColumn & m_flag_column
Definition Geometry.h:1571
LineSegment< t_dims, t_type > operator[](uint04 index) const
Definition Geometry.h:1540
const TableColumn & m_vertex_column
Definition Geometry.h:1570
uint04 m_primitive_count
Definition Geometry.h:1572
A line segment represented by two vertices, a start and end.
Definition Line.hpp:49
Serves as the primary program interface for processes to report issues and allows any number of LogSt...
Definition Log.h:48
Definition Matrix.hpp:176
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
Logic for a given plane or N-dimensions. Planes are coordinate systems of one less dimension than the...
Definition Geometry.h:41
Provides shared ownership of a dynamically allocated object.
Definition Pointer.hpp:71
An N-sided polygon.
Definition Polygon.hpp:53
uint04 vertexCount() const
Definition Polygon.hpp:204
void add(const t_vertex &vertex)
Definition Polygon.hpp:293
void clear()
Definition Polygon.hpp:410
A polyline which stores vertex information for many points along a given path.
Definition CoordinateProjectionManager.h:44
uint04 vertexCount() const
Definition PolyLine.hpp:191
void add(const t_vertex &vertex)
Definition PolyLine.hpp:241
void clear()
Definition PolyLine.hpp:396
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
Definition GeometryVertices.h:11
Definition Vertex.hpp:317
The root Model that is responsible for storing the underlying data for all Scene Models.
Definition Model.h:492
Responsible for turning a user interaction into a selection within a DesignObjectLookup.
Definition Selector.h:50
The core String class for the NDEVR API.
Definition String.h:69
Logic for reading or writing to a string or a user friendly, TranslatedString.
Definition StringStream.h:230
A virtual storage type that is used with Table class to store data where the actual mechanism for sto...
Definition TableColumn.h:76
void get(uint04 index, Vector< 1, t_class > &vector) const
Definition TableColumn.h:236
virtual void set(uint04 index, bool value)=0
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometr...
Definition Triangle.hpp:138
A class to easily iterate each triangle over a Geometry of triangles or meshes.
Definition Geometry.h:1580
Triangle< t_dims, t_type > operator[](uint04 index) const
Definition Geometry.h:1600
const uint04 m_vertex_offset
Definition Geometry.h:1636
Geometry::OptimizedPrimitiveDef m_primitive_def
Definition Geometry.h:1633
uint04 size() const
Definition Geometry.h:1624
const TableColumn & m_vertex_column
Definition Geometry.h:1634
Vector< 3, uint04 > vertexIndex(uint04 index) const
Definition Geometry.h:1614
uint04 m_primitive_count
Definition Geometry.h:1635
TriangleIterator(PrimitiveProperty primitive_property, const String &vertex_property, Geometry mesh)
Definition Geometry.h:1591
TriangleIterator(PrimitiveProperty primitive_property, VertexProperty vertex_property, Geometry mesh)
Definition Geometry.h:1582
Vector< 3, uint04 > rawIndex(uint04 index) const
Definition Geometry.h:1629
Stores information about a type, relevant for certain templated functions. To get information about a...
Definition TypeInfo.h:43
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
A class to easily iterate each vertex of a Geometry.
Definition Geometry.h:1455
const uint04 m_vertex_offset
Definition Geometry.h:1505
void setVertex(uint04 index, const t_type &value)
Definition Geometry.h:1487
const uint04 m_vertex_count
Definition Geometry.h:1506
t_type operator[](uint04 index) const
Definition Geometry.h:1475
TableColumn & m_flag_column
Definition Geometry.h:1501
uint04 size() const
Definition Geometry.h:1495
BitFlag flag(uint04 index) const
Definition Geometry.h:1482
Geometry m_geo
Definition Geometry.h:1499
VertexIterator(const String &vertex_property, Geometry geo)
Definition Geometry.h:1466
void setFlag(uint04 index, const BitFlag &value)
Definition Geometry.h:1491
TableColumn & m_column
Definition Geometry.h:1500
const VertexProperty m_vertex_property
Definition Geometry.h:1504
VertexIterator(VertexProperty vertex_property, Geometry geo)
Definition Geometry.h:1457
Used to lock a particular variable for writing. Only one write lock can be created when no read locks...
Definition RWLock.h:115
NormalMode
Definition DesignObjectBase.h:105
constexpr bool IsInvalid(const t_type &value)
Query if 'value' is valid or invalid. Invalid values should return invalid if used for calculations o...
Definition BaseFunctions.hpp:170
VertexProperty
Definition DesignObjectBase.h:52
constexpr bool DESIGN_PRIM
Definition DesignObject.h:47
GeometryType
Definition DesignObjectBase.h:86
VertexFlags
Definition DesignObjectBase.h:68
PrimitiveProperty
Definition DesignObjectBase.h:44
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
PrimitiveBitFlags
Definition DesignObjectBase.h:78
PrimitiveMode
Used with Geometry to describe how vertices and indices are used to form shapes.
Definition DesignObjectBase.h:116
WindingMode
Definition DesignObjectBase.h:97
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:375
@ B
Definition BaseValues.hpp:170
@ A
Definition BaseValues.hpp:168
@ C
Definition BaseValues.hpp:172
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233
Definition Geometry.h:378
TableColumn & fan_column
Definition Geometry.h:384
uint04 fan_offset
Definition Geometry.h:386
PrimitiveMode mode
Definition Geometry.h:392
uint04 index_offset
Definition Geometry.h:385
OptimizedPrimitiveDef(TableColumn &column, TableColumn &fan_column)
Definition Geometry.h:379
TableColumn & column
Definition Geometry.h:383
Definition Geometry.h:217
uint04 iterations
Definition Geometry.h:219
PrimitiveProperty property
Definition Geometry.h:218
Information about the object.
Definition ObjectInfo.h:54