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
Param | Type |
---|---|
box_x0 | number |
box_y0 | number |
box_x1 | number |
box_y1 | number |
x | number |
y | number |
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
Param | Type |
---|---|
result | Array.<number> | Float32Array | Float64Array |
result_offset | number |
box_x0 | number |
box_y0 | number |
box_x1 | number |
box_y1 | number |
line_x0 | number |
line_y0 | number |
line_x1 | number |
line_y1 | number |