transform:translation
List of: Scheme Extensions
Subjects: Modifying Models, Transforms
Contents: Kernel

Action: Creates a translation transform.

Filename: kern/kern_scm/tran_scm.cxx

Syntax: (transform:translation gvector)

Arg Types: gvector gvector

Returns: transform


gvector translates an object based on the supplied direction vector.

Example: ; transform:translation

; Define a working coordinate system.

(define wcs1


(wcs (position 0 0 0) (gvector 1 0 0)


(gvector 0 1 0)))

;; wcs1

; Set a color for the wcs.

(entity:set-color wcs1 6)

;; ()

; Create a solid block.

(define block1


(solid:block (position 0 0 0)


(position 15 20 15)))

;; block1

; OUTPUT Original


; Create a transform and then create its reflection.

(define transform1


(transform:translation (gvector 10 12.5 0)))

;; transform1

; Apply the transform to reflect the block.

(define transform


(entity:transform block1 transform1))

;; transform

; OUTPUT Result



Figure 15-9. transform:translation
PDF/KERN/15SCR.PDF
HTM/DATA/KERN/KERN/15SCR/0046.HTM