Blender V4.3
blender::bke::subdiv Namespace Reference

Classes

struct  ConverterStorage
 
struct  Displacement
 
struct  ForeachContext
 
struct  ForeachTaskContext
 
struct  LoopsForInterpolation
 
struct  LoopsOfPtex
 
struct  MultiresDisplacementData
 
struct  PolyCornerIndex
 
struct  Settings
 
struct  Subdiv
 
struct  SubdivDeformContext
 
struct  SubdivMeshContext
 
struct  SubdivMeshTLS
 
struct  SubdivStats
 
struct  ToMeshSettings
 
struct  VerticesForInterpolation
 

Typedefs

using ForeachTopologyInformationCb
 
using ForeachVertexFromCornerCb
 
using ForeachVertexFromEdgeCb
 
using ForeachVertexInnerCb
 
using ForeachEdgeCb
 
using ForeachLoopCb
 
using ForeachPolygonCb
 
using ForeachLooseCb
 
using ForeachVertexOfLooseEdgeCb
 

Enumerations

enum  VtxBoundaryInterpolation { SUBDIV_VTX_BOUNDARY_NONE , SUBDIV_VTX_BOUNDARY_EDGE_ONLY , SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER }
 
enum  FVarLinearInterpolation {
  SUBDIV_FVAR_LINEAR_INTERPOLATION_NONE , SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_ONLY , SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_AND_JUNCTIONS , SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_JUNCTIONS_AND_CONCAVE ,
  SUBDIV_FVAR_LINEAR_INTERPOLATION_BOUNDARIES , SUBDIV_FVAR_LINEAR_INTERPOLATION_ALL
}
 
enum  StatsValue {
  SUBDIV_STATS_TOPOLOGY_REFINER_CREATION_TIME = 0 , SUBDIV_STATS_SUBDIV_TO_MESH , SUBDIV_STATS_SUBDIV_TO_MESH_GEOMETRY , SUBDIV_STATS_EVALUATOR_CREATE ,
  SUBDIV_STATS_EVALUATOR_REFINE , SUBDIV_STATS_SUBDIV_TO_CCG , SUBDIV_STATS_SUBDIV_TO_CCG_ELEMENTS , SUBDIV_STATS_TOPOLOGY_COMPARE ,
  NUM_SUBDIV_STATS_VALUES
}
 
enum  eSubdivEvaluatorType { SUBDIV_EVALUATOR_TYPE_CPU , SUBDIV_EVALUATOR_TYPE_GPU }
 
enum  eAverageWith { AVERAGE_WITH_NONE , AVERAGE_WITH_ALL , AVERAGE_WITH_PREV , AVERAGE_WITH_NEXT }
 

Functions

void init ()
 
void exit ()
 
FVarLinearInterpolation fvar_interpolation_from_uv_smooth (int uv_smooth)
 
VtxBoundaryInterpolation vtx_boundary_interpolation_from_subsurf (int boundary_smooth)
 
void stats_init (SubdivStats *stats)
 
void stats_begin (SubdivStats *stats, StatsValue value)
 
void stats_end (SubdivStats *stats, StatsValue value)
 
void stats_reset (SubdivStats *stats, StatsValue value)
 
void stats_print (const SubdivStats *stats)
 
bool settings_equal (const Settings *settings_a, const Settings *settings_b)
 
Subdivnew_from_converter (const Settings *settings, OpenSubdiv_Converter *converter)
 
Subdivnew_from_mesh (const Settings *settings, const Mesh *mesh)
 
Subdivupdate_from_converter (Subdiv *subdiv, const Settings *settings, OpenSubdiv_Converter *converter)
 
Subdivupdate_from_mesh (Subdiv *subdiv, const Settings *settings, const Mesh *mesh)
 
void free (Subdiv *subdiv)
 
void displacement_attach_from_multires (Subdiv *subdiv, Mesh *mesh, const MultiresModifierData *mmd)
 
void displacement_detach (Subdiv *subdiv)
 
intface_ptex_offset_get (Subdiv *subdiv)
 
BLI_INLINE void ptex_face_uv_to_grid_uv (float ptex_u, float ptex_v, float *r_grid_u, float *r_grid_v)
 
BLI_INLINE void grid_uv_to_ptex_face_uv (float grid_u, float grid_v, float *r_ptex_u, float *r_ptex_v)
 
BLI_INLINE int grid_size_from_level (int level)
 
BLI_INLINE int rotate_quad_to_corner (float quad_u, float quad_v, float *r_corner_u, float *r_corner_v)
 
BLI_INLINE void rotate_grid_to_quad (int corner, float grid_u, float grid_v, float *r_quad_u, float *r_quad_v)
 
BLI_INLINE float crease_to_sharpness (float edge_crease)
 
bool eval_begin (Subdiv *subdiv, eSubdivEvaluatorType evaluator_type, OpenSubdiv_EvaluatorCache *evaluator_cache, const OpenSubdiv_EvaluatorSettings *settings)
 
bool eval_begin_from_mesh (Subdiv *subdiv, const Mesh *mesh, Span< float3 > coarse_vert_positions, eSubdivEvaluatorType evaluator_type, OpenSubdiv_EvaluatorCache *evaluator_cache)
 
bool eval_refine_from_mesh (Subdiv *subdiv, const Mesh *mesh, Span< float3 > coarse_vert_positions)
 
void eval_init_displacement (Subdiv *subdiv)
 
void eval_limit_point (Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3])
 
void eval_limit_point_and_derivatives (Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], float r_dPdu[3], float r_dPdv[3])
 
void eval_limit_point_and_normal (Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], float r_N[3])
 
void eval_vertex_data (Subdiv *subdiv, const int ptex_face_index, const float u, const float v, float r_vertex_data[])
 
void eval_face_varying (Subdiv *subdiv, int face_varying_channel, int ptex_face_index, float u, float v, float r_face_varying[2])
 
void eval_displacement (Subdiv *subdiv, int ptex_face_index, float u, float v, const float dPdu[3], const float dPdv[3], float r_D[3])
 
void eval_final_point (Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3])
 
int topology_num_fvar_layers_get (const Subdiv *subdiv)
 
void converter_free (OpenSubdiv_Converter *converter)
 
int converter_vtx_boundary_interpolation_from_settings (const Settings *settings)
 
int converter_fvar_linear_from_settings (const Settings *settings)
 
void converter_init_for_mesh (OpenSubdiv_Converter *converter, const Settings *settings, const Mesh *mesh)
 
static OpenSubdiv_SchemeType get_scheme_type (const OpenSubdiv_Converter *converter)
 
static OpenSubdiv_VtxBoundaryInterpolation get_vtx_boundary_interpolation (const OpenSubdiv_Converter *converter)
 
static OpenSubdiv_FVarLinearInterpolation get_fvar_linear_interpolation (const OpenSubdiv_Converter *converter)
 
static bool specifies_full_topology (const OpenSubdiv_Converter *)
 
static int get_num_faces (const OpenSubdiv_Converter *converter)
 
static int get_num_edges (const OpenSubdiv_Converter *converter)
 
static int get_num_vertices (const OpenSubdiv_Converter *converter)
 
static int get_num_face_vertices (const OpenSubdiv_Converter *converter, int manifold_face_index)
 
static void get_face_vertices (const OpenSubdiv_Converter *converter, int manifold_face_index, int *manifold_face_vertices)
 
static void get_edge_vertices (const OpenSubdiv_Converter *converter, int manifold_edge_index, int *manifold_edge_vertices)
 
static float get_edge_sharpness (const OpenSubdiv_Converter *converter, int manifold_edge_index)
 
static bool is_infinite_sharp_vertex (const OpenSubdiv_Converter *converter, int manifold_vertex_index)
 
static float get_vertex_sharpness (const OpenSubdiv_Converter *converter, int manifold_vertex_index)
 
static int get_num_uv_layers (const OpenSubdiv_Converter *converter)
 
static void precalc_uv_layer (const OpenSubdiv_Converter *converter, const int layer_index)
 
static void finish_uv_layer (const OpenSubdiv_Converter *)
 
static int get_num_uvs (const OpenSubdiv_Converter *converter)
 
static int get_face_corner_uv_index (const OpenSubdiv_Converter *converter, const int face_index, const int corner)
 
static void free_user_data (const OpenSubdiv_Converter *converter)
 
static void init_functions (OpenSubdiv_Converter *converter)
 
static void initialize_manifold_index_array (const BitSpan not_used_map, const int num_elements, int **r_indices, int **r_indices_reverse, int *r_num_manifold_elements)
 
static void initialize_manifold_indices (ConverterStorage *storage)
 
static void init_user_data (OpenSubdiv_Converter *converter, const Settings *settings, const Mesh *mesh)
 
static int displacement_get_grid_and_coord (Displacement *displacement, const int ptex_face_index, const float u, const float v, const MDisps **r_displacement_grid, float *grid_u, float *grid_v)
 
static const MDispsdisplacement_get_other_grid (Displacement *displacement, const int ptex_face_index, const int corner, const int corner_delta)
 
BLI_INLINE eAverageWith read_displacement_grid (const MDisps *displacement_grid, const int grid_size, const float grid_u, const float grid_v, float r_tangent_D[3])
 
static void average_convert_grid_coord_to_ptex (const int num_corners, const int corner, const float grid_u, const float grid_v, float *r_ptex_face_u, float *r_ptex_face_v)
 
static void average_construct_tangent_matrix (Subdiv *subdiv, const int num_corners, const int ptex_face_index, const int corner, const float u, const float v, float r_tangent_matrix[3][3])
 
static void average_read_displacement_tangent (MultiresDisplacementData *data, const MDisps *other_displacement_grid, const float grid_u, const float grid_v, float r_tangent_D[3])
 
static void average_read_displacement_object (MultiresDisplacementData *data, const MDisps *displacement_grid, const float grid_u, const float grid_v, const int ptex_face_index, const int corner_index, float r_D[3])
 
static void average_get_other_ptex_and_corner (MultiresDisplacementData *data, const int ptex_face_index, const int corner, const int corner_delta, int *r_other_ptex_face_index, int *r_other_corner_index)
 
static void average_with_other (Displacement *displacement, const int ptex_face_index, const int corner, const float grid_u, const float grid_v, const int corner_delta, float r_D[3])
 
static void average_with_all (Displacement *displacement, const int ptex_face_index, const int corner, const float, const float, float r_D[3])
 
static void average_with_next (Displacement *displacement, const int ptex_face_index, const int corner, const float grid_u, const float, float r_D[3])
 
static void average_with_prev (Displacement *displacement, const int ptex_face_index, const int corner, const float, const float grid_v, float r_D[3])
 
static void average_displacement (Displacement *displacement, eAverageWith average_with, const int ptex_face_index, const int corner, const float grid_u, const float grid_v, float r_D[3])
 
static int displacement_get_face_corner (MultiresDisplacementData *data, const int ptex_face_index, const float u, const float v)
 
static void initialize (Displacement *displacement)
 
static void eval_displacement (Displacement *displacement, const int ptex_face_index, const float u, const float v, const float dPdu[3], const float dPdv[3], float r_D[3])
 
static void free_displacement (Displacement *displacement)
 
static int count_num_ptex_faces (const Mesh *mesh)
 
static void displacement_data_init_mapping (Displacement *displacement, const Mesh *mesh)
 
static void displacement_init_data (Displacement *displacement, Subdiv *subdiv, Mesh *mesh, const MultiresModifierData *mmd)
 
static void displacement_init_functions (Displacement *displacement)
 
static eOpenSubdivEvaluator opensubdiv_evalutor_from_subdiv_evaluator_type (eSubdivEvaluatorType evaluator_type)
 
Public entry point
void deform_coarse_vertices (Subdiv *subdiv, const Mesh *coarse_mesh, MutableSpan< float3 > vert_positions)
 
Meshsubdiv_to_mesh (Subdiv *subdiv, const ToMeshSettings *settings, const Mesh *coarse_mesh)
 
Subdivision process entry points
bool foreach_subdiv_geometry (Subdiv *subdiv, const ForeachContext *context, const ToMeshSettings *mesh_settings, const Mesh *coarse_mesh)
 
static void subdiv_foreach_single_geometry_vertices (ForeachTaskContext *ctx, void *tls)
 
static void subdiv_foreach_mark_non_loose_geometry (ForeachTaskContext *ctx)
 
static void subdiv_foreach_single_thread_tasks (ForeachTaskContext *ctx)
 
static void subdiv_foreach_task (void *__restrict userdata, const int face_index, const TaskParallelTLS *__restrict tls)
 
static void subdiv_foreach_boundary_edges_task (void *__restrict userdata, const int edge_index, const TaskParallelTLS *__restrict tls)
 
static void subdiv_foreach_free (const void *__restrict userdata, void *__restrict userdata_chunk)
 
Loose elements subdivision process
float3 mesh_interpolate_position_on_edge (Span< float3 > coarse_positions, Span< int2 > coarse_edges, GroupedSpan< int > vert_to_edge_map, int coarse_edge_index, bool is_simple, float u)
 
static void subdiv_mesh_vertex_loose (const ForeachContext *foreach_context, void *, const int coarse_vertex_index, const int subdiv_vertex_index)
 
static std::array< std::optional< int2 >, 2 > find_edge_neighbors (const Span< int2 > coarse_edges, const GroupedSpan< int > vert_to_edge_map, const int edge_index)
 
static std::array< float3, 4 > find_loose_edge_interpolation_positions (const Span< float3 > coarse_positions, const int2 &coarse_edge, const std::array< std::optional< int2 >, 2 > &neighbors)
 
static void subdiv_mesh_vertex_of_loose_edge_interpolate (SubdivMeshContext *ctx, const int2 &coarse_edge, const float u, const int subdiv_vertex_index)
 
static void subdiv_mesh_vertex_of_loose_edge (const ForeachContext *foreach_context, void *, const int coarse_edge_index, const float u, const int subdiv_vertex_index)
 
Subdivision context
static void subdiv_mesh_prepare_accumulator (SubdivDeformContext *ctx, int num_vertices)
 
static void subdiv_mesh_context_free (SubdivDeformContext *ctx)
 
static void subdiv_mesh_ctx_cache_uv_layers (SubdivMeshContext *ctx)
 
static void subdiv_mesh_ctx_cache_custom_data_layers (SubdivMeshContext *ctx)
 
static void subdiv_mesh_prepare_accumulator (SubdivMeshContext *ctx, int num_vertices)
 
static void subdiv_mesh_context_free (SubdivMeshContext *ctx)
 
Accumulation helpers
static void subdiv_accumulate_vertex_displacement (SubdivDeformContext *ctx, const int ptex_face_index, const float u, const float v, int vertex_index)
 
static void subdiv_accumulate_vertex_displacement (SubdivMeshContext *ctx, const int ptex_face_index, const float u, const float v, const int subdiv_vertex_index)
 
Subdivision callbacks
static bool subdiv_mesh_topology_info (const ForeachContext *foreach_context, const int, const int, const int, const int, const int *)
 
static void subdiv_mesh_vertex_every_corner (const ForeachContext *foreach_context, void *, const int ptex_face_index, const float u, const float v, const int coarse_vertex_index, const int, const int, const int)
 
static void subdiv_mesh_vertex_corner (const ForeachContext *foreach_context, void *, const int ptex_face_index, const float u, const float v, const int coarse_vertex_index, const int, const int, const int)
 
Initialization
static void setup_foreach_callbacks (const SubdivDeformContext *subdiv_context, ForeachContext *foreach_context)
 
static void subdiv_foreach_ctx_count (ForeachTaskContext *ctx)
 
static void subdiv_foreach_ctx_init_offsets (ForeachTaskContext *ctx)
 
static void subdiv_foreach_ctx_init (Subdiv *subdiv, ForeachTaskContext *ctx)
 
static void subdiv_foreach_ctx_free (ForeachTaskContext *ctx)
 
static void setup_foreach_callbacks (const SubdivMeshContext *subdiv_context, ForeachContext *foreach_context)
 
General helpers
BLI_INLINE int num_ptex_faces_per_face_get (const IndexRange face)
 
BLI_INLINE int num_edges_per_ptex_face_get (const int resolution)
 
BLI_INLINE int num_inner_edges_per_ptex_face_get (const int resolution)
 
BLI_INLINE int num_faces_per_ptex_get (const int resolution)
 
BLI_INLINE int ptex_face_resolution_get (const IndexRange face, int resolution)
 
Threading helpers
static void * subdiv_foreach_tls_alloc (ForeachTaskContext *ctx)
 
static void subdiv_foreach_tls_free (ForeachTaskContext *ctx, void *tls)
 
Vertex traversal process
static void subdiv_foreach_corner_vertices_regular_do (ForeachTaskContext *ctx, void *tls, const int coarse_face_index, ForeachVertexFromCornerCb vertex_corner, bool check_usage)
 
static void subdiv_foreach_corner_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_corner_vertices_special_do (ForeachTaskContext *ctx, void *tls, const int coarse_face_index, ForeachVertexFromCornerCb vertex_corner, bool check_usage)
 
static void subdiv_foreach_corner_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_corner_vertices (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_every_corner_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_every_corner_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_every_corner_vertices (ForeachTaskContext *ctx, void *tls)
 
static void subdiv_foreach_edge_vertices_regular_do (ForeachTaskContext *ctx, void *tls, const int coarse_face_index, ForeachVertexFromEdgeCb vertex_edge, bool check_usage)
 
static void subdiv_foreach_edge_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_edge_vertices_special_do (ForeachTaskContext *ctx, void *tls, const int coarse_face_index, ForeachVertexFromEdgeCb vertex_edge, bool check_usage)
 
static void subdiv_foreach_edge_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_edge_vertices (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_every_edge_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_every_edge_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_every_edge_vertices (ForeachTaskContext *ctx, void *tls)
 
static void subdiv_foreach_inner_vertices_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_inner_vertices_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_inner_vertices (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_vertices (ForeachTaskContext *ctx, void *tls, const int face_index)
 
Edge traversal process
static int 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 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 subdiv_foreach_edges_all_patches_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_edges_all_patches_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_edges_all_patches (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_edges (ForeachTaskContext *ctx, void *tls, int face_index)
 
static void subdiv_foreach_boundary_edges (ForeachTaskContext *ctx, void *tls, int coarse_edge_index)
 
Loops traversal
static void rotate_indices (const int rot, int *a, int *b, int *c, int *d)
 
static void 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 subdiv_foreach_loops_corner_index (const float u, const float v, const float du, const float dv)
 
static void subdiv_foreach_loops_regular (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_loops_special (ForeachTaskContext *ctx, void *tls, const int coarse_face_index)
 
static void subdiv_foreach_loops (ForeachTaskContext *ctx, void *tls, int face_index)
 
Polygons traverse process
static void subdiv_foreach_faces (ForeachTaskContext *ctx, void *tls, int face_index)
 
Loose elements traverse process
static void subdiv_foreach_loose_vertices_task (void *__restrict userdata, const int coarse_vertex_index, const TaskParallelTLS *__restrict tls)
 
static void subdiv_foreach_vertices_of_loose_edges_task (void *__restrict userdata, const int coarse_edge_index, const TaskParallelTLS *__restrict tls)
 
Loop custom data copy helpers
static void loops_of_ptex_get (LoopsOfPtex *loops_of_ptex, const IndexRange coarse_face, const int ptex_of_face_index)
 
Vertex custom data interpolation helpers
static void vertex_interpolation_init (const SubdivMeshContext *ctx, VerticesForInterpolation *vertex_interpolation, const IndexRange coarse_face)
 
static void vertex_interpolation_from_corner (const SubdivMeshContext *ctx, VerticesForInterpolation *vertex_interpolation, const IndexRange coarse_face, const int corner)
 
static void vertex_interpolation_end (VerticesForInterpolation *vertex_interpolation)
 
Loop custom data interpolation helpers
static void loop_interpolation_init (const SubdivMeshContext *ctx, LoopsForInterpolation *loop_interpolation, const IndexRange coarse_face)
 
static void loop_interpolation_from_corner (const SubdivMeshContext *ctx, LoopsForInterpolation *loop_interpolation, const IndexRange coarse_face, const int corner)
 
static void loop_interpolation_end (LoopsForInterpolation *loop_interpolation)
 
TLS
static void subdiv_mesh_tls_free (void *tls_v)
 
Evaluation helper functions
static void subdiv_vertex_orco_evaluate (const SubdivMeshContext *ctx, const int ptex_face_index, const float u, const float v, const int subdiv_vertex_index)
 
Callbacks
static bool subdiv_mesh_topology_info (const ForeachContext *foreach_context, const int num_vertices, const int num_edges, const int num_loops, const int num_faces, const int *)
 
Vertex subdivision process
static void subdiv_vertex_data_copy (const SubdivMeshContext *ctx, const int coarse_vertex_index, const int subdiv_vertex_index)
 
static void subdiv_vertex_data_interpolate (const SubdivMeshContext *ctx, const int subdiv_vertex_index, const VerticesForInterpolation *vertex_interpolation, const float u, const float v)
 
static void evaluate_vertex_and_apply_displacement_copy (const SubdivMeshContext *ctx, const int ptex_face_index, const float u, const float v, const int coarse_vertex_index, const int subdiv_vertex_index)
 
static void evaluate_vertex_and_apply_displacement_interpolate (const SubdivMeshContext *ctx, const int ptex_face_index, const float u, const float v, VerticesForInterpolation *vertex_interpolation, const int subdiv_vertex_index)
 
static void subdiv_mesh_vertex_displacement_every_corner_or_edge (const ForeachContext *foreach_context, void *, const int ptex_face_index, const float u, const float v, const int subdiv_vertex_index)
 
static void subdiv_mesh_vertex_displacement_every_corner (const ForeachContext *foreach_context, void *tls, const int ptex_face_index, const float u, const float v, const int, const int, const int, const int subdiv_vertex_index)
 
static void subdiv_mesh_vertex_displacement_every_edge (const ForeachContext *foreach_context, void *tls, const int ptex_face_index, const float u, const float v, const int, const int, const int, const int subdiv_vertex_index)
 
static void subdiv_mesh_vertex_corner (const ForeachContext *foreach_context, void *, const int ptex_face_index, const float u, const float v, const int coarse_vertex_index, const int, const int, const int subdiv_vertex_index)
 
static void subdiv_mesh_ensure_vertex_interpolation (SubdivMeshContext *ctx, SubdivMeshTLS *tls, const int coarse_face_index, const int coarse_corner)
 
static void subdiv_mesh_vertex_edge (const ForeachContext *foreach_context, void *tls_v, const int ptex_face_index, const float u, const float v, const int, const int coarse_face_index, const int coarse_corner, const int subdiv_vertex_index)
 
static bool subdiv_mesh_is_center_vertex (const IndexRange coarse_face, const float u, const float v)
 
static void subdiv_mesh_tag_center_vertex (const IndexRange coarse_face, const int subdiv_vertex_index, const float u, const float v, Mesh *subdiv_mesh)
 
static void subdiv_mesh_vertex_inner (const ForeachContext *foreach_context, void *tls_v, const int ptex_face_index, const float u, const float v, const int coarse_face_index, const int coarse_corner, const int subdiv_vertex_index)
 
Edge subdivision process
static void subdiv_copy_edge_data (SubdivMeshContext *ctx, const int subdiv_edge_index, const int coarse_edge_index)
 
static void subdiv_mesh_edge (const ForeachContext *foreach_context, void *, const int coarse_edge_index, const int subdiv_edge_index, const bool, const int subdiv_v1, const int subdiv_v2)
 
Loops creation/interpolation
static void subdiv_interpolate_corner_data (const SubdivMeshContext *ctx, const int subdiv_loop_index, const LoopsForInterpolation *loop_interpolation, const float u, const float v)
 
static void subdiv_eval_uv_layer (SubdivMeshContext *ctx, const int corner_index, const int ptex_face_index, const float u, const float v)
 
static void subdiv_mesh_ensure_loop_interpolation (SubdivMeshContext *ctx, SubdivMeshTLS *tls, const int coarse_face_index, const int coarse_corner)
 
static void subdiv_mesh_loop (const ForeachContext *foreach_context, void *tls_v, const int ptex_face_index, const float u, const float v, const int, const int coarse_face_index, const int coarse_corner, const int subdiv_loop_index, const int subdiv_vertex_index, const int subdiv_edge_index)
 
Polygons subdivision process
static void subdiv_mesh_face (const ForeachContext *foreach_context, void *, const int coarse_face_index, const int subdiv_face_index, const int start_loop_index, const int)
 

Typedef Documentation

◆ ForeachEdgeCb

Initial value:
void (*)(const ForeachContext *context,
void *tls,
int coarse_edge_index,
int subdiv_edge_index,
bool is_loose,
int subdiv_v1,
int subdiv_v2)

Definition at line 57 of file BKE_subdiv_foreach.hh.

◆ ForeachLoopCb

Initial value:
void (*)(const ForeachContext *context,
void *tls,
int ptex_face_index,
float u,
float v,
int coarse_loop_index,
int coarse_face_index,
int coarse_corner,
int subdiv_loop_index,
int subdiv_vertex_index,
int subdiv_edge_index)
ATTR_WARN_UNUSED_RESULT const BMVert * v

Definition at line 65 of file BKE_subdiv_foreach.hh.

◆ ForeachLooseCb

Initial value:
void (*)(const ForeachContext *context,
void *tls,
int coarse_vertex_index,
int subdiv_vertex_index)

Definition at line 84 of file BKE_subdiv_foreach.hh.

◆ ForeachPolygonCb

Initial value:
void (*)(const ForeachContext *context,
void *tls,
int coarse_face_index,
int subdiv_face_index,
int start_loop_index,
int num_loops)

Definition at line 77 of file BKE_subdiv_foreach.hh.

◆ ForeachTopologyInformationCb

Initial value:
bool (*)(const ForeachContext *context,
int num_vertices,
int num_edges,
int num_loops,
int num_faces,
const int *subdiv_face_offset)

Definition at line 21 of file BKE_subdiv_foreach.hh.

◆ ForeachVertexFromCornerCb

Initial value:
void (*)(const ForeachContext *context,
void *tls,
int ptex_face_index,
float u,
float v,
int coarse_vertex_index,
int coarse_face_index,
int coarse_corner,
int subdiv_vertex_index)

Definition at line 28 of file BKE_subdiv_foreach.hh.

◆ ForeachVertexFromEdgeCb

Initial value:
void (*)(const ForeachContext *context,
void *tls,
int ptex_face_index,
float u,
float v,
int coarse_edge_index,
int coarse_face_index,
int coarse_corner,
int subdiv_vertex_index)

Definition at line 38 of file BKE_subdiv_foreach.hh.

◆ ForeachVertexInnerCb

Initial value:
void (*)(const ForeachContext *context,
void *tls,
int ptex_face_index,
float u,
float v,
int coarse_face_index,
int coarse_corner,
int subdiv_vertex_index)

Definition at line 48 of file BKE_subdiv_foreach.hh.

◆ ForeachVertexOfLooseEdgeCb

Initial value:
void (*)(const ForeachContext *context,
void *tls,
int coarse_edge_index,
float u,
int subdiv_vertex_index)

Definition at line 89 of file BKE_subdiv_foreach.hh.

Enumeration Type Documentation

◆ eAverageWith

Enumerator
AVERAGE_WITH_NONE 
AVERAGE_WITH_ALL 
AVERAGE_WITH_PREV 
AVERAGE_WITH_NEXT 

Definition at line 59 of file subdiv_displacement_multires.cc.

◆ eSubdivEvaluatorType

Enumerator
SUBDIV_EVALUATOR_TYPE_CPU 
SUBDIV_EVALUATOR_TYPE_GPU 

Definition at line 23 of file BKE_subdiv_eval.hh.

◆ FVarLinearInterpolation

Enumerator
SUBDIV_FVAR_LINEAR_INTERPOLATION_NONE 
SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_ONLY 
SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_AND_JUNCTIONS 
SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_JUNCTIONS_AND_CONCAVE 
SUBDIV_FVAR_LINEAR_INTERPOLATION_BOUNDARIES 
SUBDIV_FVAR_LINEAR_INTERPOLATION_ALL 

Definition at line 33 of file BKE_subdiv.hh.

◆ StatsValue

Enumerator
SUBDIV_STATS_TOPOLOGY_REFINER_CREATION_TIME 
SUBDIV_STATS_SUBDIV_TO_MESH 
SUBDIV_STATS_SUBDIV_TO_MESH_GEOMETRY 
SUBDIV_STATS_EVALUATOR_CREATE 
SUBDIV_STATS_EVALUATOR_REFINE 
SUBDIV_STATS_SUBDIV_TO_CCG 
SUBDIV_STATS_SUBDIV_TO_CCG_ELEMENTS 
SUBDIV_STATS_TOPOLOGY_COMPARE 
NUM_SUBDIV_STATS_VALUES 

Definition at line 75 of file BKE_subdiv.hh.

◆ VtxBoundaryInterpolation

Enumerator
SUBDIV_VTX_BOUNDARY_NONE 
SUBDIV_VTX_BOUNDARY_EDGE_ONLY 
SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER 

Definition at line 24 of file BKE_subdiv.hh.

Function Documentation

◆ average_construct_tangent_matrix()

static void blender::bke::subdiv::average_construct_tangent_matrix ( Subdiv * subdiv,
const int num_corners,
const int ptex_face_index,
const int corner,
const float u,
const float v,
float r_tangent_matrix[3][3] )
static

◆ average_convert_grid_coord_to_ptex()

static void blender::bke::subdiv::average_convert_grid_coord_to_ptex ( const int num_corners,
const int corner,
const float grid_u,
const float grid_v,
float * r_ptex_face_u,
float * r_ptex_face_v )
static

◆ average_displacement()

static void blender::bke::subdiv::average_displacement ( Displacement * displacement,
eAverageWith average_with,
const int ptex_face_index,
const int corner,
const float grid_u,
const float grid_v,
float r_D[3] )
static

◆ average_get_other_ptex_and_corner()

static void blender::bke::subdiv::average_get_other_ptex_and_corner ( MultiresDisplacementData * data,
const int ptex_face_index,
const int corner,
const int corner_delta,
int * r_other_ptex_face_index,
int * r_other_corner_index )
static

◆ average_read_displacement_object()

static void blender::bke::subdiv::average_read_displacement_object ( MultiresDisplacementData * data,
const MDisps * displacement_grid,
const float grid_u,
const float grid_v,
const int ptex_face_index,
const int corner_index,
float r_D[3] )
static

◆ average_read_displacement_tangent()

static void blender::bke::subdiv::average_read_displacement_tangent ( MultiresDisplacementData * data,
const MDisps * other_displacement_grid,
const float grid_u,
const float grid_v,
float r_tangent_D[3] )
static

◆ average_with_all()

static void blender::bke::subdiv::average_with_all ( Displacement * displacement,
const int ptex_face_index,
const int corner,
const float ,
const float ,
float r_D[3] )
static

◆ average_with_next()

static void blender::bke::subdiv::average_with_next ( Displacement * displacement,
const int ptex_face_index,
const int corner,
const float grid_u,
const float ,
float r_D[3] )
static

Definition at line 260 of file subdiv_displacement_multires.cc.

References average_with_other().

Referenced by average_displacement().

◆ average_with_other()

static void blender::bke::subdiv::average_with_other ( Displacement * displacement,
const int ptex_face_index,
const int corner,
const float grid_u,
const float grid_v,
const int corner_delta,
float r_D[3] )
static

◆ average_with_prev()

static void blender::bke::subdiv::average_with_prev ( Displacement * displacement,
const int ptex_face_index,
const int corner,
const float ,
const float grid_v,
float r_D[3] )
static

Definition at line 270 of file subdiv_displacement_multires.cc.

References average_with_other().

Referenced by average_displacement().

◆ converter_free()

void blender::bke::subdiv::converter_free ( OpenSubdiv_Converter * converter)

Definition at line 15 of file subdiv_converter.cc.

References OpenSubdiv_Converter::freeUserData.

Referenced by new_from_mesh(), and update_from_mesh().

◆ converter_fvar_linear_from_settings()

◆ converter_init_for_mesh()

void blender::bke::subdiv::converter_init_for_mesh ( OpenSubdiv_Converter * converter,
const Settings * settings,
const Mesh * mesh )

Definition at line 399 of file subdiv_converter_mesh.cc.

References init_functions(), and init_user_data().

Referenced by new_from_mesh(), and update_from_mesh().

◆ converter_vtx_boundary_interpolation_from_settings()

int blender::bke::subdiv::converter_vtx_boundary_interpolation_from_settings ( const Settings * settings)

◆ count_num_ptex_faces()

static int blender::bke::subdiv::count_num_ptex_faces ( const Mesh * mesh)
static

Definition at line 368 of file subdiv_displacement_multires.cc.

Referenced by displacement_data_init_mapping().

◆ crease_to_sharpness()

BLI_INLINE float blender::bke::subdiv::crease_to_sharpness ( float edge_crease)

Definition at line 93 of file subdiv_inline.hh.

Referenced by get_edge_sharpness(), and get_vertex_sharpness().

◆ deform_coarse_vertices()

◆ displacement_attach_from_multires()

◆ displacement_data_init_mapping()

static void blender::bke::subdiv::displacement_data_init_mapping ( Displacement * displacement,
const Mesh * mesh )
static

◆ displacement_detach()

void blender::bke::subdiv::displacement_detach ( Subdiv * subdiv)

◆ displacement_get_face_corner()

static int blender::bke::subdiv::displacement_get_face_corner ( MultiresDisplacementData * data,
const int ptex_face_index,
const float u,
const float v )
static

◆ displacement_get_grid_and_coord()

static int blender::bke::subdiv::displacement_get_grid_and_coord ( Displacement * displacement,
const int ptex_face_index,
const float u,
const float v,
const MDisps ** r_displacement_grid,
float * grid_u,
float * grid_v )
static

◆ displacement_get_other_grid()

static const MDisps * blender::bke::subdiv::displacement_get_other_grid ( Displacement * displacement,
const int ptex_face_index,
const int corner,
const int corner_delta )
static

◆ displacement_init_data()

◆ displacement_init_functions()

◆ eval_begin()

◆ eval_begin_from_mesh()

bool blender::bke::subdiv::eval_begin_from_mesh ( Subdiv * subdiv,
const Mesh * mesh,
Span< float3 > coarse_vert_positions,
eSubdivEvaluatorType evaluator_type,
OpenSubdiv_EvaluatorCache * evaluator_cache )

◆ eval_displacement() [1/2]

static void blender::bke::subdiv::eval_displacement ( Displacement * displacement,
const int ptex_face_index,
const float u,
const float v,
const float dPdu[3],
const float dPdv[3],
float r_D[3] )
static

◆ eval_displacement() [2/2]

void blender::bke::subdiv::eval_displacement ( Subdiv * subdiv,
int ptex_face_index,
float u,
float v,
const float dPdu[3],
const float dPdv[3],
float r_D[3] )

◆ eval_face_varying()

void blender::bke::subdiv::eval_face_varying ( Subdiv * subdiv,
int face_varying_channel,
int ptex_face_index,
float u,
float v,
float r_face_varying[2] )

◆ eval_final_point()

void blender::bke::subdiv::eval_final_point ( Subdiv * subdiv,
int ptex_face_index,
float u,
float v,
float r_P[3] )

◆ eval_init_displacement()

void blender::bke::subdiv::eval_init_displacement ( Subdiv * subdiv)

◆ eval_limit_point()

void blender::bke::subdiv::eval_limit_point ( Subdiv * subdiv,
int ptex_face_index,
float u,
float v,
float r_P[3] )

◆ eval_limit_point_and_derivatives()

◆ eval_limit_point_and_normal()

void blender::bke::subdiv::eval_limit_point_and_normal ( Subdiv * subdiv,
int ptex_face_index,
float u,
float v,
float r_P[3],
float r_N[3] )

Definition at line 324 of file subdiv_eval.cc.

References cross_v3_v3v3(), eval_limit_point_and_derivatives(), normalize_v3(), and v.

◆ eval_refine_from_mesh()

◆ eval_vertex_data()

void blender::bke::subdiv::eval_vertex_data ( Subdiv * subdiv,
const int ptex_face_index,
const float u,
const float v,
float r_vertex_data[] )

◆ evaluate_vertex_and_apply_displacement_copy()

◆ evaluate_vertex_and_apply_displacement_interpolate()

static void blender::bke::subdiv::evaluate_vertex_and_apply_displacement_interpolate ( const SubdivMeshContext * ctx,
const int ptex_face_index,
const float u,
const float v,
VerticesForInterpolation * vertex_interpolation,
const int subdiv_vertex_index )
static

◆ exit()

void blender::bke::subdiv::exit ( )

Definition at line 40 of file subdiv.cc.

References openSubdiv_cleanup().

◆ face_ptex_offset_get()

◆ find_edge_neighbors()

static std::array< std::optional< int2 >, 2 > blender::bke::subdiv::find_edge_neighbors ( const Span< int2 > coarse_edges,
const GroupedSpan< int > vert_to_edge_map,
const int edge_index )
static

Definition at line 1012 of file subdiv_mesh.cc.

References blender::Span< T >::size().

Referenced by mesh_interpolate_position_on_edge().

◆ find_loose_edge_interpolation_positions()

static std::array< float3, 4 > blender::bke::subdiv::find_loose_edge_interpolation_positions ( const Span< float3 > coarse_positions,
const int2 & coarse_edge,
const std::array< std::optional< int2 >, 2 > & neighbors )
static

Definition at line 1029 of file subdiv_mesh.cc.

References blender::bke::mesh::edge_other_vert(), and result.

Referenced by mesh_interpolate_position_on_edge().

◆ finish_uv_layer()

static void blender::bke::subdiv::finish_uv_layer ( const OpenSubdiv_Converter * )
static

Definition at line 244 of file subdiv_converter_mesh.cc.

Referenced by init_functions().

◆ foreach_subdiv_geometry()

bool blender::bke::subdiv::foreach_subdiv_geometry ( Subdiv * subdiv,
const ForeachContext * context,
const ToMeshSettings * mesh_settings,
const Mesh * coarse_mesh )

◆ free()

◆ free_displacement()

static void blender::bke::subdiv::free_displacement ( Displacement * displacement)
static

◆ free_user_data()

◆ fvar_interpolation_from_uv_smooth()

◆ get_edge_sharpness()

◆ get_edge_vertices()

static void blender::bke::subdiv::get_edge_vertices ( const OpenSubdiv_Converter * converter,
int manifold_edge_index,
int * manifold_edge_vertices )
static

◆ get_face_corner_uv_index()

static int blender::bke::subdiv::get_face_corner_uv_index ( const OpenSubdiv_Converter * converter,
const int face_index,
const int corner )
static

◆ get_face_vertices()

static void blender::bke::subdiv::get_face_vertices ( const OpenSubdiv_Converter * converter,
int manifold_face_index,
int * manifold_face_vertices )
static

◆ get_fvar_linear_interpolation()

static OpenSubdiv_FVarLinearInterpolation blender::bke::subdiv::get_fvar_linear_interpolation ( const OpenSubdiv_Converter * converter)
static

◆ get_num_edges()

static int blender::bke::subdiv::get_num_edges ( const OpenSubdiv_Converter * converter)
static

◆ get_num_face_vertices()

static int blender::bke::subdiv::get_num_face_vertices ( const OpenSubdiv_Converter * converter,
int manifold_face_index )
static

◆ get_num_faces()

static int blender::bke::subdiv::get_num_faces ( const OpenSubdiv_Converter * converter)
static

◆ get_num_uv_layers()

static int blender::bke::subdiv::get_num_uv_layers ( const OpenSubdiv_Converter * converter)
static

◆ get_num_uvs()

static int blender::bke::subdiv::get_num_uvs ( const OpenSubdiv_Converter * converter)
static

◆ get_num_vertices()

static int blender::bke::subdiv::get_num_vertices ( const OpenSubdiv_Converter * converter)
static

◆ get_scheme_type()

◆ get_vertex_sharpness()

◆ get_vtx_boundary_interpolation()

static OpenSubdiv_VtxBoundaryInterpolation blender::bke::subdiv::get_vtx_boundary_interpolation ( const OpenSubdiv_Converter * converter)
static

◆ grid_size_from_level()

◆ grid_uv_to_ptex_face_uv()

BLI_INLINE void blender::bke::subdiv::grid_uv_to_ptex_face_uv ( float grid_u,
float grid_v,
float * r_ptex_u,
float * r_ptex_v )

◆ init()

void blender::bke::subdiv::init ( )

Definition at line 35 of file subdiv.cc.

References openSubdiv_init().

Referenced by WM_init().

◆ init_functions()

static void blender::bke::subdiv::init_functions ( OpenSubdiv_Converter * converter)
static

Definition at line 271 of file subdiv_converter_mesh.cc.

References finish_uv_layer(), OpenSubdiv_Converter::finishUVLayer, free_user_data(), OpenSubdiv_Converter::freeUserData, get_edge_sharpness(), get_edge_vertices(), get_face_corner_uv_index(), get_face_vertices(), get_fvar_linear_interpolation(), get_num_edges(), get_num_face_vertices(), get_num_faces(), get_num_uv_layers(), get_num_uvs(), get_num_vertices(), get_scheme_type(), get_vertex_sharpness(), get_vtx_boundary_interpolation(), OpenSubdiv_Converter::getEdgeFaces, OpenSubdiv_Converter::getEdgeSharpness, OpenSubdiv_Converter::getEdgeVertices, OpenSubdiv_Converter::getFaceCornerUVIndex, OpenSubdiv_Converter::getFaceEdges, OpenSubdiv_Converter::getFaceVertices, OpenSubdiv_Converter::getFVarLinearInterpolation, OpenSubdiv_Converter::getNumEdgeFaces, OpenSubdiv_Converter::getNumEdges, OpenSubdiv_Converter::getNumFaces, OpenSubdiv_Converter::getNumFaceVertices, OpenSubdiv_Converter::getNumUVCoordinates, OpenSubdiv_Converter::getNumUVLayers, OpenSubdiv_Converter::getNumVertexEdges, OpenSubdiv_Converter::getNumVertexFaces, OpenSubdiv_Converter::getNumVertices, OpenSubdiv_Converter::getSchemeType, OpenSubdiv_Converter::getVertexEdges, OpenSubdiv_Converter::getVertexFaces, OpenSubdiv_Converter::getVertexSharpness, OpenSubdiv_Converter::getVtxBoundaryInterpolation, is_infinite_sharp_vertex(), OpenSubdiv_Converter::isInfiniteSharpVertex, precalc_uv_layer(), OpenSubdiv_Converter::precalcUVLayer, specifies_full_topology(), and OpenSubdiv_Converter::specifiesFullTopology.

Referenced by converter_init_for_mesh().

◆ init_user_data()

◆ initialize()

static void blender::bke::subdiv::initialize ( Displacement * displacement)
static

◆ initialize_manifold_index_array()

static void blender::bke::subdiv::initialize_manifold_index_array ( const BitSpan not_used_map,
const int num_elements,
int ** r_indices,
int ** r_indices_reverse,
int * r_num_manifold_elements )
static

◆ initialize_manifold_indices()

◆ is_infinite_sharp_vertex()

◆ loop_interpolation_end()

◆ loop_interpolation_from_corner()

◆ loop_interpolation_init()

◆ loops_of_ptex_get()

◆ mesh_interpolate_position_on_edge()

float3 blender::bke::subdiv::mesh_interpolate_position_on_edge ( Span< float3 > coarse_positions,
Span< int2 > coarse_edges,
GroupedSpan< int > vert_to_edge_map,
int coarse_edge_index,
bool is_simple,
float u )

Interpolate a position along the coarse_edge at the relative u coordinate. If is_simple is false, this will perform a B-Spline interpolation using the edge neighbors, otherwise a linear interpolation will be done base on the edge vertices.

Definition at line 1055 of file subdiv_mesh.cc.

References find_edge_neighbors(), find_loose_edge_interpolation_positions(), blender::math::interpolate(), KEY_BSPLINE, key_curve_position_weights(), and blender::bke::attribute_math::mix4().

Referenced by subdiv_mesh_vertex_of_loose_edge().

◆ new_from_converter()

◆ new_from_mesh()

Subdiv * blender::bke::subdiv::new_from_mesh ( const Settings * settings,
const Mesh * mesh )

Definition at line 133 of file subdiv.cc.

References converter_free(), converter_init_for_mesh(), and new_from_converter().

Referenced by subdivide_edit_mesh().

◆ num_edges_per_ptex_face_get()

BLI_INLINE int blender::bke::subdiv::num_edges_per_ptex_face_get ( const int resolution)

◆ num_faces_per_ptex_get()

BLI_INLINE int blender::bke::subdiv::num_faces_per_ptex_get ( const int resolution)

◆ num_inner_edges_per_ptex_face_get()

BLI_INLINE int blender::bke::subdiv::num_inner_edges_per_ptex_face_get ( const int resolution)

◆ num_ptex_faces_per_face_get()

BLI_INLINE int blender::bke::subdiv::num_ptex_faces_per_face_get ( const IndexRange face)

◆ opensubdiv_evalutor_from_subdiv_evaluator_type()

static eOpenSubdivEvaluator blender::bke::subdiv::opensubdiv_evalutor_from_subdiv_evaluator_type ( eSubdivEvaluatorType evaluator_type)
static

◆ precalc_uv_layer()

◆ ptex_face_resolution_get()

◆ ptex_face_uv_to_grid_uv()

BLI_INLINE void blender::bke::subdiv::ptex_face_uv_to_grid_uv ( float ptex_u,
float ptex_v,
float * r_grid_u,
float * r_grid_v )

◆ read_displacement_grid()

BLI_INLINE eAverageWith blender::bke::subdiv::read_displacement_grid ( const MDisps * displacement_grid,
const int grid_size,
const float grid_u,
const float grid_v,
float r_tangent_D[3] )

◆ rotate_grid_to_quad()

BLI_INLINE void blender::bke::subdiv::rotate_grid_to_quad ( int corner,
float grid_u,
float grid_v,
float * r_quad_u,
float * r_quad_v )

◆ rotate_indices()

static void blender::bke::subdiv::rotate_indices ( const int rot,
int * a,
int * b,
int * c,
int * d )
static

Definition at line 982 of file subdiv_foreach.cc.

References b, and rot.

Referenced by subdiv_foreach_loops_of_face().

◆ rotate_quad_to_corner()

BLI_INLINE int blender::bke::subdiv::rotate_quad_to_corner ( float quad_u,
float quad_v,
float * r_corner_u,
float * r_corner_v )

◆ settings_equal()

◆ setup_foreach_callbacks() [1/2]

◆ setup_foreach_callbacks() [2/2]

◆ specifies_full_topology()

static bool blender::bke::subdiv::specifies_full_topology ( const OpenSubdiv_Converter * )
static

Definition at line 101 of file subdiv_converter_mesh.cc.

Referenced by init_functions().

◆ stats_begin()

◆ stats_end()

◆ stats_init()

◆ stats_print()

void blender::bke::subdiv::stats_print ( const SubdivStats * stats)

Definition at line 44 of file subdiv_stats.cc.

References printf, and STATS_PRINT_TIME.

◆ stats_reset()

void blender::bke::subdiv::stats_reset ( SubdivStats * stats,
StatsValue value )

Definition at line 39 of file subdiv_stats.cc.

References blender::bke::subdiv::SubdivStats::values_.

Referenced by eval_begin().

◆ subdiv_accumulate_vertex_displacement() [1/2]

◆ subdiv_accumulate_vertex_displacement() [2/2]

static void blender::bke::subdiv::subdiv_accumulate_vertex_displacement ( SubdivMeshContext * ctx,
const int ptex_face_index,
const float u,
const float v,
const int subdiv_vertex_index )
static

◆ subdiv_copy_edge_data()

◆ subdiv_eval_uv_layer()

static void blender::bke::subdiv::subdiv_eval_uv_layer ( SubdivMeshContext * ctx,
const int corner_index,
const int ptex_face_index,
const float u,
const float v )
static

◆ subdiv_foreach_boundary_edges()

◆ subdiv_foreach_boundary_edges_task()

static void blender::bke::subdiv::subdiv_foreach_boundary_edges_task ( void *__restrict userdata,
const int edge_index,
const TaskParallelTLS *__restrict tls )
static

Definition at line 1781 of file subdiv_foreach.cc.

References subdiv_foreach_boundary_edges().

Referenced by foreach_subdiv_geometry().

◆ subdiv_foreach_corner_vertices()

static void blender::bke::subdiv::subdiv_foreach_corner_vertices ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_corner_vertices_regular()

static void blender::bke::subdiv::subdiv_foreach_corner_vertices_regular ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_corner_vertices_regular_do()

◆ subdiv_foreach_corner_vertices_special()

static void blender::bke::subdiv::subdiv_foreach_corner_vertices_special ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_corner_vertices_special_do()

◆ subdiv_foreach_ctx_count()

◆ subdiv_foreach_ctx_free()

◆ subdiv_foreach_ctx_init()

◆ subdiv_foreach_ctx_init_offsets()

◆ subdiv_foreach_edge_vertices()

static void blender::bke::subdiv::subdiv_foreach_edge_vertices ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_edge_vertices_regular()

static void blender::bke::subdiv::subdiv_foreach_edge_vertices_regular ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_edge_vertices_regular_do()

◆ subdiv_foreach_edge_vertices_special()

static void blender::bke::subdiv::subdiv_foreach_edge_vertices_special ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_edge_vertices_special_do()

◆ subdiv_foreach_edges()

static void blender::bke::subdiv::subdiv_foreach_edges ( ForeachTaskContext * ctx,
void * tls,
int face_index )
static

Definition at line 944 of file subdiv_foreach.cc.

References subdiv_foreach_edges_all_patches().

Referenced by subdiv_foreach_task().

◆ subdiv_foreach_edges_all_patches()

static void blender::bke::subdiv::subdiv_foreach_edges_all_patches ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_edges_all_patches_regular()

◆ subdiv_foreach_edges_all_patches_special()

◆ subdiv_foreach_edges_column()

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

◆ subdiv_foreach_edges_row()

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

◆ subdiv_foreach_every_corner_vertices()

◆ subdiv_foreach_every_corner_vertices_regular()

static void blender::bke::subdiv::subdiv_foreach_every_corner_vertices_regular ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_every_corner_vertices_special()

static void blender::bke::subdiv::subdiv_foreach_every_corner_vertices_special ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_every_edge_vertices()

◆ subdiv_foreach_every_edge_vertices_regular()

static void blender::bke::subdiv::subdiv_foreach_every_edge_vertices_regular ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_every_edge_vertices_special()

static void blender::bke::subdiv::subdiv_foreach_every_edge_vertices_special ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_faces()

◆ subdiv_foreach_free()

static void blender::bke::subdiv::subdiv_foreach_free ( const void *__restrict userdata,
void *__restrict userdata_chunk )
static

◆ subdiv_foreach_inner_vertices()

static void blender::bke::subdiv::subdiv_foreach_inner_vertices ( ForeachTaskContext * ctx,
void * tls,
const int coarse_face_index )
static

◆ subdiv_foreach_inner_vertices_regular()

◆ subdiv_foreach_inner_vertices_special()

◆ subdiv_foreach_loops()

static void blender::bke::subdiv::subdiv_foreach_loops ( ForeachTaskContext * ctx,
void * tls,
int face_index )
static

◆ subdiv_foreach_loops_corner_index()

static int blender::bke::subdiv::subdiv_foreach_loops_corner_index ( const float u,
const float v,
const float du,
const float dv )
static

Definition at line 1059 of file subdiv_foreach.cc.

References v.

Referenced by subdiv_foreach_loops_regular().

◆ subdiv_foreach_loops_of_face()

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

◆ subdiv_foreach_loops_regular()

◆ subdiv_foreach_loops_special()

◆ subdiv_foreach_loose_vertices_task()

static void blender::bke::subdiv::subdiv_foreach_loose_vertices_task ( void *__restrict userdata,
const int coarse_vertex_index,
const TaskParallelTLS *__restrict tls )
static

◆ subdiv_foreach_mark_non_loose_geometry()

◆ subdiv_foreach_single_geometry_vertices()

◆ subdiv_foreach_single_thread_tasks()

◆ subdiv_foreach_task()

◆ subdiv_foreach_tls_alloc()

◆ subdiv_foreach_tls_free()

static void blender::bke::subdiv::subdiv_foreach_tls_free ( ForeachTaskContext * ctx,
void * tls )
static

◆ subdiv_foreach_vertices()

static void blender::bke::subdiv::subdiv_foreach_vertices ( ForeachTaskContext * ctx,
void * tls,
const int face_index )
static

◆ subdiv_foreach_vertices_of_loose_edges_task()

◆ subdiv_interpolate_corner_data()

static void blender::bke::subdiv::subdiv_interpolate_corner_data ( const SubdivMeshContext * ctx,
const int subdiv_loop_index,
const LoopsForInterpolation * loop_interpolation,
const float u,
const float v )
static

◆ subdiv_mesh_context_free() [1/2]

static void blender::bke::subdiv::subdiv_mesh_context_free ( SubdivDeformContext * ctx)
static

◆ subdiv_mesh_context_free() [2/2]

◆ subdiv_mesh_ctx_cache_custom_data_layers()

◆ subdiv_mesh_ctx_cache_uv_layers()

◆ subdiv_mesh_edge()

static void blender::bke::subdiv::subdiv_mesh_edge ( const ForeachContext * foreach_context,
void * ,
const int coarse_edge_index,
const int subdiv_edge_index,
const bool ,
const int subdiv_v1,
const int subdiv_v2 )
static

◆ subdiv_mesh_ensure_loop_interpolation()

◆ subdiv_mesh_ensure_vertex_interpolation()

◆ subdiv_mesh_face()

static void blender::bke::subdiv::subdiv_mesh_face ( const ForeachContext * foreach_context,
void * ,
const int coarse_face_index,
const int subdiv_face_index,
const int start_loop_index,
const int  )
static

◆ subdiv_mesh_is_center_vertex()

static bool blender::bke::subdiv::subdiv_mesh_is_center_vertex ( const IndexRange coarse_face,
const float u,
const float v )
static

Definition at line 790 of file subdiv_mesh.cc.

References blender::IndexRange::size(), and v.

Referenced by subdiv_mesh_tag_center_vertex().

◆ subdiv_mesh_loop()

static void blender::bke::subdiv::subdiv_mesh_loop ( const ForeachContext * foreach_context,
void * tls_v,
const int ptex_face_index,
const float u,
const float v,
const int ,
const int coarse_face_index,
const int coarse_corner,
const int subdiv_loop_index,
const int subdiv_vertex_index,
const int subdiv_edge_index )
static

◆ subdiv_mesh_prepare_accumulator() [1/2]

static void blender::bke::subdiv::subdiv_mesh_prepare_accumulator ( SubdivDeformContext * ctx,
int num_vertices )
static

◆ subdiv_mesh_prepare_accumulator() [2/2]

static void blender::bke::subdiv::subdiv_mesh_prepare_accumulator ( SubdivMeshContext * ctx,
int num_vertices )
static

◆ subdiv_mesh_tag_center_vertex()

static void blender::bke::subdiv::subdiv_mesh_tag_center_vertex ( const IndexRange coarse_face,
const int subdiv_vertex_index,
const float u,
const float v,
Mesh * subdiv_mesh )
static

Definition at line 807 of file subdiv_mesh.cc.

References Mesh::runtime, subdiv_mesh_is_center_vertex(), and v.

Referenced by subdiv_mesh_vertex_inner().

◆ subdiv_mesh_tls_free()

◆ subdiv_mesh_topology_info() [1/2]

◆ subdiv_mesh_topology_info() [2/2]

static bool blender::bke::subdiv::subdiv_mesh_topology_info ( const ForeachContext * foreach_context,
const int ,
const int ,
const int ,
const int ,
const int *  )
static

◆ subdiv_mesh_vertex_corner() [1/2]

static void blender::bke::subdiv::subdiv_mesh_vertex_corner ( const ForeachContext * foreach_context,
void * ,
const int ptex_face_index,
const float u,
const float v,
const int coarse_vertex_index,
const int ,
const int ,
const int subdiv_vertex_index )
static

◆ subdiv_mesh_vertex_corner() [2/2]

◆ subdiv_mesh_vertex_displacement_every_corner()

static void blender::bke::subdiv::subdiv_mesh_vertex_displacement_every_corner ( const ForeachContext * foreach_context,
void * tls,
const int ptex_face_index,
const float u,
const float v,
const int ,
const int ,
const int ,
const int subdiv_vertex_index )
static

Definition at line 698 of file subdiv_mesh.cc.

References subdiv_mesh_vertex_displacement_every_corner_or_edge(), and v.

Referenced by setup_foreach_callbacks().

◆ subdiv_mesh_vertex_displacement_every_corner_or_edge()

static void blender::bke::subdiv::subdiv_mesh_vertex_displacement_every_corner_or_edge ( const ForeachContext * foreach_context,
void * ,
const int ptex_face_index,
const float u,
const float v,
const int subdiv_vertex_index )
static

◆ subdiv_mesh_vertex_displacement_every_edge()

static void blender::bke::subdiv::subdiv_mesh_vertex_displacement_every_edge ( const ForeachContext * foreach_context,
void * tls,
const int ptex_face_index,
const float u,
const float v,
const int ,
const int ,
const int ,
const int subdiv_vertex_index )
static

Definition at line 712 of file subdiv_mesh.cc.

References subdiv_mesh_vertex_displacement_every_corner_or_edge(), and v.

Referenced by setup_foreach_callbacks().

◆ subdiv_mesh_vertex_edge()

static void blender::bke::subdiv::subdiv_mesh_vertex_edge ( const ForeachContext * foreach_context,
void * tls_v,
const int ptex_face_index,
const float u,
const float v,
const int ,
const int coarse_face_index,
const int coarse_corner,
const int subdiv_vertex_index )
static

◆ subdiv_mesh_vertex_every_corner()

static void blender::bke::subdiv::subdiv_mesh_vertex_every_corner ( const ForeachContext * foreach_context,
void * ,
const int ptex_face_index,
const float u,
const float v,
const int coarse_vertex_index,
const int ,
const int ,
const int  )
static

◆ subdiv_mesh_vertex_inner()

◆ subdiv_mesh_vertex_loose()

static void blender::bke::subdiv::subdiv_mesh_vertex_loose ( const ForeachContext * foreach_context,
void * ,
const int coarse_vertex_index,
const int subdiv_vertex_index )
static

◆ subdiv_mesh_vertex_of_loose_edge()

◆ subdiv_mesh_vertex_of_loose_edge_interpolate()

static void blender::bke::subdiv::subdiv_mesh_vertex_of_loose_edge_interpolate ( SubdivMeshContext * ctx,
const int2 & coarse_edge,
const float u,
const int subdiv_vertex_index )
static

◆ subdiv_to_mesh()

◆ subdiv_vertex_data_copy()

static void blender::bke::subdiv::subdiv_vertex_data_copy ( const SubdivMeshContext * ctx,
const int coarse_vertex_index,
const int subdiv_vertex_index )
static

◆ subdiv_vertex_data_interpolate()

◆ subdiv_vertex_orco_evaluate()

static void blender::bke::subdiv::subdiv_vertex_orco_evaluate ( const SubdivMeshContext * ctx,
const int ptex_face_index,
const float u,
const float v,
const int subdiv_vertex_index )
static

◆ topology_num_fvar_layers_get()

int blender::bke::subdiv::topology_num_fvar_layers_get ( const Subdiv * subdiv)

◆ update_from_converter()

◆ update_from_mesh()

Subdiv * blender::bke::subdiv::update_from_mesh ( Subdiv * subdiv,
const Settings * settings,
const Mesh * mesh )

◆ vertex_interpolation_end()

◆ vertex_interpolation_from_corner()

◆ vertex_interpolation_init()

◆ vtx_boundary_interpolation_from_subsurf()