history:get-entity-from-id
List of: Scheme Extensions
Subjects: History and Roll
Contents: Kernel

Action: Returns an ENTITY from a given tag id.

Filename: kern/kern_scm/hist_scm.cxx

APIs: api_get_entity_from_id

Syntax: (history:get-entity-from-id id [history])

Arg Types: id integer

history history

Returns: integer

Errors: The id must be valid.

Description: Returns an ENTITY from a given tag id in the HISTORY_STREAM specified. If no stream is specified, the default stream is used.


id specifies an entity identifier.


history specifies a history stream.

Example: ; history:get-entity-from-id

; Create a block

(define b (solid:block (position -10 -10 -10)


(position 10 10 10)))

;; b

(define lop (lop:offset-body b 5))

;; lop

(define f (pick:face (ray (position 0 0 0)


(gvector 1 0 0))))

;; f

(entity:set-color f BLUE)

;; ()

(define id (entity:get-id f))

;; id

(roll)

;; -1

(roll)

;; -1

(entity:set-color (history:get-entity-from-id


id) RED)

;; ()
PDF/KERN/13SCF.PDF
HTM/DATA/KERN/KERN/13SCF/0097.HTM