21 INLINE
bool EggAttributes::
23 return (_flags & F_has_normal) != 0;
31 INLINE
const LNormald &EggAttributes::
33 nassertr(has_normal(), _normal);
42 INLINE
void EggAttributes::
45 _flags |= F_has_normal;
53 INLINE
void EggAttributes::
55 _flags &= ~F_has_normal;
66 if (((_flags ^ other._flags) & F_has_normal) != 0) {
72 return (get_normal() == other.get_normal() &&
73 _dnormals.
compare_to(other._dnormals, egg_parameters->_normal_threshold) == 0);
85 if (!other.has_normal()) {
88 set_normal(other.get_normal());
89 _dnormals = other._dnormals;
98 INLINE
bool EggAttributes::
100 return (_flags & F_has_color) != 0;
114 return LColor(1.0, 1.0, 1.0, 1.0);
123 INLINE
void EggAttributes::
124 set_color(
const LColor &color) {
126 _flags |= F_has_color;
134 INLINE
void EggAttributes::
136 _flags &= ~F_has_color;
147 if (((_flags ^ other._flags) & F_has_color) != 0) {
154 _drgbas.
compare_to(other._drgbas, egg_parameters->_color_threshold) == 0);
166 if (!other.has_color()) {
170 _drgbas = other._drgbas;
void copy_normal(const EggAttributes &other)
Sets this normal 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 matches_normal(const EggAttributes &other) const
Returns true if this normal matches that of the other EggAttributes object, include the morph list...
The set of attributes that may be applied to vertices as well as polygons, such as surface normal and...
void copy_color(const EggAttributes &other)
Sets this color to be the same as the other's, include morphs.
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...
This is the base class for all three-component vectors and points.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
bool sorts_less_than(const EggAttributes &other) const
An ordering operator to compare two vertices for sorting order.
int compare_to(const EggAttributes &other) const
An ordering operator to compare two vertices for sorting order.