43 const int ptex_face_index,
56 float corner_u, corner_v;
58 *r_mask_grid = &
data->grid_paint_mask[start_grid_index +
corner];
62 *r_mask_grid = &
data->grid_paint_mask[start_grid_index];
76 const int x = roundf(grid_u * (grid_size - 1));
77 const int y = roundf(grid_v * (grid_size - 1));
78 return mask_grid->
data[
y * grid_size +
x];
82 const int ptex_face_index,
104 int num_ptex_faces = 0;
106 for (
int poly_index = 0; poly_index <
mesh->
totpoly; poly_index++) {
107 const MPoly *poly = &mpoly[poly_index];
110 return num_ptex_faces;
120 num_ptex_faces,
sizeof(*
data->ptex_poly_corner),
"ptex poly corner");
122 int ptex_face_index = 0;
124 for (
int poly_index = 0; poly_index <
mesh->
totpoly; poly_index++) {
125 const MPoly *poly = &mpoly[poly_index];
127 ptex_poly_corner[ptex_face_index].
poly_index = poly_index;
128 ptex_poly_corner[ptex_face_index].
corner = 0;
133 ptex_poly_corner[ptex_face_index].
poly_index = poly_index;
CustomData interface, see also DNA_customdata_types.h.
void * CustomData_get_layer(const struct CustomData *data, int type)
BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv(float ptex_u, float ptex_v, float *r_grid_u, float *r_grid_v)
BLI_INLINE int BKE_subdiv_grid_size_from_level(int level)
BLI_INLINE int BKE_subdiv_rotate_quad_to_corner(float quad_u, float quad_v, float *r_corner_u, float *r_corner_v)
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert * v
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
PolyCornerIndex * ptex_poly_corner
const GridPaintMask * grid_paint_mask
float(* eval_mask)(struct SubdivCCGMaskEvaluator *mask_evaluator, int ptex_face_index, float u, float v)
void(* free)(struct SubdivCCGMaskEvaluator *mask_evaluator)
bool BKE_subdiv_ccg_mask_init_from_paint(SubdivCCGMaskEvaluator *mask_evaluator, const struct Mesh *mesh)
struct GridPaintMaskData GridPaintMaskData
static float eval_mask(SubdivCCGMaskEvaluator *mask_evaluator, const int ptex_face_index, const float u, const float v)
static void mask_init_data(SubdivCCGMaskEvaluator *mask_evaluator, const Mesh *mesh)
static int mask_get_grid_and_coord(SubdivCCGMaskEvaluator *mask_evaluator, const int ptex_face_index, const float u, const float v, const GridPaintMask **r_mask_grid, float *grid_u, float *grid_v)
static void mask_data_init_mapping(SubdivCCGMaskEvaluator *mask_evaluator, const Mesh *mesh)
static void mask_init_functions(SubdivCCGMaskEvaluator *mask_evaluator)
static int count_num_ptex_faces(const Mesh *mesh)
BLI_INLINE float read_mask_grid(const GridPaintMask *mask_grid, const float grid_u, const float grid_v)
struct PolyCornerIndex PolyCornerIndex
static void free_mask_data(SubdivCCGMaskEvaluator *mask_evaluator)