22 #define NO_EDGE INT_MAX
41 data->is_manifold =
true;
63 for (
int e = 0;
e < 3;
e++) {
67 bool inv_indices = (
v2 > v3);
71 if (!value_is_init || v_data ==
NO_EDGE) {
74 int value = (int)l1 + 1;
77 data->vert_to_loop[
v2] = l2;
78 data->vert_to_loop[v3] = l3;
83 bool inv_opposite = (v_data < 0);
86 if (inv_opposite == inv_indices) {
90 data->is_manifold =
false;
101 const int UNUSED(elt_index),
118 const int UNUSED(elt_index),
152 l2 =
data->vert_to_loop[
v2];
153 l3 =
data->vert_to_loop[v3];
155 data->is_manifold =
false;
186 uint subdiv_quad_index)
190 const uint loop_index = subdiv_quad_index * 4;
191 const uint l0 = loop_index + 0;
192 const uint l1 = loop_index + 1;
193 const uint l2 = loop_index + 2;
194 const uint l3 = loop_index + 3;
208 uint subdiv_quad_index,
217 uint subdiv_quad_index,
void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP free_value)
BLI_INLINE void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *r_v0, unsigned int *r_v1)
EdgeHashIterator * BLI_edgehashIterator_new(EdgeHash *eh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_edgehash_ensure_p(EdgeHash *eh, unsigned int v0, unsigned int v1, void ***r_val) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void BLI_edgehashIterator_step(EdgeHashIterator *ehi)
void BLI_edgehashIterator_free(EdgeHashIterator *ehi)
BLI_INLINE void * BLI_edgehashIterator_getValue(EdgeHashIterator *ehi)
BLI_INLINE bool BLI_edgehashIterator_isDone(const EdgeHashIterator *ehi)
EdgeHash * BLI_edgehash_new_ex(const char *info, unsigned int nentries_reserve)
#define POINTER_FROM_INT(i)
#define SHIFT3(type, a, b, c)
#define POINTER_AS_INT(i)
struct GPUIndexBuf GPUIndexBuf
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
void GPU_indexbuf_add_line_adj_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3, uint v4)
void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *, GPUIndexBuf *)
_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 GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
#define BM_elem_index_get(ele)
#define BM_elem_flag_test(ele, hflag)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void extract_lines_adjacency_iter_subdiv_bm(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *_data, uint subdiv_quad_index, const BMFace *UNUSED(coarse_quad))
static void line_adjacency_data_init(MeshExtract_LineAdjacency_Data *data, uint vert_len, uint loop_len, uint tess_edge_len)
static void extract_lines_adjacency_iter_subdiv_mesh(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *_data, uint subdiv_quad_index, const MPoly *UNUSED(coarse_quad))
static void extract_lines_adjacency_iter_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *UNUSED(mr), void *_data, uint subdiv_quad_index)
static void extract_lines_adjacency_finish_subdiv(const DRWSubdivCache *UNUSED(subdiv_cache), const MeshRenderData *mr, MeshBatchCache *cache, void *buf, void *_data)
constexpr MeshExtract create_extractor_lines_adjacency()
static void extract_lines_adjacency_iter_looptri_mesh(const MeshRenderData *mr, const MLoopTri *mlt, const int UNUSED(elt_index), void *_data)
BLI_INLINE void lines_adjacency_triangle(uint v1, uint v2, uint v3, uint l1, uint l2, uint l3, MeshExtract_LineAdjacency_Data *data)
static void extract_lines_adjacency_finish(const MeshRenderData *UNUSED(mr), MeshBatchCache *cache, void *buf, void *_data)
static void extract_lines_adjacency_init(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *UNUSED(buf), void *tls_data)
static void extract_lines_adjacency_iter_looptri_bm(const MeshRenderData *UNUSED(mr), BMLoop **elt, const int UNUSED(elt_index), void *_data)
static void extract_lines_adjacency_init_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *UNUSED(mr), MeshBatchCache *UNUSED(cache), void *UNUSED(buf), void *_data)
int * subdiv_loop_subdiv_vert_index
GPUIndexBuf * lines_adjacency