Blender  V3.3
Classes | Macros | Typedefs | Functions
CCGSubSurf_legacy.c File Reference
#include "BLI_sys_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "CCGSubSurf.h"
#include "CCGSubSurf_intern.h"

Go to the source code of this file.

Classes

struct  CCGSubSurfCalcSubdivData
 

Macros

#define FACE_calcIFNo(f, lvl, S, x, y, no)    _face_calcIFNo(f, lvl, S, x, y, no, subdivLevels, vertDataSize)
 

Typedefs

typedef struct CCGSubSurfCalcSubdivData CCGSubSurfCalcSubdivData
 

Functions

static void_edge_getCoVert (CCGEdge *e, CCGVert *v, int lvl, int x, int dataSize)
 
static int _edge_isBoundary (const CCGEdge *e)
 
static bool _vert_isBoundary (const CCGVert *v)
 
static CCGVert_edge_getOtherVert (CCGEdge *e, CCGVert *vQ)
 
static float_face_getIFNoEdge (CCGFace *f, CCGEdge *e, int f_ed_idx, int lvl, int eX, int eY, int levels, int dataSize, int normalDataOffset)
 
static void _face_calcIFNo (CCGFace *f, int lvl, int S, int x, int y, float no[3], int levels, int dataSize)
 
static int VERT_seam (const CCGVert *v)
 
static float EDGE_getSharpness (CCGEdge *e, int lvl)
 
static void ccgSubSurf__calcVertNormals_faces_accumulate_cb (void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void ccgSubSurf__calcVertNormals_faces_finalize_cb (void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void ccgSubSurf__calcVertNormals_edges_accumulate_cb (void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void ccgSubSurf__calcVertNormals (CCGSubSurf *ss, CCGVert **effectedV, CCGEdge **effectedE, CCGFace **effectedF, int numEffectedV, int numEffectedE, int numEffectedF)
 
static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb (void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb (void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void ccgSubSurf__calcSubdivLevel_verts_copydata_cb (void *__restrict userdata, const int ptrIdx, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void ccgSubSurf__calcSubdivLevel (CCGSubSurf *ss, CCGVert **effectedV, CCGEdge **effectedE, CCGFace **effectedF, const int numEffectedV, const int numEffectedE, const int numEffectedF, const int curLvl)
 
void ccgSubSurf__sync_legacy (CCGSubSurf *ss)
 
CCGError ccgSubSurf_updateNormals (CCGSubSurf *ss, CCGFace **effectedF, int numEffectedF)
 
CCGError ccgSubSurf_updateLevels (CCGSubSurf *ss, int lvl, CCGFace **effectedF, int numEffectedF)
 

Macro Definition Documentation

◆ FACE_calcIFNo

#define FACE_calcIFNo (   f,
  lvl,
  S,
  x,
  y,
  no 
)     _face_calcIFNo(f, lvl, S, x, y, no, subdivLevels, vertDataSize)

Definition at line 17 of file CCGSubSurf_legacy.c.

Typedef Documentation

◆ CCGSubSurfCalcSubdivData

Function Documentation

◆ _edge_getCoVert()

static void* _edge_getCoVert ( CCGEdge e,
CCGVert v,
int  lvl,
int  x,
int  dataSize 
)
static

◆ _edge_getOtherVert()

static CCGVert* _edge_getOtherVert ( CCGEdge e,
CCGVert vQ 
)
static

Definition at line 46 of file CCGSubSurf_legacy.c.

References e.

Referenced by ccgSubSurf__sync_legacy().

◆ _edge_isBoundary()

static int _edge_isBoundary ( const CCGEdge e)
static

Definition at line 31 of file CCGSubSurf_legacy.c.

References e.

Referenced by _vert_isBoundary(), ccgSubSurf__calcSubdivLevel(), and ccgSubSurf__sync_legacy().

◆ _face_calcIFNo()

static void _face_calcIFNo ( CCGFace f,
int  lvl,
int  S,
int  x,
int  y,
float  no[3],
int  levels,
int  dataSize 
)
static

Definition at line 69 of file CCGSubSurf_legacy.c.

References Freestyle::a, usdtokens::b(), Freestyle::c, ccg_face_getIFCo(), Normalize(), x, and y.

◆ _face_getIFNoEdge()

static float* _face_getIFNoEdge ( CCGFace f,
CCGEdge e,
int  f_ed_idx,
int  lvl,
int  eX,
int  eY,
int  levels,
int  dataSize,
int  normalDataOffset 
)
static

◆ _vert_isBoundary()

static bool _vert_isBoundary ( const CCGVert v)
static

Definition at line 36 of file CCGSubSurf_legacy.c.

References _edge_isBoundary(), and v.

Referenced by ccgSubSurf__calcSubdivLevel(), and ccgSubSurf__sync_legacy().

◆ ccgSubSurf__calcSubdivLevel()

static void ccgSubSurf__calcSubdivLevel ( CCGSubSurf ss,
CCGVert **  effectedV,
CCGEdge **  effectedE,
CCGFace **  effectedF,
const int  numEffectedV,
const int  numEffectedE,
const int  numEffectedF,
const int  curLvl 
)
static

◆ ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb()

static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb ( void *__restrict  userdata,
const int  ptrIdx,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb()

static void ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb ( void *__restrict  userdata,
const int  ptrIdx,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ ccgSubSurf__calcSubdivLevel_verts_copydata_cb()

static void ccgSubSurf__calcSubdivLevel_verts_copydata_cb ( void *__restrict  userdata,
const int  ptrIdx,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ ccgSubSurf__calcVertNormals()

static void ccgSubSurf__calcVertNormals ( CCGSubSurf ss,
CCGVert **  effectedV,
CCGEdge **  effectedE,
CCGFace **  effectedF,
int  numEffectedV,
int  numEffectedE,
int  numEffectedF 
)
static

◆ ccgSubSurf__calcVertNormals_edges_accumulate_cb()

static void ccgSubSurf__calcVertNormals_edges_accumulate_cb ( void *__restrict  userdata,
const int  ptrIdx,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ ccgSubSurf__calcVertNormals_faces_accumulate_cb()

static void ccgSubSurf__calcVertNormals_faces_accumulate_cb ( void *__restrict  userdata,
const int  ptrIdx,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ ccgSubSurf__calcVertNormals_faces_finalize_cb()

static void ccgSubSurf__calcVertNormals_faces_finalize_cb ( void *__restrict  userdata,
const int  ptrIdx,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ ccgSubSurf__sync_legacy()

void ccgSubSurf__sync_legacy ( CCGSubSurf ss)

◆ ccgSubSurf_updateLevels()

CCGError ccgSubSurf_updateLevels ( CCGSubSurf ss,
int  lvl,
CCGFace **  effectedF,
int  numEffectedF 
)

Compute subdivision levels from a given starting point, used by multi-res subdivide/propagate, by filling in coordinates at a certain level, and then subdividing that up to the highest level.

Definition at line 1332 of file CCGSubSurf_legacy.c.

References ccgSubSurf__allFaces(), ccgSubSurf__calcSubdivLevel(), ccgSubSurf__effectedFaceNeighbors(), eCCGError_None, CCGVert::flags, CCGEdge::flags, CCGFace::flags, MEM_freeN, and CCGSubSurf::subdivLevels.

Referenced by multires_modifier_update_mdisps().

◆ ccgSubSurf_updateNormals()

CCGError ccgSubSurf_updateNormals ( CCGSubSurf ss,
CCGFace **  effectedF,
int  numEffectedF 
)

◆ EDGE_getSharpness()

static float EDGE_getSharpness ( CCGEdge e,
int  lvl 
)
static

Definition at line 91 of file CCGSubSurf_legacy.c.

References e.

Referenced by ccgSubSurf__calcSubdivLevel(), and ccgSubSurf__sync_legacy().

◆ VERT_seam()

static int VERT_seam ( const CCGVert v)
static

Definition at line 86 of file CCGSubSurf_legacy.c.

References v, and Vert_eSeam.

Referenced by ccgSubSurf__calcSubdivLevel(), and ccgSubSurf__sync_legacy().