entity:material
List of: Scheme Extensions
Subjects: Materials
Contents: Rendering Base

Action: Gets the material associated with a geometric entity.

Filename: rbase/rnd_scm/mat_scm.cxx

APIs: api_rh_get_material

Syntax: (entity:material entity)

Arg Types: entity entity

Returns: material

Description: This extension returns the material (if any) associated with the entity; otherwise it returns #f.


entity specifies the entity to be queried.

Example: ; entity:material

; Create a solid cylinder.

(define cyl1


(solid:cylinder (position 0 0 0)


(position 5 30 0) 8))

;; cyl1

; Determine if the cylinder has a material.

(entity:material cyl1)

;; #f

; Create a material.

(define matter1 (material))

;; matter1

; Set the material.

(entity:set-material cyl1 matter1)

;; ()

; Get the material assigned to the cylinder.

(define material (entity:material cyl1))

;; material
PDF/RBASE/02SCA.PDF
HTM/DATA/RBASE/RBASE/02SCA/0009.HTM