EggMaterial¶
from panda3d.egg import EggMaterial
-
class
EggMaterial
¶ Bases:
EggNode
Inheritance diagram
-
__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.
-
getSpec
() → panda3d.core.LColor¶ It is legal to call this even if
hasSpec()
returns false. If so, it simply returns the default spec color.
-
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.
-
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)¶
-
setSpec
(spec: panda3d.core.LColor)¶
-
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()
.
-