EggMaterial

from panda3d.egg import EggMaterial
class EggMaterial

Bases:

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()
clearBase()

New in version 1.10.0.

clearDiff()
clearEmit()
clearIor()

New in version 1.10.0.

clearLocal()
clearMetallic()

New in version 1.10.0.

clearRoughness()

New in version 1.10.0.

clearShininess()
clearSpec()
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 ior float

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 local bool
property metallic float

New in version 1.10.0.

property roughness float

New in version 1.10.0.

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

New in version 1.10.0.

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

New in version 1.10.0.

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

New in version 1.10.0.

setRoughness(roughness: float)

New in version 1.10.0.

setShininess(shininess: float)
setSpec(spec: panda3d.core.LColor)
property shininess float
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