Skip to content

CohenSutherlandClipping

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/alpenglow/blob/main/js/clip/CohenSutherlandClipping.ts for the most up-to-date information.

Overview

Cohen-Sutherland line clipping, with the Maillot coding extension

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class CohenSutherlandClipping

import { CohenSutherlandClipping } from 'scenerystack/alpenglow';

Static Methods

getCode( x : number, y : number, bounds : Bounds2 ) : Code

The Maillot extension of the Cohen-Sutherland encoding of points

Source Code

See the source for CohenSutherlandClipping.ts in the alpenglow repository.