Blender  V3.3
Functions | Variables
draw_debug.c File Reference

Simple API to draw debug shapes in the viewport. More...

#include "MEM_guardedalloc.h"
#include "DNA_object_types.h"
#include "BKE_object.h"
#include "BLI_link_utils.h"
#include "GPU_immediate.h"
#include "GPU_matrix.h"
#include "draw_debug.h"
#include "draw_manager.h"

Go to the source code of this file.

Functions

void DRW_debug_modelmat_reset (void)
 
void DRW_debug_modelmat (const float modelmat[4][4])
 
void DRW_debug_line_v3v3 (const float v1[3], const float v2[3], const float color[4])
 
void DRW_debug_polygon_v3 (const float(*v)[3], const int vert_len, const float color[4])
 
void DRW_debug_m4 (const float m[4][4])
 
void DRW_debug_bbox (const BoundBox *bbox, const float color[4])
 
void DRW_debug_m4_as_bbox (const float m[4][4], const float color[4], const bool invert)
 
void DRW_debug_sphere (const float center[3], const float radius, const float color[4])
 
static void drw_debug_draw_lines (void)
 
static void drw_debug_draw_spheres (void)
 
void drw_debug_draw (void)
 
void drw_debug_init (void)
 

Variables

static float g_modelmat [4][4]
 

Detailed Description

Simple API to draw debug shapes in the viewport.

Definition in file draw_debug.c.

Function Documentation

◆ DRW_debug_bbox()

void DRW_debug_bbox ( const BoundBox bbox,
const float  color[4] 
)

◆ drw_debug_draw()

void drw_debug_draw ( void  )

Definition at line 187 of file draw_debug.c.

References drw_debug_draw_lines(), and drw_debug_draw_spheres().

Referenced by DRW_draw_callbacks_post_scene().

◆ drw_debug_draw_lines()

static void drw_debug_draw_lines ( void  )
static

◆ drw_debug_draw_spheres()

static void drw_debug_draw_spheres ( void  )
static

◆ drw_debug_init()

void drw_debug_init ( void  )

Definition at line 193 of file draw_debug.c.

References DRW_debug_modelmat_reset().

Referenced by DRW_draw_render_loop_2d_ex(), and DRW_draw_render_loop_ex().

◆ DRW_debug_line_v3v3()

void DRW_debug_line_v3v3 ( const float  v1[3],
const float  v2[3],
const float  color[4] 
)

◆ DRW_debug_m4()

void DRW_debug_m4 ( const float  m[4][4])
Note
g_modelmat is still applied on top.

Definition at line 57 of file draw_debug.c.

References DRW_debug_line_v3v3(), mul_m4_v3(), v1, and v2.

◆ DRW_debug_m4_as_bbox()

void DRW_debug_m4_as_bbox ( const float  m[4][4],
const float  color[4],
const bool  invert 
)

◆ DRW_debug_modelmat()

void DRW_debug_modelmat ( const float  modelmat[4][4])

Definition at line 34 of file draw_debug.c.

References copy_m4_m4(), and g_modelmat.

Referenced by drw_sculpt_generate_calls().

◆ DRW_debug_modelmat_reset()

void DRW_debug_modelmat_reset ( void  )

Definition at line 29 of file draw_debug.c.

References g_modelmat, and unit_m4().

Referenced by drw_debug_init().

◆ DRW_debug_polygon_v3()

void DRW_debug_polygon_v3 ( const float(*)  v[3],
const int  vert_len,
const float  color[4] 
)

Definition at line 48 of file draw_debug.c.

References BLI_assert, color, DRW_debug_line_v3v3(), and v.

◆ DRW_debug_sphere()

void DRW_debug_sphere ( const float  center[3],
const float  radius,
const float  color[4] 
)

Variable Documentation

◆ g_modelmat

float g_modelmat[4][4]
static