17 INLINE
bool EggAttributes::
19 return (_flags & F_has_normal) != 0;
25 INLINE
const LNormald &EggAttributes::
27 nassertr(has_normal(), _normal);
34 INLINE
void EggAttributes::
35 set_normal(
const LNormald &normal) {
37 _flags |= F_has_normal;
43 INLINE
void EggAttributes::
45 _flags &= ~F_has_normal;
54 if (((_flags ^ other._flags) & F_has_normal) != 0) {
60 return (get_normal() == other.get_normal() &&
61 _dnormals.
compare_to(other._dnormals, egg_parameters->_normal_threshold) == 0);
70 if (!other.has_normal()) {
73 set_normal(other.get_normal());
74 _dnormals = other._dnormals;
81 INLINE
bool EggAttributes::
83 return (_flags & F_has_color) != 0;
95 return LColor(1.0, 1.0, 1.0, 1.0);
102 INLINE
void EggAttributes::
103 set_color(
const LColor &color) {
105 _flags |= F_has_color;
111 INLINE
void EggAttributes::
113 _flags &= ~F_has_color;
122 if (((_flags ^ other._flags) & F_has_color) != 0) {
129 _drgbas.
compare_to(other._drgbas, egg_parameters->_color_threshold) == 0);
138 if (!other.has_color()) {
142 _drgbas = other._drgbas;
The set of attributes that may be applied to vertices as well as polygons, such as surface normal and...
bool matches_normal(const EggAttributes &other) const
Returns true if this normal matches that of the other EggAttributes object, include the morph list.
void copy_normal(const EggAttributes &other)
Sets this normal to be the same as the other's, include morphs.
int compare_to(const EggAttributes &other) const
An ordering operator to compare two vertices for sorting order.
void copy_color(const EggAttributes &other)
Sets this color to be the same as the other's, include morphs.
LColor get_color() const
Returns the color set on this particular attribute.
bool matches_color(const EggAttributes &other) const
Returns true if this color matches that of the other EggAttributes object, include the morph list.
bool sorts_less_than(const EggAttributes &other) const
An ordering operator to compare two vertices for sorting order.
int compare_to(const EggMorphList< MorphType > &other, double threshold) const
compare_to() compares a different space than the operator methods, which only check the morph's name.