EggAttributes

from panda3d.egg import EggAttributes
class EggAttributes

Bases: MemoryBase

The set of attributes that may be applied to vertices as well as polygons, such as surface normal and color.

This class cannot inherit from EggObject, because it causes problems at the EggPolygon level with multiple appearances of the EggObject base class. And making EggObject a virtual base class is just no fun.

Inheritance diagram

Inheritance diagram of EggAttributes

__init__()
__init__(copy: EggAttributes)
property _dnormalsEggMorphNormalList

getter for EggMorphNormalList EggAttributes::_dnormals;

property _drgbasEggMorphColorList

getter for EggMorphColorList EggAttributes::_drgbas;

assign(copy: EggAttributes)EggAttributes
clearColor()
clearNormal()
compareTo(other: EggAttributes)int

An ordering operator to compare two vertices for sorting order. This imposes an arbitrary ordering useful to identify unique vertices.

copyColor(other: EggAttributes)

Sets this color to be the same as the other’s, include morphs. If the other has no color, this clears the color.

copyNormal(other: EggAttributes)

Sets this normal to be the same as the other’s, include morphs. If the other has no normal, this clears the normal.

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

Returns the color set on this particular attribute. If there is no color set, returns white.

getNormal()panda3d.core.LNormald
hasColor()bool
hasNormal()bool
matchesColor(other: EggAttributes)bool

Returns true if this color matches that of the other EggAttributes object, include the morph list.

matchesNormal(other: EggAttributes)bool

Returns true if this normal matches that of the other EggAttributes object, include the morph list.

setColor(Color: panda3d.core.LColor)
setNormal(normal: panda3d.core.LNormald)
sortsLessThan(other: EggAttributes)bool

An ordering operator to compare two vertices for sorting order. This imposes an arbitrary ordering useful to identify unique vertices.

transform(mat: panda3d.core.LMatrix4d)

Applies the indicated transformation matrix to the attributes.

write(out: panda3d.core.ostream, indent_level: int)

Writes the attributes to the indicated output stream in Egg format.