entity:material-transparency
List of: Scheme Extensions
Subjects: Materials, Transparency
Contents: Rendering Base

Action: Gets the transparency property in the material associated with a geometric entity.

Filename: rbase/rnd_scm/mat_scm.cxx

APIs: api_rh_get_material_transp

Syntax: (entity:material-transparency entity)

Arg Types: entity entity

Returns: real

Errors: Returns the string entity:material-transparency: operation unsuccessful.

Description: This extension gets the transparency property (if any) in the material associated with a geometric entity. The return value real specifies the transparency factor, which ranges from 0 (transparent) to 1 (opaque).


entity specifies an entity to query.

Example: ; entity:material-transparency

; Create a solid cylinder.

(define cyl1


(solid:cylinder (position 0 0 0)


(position 30 5 15) 20))

;; 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)

;; ()

; Set the transparency property of the material.

(entity:set-material-transparency cyl1 0.8)

;; ()

; Get the material's transparency.

(entity:material-transparency cyl1)

;; 0.8
PDF/RBASE/02SCA.PDF
HTM/DATA/RBASE/RBASE/02SCA/0013.HTM