Blender  V3.3
BKE_displist.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
4 #pragma once
5 
10 #include "BKE_customdata.h"
11 #include "DNA_customdata_types.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
18 enum {
20  DL_POLY = 0,
22  DL_SEGM = 1,
24  DL_SURF = 2,
26  DL_INDEX3 = 4,
28  DL_INDEX4 = 5,
29  // DL_VERTCOL = 6, /* UNUSED */
31  DL_VERTS = 7,
32 };
33 
35 enum {
37  DL_CYCL_U = (1 << 0),
38  DL_CYCL_V = (1 << 1),
39 
40  DL_FRONT_CURVE = (1 << 2),
41  DL_BACK_CURVE = (1 << 3),
42 };
43 
44 /* prototypes */
45 
46 struct Depsgraph;
47 struct ListBase;
48 struct Mesh;
49 struct Object;
50 struct Scene;
51 
52 /* Used for curves, nurbs, meta-balls. */
53 typedef struct DispList {
54  struct DispList *next, *prev;
55  short type, flag;
56  int parts, nr;
57  short col, rt; /* Currently only used for smooth flag. */
58  float *verts, *nors;
59  int *index;
60  int charidx;
61  int totindex; /* indexed array drawing surfaces */
63 
64 void BKE_displist_copy(struct ListBase *lbn, const struct ListBase *lb);
65 DispList *BKE_displist_find(struct ListBase *lb, int type);
66 void BKE_displist_normals_add(struct ListBase *lb);
67 void BKE_displist_count(const struct ListBase *lb, int *totvert, int *totface, int *tottri);
68 void BKE_displist_free(struct ListBase *lb);
69 
71  const struct Scene *scene,
72  struct Object *ob,
73  bool for_render);
74 void BKE_displist_make_mball(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
75 
77  const struct Scene *scene,
78  struct Object *ob,
79  struct ListBase *source_nurb,
80  struct ListBase *target_nurb,
81  bool for_render);
83  const struct DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4);
84 
91 void BKE_displist_fill(const struct ListBase *dispbase,
92  struct ListBase *to,
93  const float normal_proj[3],
94  bool flip_normal);
95 
97  const struct Scene *scene,
98  struct Object *taperobj,
99  int cur,
100  int tot);
101 
102 void BKE_displist_minmax(const struct ListBase *dispbase, float min[3], float max[3]);
103 
104 #ifdef __cplusplus
105 }
106 #endif
CustomData interface, see also DNA_customdata_types.h.
void BKE_displist_copy(struct ListBase *lbn, const struct ListBase *lb)
void BKE_curve_calc_modifiers_pre(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, struct ListBase *source_nurb, struct ListBase *target_nurb, bool for_render)
bool BKE_displist_surfindex_get(const struct DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4)
void BKE_displist_free(struct ListBase *lb)
Definition: displist.cc:69
@ DL_CYCL_V
Definition: BKE_displist.h:38
@ DL_BACK_CURVE
Definition: BKE_displist.h:41
@ DL_FRONT_CURVE
Definition: BKE_displist.h:40
@ DL_CYCL_U
Definition: BKE_displist.h:37
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, bool for_render)
@ DL_SURF
Definition: BKE_displist.h:24
@ DL_INDEX4
Definition: BKE_displist.h:28
@ DL_INDEX3
Definition: BKE_displist.h:26
@ DL_POLY
Definition: BKE_displist.h:20
@ DL_SEGM
Definition: BKE_displist.h:22
@ DL_VERTS
Definition: BKE_displist.h:31
DispList * BKE_displist_find(struct ListBase *lb, int type)
Definition: displist.cc:78
void BKE_displist_fill(const struct ListBase *dispbase, struct ListBase *to, const float normal_proj[3], bool flip_normal)
void BKE_displist_normals_add(struct ListBase *lb)
Definition: displist.cc:102
float BKE_displist_calc_taper(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *taperobj, int cur, int tot)
void BKE_displist_minmax(const struct ListBase *dispbase, float min[3], float max[3])
void BKE_displist_make_mball(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: displist.cc:641
void BKE_displist_count(const struct ListBase *lb, int *totvert, int *totface, int *tottri)
struct DispList DispList
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
_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 type
Scene scene
const Depsgraph * depsgraph
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
#define min(a, b)
Definition: sort.c:35
short type
Definition: BKE_displist.h:55
int totindex
Definition: BKE_displist.h:61
short col
Definition: BKE_displist.h:57
float * verts
Definition: BKE_displist.h:58
int * index
Definition: BKE_displist.h:59
struct DispList * prev
Definition: BKE_displist.h:54
short rt
Definition: BKE_displist.h:57
struct DispList * next
Definition: BKE_displist.h:54
float * nors
Definition: BKE_displist.h:58
short flag
Definition: BKE_displist.h:55
int charidx
Definition: BKE_displist.h:60
float max