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

Action: Gets the position component of a ray.

Filename: kern/kern_scm/ray_scm.cxx

Syntax: (ray:position ray)

Arg Types: ray ray

Returns: position

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


ray specifies a ray.

Example: ; ray:position

; Define a ray.

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


(gvector 1 0 0)))

;; ray1

; Extract the position component of a ray.

(ray:position ray1)

;; #[position -5 -5 -5]

; get position component of a read event

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

;; #[position -35.0111607852786 -48.3518844171113

;; -1.77635683940025e-15]
PDF/KERN/15SCR.PDF
HTM/DATA/KERN/KERN/15SCR/0003.HTM