ray:gvector
List of: Scheme Extensions
Subjects: Ray Testing
Contents: Kernel

Action: Gets the gvector component of a ray.

Filename: kern/kern_scm/ray_scm.cxx

Syntax: (ray:gvector ray)

Arg Types: ray ray

Returns: gvector

Description: The argument ray specifies a position and a gvector. This extension returns the gvector direction from a ray.


ray specifies a ray.

Example: ; ray:gvector

; Define a ray.

(define ray1 (ray (position -5 -5 -5)


(gvector 1 0 0)))

;; ray1

; Extract the gvector component of a ray.

(ray:gvector ray1)

;; #[gvector 1 0 0]

; Get the gvector component of a read event.

(ray:gvector (pick:ray (read-event)))

; Using the mouse, select a screen position.

;; #[gvector 0.119924328873844 0.949842878199001

;; 0.288819428153296]
PDF/KERN/15SCR.PDF
HTM/DATA/KERN/KERN/15SCR/0002.HTM