Blender  V2.93
Classes | Typedefs | Enumerations | Functions
BKE_subdiv.h File Reference
#include "BLI_compiler_compat.h"
#include "BLI_sys_types.h"
#include "intern/subdiv_inline.h"

Go to the source code of this file.

Classes

struct  SubdivSettings
 
struct  SubdivStats
 
struct  SubdivDisplacement
 
struct  Subdiv
 

Typedefs

typedef enum eSubdivVtxBoundaryInterpolation eSubdivVtxBoundaryInterpolation
 
typedef enum eSubdivFVarLinearInterpolation eSubdivFVarLinearInterpolation
 
typedef struct SubdivSettings SubdivSettings
 
typedef enum eSubdivStatsValue eSubdivStatsValue
 
typedef struct SubdivStats SubdivStats
 
typedef struct SubdivDisplacement SubdivDisplacement
 
typedef struct Subdiv Subdiv
 

Enumerations

enum  eSubdivVtxBoundaryInterpolation { SUBDIV_VTX_BOUNDARY_NONE , SUBDIV_VTX_BOUNDARY_EDGE_ONLY , SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER }
 
enum  eSubdivFVarLinearInterpolation {
  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  eSubdivStatsValue {
  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
}
 

Functions

void BKE_subdiv_init (void)
 
void BKE_subdiv_exit (void)
 
eSubdivFVarLinearInterpolation BKE_subdiv_fvar_interpolation_from_uv_smooth (int uv_smooth)
 
eSubdivVtxBoundaryInterpolation BKE_subdiv_vtx_boundary_interpolation_from_subsurf (int boundary_smooth)
 
void BKE_subdiv_stats_init (SubdivStats *stats)
 
void BKE_subdiv_stats_begin (SubdivStats *stats, eSubdivStatsValue value)
 
void BKE_subdiv_stats_end (SubdivStats *stats, eSubdivStatsValue value)
 
void BKE_subdiv_stats_reset (SubdivStats *stats, eSubdivStatsValue value)
 
void BKE_subdiv_stats_print (const SubdivStats *stats)
 
bool BKE_subdiv_settings_equal (const SubdivSettings *settings_a, const SubdivSettings *settings_b)
 
SubdivBKE_subdiv_new_from_converter (const SubdivSettings *settings, struct OpenSubdiv_Converter *converter)
 
SubdivBKE_subdiv_new_from_mesh (const SubdivSettings *settings, const struct Mesh *mesh)
 
SubdivBKE_subdiv_update_from_converter (Subdiv *subdiv, const SubdivSettings *settings, struct OpenSubdiv_Converter *converter)
 
SubdivBKE_subdiv_update_from_mesh (Subdiv *subdiv, const SubdivSettings *settings, const struct Mesh *mesh)
 
void BKE_subdiv_free (Subdiv *subdiv)
 
void BKE_subdiv_displacement_attach_from_multires (Subdiv *subdiv, struct Mesh *mesh, const struct MultiresModifierData *mmd)
 
void BKE_subdiv_displacement_detach (Subdiv *subdiv)
 
int * BKE_subdiv_face_ptex_offset_get (Subdiv *subdiv)
 
BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv (const float ptex_u, const float ptex_v, float *r_grid_u, float *r_grid_v)
 
BLI_INLINE void BKE_subdiv_grid_uv_to_ptex_face_uv (const float grid_u, const float grid_v, float *r_ptex_u, float *r_ptex_v)
 
BLI_INLINE int BKE_subdiv_grid_size_from_level (const int level)
 
BLI_INLINE int BKE_subdiv_rotate_quad_to_corner (const float quad_u, const float quad_v, float *r_corner_u, float *r_corner_v)
 
BLI_INLINE void BKE_subdiv_rotate_grid_to_quad (const int corner, const float grid_u, const float grid_v, float *r_quad_u, float *r_quad_v)
 
BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_f (float edge_crease)
 
BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_char (char edge_crease)
 

Typedef Documentation

◆ eSubdivFVarLinearInterpolation

◆ eSubdivStatsValue

◆ eSubdivVtxBoundaryInterpolation

◆ Subdiv

typedef struct Subdiv Subdiv

◆ SubdivDisplacement

◆ SubdivSettings

◆ SubdivStats

typedef struct SubdivStats SubdivStats

Enumeration Type Documentation

◆ eSubdivFVarLinearInterpolation

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 49 of file BKE_subdiv.h.

◆ eSubdivStatsValue

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 91 of file BKE_subdiv.h.

◆ eSubdivVtxBoundaryInterpolation

Enumerator
SUBDIV_VTX_BOUNDARY_NONE 
SUBDIV_VTX_BOUNDARY_EDGE_ONLY 
SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER 

Definition at line 40 of file BKE_subdiv.h.

Function Documentation

◆ BKE_subdiv_displacement_attach_from_multires()

void BKE_subdiv_displacement_attach_from_multires ( Subdiv subdiv,
struct Mesh mesh,
const struct MultiresModifierData mmd 
)

◆ BKE_subdiv_displacement_detach()

void BKE_subdiv_displacement_detach ( Subdiv subdiv)

◆ BKE_subdiv_edge_crease_to_sharpness_char()

BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_char ( char  edge_crease)

Definition at line 111 of file subdiv_inline.h.

References BKE_subdiv_edge_crease_to_sharpness_f().

Referenced by get_edge_sharpness(), and store_edge().

◆ BKE_subdiv_edge_crease_to_sharpness_f()

BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_f ( float  edge_crease)

Definition at line 106 of file subdiv_inline.h.

Referenced by BKE_subdiv_edge_crease_to_sharpness_char().

◆ BKE_subdiv_exit()

void BKE_subdiv_exit ( void  )

Definition at line 48 of file subdiv.c.

References openSubdiv_cleanup().

Referenced by WM_exit_ex().

◆ BKE_subdiv_face_ptex_offset_get()

int* BKE_subdiv_face_ptex_offset_get ( Subdiv subdiv)

◆ BKE_subdiv_free()

void BKE_subdiv_free ( Subdiv subdiv)

◆ BKE_subdiv_fvar_interpolation_from_uv_smooth()

eSubdivFVarLinearInterpolation BKE_subdiv_fvar_interpolation_from_uv_smooth ( int  uv_smooth)

◆ BKE_subdiv_grid_size_from_level()

BLI_INLINE int BKE_subdiv_grid_size_from_level ( const int  level)

◆ BKE_subdiv_grid_uv_to_ptex_face_uv()

BLI_INLINE void BKE_subdiv_grid_uv_to_ptex_face_uv ( const float  grid_u,
const float  grid_v,
float r_ptex_u,
float r_ptex_v 
)

◆ BKE_subdiv_init()

void BKE_subdiv_init ( void  )

Definition at line 43 of file subdiv.c.

References openSubdiv_init().

Referenced by WM_init().

◆ BKE_subdiv_new_from_converter()

Subdiv* BKE_subdiv_new_from_converter ( const SubdivSettings settings,
struct OpenSubdiv_Converter converter 
)

◆ BKE_subdiv_new_from_mesh()

Subdiv* BKE_subdiv_new_from_mesh ( const SubdivSettings settings,
const struct Mesh mesh 
)

◆ BKE_subdiv_ptex_face_uv_to_grid_uv()

BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv ( const float  ptex_u,
const float  ptex_v,
float r_grid_u,
float r_grid_v 
)

◆ BKE_subdiv_rotate_grid_to_quad()

BLI_INLINE void BKE_subdiv_rotate_grid_to_quad ( const int  corner,
const float  grid_u,
const float  grid_v,
float r_quad_u,
float r_quad_v 
)

◆ BKE_subdiv_rotate_quad_to_corner()

BLI_INLINE int BKE_subdiv_rotate_quad_to_corner ( const float  quad_u,
const float  quad_v,
float r_corner_u,
float r_corner_v 
)

◆ BKE_subdiv_settings_equal()

bool BKE_subdiv_settings_equal ( const SubdivSettings settings_a,
const SubdivSettings settings_b 
)

◆ BKE_subdiv_stats_begin()

void BKE_subdiv_stats_begin ( SubdivStats stats,
eSubdivStatsValue  value 
)

◆ BKE_subdiv_stats_end()

void BKE_subdiv_stats_end ( SubdivStats stats,
eSubdivStatsValue  value 
)

◆ BKE_subdiv_stats_init()

void BKE_subdiv_stats_init ( SubdivStats stats)

◆ BKE_subdiv_stats_print()

void BKE_subdiv_stats_print ( const SubdivStats stats)

Definition at line 57 of file subdiv_stats.c.

References STATS_PRINT_TIME.

◆ BKE_subdiv_stats_reset()

void BKE_subdiv_stats_reset ( SubdivStats stats,
eSubdivStatsValue  value 
)

Definition at line 52 of file subdiv_stats.c.

References SubdivStats::values_.

Referenced by BKE_subdiv_eval_begin().

◆ BKE_subdiv_update_from_converter()

Subdiv* BKE_subdiv_update_from_converter ( Subdiv subdiv,
const SubdivSettings settings,
struct OpenSubdiv_Converter converter 
)

◆ BKE_subdiv_update_from_mesh()

Subdiv* BKE_subdiv_update_from_mesh ( Subdiv subdiv,
const SubdivSettings settings,
const struct Mesh mesh 
)

◆ BKE_subdiv_vtx_boundary_interpolation_from_subsurf()

eSubdivVtxBoundaryInterpolation BKE_subdiv_vtx_boundary_interpolation_from_subsurf ( int  boundary_smooth)