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

Inheritance diagram of EggAttributes

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

EggAttributes

clearColor() → None
clearNormal() → None
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) → None

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) → None

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() → TypeHandle
Return type

TypeHandle

getColor() → LColor

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

Return type

LColor

getNormal() → LNormald
Return type

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: LColor) → None
setNormal(normal: LNormald) → None
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: LMatrix4d) → None

Applies the indicated transformation matrix to the attributes.

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

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