Action:
|
Gets a list of all loops of an entity or list of entities.
|
|
Filename:
|
kern/kern_scm/ent_scm.cxx
|
|
APIs:
|
api_get_loops
|
|
Syntax:
|
(entity:loops entity-list [include-pat])
|
|
Arg Types:
|
entity-list
|
entity | (entity ... )
|
|
include-pat
|
integer
|
|
Returns:
|
(loop ... )
|
|
Description:
|
This extension returns a list of the entity's loops. If no loops are found, this extension returns an empty list.
|
|
|
entity-list specifies an entity or an entity list that has to be queried.
|
|
|
The optional parameter
include-pat determines how this function deals with patterned objects. By default, patterned objects are included in the list of entities. The user may specify any one of the following through this argument:
|
|
|
0
|
patterned objects are created if they do not already exist, and are included in the list.
|
|
1
|
only those patterned objects that have already been created are included in the list.
|
|
2
|
no patterned objects besides seed pattern objects are included in the list.
|
|
Example:
|
; entity:loops
|
|
; Create a solid block.
|
|
(define block1
|
|
|
(solid:block (position 0 0 0)
|
|
|
(position 15 10 5)))
|
|
;; block1
|
|
; Get a list of the block's loops.
|
|
(entity:loops block1)
|
|
;; (#[entity 3 1] #[entity 4 1] #[entity 5 1]
|
|
;; #[entity 6 1] #[entity 7 1] #[entity 8 1])
|