wcs:set-active
List of: Scheme Extensions
Subjects: Work Coordinate Systems
Contents: Kernel

Action: Sets the active work coordinate system to the specified WCS.

Filename: kern/kern_scm/wcs_scm.cxx

APIs: api_wcs_set_active

Syntax: (wcs:set-active wcs)

Arg Types: wcs wcs | #f

Returns: unspecified


If a wcs is specified, it becomes the active wcs. If boolean#f is specified, the system is returned to its initial state of no active wcs.

Example: ; wcs:set-active

; Define working coordinate system.

(define wcs1 (wcs (position 0 0 0)


(position 5 0 0) (position 0 5 0)))

;; wcs1

; Set a color for wcs1.

(entity:set-color wcs1 6)

;; ()

; Define a solid block.

(define block1


(solid:block (position 0 0 0)


(position 10 10 10)))

;; block1

; Set a color for block 1.

(entity:set-color block1 3)

;; ()

; Define a second working coordinate system.

(define wcs2 (wcs (position 15 0 0)


(position 20 0 0) (position 0 20 0)))

;; wcs2

; OUTPUT WCS1 and Block1


; Set the specified WCS to be the active WCS.

(wcs:set-active wcs2)

;; ()

; Define another solid block in the specified WCS.

(define block2


(solid:block (position 0 0 0)


(position 10 10 10)))

;; block2

; Set a color for the second block.

(entity:set-color block2 1)

;; ()

; OUTPUT WCS2 and Block2



Figure 15-12. wcs:set-active
PDF/KERN/15SCR.PDF
HTM/DATA/KERN/KERN/15SCR/0055.HTM