Blender V5.0
geometry_compare.cc File Reference
#include <algorithm>
#include <numeric>
#include "BLI_array.hh"
#include "BLI_math_base.h"
#include "BLI_ordered_edge.hh"
#include "BLI_span.hh"
#include "BKE_anonymous_attribute_id.hh"
#include "BKE_attribute.hh"
#include "BKE_attribute_math.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_mapping.hh"
#include "BKE_geometry_compare.hh"
#include "DNA_curve_types.h"
#include "DNA_lattice_types.h"

Go to the source code of this file.

Classes

class  blender::bke::compare_geometry::IndexMapping

Namespaces

namespace  blender
namespace  blender::bke
namespace  blender::bke::compare_geometry

Macros

#define ASSERT_AND_ASSUME(expr)

Enumerations

enum class  blender::bke::compare_geometry::GeoMismatch : int8_t {
  blender::bke::compare_geometry::NumPoints , blender::bke::compare_geometry::NumEdges , blender::bke::compare_geometry::NumCorners , blender::bke::compare_geometry::NumFaces ,
  blender::bke::compare_geometry::NumCurves , blender::bke::compare_geometry::PointAttributes , blender::bke::compare_geometry::EdgeAttributes , blender::bke::compare_geometry::CornerAttributes ,
  blender::bke::compare_geometry::FaceAttributes , blender::bke::compare_geometry::CurveAttributes , blender::bke::compare_geometry::EdgeTopology , blender::bke::compare_geometry::FaceTopology ,
  blender::bke::compare_geometry::CurveTopology , blender::bke::compare_geometry::Attributes , blender::bke::compare_geometry::AttributeTypes , blender::bke::compare_geometry::Indices
}

Functions

const char * blender::bke::compare_geometry::mismatch_to_string (const GeoMismatch &mismatch)
template<typename T>
static void blender::bke::compare_geometry::sort_indices (MutableSpan< int > indices, const Span< T > values, const int component_i)
static void blender::bke::compare_geometry::sort_indices_with_id_maps (MutableSpan< int > indices, const Span< int > values, const Span< int > values_to_sorted, const Span< int > set_ids)
template<typename T>
static void blender::bke::compare_geometry::sort_per_set_based_on_attributes (const Span< int > set_sizes, MutableSpan< int > sorted_to_domain1, MutableSpan< int > sorted_to_domain2, const Span< T > values1, const Span< T > values2, const int component_i)
static void blender::bke::compare_geometry::sort_per_set_with_id_maps (const Span< int > set_sizes, const Span< int > values1, const Span< int > values2, const Span< int > values1_to_sorted, const Span< int > values2_to_sorted, const Span< int > value_set_ids, MutableSpan< int > sorted_to_domain1, MutableSpan< int > sorted_to_domain2)
template<typename T>
static bool blender::bke::compare_geometry::values_different (const T value1, const T value2, const float threshold, const int component_i)
template<typename T>
static bool blender::bke::compare_geometry::update_set_ids (MutableSpan< int > set_ids, const Span< T > values1, const Span< T > values2, const Span< int > sorted_to_values1, const Span< int > sorted_to_values2, const float threshold, const int component_i)
static bool blender::bke::compare_geometry::update_set_ids_with_id_maps (MutableSpan< int > set_ids, const Span< int > domain_to_values1, const Span< int > domain_to_values2, const Span< int > values1_to_sorted, const Span< int > values2_to_sorted, const Span< int > value_set_ids, const Span< int > sorted_to_domain1, const Span< int > sorted_to_domain2)
static void blender::bke::compare_geometry::update_set_sizes (const Span< int > set_ids, MutableSpan< int > set_sizes)
static void blender::bke::compare_geometry::edges_from_vert_sets (const Span< int2 > edges, const Span< int > verts_to_sorted, const Span< int > vert_set_ids, MutableSpan< OrderedEdge > r_edges)
static bool blender::bke::compare_geometry::sort_edges (const Span< int2 > edges1, const Span< int2 > edges2, const IndexMapping &verts, IndexMapping &edges)
static bool blender::bke::compare_geometry::sort_corners_based_on_domain (const Span< int > corner_domain1, const Span< int > corner_domain2, const IndexMapping &domain, IndexMapping &corners)
static void blender::bke::compare_geometry::calc_smallest_corner_ids (const Span< int > face_offsets, const Span< int > corners_to_sorted, const Span< int > corner_set_ids, MutableSpan< int > smallest_corner_ids)
static bool blender::bke::compare_geometry::sort_faces_based_on_corners (const IndexMapping &corners, const Span< int > face_offsets1, const Span< int > face_offsets2, IndexMapping &faces)
static bool blender::bke::compare_geometry::ignored_attribute (const StringRef id)
static std::optional< GeoMismatchblender::bke::compare_geometry::verify_attributes_compatible (const AttributeAccessor &attributes1, const AttributeAccessor &attributes2)
static std::optional< GeoMismatchblender::bke::compare_geometry::sort_domain_using_attributes (const AttributeAccessor &attributes1, const AttributeAccessor &attributes2, const AttrDomain domain, const Span< StringRef > excluded_attributes, IndexMapping &maps, const float threshold)
static void blender::bke::compare_geometry::make_set_sizes_one (IndexMapping &indices)
static bool blender::bke::compare_geometry::all_set_sizes_one (const Span< int > set_sizes)
static std::optional< GeoMismatchblender::bke::compare_geometry::construct_vert_mapping (const Mesh &mesh1, const Mesh &mesh2, IndexMapping &verts, IndexMapping &edges)
std::optional< GeoMismatchblender::bke::compare_geometry::compare_meshes (const Mesh &mesh1, const Mesh &mesh2, float threshold)
 Checks if the two meshes are different, returning the type of mismatch if any. Changes in index order are detected, but treated as a mismatch.
static bool blender::bke::compare_geometry::sort_curves (const OffsetIndices< int > offset_indices1, const OffsetIndices< int > offset_indices2, IndexMapping &curves)
std::optional< GeoMismatchblender::bke::compare_geometry::compare_curves (const CurvesGeometry &curves1, const CurvesGeometry &curves2, float threshold)
 Checks if the two curves geometries are different, returning the type of mismatch if any. Changes in index order are detected, but treated as a mismatch.
std::optional< GeoMismatchblender::bke::compare_geometry::compare_lattices (const Lattice &lattice1, const Lattice &lattice2, float threshold)
 Checks if the two lattices are different, returning the type of mismatch if any.

Macro Definition Documentation

◆ ASSERT_AND_ASSUME

#define ASSERT_AND_ASSUME ( expr)
Value:
BLI_assert(expr);
#define BLI_assert(a)
Definition BLI_assert.h:46

Referenced by blender::bke::compare_geometry::values_different().