gvector:set!
List of: Scheme Extensions
Subjects: Mathematics
Contents: Kernel

Action: Sets a gvector's direction given components of x, y, and z.

Filename: kern/kern_scm/gvec_scm.cxx

Syntax: (gvector:set! gvector {x y z})

Arg Types: gvector gvector

x real

y real

z real

Returns: gvector

Description: The coordinates are computed relative to the active coordinate system.


gvector specifies the original x-, y-, and z-components.


x specifies the value to replace the original x-value specified in gvector.


y specifies the value to replace the original y-value specified in gvector.


z specifies the value to replace the original z-value specified in gvector.

Example: ; gvector:set!

; Set new x-, y-, and z-components

; in an existing gvector.

(define vector1 (gvector 1 0 0))

;; vector1

(gvector:set! vector1 0 7 3)

;; #[gvector 0 7 3]

vector1

;; #[gvector 0 7 3]

(define outline (gvector 0 0 1))

;; outline

(gvector:set! outline 3 5 4)

;; #[gvector 3 5 4]
PDF/KERN/13SCF.PDF
HTM/DATA/KERN/KERN/13SCF/0084.HTM