Add various helpers for creating polyhedra

This commit is contained in:
jgk
2021-06-27 18:53:06 +02:00
parent 06f22a3ea5
commit 089dcc3f5d
14 changed files with 155 additions and 65 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
module MatrixHelper
( perspectiveMatrixb
, perspectiveMatrixc
, isoMatrix
) where
--import Geometry
import Geometry.Data
@@ -28,13 +28,13 @@ perspectiveMatrixb rot zoom (tranx,trany) (winx,winy) (viewFromx,viewFromy) =
!*! vertScale
!*! vertTrans
perspectiveMatrixc
isoMatrix
:: Float -- ^ Rotation
-> Float -- ^ Zoom
-> Point2 -- ^ Translation
-> Point2 -- ^ Window size
-> [GLfloat]
perspectiveMatrixc rot zoom (tranx,trany) (winx,winy) = concatMap vToL
isoMatrix rot zoom (tranx,trany) (winx,winy) = concatMap vToL
. vToL
. lmt
$ scaleMat (2*zoom/winx,2*zoom/winy)