EggAttributes

from panda3d.egg import EggAttributes
class EggAttributes

Bases:

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 _dnormals EggMorphNormalList

getter for EggMorphNormalList EggAttributes::_dnormals;

property _drgbas EggMorphColorList

getter for EggMorphColorList EggAttributes::_drgbas;

assign(copy: EggAttributes) EggAttributes
clear_color()
clear_normal()
compare_to(other: EggAttributes) int

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

copy_color(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.

copy_normal(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 get_class_type() panda3d.core.TypeHandle
get_color() panda3d.core.LColor

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

get_normal() panda3d.core.LNormald
has_color() bool
has_normal() bool
matches_color(other: EggAttributes) bool

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

matches_normal(other: EggAttributes) bool

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

set_color(Color: panda3d.core.LColor)
set_normal(normal: panda3d.core.LNormald)
sorts_less_than(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.