Blender V4.3
subdiv_foreach.cc File Reference
#include "BKE_subdiv_foreach.hh"
#include "atomic_ops.h"
#include "BLI_bitmap.h"
#include "BLI_task.h"
#include "BKE_customdata.hh"
#include "BKE_mesh.hh"
#include "BKE_subdiv.hh"
#include "BKE_subdiv_mesh.hh"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Classes

struct  blender::bke::subdiv::ForeachTaskContext
 

Namespaces

namespace  blender
 
namespace  blender::bke
 
namespace  blender::bke::subdiv
 

Functions

General helpers
BLI_INLINE int blender::bke::subdiv::num_ptex_faces_per_face_get (const IndexRange face)
 
BLI_INLINE int blender::bke::subdiv::num_edges_per_ptex_face_get (const int resolution)
 
BLI_INLINE int blender::bke::subdiv::num_inner_edges_per_ptex_face_get (const int resolution)
 
BLI_INLINE int blender::bke::subdiv::num_faces_per_ptex_get (const int resolution)
 
BLI_INLINE int blender::bke::subdiv::ptex_face_resolution_get (const IndexRange face, int resolution)
 
Threading helpers
static void * blender::bke::subdiv::subdiv_foreach_tls_alloc (ForeachTaskContext *ctx)
 
static void blender::bke::subdiv::subdiv_foreach_tls_free (ForeachTaskContext *ctx, void *tls)
 
Initialization
static void blender::bke::subdiv::subdiv_foreach_ctx_count (ForeachTaskContext *ctx)
 
static void blender::bke::subdiv::subdiv_foreach_ctx_init_offsets (ForeachTaskContext *ctx)
 
static void blender::bke::subdiv::subdiv_foreach_ctx_init (Subdiv *subdiv, ForeachTaskContext *ctx)
 
static void blender::bke::subdiv::subdiv_foreach_ctx_free (ForeachTaskContext *ctx)
 
Vertex traversal process
static void blender::bke::subdiv::subdiv_foreach_corner_vertices_regular_do (ForeachTaskContext *ctx, void *tls, const int coarse_face_index, ForeachVertexFromCornerCb vertex_corner, bool check_usage)
 
static void blender::bke::subdiv::subdiv_foreach_corner_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_corner_vertices_special_do (ForeachTaskContext *ctx, void *tls, const int coarse_face_index, ForeachVertexFromCornerCb vertex_corner, bool check_usage)
 
static void blender::bke::subdiv::subdiv_foreach_corner_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_corner_vertices (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_every_corner_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_every_corner_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_every_corner_vertices (ForeachTaskContext *ctx, void *tls)
 
static void blender::bke::subdiv::subdiv_foreach_edge_vertices_regular_do (ForeachTaskContext *ctx, void *tls, const int coarse_face_index, ForeachVertexFromEdgeCb vertex_edge, bool check_usage)
 
static void blender::bke::subdiv::subdiv_foreach_edge_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_edge_vertices_special_do (ForeachTaskContext *ctx, void *tls, const int coarse_face_index, ForeachVertexFromEdgeCb vertex_edge, bool check_usage)
 
static void blender::bke::subdiv::subdiv_foreach_edge_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_edge_vertices (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_every_edge_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_every_edge_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_every_edge_vertices (ForeachTaskContext *ctx, void *tls)
 
static void blender::bke::subdiv::subdiv_foreach_inner_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_inner_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_inner_vertices (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_vertices (ForeachTaskContext *ctx, void *tls, const int face_index)
 
Edge traversal process
static int blender::bke::subdiv::subdiv_foreach_edges_row (ForeachTaskContext *ctx, void *tls, const int coarse_edge_index, const int start_subdiv_edge_index, const int start_vertex_index, const int num_edges_per_row)
 
static int blender::bke::subdiv::subdiv_foreach_edges_column (ForeachTaskContext *ctx, void *tls, const int coarse_start_edge_index, const int coarse_end_edge_index, const int start_subdiv_edge_index, const int start_vertex_index, const int num_edges_per_row)
 
static void blender::bke::subdiv::subdiv_foreach_edges_all_patches_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_edges_all_patches_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_edges_all_patches (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_edges (ForeachTaskContext *ctx, void *tls, int face_index)
 
static void blender::bke::subdiv::subdiv_foreach_boundary_edges (ForeachTaskContext *ctx, void *tls, int coarse_edge_index)
 
Loops traversal
static void blender::bke::subdiv::rotate_indices (const int rot, int *a, int *b, int *c, int *d)
 
static void blender::bke::subdiv::subdiv_foreach_loops_of_face (ForeachTaskContext *ctx, void *tls, int subdiv_loop_start_index, const int ptex_face_index, const int coarse_face_index, const int coarse_corner_index, const int rotation, int v0, int e0, int v1, int e1, int v2, int e2, int v3, int e3, const float u, const float v, const float du, const float dv)
 
static int blender::bke::subdiv::subdiv_foreach_loops_corner_index (const float u, const float v, const float du, const float dv)
 
static void blender::bke::subdiv::subdiv_foreach_loops_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_loops_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void blender::bke::subdiv::subdiv_foreach_loops (ForeachTaskContext *ctx, void *tls, int face_index)
 
Polygons traverse process
static void blender::bke::subdiv::subdiv_foreach_faces (ForeachTaskContext *ctx, void *tls, int face_index)
 
Loose elements traverse process
static void blender::bke::subdiv::subdiv_foreach_loose_vertices_task (void *__restrict userdata, const int coarse_vertex_index, const TaskParallelTLS *__restrict tls)
 
static void blender::bke::subdiv::subdiv_foreach_vertices_of_loose_edges_task (void *__restrict userdata, const int coarse_edge_index, const TaskParallelTLS *__restrict tls)
 
Subdivision process entry points
static void blender::bke::subdiv::subdiv_foreach_single_geometry_vertices (ForeachTaskContext *ctx, void *tls)
 
static void blender::bke::subdiv::subdiv_foreach_mark_non_loose_geometry (ForeachTaskContext *ctx)
 
static void blender::bke::subdiv::subdiv_foreach_single_thread_tasks (ForeachTaskContext *ctx)
 
static void blender::bke::subdiv::subdiv_foreach_task (void *__restrict userdata, const int face_index, const TaskParallelTLS *__restrict tls)
 
static void blender::bke::subdiv::subdiv_foreach_boundary_edges_task (void *__restrict userdata, const int edge_index, const TaskParallelTLS *__restrict tls)
 
static void blender::bke::subdiv::subdiv_foreach_free (const void *__restrict userdata, void *__restrict userdata_chunk)
 
bool blender::bke::subdiv::foreach_subdiv_geometry (Subdiv *subdiv, const ForeachContext *context, const ToMeshSettings *mesh_settings, const Mesh *coarse_mesh)