FaceConversion¶
Overview¶
Multiple methods of conversion from RationalFaces to RenderableFaces.
They mostly differ on whether they combine faces with equivalent RenderPrograms, WHICH cases they do so, and whether they output polygonal or unsorted-edge formats (PolygonalFace/EdgedFace).
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class FaceConversion¶
Static Methods¶
toSimpleRenderableFaces( faces : RationalFace[], fromIntegerMatrix : Matrix3, accumulator : ClippableFaceAccumulator ) : RenderableFace[]¶
toFullyCombinedRenderableFaces( faces : RationalFace[], fromIntegerMatrix : Matrix3, accumulator : ClippableFaceAccumulator ) : RenderableFace[]¶
toSimplifyingCombinedRenderableFaces( faces : RationalFace[], fromIntegerMatrix : Matrix3, accumulator : ClippableFaceAccumulator ) : RenderableFace[]¶
Will combine faces that have equivalent RenderPrograms IFF they border each other (leaving separate programs with equivalent RenderPrograms separate if they don't border). It will also remove edges that border between faces that we combine (thus switching to EdgedFaces with unsorted edges).
toTracedRenderableFaces( faces : RationalFace[], fromIntegerMatrix : Matrix3, accumulator : ClippableFaceAccumulator ) : RenderableFace[]¶
Combines faces that have equivalent RenderPrograms IFF they border each other (leaving separate programs with equivalent RenderPrograms separate if they don't border). It will also remove edges that border between faces that we combine, and will connect edges to keep things polygonal!
Source Code¶
See the source for FaceConversion.ts in the alpenglow repository.