Blender  V3.3
Classes | Typedefs | Functions
draw_manager_text.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_memiter.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BKE_editmesh.h"
#include "BKE_editmesh_cache.h"
#include "BKE_global.h"
#include "BKE_unit.h"
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "BLF_api.h"
#include "WM_api.h"
#include "draw_manager_text.h"
#include "intern/bmesh_polygon.h"

Go to the source code of this file.

Classes

struct  ViewCachedString
 
struct  DRWTextStore
 

Typedefs

typedef struct ViewCachedString ViewCachedString
 
typedef struct DRWTextStore DRWTextStore
 

Functions

DRWTextStoreDRW_text_cache_create (void)
 
void DRW_text_cache_destroy (struct DRWTextStore *dt)
 
void DRW_text_cache_add (DRWTextStore *dt, const float co[3], const char *str, const int str_len, short xoffs, short yoffs, short flag, const uchar col[4])
 
static void drw_text_cache_draw_ex (DRWTextStore *dt, ARegion *region)
 
void DRW_text_cache_draw (DRWTextStore *dt, ARegion *region, struct View3D *v3d)
 
void DRW_text_edit_mesh_measure_stats (ARegion *region, View3D *v3d, Object *ob, const UnitSettings *unit)
 

Typedef Documentation

◆ DRWTextStore

typedef struct DRWTextStore DRWTextStore

◆ ViewCachedString

Function Documentation

◆ DRW_text_cache_add()

void DRW_text_cache_add ( DRWTextStore dt,
const float  co[3],
const char *  str,
const int  str_len,
short  xoffs,
short  yoffs,
short  flag,
const uchar  col[4] 
)

◆ DRW_text_cache_create()

DRWTextStore* DRW_text_cache_create ( void  )

Definition at line 60 of file draw_manager_text.c.

References BLI_memiter_create(), DRWTextStore::cache_strings, and MEM_callocN.

Referenced by DRW_text_cache_ensure().

◆ DRW_text_cache_destroy()

void DRW_text_cache_destroy ( struct DRWTextStore dt)

◆ DRW_text_cache_draw()

void DRW_text_cache_draw ( DRWTextStore dt,
ARegion region,
struct View3D v3d 
)

◆ drw_text_cache_draw_ex()

static void drw_text_cache_draw_ex ( DRWTextStore dt,
ARegion region 
)
static

◆ DRW_text_edit_mesh_measure_stats()

void DRW_text_edit_mesh_measure_stats ( ARegion region,
View3D v3d,
Object ob,
const UnitSettings unit 
)

Definition at line 211 of file draw_manager_text.c.

References add_v3_v3(), angle(), angle_normalized_v3v3(), angle_v3v3v3(), blender::compositor::area(), area_tri_v3(), B_UNIT_AREA, B_UNIT_LENGTH, BKE_editmesh_cache_ensure_poly_normals(), BKE_unit_value_as_string(), BLI_snprintf_rlen(), BMEditMesh::bm, BM_edge_loop_pair(), BM_EDGES_OF_MESH, BM_elem_flag_test, BM_elem_flag_test_bool, BM_elem_index_get, BM_ELEM_SELECT, BM_FACE, BM_face_calc_center_bounds(), BM_face_calc_center_bounds_vcos(), BM_face_calc_center_median(), BM_face_calc_center_median_vcos(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_LOOPS_OF_FACE, BM_mesh_elem_index_ensure(), BM_VERT, BM_VERTS_OF_MESH, clip_segment_v3_plane_n(), BMVert::co, col, copy_v3_v3(), Object::data, DRW_text_cache_add(), DRW_text_cache_ensure(), DRW_TEXT_CACHE_GLOBALSPACE, ED_view3d_clipping_calc(), Mesh_Runtime::edit_data, View3DOverlay::edit_flag, Mesh::edit_mesh, BMLoop::f, View3D::flag, float(), G, G_TRANSFORM_EDIT, View3D::grid, Object::imat, interp_v3_v3v3(), l, l_b, BMFace::len, len_v3v3(), BMEditMesh::looptris, mid_v3_v3v3(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), BMLoop::next, BMFace::no, normalize_v3(), NULL, Object::obmat, View3D::overlay, EditMeshData::polyNos, BMLoop::prev, RAD2DEGF, Mesh::runtime, UnitSettings::scale_length, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, UnitSettings::system, UnitSettings::system_rotation, TH_DRAWEXTRA_EDGEANG, TH_DRAWEXTRA_EDGELEN, TH_DRAWEXTRA_FACEANG, TH_DRAWEXTRA_FACEAREA, UI_GetThemeColor3ubv(), USER_UNIT_ROT_RADIANS, BMLoop::v, v, BMEdge::v1, v1, BMEdge::v2, v2, V3D_GLOBAL_STATS, V3D_OVERLAY_EDIT_EDGE_ANG, V3D_OVERLAY_EDIT_EDGE_LEN, V3D_OVERLAY_EDIT_FACE_ANG, V3D_OVERLAY_EDIT_FACE_AREA, V3D_OVERLAY_EDIT_INDICES, EditMeshData::vertexCos, ARegion::winx, ARegion::winy, and zero_v3().

Referenced by OVERLAY_edit_mesh_cache_populate().