Skip to content

Documentation / @ripl/3d / materialDrawsFace

Function: materialDrawsFace() ​

materialDrawsFace(side, signedArea): boolean

Defined in: 3d/src/core/material.ts:157

Whether a face wound counter-clockwise should be drawn, given its signed screen area.

Culling is decided from the projected area rather than from the normal, because that is correct under both perspective and orthographic projection and needs no view vector.

Parameters ​

ParameterTypeDescription
sideMaterialSideWhich faces the material draws.
signedAreanumberTwice the signed area of the projected polygon.

Returns ​

boolean

Whether to draw the face.