46 _normal = copy._normal;
48 _dnormals = copy._dnormals;
49 _drgbas = copy._drgbas;
65write(std::ostream &out,
int indent_level)
const {
67 if (_dnormals.empty()) {
69 <<
"<Normal> { " << get_normal() <<
" }\n";
71 indent(out, indent_level) <<
"<Normal> {\n";
72 indent(out, indent_level + 2) << get_normal() <<
"\n";
73 _dnormals.write(out, indent_level + 2,
"<DNormal>", 3);
74 indent(out, indent_level) <<
"}\n";
78 if (_drgbas.empty()) {
82 indent(out, indent_level) <<
"<RGBA> {\n";
84 _drgbas.write(out, indent_level + 2,
"<DRBGA>", 4);
85 indent(out, indent_level) <<
"}\n";
97 if (_flags != other._flags) {
98 return (
int)_flags - (int)other._flags;
103 _normal.compare_to(other._normal, egg_parameters->_normal_threshold);
107 compare = _dnormals.
compare_to(other._dnormals, egg_parameters->_normal_threshold);
115 _color.compare_to(other._color, egg_parameters->_color_threshold);
119 compare = _drgbas.
compare_to(other._drgbas, egg_parameters->_color_threshold);
134 _normal = _normal * mat;
135 LVector3d old_normal = _normal;
138 EggMorphNormalList::iterator mi;
139 for (mi = _dnormals.begin(); mi != _dnormals.end(); ++mi) {
148 LVector3d offset = (*mi).get_offset() * mat;
149 LVector3d n = old_normal + offset;
151 morph.set_offset(n - _normal);
The set of attributes that may be applied to vertices as well as polygons, such as surface normal and...
void transform(const LMatrix4d &mat)
Applies the indicated transformation matrix to the attributes.
int compare_to(const EggAttributes &other) const
An ordering operator to compare two vertices for sorting order.
LColor get_color() const
Returns the color set on this particular attribute.
void write(std::ostream &out, int indent_level) const
Writes the attributes to the indicated output stream in Egg format.
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.
A single <Dxyz> or <Duv> or some such entry.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.