entray:entity
List of: Scheme Extensions
Subjects: Ray Testing
Contents: Kernel

Action: Gets the entity component of an entray.

Filename: kern/kern_scm/eray_scm.cxx

Syntax: (entray:entity entray)

Arg Types: entray entray

Returns: entity

Description: Gets the entity component of an entray. An entray is a scheme-object with an entity component and a ray component. Entrays are represented externally in the form #[entray n p (x y z) (a b c)], indicating its entity components are #[entity n p] and its ray components are #[ray (x y z) (a b c)].


entray specifies the entray object that has to be queried.

Example: ; entray:entity

; Create a solid block.

(define block1


(solid:block (position 0 0 0)


(position 15 15 15)))

;; block1

; Create an entity ray and then extract

; the entity portion.

(entray:entity (entray block1


(ray (position 0 0 0) (gvector 0 0 1))))

;; #[entity 2 1]
PDF/KERN/12SCA.PDF
HTM/DATA/KERN/KERN/12SCA/0110.HTM