Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/BKE_subdiv.h')
-rw-r--r--source/blender/blenkernel/BKE_subdiv.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h
index 81d605ffb63..d79ea1ca646 100644
--- a/source/blender/blenkernel/BKE_subdiv.h
+++ b/source/blender/blenkernel/BKE_subdiv.h
@@ -79,6 +79,7 @@ typedef enum eSubdivStatsValue {
SUBDIV_STATS_EVALUATOR_REFINE,
SUBDIV_STATS_SUBDIV_TO_CCG,
SUBDIV_STATS_SUBDIV_TO_CCG_ELEMENTS,
+ SUBDIV_STATS_TOPOLOGY_COMPARE,
NUM_SUBDIV_STATS_VALUES,
} eSubdivStatsValue;
@@ -102,6 +103,8 @@ typedef struct SubdivStats {
double subdiv_to_ccg_time;
/* Time spent on CCG elements evaluation/initialization. */
double subdiv_to_ccg_elements_time;
+ /* Time spent on CCG elements evaluation/initialization. */
+ double topology_compare_time;
};
double values_[NUM_SUBDIV_STATS_VALUES];
};
@@ -187,14 +190,37 @@ void BKE_subdiv_stats_end(SubdivStats *stats, eSubdivStatsValue value);
void BKE_subdiv_stats_print(const SubdivStats *stats);
+/* ================================ SETTINGS ================================ */
+
+bool BKE_subdiv_settings_equal(const SubdivSettings *settings_a,
+ const SubdivSettings *settings_b);
+
/* ============================== CONSTRUCTION ============================== */
+/* Construct new subdivision surface descriptor, from scratch, using given
+ * settings and topology. */
Subdiv *BKE_subdiv_new_from_converter(const SubdivSettings *settings,
struct OpenSubdiv_Converter *converter);
-
Subdiv *BKE_subdiv_new_from_mesh(const SubdivSettings *settings,
const struct Mesh *mesh);
+/* Similar to above, but will not re-create descriptor if it was created for the
+ * same settings and topology.
+ * If settings or topology did change, the existing descriptor is freed and a
+ * new one is created from scratch.
+ *
+ * NOTE: It is allowed to pass NULL as an existing subdivision surface
+ * descriptor. This will create enw descriptor without any extra checks.
+ */
+Subdiv *BKE_subdiv_update_from_converter(
+ Subdiv *subdiv,
+ const SubdivSettings *settings,
+ struct OpenSubdiv_Converter *converter);
+Subdiv *BKE_subdiv_update_from_mesh(
+ Subdiv *subdiv,
+ const SubdivSettings *settings,
+ const struct Mesh *mesh);
+
void BKE_subdiv_free(Subdiv *subdiv);
/* ============================ DISPLACEMENT API ============================ */