differt_core.scene.Material

differt_core.scene.Material#

class Material#

Bases: object

A basic material, that can be linked to EM properties.

Attributes

color

The material color, used for plotting.

id

The material ID.

name

The material name.

thickness

The thickness of the material.

Methods

Detailed documentation

color#

The material color, used for plotting.

The color is obtained from a—possibly-nested—<rgb> element, or from a <string> element with a type attribute. In the latter case, the color is chosen from a predefined list of colors.

Type:

tuple[float, float, float]

id#

The material ID.

This is used to match the material id used in shapes.

Type:

str

name#

The material name.

This can be, e.g., an ITU identifier.

Type:

str

thickness#

The thickness of the material.

Type:

Optional[float]