entity:set-material
List of: Scheme Extensions
Subjects: Entity, Materials
Contents: Rendering Base

Action: Sets the material attribute of an entity.

Filename: rbase/rnd_scm/mat_scm.cxx

APIs: api_rh_set_material

Syntax: (entity:set-material entity-list material)

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

material material | #f

Returns: unspecified


entity-list specifies an entity or entity list to which the material is to be attached.


material specifies the type of material entity to attach to the entity. If the argument material is #f, then the material attribute is removed from the entity or entity list.

Example: ; entity:set-material

; Create a material.

(define matter1 (material))

;; matter1

; Create a solid block.

(define block1


(solid:block (position 0 0 0)


(position 15 10 5)))

;; block1

; Assign the material to the block.

(entity:set-material block1 matter1)

;; ()

; Remove the material from the block.

(entity:set-material block1 #f)

;; ()
PDF/RBASE/02SCA.PDF
HTM/DATA/RBASE/RBASE/02SCA/0015.HTM