15 #include "eggAttributes.h" 16 #include "eggParameters.h" 18 #include "eggMorphList.h" 53 _normal = copy._normal;
55 _dnormals = copy._dnormals;
56 _drgbas = copy._drgbas;
77 write(ostream &out,
int indent_level)
const {
79 if (_dnormals.empty()) {
80 indent(out, indent_level)
81 <<
"<Normal> { " << get_normal() <<
" }\n";
83 indent(out, indent_level) <<
"<Normal> {\n";
84 indent(out, indent_level + 2) << get_normal() <<
"\n";
85 _dnormals.write(out, indent_level + 2,
"<DNormal>", 3);
86 indent(out, indent_level) <<
"}\n";
90 if (_drgbas.empty()) {
91 indent(out, indent_level)
94 indent(out, indent_level) <<
"<RGBA> {\n";
95 indent(out, indent_level + 2) <<
get_color() <<
"\n";
96 _drgbas.write(out, indent_level + 2,
"<DRBGA>", 4);
97 indent(out, indent_level) <<
"}\n";
112 if (_flags != other._flags) {
113 return (
int)_flags - (int)other._flags;
118 _normal.
compare_to(other._normal, egg_parameters->_normal_threshold);
122 compare = _dnormals.
compare_to(other._dnormals, egg_parameters->_normal_threshold);
130 _color.
compare_to(other._color, egg_parameters->_color_threshold);
134 compare = _drgbas.
compare_to(other._drgbas, egg_parameters->_color_threshold);
152 _normal = _normal * mat;
156 EggMorphNormalList::iterator mi;
157 for (mi = _dnormals.begin(); mi != _dnormals.end(); ++mi) {
167 LVector3d offset = (*mi).get_offset() * mat;
170 morph.set_offset(n - _normal);
This is a 4-by-4 transform matrix.
void transform(const LMatrix4d &mat)
Applies the indicated transformation matrix to the attributes.
A single <Dxyz> or <Duv> or some such entry.
LColor get_color() const
Returns the color set on this particular attribute.
bool normalize()
Normalizes the vector in place.
The set of attributes that may be applied to vertices as well as polygons, such as surface normal and...
int compare_to(const LVecBase4f &other) const
This flavor of compare_to uses a default threshold value based on the numeric type.
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...
void write(ostream &out, int indent_level) const
Writes the attributes to the indicated output stream in Egg format.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
int compare_to(const LVecBase3d &other) const
This flavor of compare_to uses a default threshold value based on the numeric type.
TypeHandle is the identifier used to differentiate C++ class types.
int compare_to(const EggAttributes &other) const
An ordering operator to compare two vertices for sorting order.