pcb 4.1.1
An interactive printed circuit board layout editor.

hidgl.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  triangle_buffer

Defines

#define TRIANGLE_ARRAY_SIZE   5461

Functions

void hidgl_flush_triangles (triangle_buffer *buffer)
void hidgl_ensure_triangle_space (triangle_buffer *buffer, int count)
static void hidgl_add_triangle_3D (triangle_buffer *buffer, GLfloat x1, GLfloat y1, GLfloat z1, GLfloat x2, GLfloat y2, GLfloat z2, GLfloat x3, GLfloat y3, GLfloat z3)
static void hidgl_add_triangle (triangle_buffer *buffer, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2, GLfloat x3, GLfloat y3)
void hidgl_draw_grid (BoxType *drawn_area)
 Draw the grid on the 3D canvas.
void hidgl_set_depth (float depth)
void hidgl_draw_line (int cap, Coord width, Coord x1, Coord y1, Coord x2, Coord y2, double scale)
void hidgl_draw_arc (Coord width, Coord vx, Coord vy, Coord vrx, Coord vry, Angle start_angle, Angle delta_angle, double scale)
void hidgl_draw_rect (Coord x1, Coord y1, Coord x2, Coord y2)
void hidgl_fill_circle (Coord vx, Coord vy, Coord vr, double scale)
void hidgl_fill_polygon (int n_coords, Coord *x, Coord *y)
void hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale)
void hidgl_fill_rect (Coord x1, Coord y1, Coord x2, Coord y2)
void hidgl_init (void)
void hidgl_start_render (void)
void hidgl_finish_render (void)
int hidgl_stencil_bits (void)
int hidgl_assign_clear_stencil_bit (void)
void hidgl_return_stencil_bit (int bit)
void hidgl_reset_stencil_usage (void)

Variables

triangle_buffer buffer
float global_depth

Define Documentation

#define TRIANGLE_ARRAY_SIZE   5461

Definition at line 30 of file hidgl.h.

Referenced by hidgl_ensure_triangle_space().


Function Documentation

static void hidgl_add_triangle ( triangle_buffer buffer,
GLfloat  x1,
GLfloat  y1,
GLfloat  x2,
GLfloat  y2,
GLfloat  x3,
GLfloat  y3 
) [inline, static]

Definition at line 62 of file hidgl.h.

References global_depth, and hidgl_add_triangle_3D().

Referenced by draw_cap(), hidgl_draw_arc(), hidgl_draw_line(), hidgl_fill_circle(), hidgl_fill_rect(), and myVertex().

Here is the call graph for this function:

static void hidgl_add_triangle_3D ( triangle_buffer buffer,
GLfloat  x1,
GLfloat  y1,
GLfloat  z1,
GLfloat  x2,
GLfloat  y2,
GLfloat  z2,
GLfloat  x3,
GLfloat  y3,
GLfloat  z3 
) [inline, static]
int hidgl_assign_clear_stencil_bit ( void  )

Definition at line 782 of file hidgl.c.

References assigned_bits, dirty_bits, hidgl_clean_unassigned_stencil(), and stencil_bits.

Referenced by fill_polyarea(), ghid_use_mask(), and start_subcomposite().

Here is the call graph for this function:

void hidgl_draw_arc ( Coord  width,
Coord  vx,
Coord  vy,
Coord  vrx,
Coord  vry,
Angle  start_angle,
Angle  delta_angle,
double  scale 
)

Definition at line 299 of file hidgl.c.

References calc_slices(), draw_cap(), hidgl_add_triangle(), hidgl_ensure_triangle_space(), M_PI, MAX_SLICES_PER_ARC, MIN_SLICES_PER_ARC, scale, x, and y.

Referenced by draw_lead_user(), and ghid_draw_arc().

Here is the call graph for this function:

void hidgl_draw_grid ( BoxType drawn_area)

Draw the grid on the 3D canvas.

Definition at line 131 of file hidgl.c.

References SettingType::DrawGrid, global_depth, PCBType::Grid, GridFit(), PCBType::GridOffsetX, PCBType::GridOffsetY, MAX, PCBType::MaxHeight, PCBType::MaxWidth, MIN, n, PCB, realloc(), Settings, x, BoxType::X1, BoxType::X2, y, BoxType::Y1, and BoxType::Y2.

Referenced by ghid_draw_grid().

Here is the call graph for this function:

void hidgl_draw_line ( int  cap,
Coord  width,
Coord  x1,
Coord  y1,
Coord  x2,
Coord  y2,
double  scale 
)

Definition at line 232 of file hidgl.c.

References Beveled_Cap, draw_cap(), hidgl_add_triangle(), hidgl_ensure_triangle_space(), M_PI, Round_Cap, scale, Square_Cap, and Trace_Cap.

Referenced by ghid_draw_line().

Here is the call graph for this function:

void hidgl_draw_rect ( Coord  x1,
Coord  y1,
Coord  x2,
Coord  y2 
)

Definition at line 377 of file hidgl.c.

References global_depth.

Referenced by ghid_draw_rect().

void hidgl_ensure_triangle_space ( triangle_buffer buffer,
int  count 
)

Definition at line 108 of file hidgl.c.

References hidgl_flush_triangles(), TRIANGLE_ARRAY_SIZE, and triangle_buffer::triangle_count.

Referenced by draw_cap(), hidgl_draw_arc(), hidgl_draw_line(), hidgl_fill_circle(), hidgl_fill_rect(), and myVertex().

Here is the call graph for this function:

void hidgl_fill_circle ( Coord  vx,
Coord  vy,
Coord  vr,
double  scale 
)

Definition at line 389 of file hidgl.c.

References calc_slices(), hidgl_add_triangle(), hidgl_ensure_triangle_space(), M_PI, MAX_TRIANGLES_PER_CIRCLE, MIN_TRIANGLES_PER_CIRCLE, vx, vy, x, and y.

Referenced by ghid_fill_circle(), and tesselate_contour().

Here is the call graph for this function:

void hidgl_fill_pcb_polygon ( PolygonType poly,
const BoxType clip_box,
double  scale 
)

Definition at line 710 of file hidgl.c.

References polygon_st::Clipped, POLYAREA::f, fill_polyarea(), and TEST_FLAG.

Referenced by ghid_fill_pcb_polygon().

Here is the call graph for this function:

void hidgl_fill_polygon ( int  n_coords,
Coord x,
Coord y 
)

Definition at line 542 of file hidgl.c.

References malloc(), myBegin(), myCombine(), myError(), myFreeCombined(), and myVertex().

Referenced by ghid_fill_polygon().

Here is the call graph for this function:

void hidgl_fill_rect ( Coord  x1,
Coord  y1,
Coord  x2,
Coord  y2 
)

Definition at line 727 of file hidgl.c.

References hidgl_add_triangle(), and hidgl_ensure_triangle_space().

Referenced by ghid_fill_rect().

Here is the call graph for this function:

void hidgl_finish_render ( void  )
void hidgl_init ( void  )

Definition at line 735 of file hidgl.c.

References stencil_bits.

Referenced by hidgl_start_render().

void hidgl_reset_stencil_usage ( void  )

Definition at line 825 of file hidgl.c.

References assigned_bits, and dirty_bits.

Referenced by ghid_drawing_area_expose_cb(), ghid_pinout_preview_expose(), and ghid_render_pixmap().

void hidgl_return_stencil_bit ( int  bit)

Definition at line 819 of file hidgl.c.

References assigned_bits.

Referenced by end_subcomposite(), fill_polyarea(), and ghid_use_mask().

void hidgl_set_depth ( float  depth)

Definition at line 122 of file hidgl.c.

References global_depth.

void hidgl_start_render ( void  )

Definition at line 754 of file hidgl.c.

References hidgl_init(), and hidgl_init_triangle_array().

Referenced by ghid_drawing_area_expose_cb(), ghid_pinout_preview_expose(), ghid_render_pixmap(), and ghid_request_debug_draw().

Here is the call graph for this function:

int hidgl_stencil_bits ( void  )

Definition at line 766 of file hidgl.c.

References stencil_bits.

Referenced by ghid_drawing_area_expose_cb().


Variable Documentation

float global_depth

Definition at line 83 of file hidgl.c.

Referenced by hidgl_add_triangle(), hidgl_draw_grid(), hidgl_draw_rect(), and hidgl_set_depth().