Blender  V3.3
Enumerations | Functions | Variables
BKE_lattice.h File Reference
#include "BLI_compiler_attrs.h"

Go to the source code of this file.

Enumerations

enum  { BKE_LATTICE_BATCH_DIRTY_ALL = 0 , BKE_LATTICE_BATCH_DIRTY_SELECT }
 

Functions

void BKE_lattice_resize (struct Lattice *lt, int u, int v, int w, struct Object *ltOb)
 
struct LatticeBKE_lattice_add (struct Main *bmain, const char *name)
 
void calc_lat_fudu (int flag, int res, float *r_fu, float *r_du)
 
bool object_deform_mball (struct Object *ob, struct ListBase *dispbase)
 
void outside_lattice (struct Lattice *lt)
 
float(* BKE_lattice_vert_coords_alloc (const struct Lattice *lt, int *r_vert_len))[3]
 
void BKE_lattice_vert_coords_get (const struct Lattice *lt, float(*vert_coords)[3])
 
void BKE_lattice_vert_coords_apply_with_mat4 (struct Lattice *lt, const float(*vert_coords)[3], const float mat[4][4])
 
void BKE_lattice_vert_coords_apply (struct Lattice *lt, const float(*vert_coords)[3])
 
void BKE_lattice_modifiers_calc (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
 
struct MDeformVertBKE_lattice_deform_verts_get (const struct Object *oblatt)
 
struct BPointBKE_lattice_active_point_get (struct Lattice *lt)
 
struct BoundBoxBKE_lattice_boundbox_get (struct Object *ob)
 
void BKE_lattice_minmax_dl (struct Object *ob, struct Lattice *lt, float min[3], float max[3])
 
void BKE_lattice_minmax (struct Lattice *lt, float min[3], float max[3])
 
void BKE_lattice_center_median (struct Lattice *lt, float cent[3])
 
void BKE_lattice_center_bounds (struct Lattice *lt, float cent[3])
 
void BKE_lattice_translate (struct Lattice *lt, const float offset[3], bool do_keys)
 
void BKE_lattice_transform (struct Lattice *lt, const float mat[4][4], bool do_keys)
 
bool BKE_lattice_is_any_selected (const struct Lattice *lt)
 
int BKE_lattice_index_from_uvw (struct Lattice *lt, int u, int v, int w)
 
void BKE_lattice_index_to_uvw (struct Lattice *lt, int index, int *r_u, int *r_v, int *r_w)
 
int BKE_lattice_index_flip (struct Lattice *lt, int index, bool flip_u, bool flip_v, bool flip_w)
 
void BKE_lattice_bitmap_from_flag (struct Lattice *lt, unsigned int *bitmap, uint8_t flag, bool clear, bool respecthide)
 
void BKE_lattice_eval_geometry (struct Depsgraph *depsgraph, struct Lattice *latt)
 
void BKE_lattice_batch_cache_dirty_tag (struct Lattice *lt, int mode)
 
void BKE_lattice_batch_cache_free (struct Lattice *lt)
 
Deform 3D Coordinates by Lattice (lattice_deform.c)
struct LatticeDeformDataBKE_lattice_deform_data_create (const struct Object *oblatt, const struct Object *ob) ATTR_WARN_UNUSED_RESULT
 
void BKE_lattice_deform_data_eval_co (struct LatticeDeformData *lattice_deform_data, float co[3], float weight)
 
void BKE_lattice_deform_data_destroy (struct LatticeDeformData *lattice_deform_data)
 
void BKE_lattice_deform_coords (const struct Object *ob_lattice, const struct Object *ob_target, float(*vert_coords)[3], int vert_coords_len, short flag, const char *defgrp_name, float fac)
 
void BKE_lattice_deform_coords_with_mesh (const struct Object *ob_lattice, const struct Object *ob_target, float(*vert_coords)[3], int vert_coords_len, short flag, const char *defgrp_name, float fac, const struct Mesh *me_target)
 
void BKE_lattice_deform_coords_with_editmesh (const struct Object *ob_lattice, const struct Object *ob_target, float(*vert_coords)[3], int vert_coords_len, short flag, const char *defgrp_name, float fac, struct BMEditMesh *em_target)
 

Variables

void(* BKE_lattice_batch_cache_dirty_tag_cb )(struct Lattice *lt, int mode)
 
void(* BKE_lattice_batch_cache_free_cb )(struct Lattice *lt)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BKE_LATTICE_BATCH_DIRTY_ALL 
BKE_LATTICE_BATCH_DIRTY_SELECT 

Definition at line 69 of file BKE_lattice.h.

Function Documentation

◆ BKE_lattice_active_point_get()

struct BPoint* BKE_lattice_active_point_get ( struct Lattice lt)

◆ BKE_lattice_add()

struct Lattice* BKE_lattice_add ( struct Main bmain,
const char *  name 
)

Definition at line 392 of file lattice.c.

References BKE_id_new(), and ID_LT.

Referenced by BKE_object_obdata_add_from_type().

◆ BKE_lattice_batch_cache_dirty_tag()

void BKE_lattice_batch_cache_dirty_tag ( struct Lattice lt,
int  mode 
)

◆ BKE_lattice_batch_cache_free()

void BKE_lattice_batch_cache_free ( struct Lattice lt)

Definition at line 790 of file lattice.c.

References Lattice::batch_cache, and BKE_lattice_batch_cache_free_cb.

Referenced by lattice_free_data().

◆ BKE_lattice_bitmap_from_flag()

void BKE_lattice_bitmap_from_flag ( struct Lattice lt,
unsigned int *  bitmap,
uint8_t  flag,
bool  clear,
bool  respecthide 
)

◆ BKE_lattice_boundbox_get()

struct BoundBox* BKE_lattice_boundbox_get ( struct Object ob)

Definition at line 652 of file lattice.c.

References Object_Runtime::bb, boundbox_lattice(), and Object::runtime.

Referenced by BKE_object_boundbox_get().

◆ BKE_lattice_center_bounds()

void BKE_lattice_center_bounds ( struct Lattice lt,
float  cent[3] 
)

Definition at line 696 of file lattice.c.

References BKE_lattice_minmax(), INIT_MINMAX, max, mid_v3_v3v3(), and min.

Referenced by object_origin_set_exec().

◆ BKE_lattice_center_median()

void BKE_lattice_center_median ( struct Lattice lt,
float  cent[3] 
)

◆ BKE_lattice_deform_coords()

void BKE_lattice_deform_coords ( const struct Object ob_lattice,
const struct Object ob_target,
float(*)  vert_coords[3],
int  vert_coords_len,
short  flag,
const char *  defgrp_name,
float  fac 
)

◆ BKE_lattice_deform_coords_with_editmesh()

void BKE_lattice_deform_coords_with_editmesh ( const struct Object ob_lattice,
const struct Object ob_target,
float(*)  vert_coords[3],
int  vert_coords_len,
short  flag,
const char *  defgrp_name,
float  fac,
struct BMEditMesh em_target 
)

Definition at line 443 of file lattice_deform.c.

References lattice_deform_coords_impl(), and NULL.

Referenced by deformVertsEM().

◆ BKE_lattice_deform_coords_with_mesh()

void BKE_lattice_deform_coords_with_mesh ( const struct Object ob_lattice,
const struct Object ob_target,
float(*)  vert_coords[3],
int  vert_coords_len,
short  flag,
const char *  defgrp_name,
float  fac,
const struct Mesh me_target 
)

Referenced by deformVerts().

◆ BKE_lattice_deform_data_create()

struct LatticeDeformData* BKE_lattice_deform_data_create ( const struct Object oblatt,
const struct Object ob 
)

◆ BKE_lattice_deform_data_destroy()

void BKE_lattice_deform_data_destroy ( struct LatticeDeformData lattice_deform_data)

◆ BKE_lattice_deform_data_eval_co()

void BKE_lattice_deform_data_eval_co ( struct LatticeDeformData lattice_deform_data,
float  co[3],
float  weight 
)

◆ BKE_lattice_deform_verts_get()

struct MDeformVert* BKE_lattice_deform_verts_get ( const struct Object oblatt)

◆ BKE_lattice_eval_geometry()

void BKE_lattice_eval_geometry ( struct Depsgraph depsgraph,
struct Lattice latt 
)

◆ BKE_lattice_index_flip()

int BKE_lattice_index_flip ( struct Lattice lt,
int  index,
bool  flip_u,
bool  flip_v,
bool  flip_w 
)

◆ BKE_lattice_index_from_uvw()

int BKE_lattice_index_from_uvw ( struct Lattice lt,
int  u,
int  v,
int  w 
)

◆ BKE_lattice_index_to_uvw()

void BKE_lattice_index_to_uvw ( struct Lattice lt,
int  index,
int *  r_u,
int *  r_v,
int *  r_w 
)

Definition at line 213 of file lattice.c.

References Lattice::pntsu, and Lattice::pntsv.

Referenced by BKE_lattice_index_flip().

◆ BKE_lattice_is_any_selected()

bool BKE_lattice_is_any_selected ( const struct Lattice lt)

Referenced by lattice_select_all_exec().

◆ BKE_lattice_minmax()

void BKE_lattice_minmax ( struct Lattice lt,
float  min[3],
float  max[3] 
)

◆ BKE_lattice_minmax_dl()

void BKE_lattice_minmax_dl ( struct Object ob,
struct Lattice lt,
float  min[3],
float  max[3] 
)

◆ BKE_lattice_modifiers_calc()

void BKE_lattice_modifiers_calc ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob 
)

◆ BKE_lattice_resize()

void BKE_lattice_resize ( struct Lattice lt,
int  u,
int  v,
int  w,
struct Object ltOb 
)

◆ BKE_lattice_transform()

void BKE_lattice_transform ( struct Lattice lt,
const float  mat[4][4],
bool  do_keys 
)

◆ BKE_lattice_translate()

void BKE_lattice_translate ( struct Lattice lt,
const float  offset[3],
bool  do_keys 
)

◆ BKE_lattice_vert_coords_alloc()

float(* BKE_lattice_vert_coords_alloc ( const struct Lattice lt,
int *  r_vert_len 
) )[3]

Referenced by modifier_apply_obdata().

◆ BKE_lattice_vert_coords_apply()

void BKE_lattice_vert_coords_apply ( struct Lattice lt,
const float(*)  vert_coords[3] 
)

◆ BKE_lattice_vert_coords_apply_with_mat4()

void BKE_lattice_vert_coords_apply_with_mat4 ( struct Lattice lt,
const float(*)  vert_coords[3],
const float  mat[4][4] 
)

◆ BKE_lattice_vert_coords_get()

void BKE_lattice_vert_coords_get ( const struct Lattice lt,
float(*)  vert_coords[3] 
)

◆ calc_lat_fudu()

void calc_lat_fudu ( int  flag,
int  res,
float r_fu,
float r_du 
)

Definition at line 264 of file lattice.c.

References LT_GRID.

Referenced by BKE_lattice_resize(), and blo_do_versions_pre250().

◆ object_deform_mball()

bool object_deform_mball ( struct Object ob,
struct ListBase dispbase 
)

◆ outside_lattice()

void outside_lattice ( struct Lattice lt)

Variable Documentation

◆ BKE_lattice_batch_cache_dirty_tag_cb

void(* BKE_lattice_batch_cache_dirty_tag_cb) (struct Lattice *lt, int mode) ( struct Lattice lt,
int  mode 
)
extern

Definition at line 781 of file lattice.c.

Referenced by BKE_lattice_batch_cache_dirty_tag(), and DRW_engines_register().

◆ BKE_lattice_batch_cache_free_cb

void(* BKE_lattice_batch_cache_free_cb) (struct Lattice *lt) ( struct Lattice lt)
extern

Definition at line 782 of file lattice.c.

Referenced by BKE_lattice_batch_cache_free(), and DRW_engines_register().