Blender  V3.3
Classes
multires_reshape_smooth.c File Reference
#include "multires_reshape.h"
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "BLI_bitmap.h"
#include "BLI_math_vector.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "BKE_customdata.h"
#include "BKE_multires.h"
#include "BKE_subdiv.h"
#include "BKE_subdiv_eval.h"
#include "BKE_subdiv_foreach.h"
#include "BKE_subdiv_mesh.h"
#include "opensubdiv_converter_capi.h"
#include "opensubdiv_evaluator_capi.h"
#include "opensubdiv_topology_refiner_capi.h"
#include "atomic_ops.h"
#include "subdiv_converter.h"

Go to the source code of this file.

Classes

struct  SurfacePoint
 
struct  SurfaceGrid
 
struct  Vertex
 
struct  Corner
 
struct  Face
 
struct  Edge
 
struct  LinearGridElement
 
struct  LinearGrid
 
struct  LinearGrids
 
struct  MultiresReshapeSmoothContext
 
struct  ForeachTopLevelGridCoordTaskData
 

Typedefs

Local Structs
typedef struct SurfacePoint SurfacePoint
 
typedef struct SurfaceGrid SurfaceGrid
 
typedef struct Vertex Vertex
 
typedef struct Corner Corner
 
typedef struct Face Face
 
typedef struct Edge Edge
 
typedef struct LinearGridElement LinearGridElement
 
typedef struct LinearGrid LinearGrid
 
typedef struct LinearGrids LinearGrids
 
typedef struct MultiresReshapeSmoothContext MultiresReshapeSmoothContext
 

Functions

Linear grids manipulation
static void linear_grids_init (LinearGrids *linear_grids)
 
static void linear_grids_allocate (LinearGrids *linear_grids, int num_grids, int level)
 
static LinearGridElementlinear_grid_element_get (const LinearGrids *linear_grids, const GridCoord *grid_coord)
 
static void linear_grids_free (LinearGrids *linear_grids)
 
static void linear_grid_element_init (LinearGridElement *linear_grid_element)
 
static void linear_grid_element_sub (LinearGridElement *result, const LinearGridElement *a, const LinearGridElement *b)
 
static void linear_grid_element_interpolate (LinearGridElement *result, const LinearGridElement elements[4], const float weights[4])
 
Surface
static void base_surface_grids_allocate (MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void base_surface_grids_free (MultiresReshapeSmoothContext *reshape_smooth_context)
 
static SurfacePointbase_surface_grids_read (const MultiresReshapeSmoothContext *reshape_smooth_context, const GridCoord *grid_coord)
 
static void base_surface_grids_write (const MultiresReshapeSmoothContext *reshape_smooth_context, const GridCoord *grid_coord, float P[3], float tangent_matrix[3][3])
 
Generation of a topology information for OpenSubdiv converter

Calculates vertices, their coordinates in the original grids, and connections of them so then it's easy to create OpenSubdiv's topology refiner.

static int get_reshape_level_resolution (const MultiresReshapeContext *reshape_context)
 
static bool is_crease_supported (const MultiresReshapeSmoothContext *reshape_smooth_context)
 
static char get_effective_crease_char (const MultiresReshapeSmoothContext *reshape_smooth_context, const MEdge *base_edge)
 
static float get_effective_crease_float (const MultiresReshapeSmoothContext *reshape_smooth_context, const float crease)
 
static void context_init (MultiresReshapeSmoothContext *reshape_smooth_context, const MultiresReshapeContext *reshape_context, const eMultiresSubdivideModeType mode)
 
static void context_free_geometry (MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void context_free_subdiv (MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void context_free (MultiresReshapeSmoothContext *reshape_smooth_context)
 
static bool foreach_topology_info (const SubdivForeachContext *foreach_context, const int num_vertices, const int num_edges, const int num_loops, const int num_polygons, const int *UNUSED(subdiv_polygon_offset))
 
static void foreach_single_vertex (const SubdivForeachContext *foreach_context, const GridCoord *grid_coord, const int coarse_vertex_index, const int subdiv_vertex_index)
 
static void foreach_vertex (const SubdivForeachContext *foreach_context, const PTexCoord *ptex_coord, const int coarse_vertex_index, const int subdiv_vertex_index)
 
static void foreach_vertex_inner (const struct SubdivForeachContext *foreach_context, void *UNUSED(tls), const int ptex_face_index, const float ptex_face_u, const float ptex_face_v, const int UNUSED(coarse_poly_index), const int UNUSED(coarse_corner), const int subdiv_vertex_index)
 
static void foreach_vertex_every_corner (const struct SubdivForeachContext *foreach_context, void *UNUSED(tls_v), const int ptex_face_index, const float ptex_face_u, const float ptex_face_v, const int coarse_vertex_index, const int UNUSED(coarse_face_index), const int UNUSED(coarse_face_corner), const int subdiv_vertex_index)
 
static void foreach_vertex_every_edge (const struct SubdivForeachContext *foreach_context, void *UNUSED(tls_v), const int ptex_face_index, const float ptex_face_u, const float ptex_face_v, const int UNUSED(coarse_edge_index), const int UNUSED(coarse_face_index), const int UNUSED(coarse_face_corner), const int subdiv_vertex_index)
 
static void foreach_loop (const struct SubdivForeachContext *foreach_context, void *UNUSED(tls), const int UNUSED(ptex_face_index), const float UNUSED(ptex_face_u), const float UNUSED(ptex_face_v), const int UNUSED(coarse_loop_index), const int coarse_poly_index, const int coarse_corner, const int subdiv_loop_index, const int subdiv_vertex_index, const int UNUSED(subdiv_edge_index))
 
static void foreach_poly (const SubdivForeachContext *foreach_context, void *UNUSED(tls), const int UNUSED(coarse_poly_index), const int subdiv_poly_index, const int start_loop_index, const int num_loops)
 
static void foreach_vertex_of_loose_edge (const struct SubdivForeachContext *foreach_context, void *UNUSED(tls), const int UNUSED(coarse_edge_index), const float UNUSED(u), const int vertex_index)
 
static void store_edge (MultiresReshapeSmoothContext *reshape_smooth_context, const int subdiv_v1, const int subdiv_v2, const char crease)
 
static void foreach_edge (const struct SubdivForeachContext *foreach_context, void *UNUSED(tls), const int coarse_edge_index, const int UNUSED(subdiv_edge_index), const bool is_loose, const int subdiv_v1, const int subdiv_v2)
 
static void geometry_init_loose_information (MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void geometry_create (MultiresReshapeSmoothContext *reshape_smooth_context)
 
Linearly interpolated data
static LinearGridElement linear_grid_element_orig_get (const MultiresReshapeSmoothContext *reshape_smooth_context, const GridCoord *grid_coord)
 
static LinearGridElement linear_grid_element_final_get (const MultiresReshapeSmoothContext *reshape_smooth_context, const GridCoord *grid_coord)
 
static void linear_grid_element_delta_interpolate (const MultiresReshapeSmoothContext *reshape_smooth_context, const GridCoord *grid_coord, LinearGridElement *result)
 
static void evaluate_linear_delta_grids_callback (const MultiresReshapeSmoothContext *reshape_smooth_context, const PTexCoord *UNUSED(ptex_coord), const GridCoord *grid_coord, void *UNUSED(userdata_v))
 
static void evaluate_linear_delta_grids (MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void propagate_linear_data_delta (const MultiresReshapeSmoothContext *reshape_smooth_context, ReshapeGridElement *final_grid_element, const GridCoord *grid_coord)
 
Evaluation of base surface
static void evaluate_base_surface_grids_callback (const MultiresReshapeSmoothContext *reshape_smooth_context, const PTexCoord *ptex_coord, const GridCoord *grid_coord, void *UNUSED(userdata_v))
 
static void evaluate_base_surface_grids (const MultiresReshapeSmoothContext *reshape_smooth_context)
 
Evaluation of new surface
static void evaluate_final_original_point (const MultiresReshapeSmoothContext *reshape_smooth_context, const GridCoord *grid_coord, float r_orig_final_P[3])
 
static void evaluate_higher_grid_positions_with_details_callback (const MultiresReshapeSmoothContext *reshape_smooth_context, const PTexCoord *ptex_coord, const GridCoord *grid_coord, void *UNUSED(userdata_v))
 
static void evaluate_higher_grid_positions_with_details (const MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void evaluate_higher_grid_positions_callback (const MultiresReshapeSmoothContext *reshape_smooth_context, const PTexCoord *ptex_coord, const GridCoord *grid_coord, void *UNUSED(userdata_v))
 
static void evaluate_higher_grid_positions (const MultiresReshapeSmoothContext *reshape_smooth_context)
 
Entry point
void multires_reshape_smooth_object_grids_with_details (const MultiresReshapeContext *reshape_context)
 
void multires_reshape_smooth_object_grids (const MultiresReshapeContext *reshape_context, const eMultiresSubdivideModeType mode)
 

Evaluation of subdivision surface at a reshape level

typedef void(* ForeachTopLevelGridCoordCallback) (const MultiresReshapeSmoothContext *reshape_smooth_context, const PTexCoord *ptex_coord, const GridCoord *grid_coord, void *userdata_v)
 
typedef struct ForeachTopLevelGridCoordTaskData ForeachHighLevelCoordTaskData
 
static int get_face_grid_index (const MultiresReshapeSmoothContext *reshape_smooth_context, const Face *face)
 
static GridCoordvertex_grid_coord_with_grid_index (const Vertex *vertex, const int grid_index)
 
static void grid_coords_from_face_vertices (const MultiresReshapeSmoothContext *reshape_smooth_context, const Face *face, const GridCoord *grid_coords[])
 
static float lerp (float t, float a, float b)
 
static void interpolate_grid_coord (GridCoord *result, const GridCoord *face_grid_coords[4], const float u, const float v)
 
static void foreach_toplevel_grid_coord_task (void *__restrict userdata_v, const int face_index, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void foreach_toplevel_grid_coord (const MultiresReshapeSmoothContext *reshape_smooth_context, ForeachTopLevelGridCoordCallback callback, void *callback_userdata_v)
 

Generation of OpenSubdiv evaluator for topology created form reshape level

typedef void() ReshapeSubdivCoarsePositionCb(const MultiresReshapeSmoothContext *reshape_smooth_context, const Vertex *vertex, float r_P[3])
 
static OpenSubdiv_SchemeType get_scheme_type (const OpenSubdiv_Converter *UNUSED(converter))
 
static OpenSubdiv_VtxBoundaryInterpolation get_vtx_boundary_interpolation (const struct OpenSubdiv_Converter *converter)
 
static OpenSubdiv_FVarLinearInterpolation get_fvar_linear_interpolation (const OpenSubdiv_Converter *converter)
 
static bool specifies_full_topology (const OpenSubdiv_Converter *UNUSED(converter))
 
static int get_num_faces (const OpenSubdiv_Converter *converter)
 
static int get_num_vertices (const OpenSubdiv_Converter *converter)
 
static int get_num_face_vertices (const OpenSubdiv_Converter *converter, int face_index)
 
static void get_face_vertices (const OpenSubdiv_Converter *converter, int face_index, int *face_vertices)
 
static int get_num_edges (const struct OpenSubdiv_Converter *converter)
 
static void get_edge_vertices (const OpenSubdiv_Converter *converter, const int edge_index, int edge_vertices[2])
 
static float get_edge_sharpness (const OpenSubdiv_Converter *converter, const int edge_index)
 
static float get_vertex_sharpness (const OpenSubdiv_Converter *converter, const int vertex_index)
 
static bool is_infinite_sharp_vertex (const OpenSubdiv_Converter *converter, int vertex_index)
 
static void converter_init (const MultiresReshapeSmoothContext *reshape_smooth_context, OpenSubdiv_Converter *converter)
 
static void reshape_subdiv_create (MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void reshape_subdiv_refine (const MultiresReshapeSmoothContext *reshape_smooth_context, ReshapeSubdivCoarsePositionCb coarse_position_cb)
 
BLI_INLINE const GridCoordreshape_subdiv_refine_vertex_grid_coord (const Vertex *vertex)
 
static void reshape_subdiv_refine_orig_P (const MultiresReshapeSmoothContext *reshape_smooth_context, const Vertex *vertex, float r_P[3])
 
static void reshape_subdiv_refine_orig (const MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void reshape_subdiv_refine_final_P (const MultiresReshapeSmoothContext *reshape_smooth_context, const Vertex *vertex, float r_P[3])
 
static void reshape_subdiv_refine_final (const MultiresReshapeSmoothContext *reshape_smooth_context)
 
static void reshape_subdiv_evaluate_limit_at_grid (const MultiresReshapeSmoothContext *reshape_smooth_context, const PTexCoord *ptex_coord, const GridCoord *grid_coord, float limit_P[3], float r_tangent_matrix[3][3])
 

Typedef Documentation

◆ Corner

typedef struct Corner Corner

◆ Edge

typedef struct Edge Edge

◆ Face

typedef struct Face Face

◆ ForeachHighLevelCoordTaskData

◆ ForeachTopLevelGridCoordCallback

typedef void(* ForeachTopLevelGridCoordCallback) (const MultiresReshapeSmoothContext *reshape_smooth_context, const PTexCoord *ptex_coord, const GridCoord *grid_coord, void *userdata_v)

Definition at line 311 of file multires_reshape_smooth.c.

◆ LinearGrid

typedef struct LinearGrid LinearGrid

◆ LinearGridElement

◆ LinearGrids

typedef struct LinearGrids LinearGrids

◆ MultiresReshapeSmoothContext

◆ ReshapeSubdivCoarsePositionCb

typedef void() ReshapeSubdivCoarsePositionCb(const MultiresReshapeSmoothContext *reshape_smooth_context, const Vertex *vertex, float r_P[3])

Definition at line 1086 of file multires_reshape_smooth.c.

◆ SurfaceGrid

typedef struct SurfaceGrid SurfaceGrid

◆ SurfacePoint

typedef struct SurfacePoint SurfacePoint

◆ Vertex

typedef struct Vertex Vertex

Function Documentation

◆ base_surface_grids_allocate()

static void base_surface_grids_allocate ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ base_surface_grids_free()

static void base_surface_grids_free ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ base_surface_grids_read()

static SurfacePoint* base_surface_grids_read ( const MultiresReshapeSmoothContext reshape_smooth_context,
const GridCoord grid_coord 
)
static

◆ base_surface_grids_write()

static void base_surface_grids_write ( const MultiresReshapeSmoothContext reshape_smooth_context,
const GridCoord grid_coord,
float  P[3],
float  tangent_matrix[3][3] 
)
static

◆ context_free()

static void context_free ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ context_free_geometry()

static void context_free_geometry ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ context_free_subdiv()

static void context_free_subdiv ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ context_init()

static void context_init ( MultiresReshapeSmoothContext reshape_smooth_context,
const MultiresReshapeContext reshape_context,
const eMultiresSubdivideModeType  mode 
)
static

◆ converter_init()

static void converter_init ( const MultiresReshapeSmoothContext reshape_smooth_context,
OpenSubdiv_Converter converter 
)
static

Definition at line 1027 of file multires_reshape_smooth.c.

References OpenSubdiv_Converter::finishUVLayer, OpenSubdiv_Converter::freeUserData, get_edge_sharpness(), get_edge_vertices(), get_face_vertices(), get_fvar_linear_interpolation(), get_num_edges(), get_num_face_vertices(), get_num_faces(), 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, NULL, OpenSubdiv_Converter::precalcUVLayer, specifies_full_topology(), OpenSubdiv_Converter::specifiesFullTopology, and OpenSubdiv_Converter::user_data.

Referenced by reshape_subdiv_create().

◆ evaluate_base_surface_grids()

static void evaluate_base_surface_grids ( const MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ evaluate_base_surface_grids_callback()

static void evaluate_base_surface_grids_callback ( const MultiresReshapeSmoothContext reshape_smooth_context,
const PTexCoord ptex_coord,
const GridCoord grid_coord,
void UNUSEDuserdata_v 
)
static

◆ evaluate_final_original_point()

static void evaluate_final_original_point ( const MultiresReshapeSmoothContext reshape_smooth_context,
const GridCoord grid_coord,
float  r_orig_final_P[3] 
)
static

◆ evaluate_higher_grid_positions()

static void evaluate_higher_grid_positions ( const MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ evaluate_higher_grid_positions_callback()

static void evaluate_higher_grid_positions_callback ( const MultiresReshapeSmoothContext reshape_smooth_context,
const PTexCoord ptex_coord,
const GridCoord grid_coord,
void UNUSEDuserdata_v 
)
static

◆ evaluate_higher_grid_positions_with_details()

static void evaluate_higher_grid_positions_with_details ( const MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ evaluate_higher_grid_positions_with_details_callback()

static void evaluate_higher_grid_positions_with_details_callback ( const MultiresReshapeSmoothContext reshape_smooth_context,
const PTexCoord ptex_coord,
const GridCoord grid_coord,
void UNUSEDuserdata_v 
)
static

◆ evaluate_linear_delta_grids()

static void evaluate_linear_delta_grids ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ evaluate_linear_delta_grids_callback()

static void evaluate_linear_delta_grids_callback ( const MultiresReshapeSmoothContext reshape_smooth_context,
const PTexCoord UNUSEDptex_coord,
const GridCoord grid_coord,
void UNUSEDuserdata_v 
)
static

◆ foreach_edge()

static void foreach_edge ( const struct SubdivForeachContext foreach_context,
void UNUSEDtls,
const int  coarse_edge_index,
const int   UNUSEDsubdiv_edge_index,
const bool  is_loose,
const int  subdiv_v1,
const int  subdiv_v2 
)
static

◆ foreach_loop()

static void foreach_loop ( const struct SubdivForeachContext foreach_context,
void UNUSEDtls,
const int   UNUSEDptex_face_index,
const float   UNUSEDptex_face_u,
const float   UNUSEDptex_face_v,
const int   UNUSEDcoarse_loop_index,
const int  coarse_poly_index,
const int  coarse_corner,
const int  subdiv_loop_index,
const int  subdiv_vertex_index,
const int   UNUSEDsubdiv_edge_index 
)
static

◆ foreach_poly()

static void foreach_poly ( const SubdivForeachContext foreach_context,
void UNUSEDtls,
const int   UNUSEDcoarse_poly_index,
const int  subdiv_poly_index,
const int  start_loop_index,
const int  num_loops 
)
static

◆ foreach_single_vertex()

static void foreach_single_vertex ( const SubdivForeachContext foreach_context,
const GridCoord grid_coord,
const int  coarse_vertex_index,
const int  subdiv_vertex_index 
)
static

◆ foreach_toplevel_grid_coord()

static void foreach_toplevel_grid_coord ( const MultiresReshapeSmoothContext reshape_smooth_context,
ForeachTopLevelGridCoordCallback  callback,
void callback_userdata_v 
)
static

◆ foreach_toplevel_grid_coord_task()

static void foreach_toplevel_grid_coord_task ( void *__restrict  userdata_v,
const int  face_index,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ foreach_topology_info()

static bool foreach_topology_info ( const SubdivForeachContext foreach_context,
const int  num_vertices,
const int  num_edges,
const int  num_loops,
const int  num_polygons,
const int *  UNUSEDsubdiv_polygon_offset 
)
static

◆ foreach_vertex()

static void foreach_vertex ( const SubdivForeachContext foreach_context,
const PTexCoord ptex_coord,
const int  coarse_vertex_index,
const int  subdiv_vertex_index 
)
static

◆ foreach_vertex_every_corner()

static void foreach_vertex_every_corner ( const struct SubdivForeachContext foreach_context,
void UNUSEDtls_v,
const int  ptex_face_index,
const float  ptex_face_u,
const float  ptex_face_v,
const int  coarse_vertex_index,
const int   UNUSEDcoarse_face_index,
const int   UNUSEDcoarse_face_corner,
const int  subdiv_vertex_index 
)
static

Definition at line 702 of file multires_reshape_smooth.c.

References foreach_vertex(), and PTexCoord::ptex_face_index.

Referenced by geometry_create().

◆ foreach_vertex_every_edge()

static void foreach_vertex_every_edge ( const struct SubdivForeachContext foreach_context,
void UNUSEDtls_v,
const int  ptex_face_index,
const float  ptex_face_u,
const float  ptex_face_v,
const int   UNUSEDcoarse_edge_index,
const int   UNUSEDcoarse_face_index,
const int   UNUSEDcoarse_face_corner,
const int  subdiv_vertex_index 
)
static

Definition at line 720 of file multires_reshape_smooth.c.

References foreach_vertex(), and PTexCoord::ptex_face_index.

Referenced by geometry_create().

◆ foreach_vertex_inner()

static void foreach_vertex_inner ( const struct SubdivForeachContext foreach_context,
void UNUSEDtls,
const int  ptex_face_index,
const float  ptex_face_u,
const float  ptex_face_v,
const int   UNUSEDcoarse_poly_index,
const int   UNUSEDcoarse_corner,
const int  subdiv_vertex_index 
)
static

Definition at line 685 of file multires_reshape_smooth.c.

References foreach_vertex(), and PTexCoord::ptex_face_index.

Referenced by geometry_create().

◆ foreach_vertex_of_loose_edge()

static void foreach_vertex_of_loose_edge ( const struct SubdivForeachContext foreach_context,
void UNUSEDtls,
const int   UNUSEDcoarse_edge_index,
const float   UNUSEDu,
const int  vertex_index 
)
static

◆ geometry_create()

static void geometry_create ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ geometry_init_loose_information()

static void geometry_init_loose_information ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ get_edge_sharpness()

static float get_edge_sharpness ( const OpenSubdiv_Converter converter,
const int  edge_index 
)
static

◆ get_edge_vertices()

static void get_edge_vertices ( const OpenSubdiv_Converter converter,
const int  edge_index,
int  edge_vertices[2] 
)
static

◆ get_effective_crease_char()

static char get_effective_crease_char ( const MultiresReshapeSmoothContext reshape_smooth_context,
const MEdge base_edge 
)
static

◆ get_effective_crease_float()

static float get_effective_crease_float ( const MultiresReshapeSmoothContext reshape_smooth_context,
const float  crease 
)
static

Definition at line 495 of file multires_reshape_smooth.c.

References is_crease_supported().

Referenced by foreach_single_vertex().

◆ get_face_grid_index()

static int get_face_grid_index ( const MultiresReshapeSmoothContext reshape_smooth_context,
const Face face 
)
static

◆ get_face_vertices()

static void get_face_vertices ( const OpenSubdiv_Converter converter,
int  face_index,
int *  face_vertices 
)
static

◆ get_fvar_linear_interpolation()

static OpenSubdiv_FVarLinearInterpolation get_fvar_linear_interpolation ( const OpenSubdiv_Converter converter)
static

◆ get_num_edges()

static int get_num_edges ( const struct OpenSubdiv_Converter converter)
static

◆ get_num_face_vertices()

static int get_num_face_vertices ( const OpenSubdiv_Converter converter,
int  face_index 
)
static

◆ get_num_faces()

static int get_num_faces ( const OpenSubdiv_Converter converter)
static

◆ get_num_vertices()

static int get_num_vertices ( const OpenSubdiv_Converter converter)
static

◆ get_reshape_level_resolution()

static int get_reshape_level_resolution ( const MultiresReshapeContext reshape_context)
static

◆ get_scheme_type()

static OpenSubdiv_SchemeType get_scheme_type ( const OpenSubdiv_Converter UNUSEDconverter)
static

Definition at line 912 of file multires_reshape_smooth.c.

References OSD_SCHEME_CATMARK.

Referenced by converter_init().

◆ get_vertex_sharpness()

static float get_vertex_sharpness ( const OpenSubdiv_Converter converter,
const int  vertex_index 
)
static

◆ get_vtx_boundary_interpolation()

static OpenSubdiv_VtxBoundaryInterpolation get_vtx_boundary_interpolation ( const struct OpenSubdiv_Converter converter)
static

◆ grid_coords_from_face_vertices()

static void grid_coords_from_face_vertices ( const MultiresReshapeSmoothContext reshape_smooth_context,
const Face face,
const GridCoord grid_coords[] 
)
static

◆ interpolate_grid_coord()

static void interpolate_grid_coord ( GridCoord result,
const GridCoord face_grid_coords[4],
const float  u,
const float  v 
)
static

Definition at line 380 of file multires_reshape_smooth.c.

References GridCoord::grid_index, lerp(), result, and v.

Referenced by foreach_toplevel_grid_coord_task().

◆ is_crease_supported()

static bool is_crease_supported ( const MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ is_infinite_sharp_vertex()

static bool is_infinite_sharp_vertex ( const OpenSubdiv_Converter converter,
int  vertex_index 
)
static

◆ lerp()

static float lerp ( float  t,
float  a,
float  b 
)
static

◆ linear_grid_element_delta_interpolate()

static void linear_grid_element_delta_interpolate ( const MultiresReshapeSmoothContext reshape_smooth_context,
const GridCoord grid_coord,
LinearGridElement result 
)
static

◆ linear_grid_element_final_get()

static LinearGridElement linear_grid_element_final_get ( const MultiresReshapeSmoothContext reshape_smooth_context,
const GridCoord grid_coord 
)
static

◆ linear_grid_element_get()

static LinearGridElement* linear_grid_element_get ( const LinearGrids linear_grids,
const GridCoord grid_coord 
)
static

◆ linear_grid_element_init()

static void linear_grid_element_init ( LinearGridElement linear_grid_element)
static

◆ linear_grid_element_interpolate()

static void linear_grid_element_interpolate ( LinearGridElement result,
const LinearGridElement  elements[4],
const float  weights[4] 
)
static

Definition at line 233 of file multires_reshape_smooth.c.

References LinearGridElement::mask, and result.

Referenced by linear_grid_element_delta_interpolate().

◆ linear_grid_element_orig_get()

static LinearGridElement linear_grid_element_orig_get ( const MultiresReshapeSmoothContext reshape_smooth_context,
const GridCoord grid_coord 
)
static

◆ linear_grid_element_sub()

static void linear_grid_element_sub ( LinearGridElement result,
const LinearGridElement a,
const LinearGridElement b 
)
static

Definition at line 226 of file multires_reshape_smooth.c.

References Freestyle::a, usdtokens::b(), and result.

Referenced by linear_grid_element_delta_interpolate().

◆ linear_grids_allocate()

static void linear_grids_allocate ( LinearGrids linear_grids,
int  num_grids,
int  level 
)
static

◆ linear_grids_free()

static void linear_grids_free ( LinearGrids linear_grids)
static

◆ linear_grids_init()

static void linear_grids_init ( LinearGrids linear_grids)
static

◆ multires_reshape_smooth_object_grids()

void multires_reshape_smooth_object_grids ( const MultiresReshapeContext reshape_context,
enum eMultiresSubdivideModeType  mode 
)

Operates on a displacement grids (CD_MDISPS) which contains object space-coordinates stored for the reshape level.

Makes it so surface on top level looks smooth. Details are not preserved

Definition at line 1512 of file multires_reshape_smooth.c.

References context_free(), context_init(), evaluate_higher_grid_positions(), evaluate_linear_delta_grids(), geometry_create(), MultiresReshapeContext::level, MultiresReshapeContext::reshape, reshape_subdiv_create(), reshape_subdiv_refine_final(), and MultiresReshapeContext::top.

Referenced by multiresModifier_subdivide_to_level().

◆ multires_reshape_smooth_object_grids_with_details()

void multires_reshape_smooth_object_grids_with_details ( const MultiresReshapeContext reshape_context)

◆ propagate_linear_data_delta()

static void propagate_linear_data_delta ( const MultiresReshapeSmoothContext reshape_smooth_context,
ReshapeGridElement final_grid_element,
const GridCoord grid_coord 
)
static

◆ reshape_subdiv_create()

static void reshape_subdiv_create ( MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ reshape_subdiv_evaluate_limit_at_grid()

static void reshape_subdiv_evaluate_limit_at_grid ( const MultiresReshapeSmoothContext reshape_smooth_context,
const PTexCoord ptex_coord,
const GridCoord grid_coord,
float  limit_P[3],
float  r_tangent_matrix[3][3] 
)
static

◆ reshape_subdiv_refine()

static void reshape_subdiv_refine ( const MultiresReshapeSmoothContext reshape_smooth_context,
ReshapeSubdivCoarsePositionCb  coarse_position_cb 
)
static

◆ reshape_subdiv_refine_final()

static void reshape_subdiv_refine_final ( const MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ reshape_subdiv_refine_final_P()

static void reshape_subdiv_refine_final_P ( const MultiresReshapeSmoothContext reshape_smooth_context,
const Vertex vertex,
float  r_P[3] 
)
static

◆ reshape_subdiv_refine_orig()

static void reshape_subdiv_refine_orig ( const MultiresReshapeSmoothContext reshape_smooth_context)
static

◆ reshape_subdiv_refine_orig_P()

static void reshape_subdiv_refine_orig_P ( const MultiresReshapeSmoothContext reshape_smooth_context,
const Vertex vertex,
float  r_P[3] 
)
static

◆ reshape_subdiv_refine_vertex_grid_coord()

BLI_INLINE const GridCoord* reshape_subdiv_refine_vertex_grid_coord ( const Vertex vertex)

◆ specifies_full_topology()

static bool specifies_full_topology ( const OpenSubdiv_Converter UNUSEDconverter)
static

Definition at line 937 of file multires_reshape_smooth.c.

Referenced by converter_init().

◆ store_edge()

static void store_edge ( MultiresReshapeSmoothContext reshape_smooth_context,
const int  subdiv_v1,
const int  subdiv_v2,
const char  crease 
)
static

◆ vertex_grid_coord_with_grid_index()

static GridCoord* vertex_grid_coord_with_grid_index ( const Vertex vertex,
const int  grid_index 
)
static