diff options
author | David Thompson <davet@gnu.org> | 2015-06-06 15:04:25 -0400 |
---|---|---|
committer | David Thompson <davet@gnu.org> | 2015-06-06 15:05:02 -0400 |
commit | 17901b6e4d66dd4ce7ce23d683bf73db85a7f4a6 (patch) | |
tree | 798aa3ea511912fa203ff149897530dc2de67b1a | |
parent | 6b83b4a5a78e164a9ef8bfb618674fa1a5391114 (diff) |
render: model: Add model-scale.
* sly/render/model.scm (model-scale): New procedure.
-rw-r--r-- | sly/render/model.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sly/render/model.scm b/sly/render/model.scm index 72a1719..3cc310a 100644 --- a/sly/render/model.scm +++ b/sly/render/model.scm @@ -51,6 +51,7 @@ model-group list->model model-move + model-scale model-place)) ;; Representation of a single OpenGL render call. @@ -199,6 +200,11 @@ the vector POSITION." (model-inherit model #:transform (transform* (model-transform model) (translate position)))) +(define (model-scale factor model) + "Create a version of MODEL that is scaled up/down by FACTOR." + (model-inherit model #:transform (transform* (model-transform model) + (scale factor)))) + (define (model-place transform model) "Create a new group in which the tranformation matrices of the CHILDREN are multiplied by TRANSFORM." |