Blender
V3.3
|
Lattice API for render engines. More...
#include "MEM_guardedalloc.h"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "DNA_curve_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_userdef_types.h"
#include "BKE_colorband.h"
#include "BKE_deform.h"
#include "BKE_lattice.h"
#include "GPU_batch.h"
#include "draw_cache_impl.h"
Go to the source code of this file.
Classes | |
struct | LatticeRenderData |
struct | LatticeBatchCache |
Macros | |
#define | SELECT 1 |
#define | LATT_INDEX(u, v, w) ((((w)*rdata->dims.v_len + (v)) * rdata->dims.u_len) + (u)) |
Typedefs | |
typedef struct LatticeRenderData | LatticeRenderData |
typedef struct LatticeBatchCache | LatticeBatchCache |
Enumerations | |
enum | { LR_DATATYPE_VERT = 1 << 0 , LR_DATATYPE_EDGE = 1 << 1 , LR_DATATYPE_OVERLAY = 1 << 2 } |
Lattice API for render engines.
Definition in file draw_cache_impl_lattice.c.
#define SELECT 1 |
Definition at line 28 of file draw_cache_impl_lattice.c.
typedef struct LatticeBatchCache LatticeBatchCache |
typedef struct LatticeRenderData LatticeRenderData |
anonymous enum |
Enumerator | |
---|---|
LR_DATATYPE_VERT | |
LR_DATATYPE_EDGE | |
LR_DATATYPE_OVERLAY |
Definition at line 115 of file draw_cache_impl_lattice.c.
Definition at line 281 of file draw_cache_impl_lattice.c.
References Lattice::batch_cache, BKE_LATTICE_BATCH_DIRTY_ALL, BKE_LATTICE_BATCH_DIRTY_SELECT, BLI_assert, GPU_BATCH_DISCARD_SAFE, LatticeBatchCache::is_dirty, NULL, and LatticeBatchCache::overlay_verts.
Referenced by DRW_engines_register().
Definition at line 315 of file draw_cache_impl_lattice.c.
References Lattice::batch_cache, lattice_batch_cache_clear(), and MEM_SAFE_FREE.
Referenced by DRW_engines_register().
Definition at line 462 of file draw_cache_impl_lattice.c.
References LatticeBatchCache::all_edges, GPU_batch_create, GPU_PRIM_LINES, lattice_batch_cache_get(), lattice_batch_cache_get_edges(), lattice_batch_cache_get_pos(), lattice_render_data_create(), lattice_render_data_free(), LR_DATATYPE_EDGE, LR_DATATYPE_VERT, and NULL.
Referenced by DRW_cache_lattice_wire_get().
Definition at line 481 of file draw_cache_impl_lattice.c.
References LatticeBatchCache::all_verts, GPU_batch_create, GPU_PRIM_POINTS, lattice_batch_cache_get(), lattice_batch_cache_get_pos(), lattice_render_data_create(), lattice_render_data_free(), LR_DATATYPE_VERT, and NULL.
Referenced by DRW_cache_lattice_verts_get().
Definition at line 497 of file draw_cache_impl_lattice.c.
References lattice_batch_cache_create_overlay_batches(), lattice_batch_cache_get(), NULL, and LatticeBatchCache::overlay_verts.
Referenced by DRW_cache_lattice_vert_overlay_get().
Definition at line 268 of file draw_cache_impl_lattice.c.
References lattice_batch_cache_clear(), lattice_batch_cache_init(), and lattice_batch_cache_valid().
Referenced by drw_batch_cache_validate().
|
static |
Definition at line 49 of file draw_cache_impl_lattice.c.
Referenced by lattice_render_edges_len_get().
TODO
Definition at line 300 of file draw_cache_impl_lattice.c.
References LatticeBatchCache::all_edges, LatticeBatchCache::all_verts, Lattice::batch_cache, LatticeBatchCache::edges, GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, LatticeBatchCache::overlay_verts, and LatticeBatchCache::pos.
Referenced by DRW_lattice_batch_cache_free(), and DRW_lattice_batch_cache_validate().
Definition at line 416 of file draw_cache_impl_lattice.c.
References LatticeRenderData::actbp, attr_id, data, BPoint::f1, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_PRIM_POINTS, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), lattice_batch_cache_get(), lattice_render_data_create(), lattice_render_data_free(), lattice_render_data_vert_bpoint(), lattice_render_data_verts_len_get(), LR_DATATYPE_OVERLAY, LR_DATATYPE_VERT, NULL, options, LatticeBatchCache::overlay_verts, pos, SELECT, BPoint::vec, VFLAG_VERT_ACTIVE, and VFLAG_VERT_SELECTED.
Referenced by DRW_lattice_batch_cache_get_edit_verts().
|
static |
Definition at line 276 of file draw_cache_impl_lattice.c.
References Lattice::batch_cache.
Referenced by DRW_lattice_batch_cache_get_all_edges(), DRW_lattice_batch_cache_get_all_verts(), DRW_lattice_batch_cache_get_edit_verts(), and lattice_batch_cache_create_overlay_batches().
|
static |
Definition at line 360 of file draw_cache_impl_lattice.c.
References BLI_assert, LatticeRenderData::dims, LatticeBatchCache::edges, ELEM, GPU_indexbuf_add_line_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_LINES, LATT_INDEX, lattice_render_data_edges_len_get(), lattice_render_data_verts_len_get(), LR_DATATYPE_EDGE, LR_DATATYPE_VERT, NULL, LatticeRenderData::show_only_outside, LatticeRenderData::types, LatticeRenderData::u_len, v, LatticeRenderData::v_len, w(), and LatticeRenderData::w_len.
Referenced by DRW_lattice_batch_cache_get_all_edges().
|
static |
Definition at line 322 of file draw_cache_impl_lattice.c.
References attr_id, BKE_defvert_find_weight(), BLI_assert, col, LatticeRenderData::dvert, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), lattice_render_data_vert_bpoint(), lattice_render_data_verts_len_get(), LR_DATATYPE_VERT, NULL, LatticeBatchCache::pos, pos, LatticeRenderData::types, and BPoint::vec.
Referenced by DRW_lattice_batch_cache_get_all_edges(), and DRW_lattice_batch_cache_get_all_verts().
Definition at line 247 of file draw_cache_impl_lattice.c.
References Lattice::batch_cache, LatticeBatchCache::dims, Lattice::editlatt, Lattice::flag, LatticeBatchCache::is_dirty, LatticeBatchCache::is_editmode, LT_OUTSIDE, MEM_callocN, NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, LatticeBatchCache::show_only_outside, LatticeBatchCache::u_len, LatticeBatchCache::v_len, and LatticeBatchCache::w_len.
Referenced by DRW_lattice_batch_cache_validate().
Definition at line 222 of file draw_cache_impl_lattice.c.
References Lattice::batch_cache, LatticeBatchCache::dims, Lattice::editlatt, Lattice::flag, LatticeBatchCache::is_dirty, LatticeBatchCache::is_editmode, LT_OUTSIDE, NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, LatticeBatchCache::show_only_outside, LatticeBatchCache::u_len, LatticeBatchCache::v_len, and LatticeBatchCache::w_len.
Referenced by DRW_lattice_batch_cache_validate().
|
static |
Definition at line 121 of file draw_cache_impl_lattice.c.
References LatticeRenderData::actbp, Lattice::actbp, LatticeRenderData::bp, Lattice::def, LatticeRenderData::dims, LatticeRenderData::dvert, Lattice::dvert, LatticeRenderData::edge_len, LatticeRenderData::edit_latt, Lattice::editlatt, Lattice::flag, EditLatt::latt, lattice_render_edges_len_get(), lattice_render_verts_len_get(), LR_DATATYPE_EDGE, LR_DATATYPE_OVERLAY, LR_DATATYPE_VERT, LT_OUTSIDE, MEM_callocN, NULL, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, LatticeRenderData::show_only_outside, LatticeRenderData::types, types, LatticeRenderData::u_len, LatticeRenderData::v_len, LatticeRenderData::vert_len, and LatticeRenderData::w_len.
Referenced by DRW_lattice_batch_cache_get_all_edges(), DRW_lattice_batch_cache_get_all_verts(), and lattice_batch_cache_create_overlay_batches().
|
static |
Definition at line 184 of file draw_cache_impl_lattice.c.
References BLI_assert, LatticeRenderData::edge_len, LR_DATATYPE_EDGE, and LatticeRenderData::types.
Referenced by lattice_batch_cache_get_edges().
|
static |
Definition at line 168 of file draw_cache_impl_lattice.c.
References MEM_freeN.
Referenced by DRW_lattice_batch_cache_get_all_edges(), DRW_lattice_batch_cache_get_all_verts(), and lattice_batch_cache_create_overlay_batches().
|
static |
Definition at line 190 of file draw_cache_impl_lattice.c.
References BLI_assert, LatticeRenderData::bp, LR_DATATYPE_VERT, and LatticeRenderData::types.
Referenced by lattice_batch_cache_create_overlay_batches(), and lattice_batch_cache_get_pos().
|
static |
Definition at line 178 of file draw_cache_impl_lattice.c.
References BLI_assert, LR_DATATYPE_VERT, LatticeRenderData::types, and LatticeRenderData::vert_len.
Referenced by lattice_batch_cache_create_overlay_batches(), lattice_batch_cache_get_edges(), and lattice_batch_cache_get_pos().
|
static |
Definition at line 75 of file draw_cache_impl_lattice.c.
References edge_len_calc(), Lattice::editlatt, Lattice::flag, EditLatt::latt, LT_OUTSIDE, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, v, and w().
Referenced by lattice_render_data_create().
|
static |
Definition at line 57 of file draw_cache_impl_lattice.c.
References Lattice::editlatt, Lattice::flag, EditLatt::latt, LT_OUTSIDE, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, v, vert_len_calc(), and w().
Referenced by lattice_render_data_create().
|
static |
Definition at line 41 of file draw_cache_impl_lattice.c.
Referenced by lattice_render_verts_len_get().