Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions
draw_cache_impl_lattice.c File Reference

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 }
 

Functions

static void lattice_batch_cache_clear (Lattice *lt)
 
static int vert_len_calc (int u, int v, int w)
 
static int edge_len_calc (int u, int v, int w)
 
static int lattice_render_verts_len_get (Lattice *lt)
 
static int lattice_render_edges_len_get (Lattice *lt)
 
static LatticeRenderDatalattice_render_data_create (Lattice *lt, const int types)
 
static void lattice_render_data_free (LatticeRenderData *rdata)
 
static int lattice_render_data_verts_len_get (const LatticeRenderData *rdata)
 
static int lattice_render_data_edges_len_get (const LatticeRenderData *rdata)
 
static const BPointlattice_render_data_vert_bpoint (const LatticeRenderData *rdata, const int vert_idx)
 
static bool lattice_batch_cache_valid (Lattice *lt)
 
static void lattice_batch_cache_init (Lattice *lt)
 
void DRW_lattice_batch_cache_validate (Lattice *lt)
 
static LatticeBatchCachelattice_batch_cache_get (Lattice *lt)
 
void DRW_lattice_batch_cache_dirty_tag (Lattice *lt, int mode)
 
void DRW_lattice_batch_cache_free (Lattice *lt)
 
static GPUVertBuflattice_batch_cache_get_pos (LatticeRenderData *rdata, LatticeBatchCache *cache, bool use_weight, const int actdef)
 
static GPUIndexBuflattice_batch_cache_get_edges (LatticeRenderData *rdata, LatticeBatchCache *cache)
 
static void lattice_batch_cache_create_overlay_batches (Lattice *lt)
 
GPUBatchDRW_lattice_batch_cache_get_all_edges (Lattice *lt, bool use_weight, const int actdef)
 
GPUBatchDRW_lattice_batch_cache_get_all_verts (Lattice *lt)
 
GPUBatchDRW_lattice_batch_cache_get_edit_verts (Lattice *lt)
 

Detailed Description

Lattice API for render engines.

Definition in file draw_cache_impl_lattice.c.

Macro Definition Documentation

◆ LATT_INDEX

#define LATT_INDEX (   u,
  v,
  w 
)    ((((w)*rdata->dims.v_len + (v)) * rdata->dims.u_len) + (u))

◆ SELECT

#define SELECT   1

Definition at line 28 of file draw_cache_impl_lattice.c.

Typedef Documentation

◆ LatticeBatchCache

◆ LatticeRenderData

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LR_DATATYPE_VERT 
LR_DATATYPE_EDGE 
LR_DATATYPE_OVERLAY 

Definition at line 115 of file draw_cache_impl_lattice.c.

Function Documentation

◆ DRW_lattice_batch_cache_dirty_tag()

void DRW_lattice_batch_cache_dirty_tag ( Lattice lt,
int  mode 
)

◆ DRW_lattice_batch_cache_free()

void DRW_lattice_batch_cache_free ( Lattice lt)

◆ DRW_lattice_batch_cache_get_all_edges()

GPUBatch* DRW_lattice_batch_cache_get_all_edges ( Lattice lt,
bool  use_weight,
const int  actdef 
)

◆ DRW_lattice_batch_cache_get_all_verts()

GPUBatch* DRW_lattice_batch_cache_get_all_verts ( Lattice lt)

◆ DRW_lattice_batch_cache_get_edit_verts()

GPUBatch* DRW_lattice_batch_cache_get_edit_verts ( Lattice lt)

◆ DRW_lattice_batch_cache_validate()

void DRW_lattice_batch_cache_validate ( Lattice lt)

◆ edge_len_calc()

static int edge_len_calc ( int  u,
int  v,
int  w 
)
static

Definition at line 49 of file draw_cache_impl_lattice.c.

References v, and w().

Referenced by lattice_render_edges_len_get().

◆ lattice_batch_cache_clear()

static void lattice_batch_cache_clear ( Lattice lt)
static

◆ lattice_batch_cache_create_overlay_batches()

static void lattice_batch_cache_create_overlay_batches ( Lattice lt)
static

◆ lattice_batch_cache_get()

static LatticeBatchCache* lattice_batch_cache_get ( Lattice lt)
static

◆ lattice_batch_cache_get_edges()

static GPUIndexBuf* lattice_batch_cache_get_edges ( LatticeRenderData rdata,
LatticeBatchCache cache 
)
static

◆ lattice_batch_cache_get_pos()

static GPUVertBuf* lattice_batch_cache_get_pos ( LatticeRenderData rdata,
LatticeBatchCache cache,
bool  use_weight,
const int  actdef 
)
static

◆ lattice_batch_cache_init()

static void lattice_batch_cache_init ( Lattice lt)
static

◆ lattice_batch_cache_valid()

static bool lattice_batch_cache_valid ( Lattice lt)
static

◆ lattice_render_data_create()

static LatticeRenderData* lattice_render_data_create ( Lattice lt,
const int  types 
)
static

◆ lattice_render_data_edges_len_get()

static int lattice_render_data_edges_len_get ( const LatticeRenderData rdata)
static

◆ lattice_render_data_free()

static void lattice_render_data_free ( LatticeRenderData rdata)
static

◆ lattice_render_data_vert_bpoint()

static const BPoint* lattice_render_data_vert_bpoint ( const LatticeRenderData rdata,
const int  vert_idx 
)
static

◆ lattice_render_data_verts_len_get()

static int lattice_render_data_verts_len_get ( const LatticeRenderData rdata)
static

◆ lattice_render_edges_len_get()

static int lattice_render_edges_len_get ( Lattice lt)
static

◆ lattice_render_verts_len_get()

static int lattice_render_verts_len_get ( Lattice lt)
static

◆ vert_len_calc()

static int vert_len_calc ( int  u,
int  v,
int  w 
)
static

Definition at line 41 of file draw_cache_impl_lattice.c.

References v, and w().

Referenced by lattice_render_verts_len_get().