41write(std::ostream &out,
int indent_level)
const {
43 write_body(out, indent_level+2);
44 indent(out, indent_level) <<
"}\n";
53get_num_lead_vertices()
const {
67bool EggTriangleStrip::
72 const_iterator vi = begin();
77 bool reversed =
false;
79 for (
int i = 0; i < (int)size() - 2; i++) {
83 if (attrib->has_color()) {
86 if (attrib->has_normal()) {
87 poly->set_normal(attrib->get_normal());
99 poly->add_vertex(*vi);
The set of attributes that may be applied to vertices as well as polygons, such as surface normal and...
LColor get_color() const
Returns the color set on this particular attribute.
get_component
Returns the attributes for the nth component triangle.
A base class for nodes in the hierarchy that are not leaf nodes.
EggNode * add_child(EggNode *node)
Adds the indicated child to the group and returns it.
void write_header(std::ostream &out, int indent_level, const char *egg_keyword) const
Writes the first line of the egg object, e.g.
void copy_attributes(const EggAttributes &other)
Copies the rendering attributes from the indicated primitive.
void clear()
Removes all of the vertices from the primitive.
A connected strip of triangles.
virtual EggTriangleStrip * make_copy() const override
Makes a copy of this object.
virtual void write(std::ostream &out, int indent_level) const override
Writes the triangle strip to the indicated output stream in Egg format.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
TypeHandle is the identifier used to differentiate C++ class types.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
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.