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]
|