SchemeExt:Entity:previous
From DocR23
Revision as of 21:52, 10 May 2010 by Adminwikispa (Talk | contribs)
Contents |
Action
Gets the previous COEDGE in an entity list.
Filename
scm/scmext/kern/ent_scm.cpp
APIs
None
Syntax
(entity:previous entity)
Argument Types
| Argument | Scheme Data Type |
|---|---|
| entity | entity |
Returns
entity
Description
Returns the previous COEDGE in the entity list.
Arguments
- entity specifies the entity that has to be queried.
Example
; entity:previous ; Create a solid block. (define block1 (solid:block (position 0 0 0)(position 15 10 5))) ;; block1 (entity:owner block1) ;; #[entity 2 1] ; Get the faces of the block. (define faces1 (entity:faces block1)) ;; faces1 ; Get the coedges of one of the faces. (define coedges1 (entity:coedges (list-ref faces1 0))) ;; coedges1 ; coedges1 ==> ; #[entity 9 1] #[entity 10 1] ; #[entity 11 1] #[entity 12 1] ; Determine the previous coedge in the list. (entity:previous (list-ref coedges1 0)) ;; #[entity 12 1]