entity:transform
List of: Scheme Extensions
Subjects: Entity, Transforms
Contents: Kernel

Action: Applies a transform to a single entity or list of entities.

Filename: kern/kern_scm/ent_scm.cxx

APIs: api_transform_entity

Syntax: (entity:transform entity-list transform)

Arg Types: entity-list entity | (entity ... )

transform transform

Returns: entity | (entity ... )

Description: This extension returns the input entity or entity-list. Refer to the transform Scheme extensions for more information.


The argument entity-list comprises any entity or list of entities to be transformed.


The argument transform is any valid transform.

Example: ; entity:transform

; Define a WCS.

(define wcs1


(wcs (position 0 0 0) (position 5 0 0)


(position 0 5 0)))

;; wcs1

; Create a solid block.

(define block1


(solid:block (position 0 0 0)


(position -15 -25 -15)))

;; block1

; OUTPUT Original


; Copy the block.

(define copy


(entity:copy block1))

;; copy

; Set the color for the copy.

(entity:set-color copy 3)

;; ()

; Transform the solid block.

(define transform (entity:transform copy


(transform:axes (position 0 0 0) (gvector -8 0 0)


(gvector 0 6 0))))

;; transform

(view:refresh)

;; #[view 107599568]

; OUTPUT Result



Figure 12-4. entity:transform
PDF/KERN/12SCA.PDF
HTM/DATA/KERN/KERN/12SCA/0105.HTM