# panda3d.egg.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

__init__() → None
__init__(copy: EggAttributes) → None
assign(copy: EggAttributes) → EggAttributes
Return type

EggAttributes

hasNormal() → bool
getNormal() → LNormald
Return type

LNormald

setNormal(normal: LNormald) → None
clearNormal() → None
matchesNormal(other: EggAttributes) → bool

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

copyNormal(other: EggAttributes) → None

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

hasColor() → bool
getColor() → LColor

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

Return type

LColor

setColor(Color: LColor) → None
clearColor() → None
matchesColor(other: EggAttributes) → bool

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

copyColor(other: EggAttributes) → None

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

write(out: ostream, indent_level: int) → None

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

sortsLessThan(other: EggAttributes) → bool

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

compareTo(other: EggAttributes) → int

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

transform(mat: LMatrix4d) → None

Applies the indicated transformation matrix to the attributes.

static getClassType() → TypeHandle
Return type

TypeHandle