Skip to main content

aabb2_clip_line_cohen_sutherland

Functions

compute_out_code(box_x0, box_y0, box_x1, box_y1, x, y)number

Compute the bit code for a point (x, y) using the clip rectangle

aabb2_clip_line_cohen_sutherland(result, result_offset, box_x0, box_y0, box_x1, box_y1, line_x0, line_y0, line_x1, line_y1)boolean

Implements Cohen–Sutherland algorithm

compute_out_code(box_x0, box_y0, box_x1, box_y1, x, y) ⇒ number

Compute the bit code for a point (x, y) using the clip rectangle

Kind: global function

ParamType
box_x0number
box_y0number
box_x1number
box_y1number
xnumber
ynumber

aabb2_clip_line_cohen_sutherland(result, result_offset, box_x0, box_y0, box_x1, box_y1, line_x0, line_y0, line_x1, line_y1) ⇒ boolean

Implements Cohen–Sutherland algorithm

Kind: global function

ParamType
resultArray.<number> | Float32Array | Float64Array
result_offsetnumber
box_x0number
box_y0number
box_x1number
box_y1number
line_x0number
line_y0number
line_x1number
line_y1number