EggMaterial

from panda3d.egg import EggMaterial
class EggMaterial

Bases: EggNode

Inheritance diagram

Inheritance diagram of EggMaterial

enum Equivalence
enumerator E_attributes = 1
enumerator E_mref_name = 2
__init__(copy: EggMaterial)
__init__(mref_name: str)
property amb → LColor
Getter

It is legal to call this even if hasAmb() returns false. If so, it simply returns the default amb color.

Setter

property base → LColor
Getter

It is legal to call this even if hasBase() returns false. If so, it simply returns the default base color.

New in version 1.10.0.

Setter

New in version 1.10.0.

clearAmb()None
clearBase()None

New in version 1.10.0.

clearDiff()None
clearEmit()None
clearIor()None

New in version 1.10.0.

clearLocal()None
clearMetallic()None

New in version 1.10.0.

clearRoughness()None

New in version 1.10.0.

clearShininess()None
clearSpec()None
property diff → LColor
Getter

It is legal to call this even if hasDiff() returns false. If so, it simply returns the default diff color.

Setter

property emit → LColor
Getter

It is legal to call this even if hasEmit() returns false. If so, it simply returns the default emit color.

Setter

getAmb()panda3d.core.LColor

It is legal to call this even if hasAmb() returns false. If so, it simply returns the default amb color.

getBase()panda3d.core.LColor

It is legal to call this even if hasBase() returns false. If so, it simply returns the default base color.

New in version 1.10.0.

static getClassType()panda3d.core.TypeHandle
getDiff()panda3d.core.LColor

It is legal to call this even if hasDiff() returns false. If so, it simply returns the default diff color.

getEmit()panda3d.core.LColor

It is legal to call this even if hasEmit() returns false. If so, it simply returns the default emit color.

getIor()float

New in version 1.10.0.

getLocal()bool
getMetallic()float

New in version 1.10.0.

getRoughness()float

New in version 1.10.0.

getShininess()float
getSpec()panda3d.core.LColor

It is legal to call this even if hasSpec() returns false. If so, it simply returns the default spec color.

hasAmb()bool
hasBase()bool

New in version 1.10.0.

hasDiff()bool
hasEmit()bool
hasIor()bool

New in version 1.10.0.

hasLocal()bool
hasMetallic()bool

New in version 1.10.0.

hasRoughness()bool

New in version 1.10.0.

hasShininess()bool
hasSpec()bool
property iorfloat
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

isEquivalentTo(other: EggMaterial, eq: int)bool

Returns true if the two materials are equivalent in all relevant properties (according to eq), false otherwise.

The Equivalence parameter, eq, should be set to the bitwise OR of the following properties, according to what you consider relevant:

EggMaterial::E_attributes: All material attributes (diff, spec, etc.) except MRef name.

EggMaterial::E_mref_name: The MRef name.

property localbool

Getter Setter

property metallicfloat
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

property roughnessfloat
Getter

New in version 1.10.0.

Setter

New in version 1.10.0.

setAmb(amb: panda3d.core.LColor)None
setBase(base: panda3d.core.LColor)None

New in version 1.10.0.

setDiff(diff: panda3d.core.LColor)None
setEmit(emit: panda3d.core.LColor)None
setIor(ior: float)None

New in version 1.10.0.

setLocal(local: bool)None
setMetallic(metallic: float)None

New in version 1.10.0.

setRoughness(roughness: float)None

New in version 1.10.0.

setShininess(shininess: float)None
setSpec(spec: panda3d.core.LColor)None
property shininessfloat

Getter Setter

sortsLessThan(other: EggMaterial, eq: int)bool

An ordering operator to compare two materials for sorting order. This imposes an arbitrary ordering useful to identify unique materials, according to the indicated Equivalence factor. See isEquivalentTo().

property spec → LColor
Getter

It is legal to call this even if hasSpec() returns false. If so, it simply returns the default spec color.

Setter