Action:
|
Reads a ray from the ray queue or from a pick-event.
|
|
Filename:
|
kern/kern_scm/ray_scm.cxx
|
|
Syntax:
|
(read-ray)
|
|
Returns:
|
ray
|
|
Description:
|
If the ray queue contains a ray, it is removed and returned and the ray size option is set from the queued information. Otherwise, a pick-event is read, using read-event, and converted to a ray. If journaling is on, a (ray: queue ....) command is written to the journal file. This results in a ray in the queue when the journal is replayed.
|
|
|
If the pick-event is from the right mouse button, the ray vector is set to an invalid zero length. This can be used as a stop condition in picking loops.
|
|
Example:
|
; read-ray
|
|
; Create a ray using the mouse.
|
|
(read-ray)
|
|
; Use the left mouse button to create a pick-event.
|
|
;; #[ray (94.7806 -194.257 116.706)
|
|
;; (-0.408248 0.816497 -0.408248)]
|