Blender V4.3
BKE_lattice.hh File Reference
#include <optional>
#include "BLI_bounds_types.hh"
#include "BLI_compiler_attrs.h"
#include "BLI_math_vector_types.hh"
#include "BLI_sys_types.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 (Lattice *lt, int u_new, int v_new, int w_new, Object *lt_ob)
 
LatticeBKE_lattice_add (Main *bmain, const char *name)
 
void calc_lat_fudu (int flag, int res, float *r_fu, float *r_du)
 
void outside_lattice (Lattice *lt)
 
float(* BKE_lattice_vert_coords_alloc (const Lattice *lt, int *r_vert_len))[3]
 
void BKE_lattice_vert_coords_get (const Lattice *lt, float(*vert_coords)[3])
 
void BKE_lattice_vert_coords_apply_with_mat4 (Lattice *lt, const float(*vert_coords)[3], const float mat[4][4])
 
void BKE_lattice_vert_coords_apply (Lattice *lt, const float(*vert_coords)[3])
 
void BKE_lattice_modifiers_calc (Depsgraph *depsgraph, Scene *scene, Object *ob)
 
MDeformVertBKE_lattice_deform_verts_get (const Object *oblatt)
 
BPointBKE_lattice_active_point_get (Lattice *lt)
 
std::optional< blender::Bounds< blender::float3 > > BKE_lattice_minmax (const Lattice *lt)
 
void BKE_lattice_center_median (Lattice *lt, float cent[3])
 
void BKE_lattice_translate (Lattice *lt, const float offset[3], bool do_keys)
 
void BKE_lattice_transform (Lattice *lt, const float mat[4][4], bool do_keys)
 
bool BKE_lattice_is_any_selected (const Lattice *lt)
 
int BKE_lattice_index_from_uvw (const Lattice *lt, int u, int v, int w)
 
void BKE_lattice_index_to_uvw (const Lattice *lt, int index, int *r_u, int *r_v, int *r_w)
 
int BKE_lattice_index_flip (const Lattice *lt, int index, bool flip_u, bool flip_v, bool flip_w)
 
void BKE_lattice_bitmap_from_flag (const Lattice *lt, unsigned int *bitmap, uint8_t flag, bool clear, bool respecthide)
 
void BKE_lattice_eval_geometry (Depsgraph *depsgraph, Lattice *latt)
 
void BKE_lattice_batch_cache_dirty_tag (Lattice *lt, int mode)
 
void BKE_lattice_batch_cache_free (Lattice *lt)
 
Deform 3D Coordinates by Lattice (<tt>lattice_deform.cc</tt>)
LatticeDeformDataBKE_lattice_deform_data_create (const Object *oblatt, const Object *ob) ATTR_WARN_UNUSED_RESULT
 
void BKE_lattice_deform_data_eval_co (LatticeDeformData *lattice_deform_data, float co[3], float weight)
 
void BKE_lattice_deform_data_destroy (LatticeDeformData *lattice_deform_data)
 
void BKE_lattice_deform_coords (const Object *ob_lattice, const 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 Object *ob_lattice, const Object *ob_target, float(*vert_coords)[3], int vert_coords_len, short flag, const char *defgrp_name, float fac, const Mesh *me_target)
 
void BKE_lattice_deform_coords_with_editmesh (const Object *ob_lattice, const Object *ob_target, float(*vert_coords)[3], int vert_coords_len, short flag, const char *defgrp_name, float fac, const BMEditMesh *em_target)
 

Variables

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BKE_LATTICE_BATCH_DIRTY_ALL 
BKE_LATTICE_BATCH_DIRTY_SELECT 

Definition at line 64 of file BKE_lattice.hh.

Function Documentation

◆ BKE_lattice_active_point_get()

◆ BKE_lattice_add()

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

Definition at line 388 of file lattice.cc.

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 ( Lattice * lt,
int mode )

◆ BKE_lattice_batch_cache_free()

void BKE_lattice_batch_cache_free ( Lattice * lt)

Definition at line 716 of file lattice.cc.

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 ( const Lattice * lt,
unsigned int * bitmap,
uint8_t flag,
bool clear,
bool respecthide )

◆ BKE_lattice_center_median()

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

◆ BKE_lattice_deform_coords()

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

Definition at line 417 of file lattice_deform.cc.

References flag, and lattice_deform_coords_impl().

Referenced by BKE_lattice_resize(), and BKE_mball_data_update().

◆ BKE_lattice_deform_coords_with_editmesh()

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

Definition at line 456 of file lattice_deform.cc.

References flag, and lattice_deform_coords_impl().

Referenced by deform_verts_EM().

◆ BKE_lattice_deform_coords_with_mesh()

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

Definition at line 436 of file lattice_deform.cc.

References flag, and lattice_deform_coords_impl().

Referenced by deform_verts().

◆ BKE_lattice_deform_data_create()

◆ BKE_lattice_deform_data_destroy()

void BKE_lattice_deform_data_destroy ( LatticeDeformData * lattice_deform_data)

◆ BKE_lattice_deform_data_eval_co()

◆ BKE_lattice_deform_verts_get()

MDeformVert * BKE_lattice_deform_verts_get ( const Object * oblatt)

◆ BKE_lattice_eval_geometry()

void BKE_lattice_eval_geometry ( Depsgraph * depsgraph,
Lattice * latt )

◆ BKE_lattice_index_flip()

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

◆ BKE_lattice_index_from_uvw()

◆ BKE_lattice_index_to_uvw()

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

Definition at line 203 of file lattice.cc.

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

Referenced by BKE_lattice_index_flip().

◆ BKE_lattice_is_any_selected()

bool BKE_lattice_is_any_selected ( const Lattice * lt)

◆ BKE_lattice_minmax()

◆ BKE_lattice_modifiers_calc()

◆ BKE_lattice_resize()

◆ BKE_lattice_transform()

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

◆ BKE_lattice_translate()

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

◆ BKE_lattice_vert_coords_alloc()

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

◆ BKE_lattice_vert_coords_apply()

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

◆ BKE_lattice_vert_coords_apply_with_mat4()

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

◆ BKE_lattice_vert_coords_get()

void BKE_lattice_vert_coords_get ( const 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 257 of file lattice.cc.

References flag, and LT_GRID.

Referenced by BKE_lattice_resize(), and blo_do_versions_pre250().

◆ outside_lattice()

Variable Documentation

◆ BKE_lattice_batch_cache_dirty_tag_cb

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

Definition at line 707 of file lattice.cc.

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) (Lattice *lt) ( Lattice * lt)
extern

Definition at line 708 of file lattice.cc.

Referenced by BKE_lattice_batch_cache_free(), and DRW_engines_register().