Go to the documentation of this file.
41 write(std::ostream &out,
int indent_level)
const {
43 write_body(out, indent_level+2);
44 indent(out, indent_level) <<
"}\n";
62 do_apply_flat_attribute(i + 1, component);
72 get_num_lead_vertices()
const {
91 const_iterator vi = begin();
97 for (
int i = 0; i < (int)size() - 2; i++) {
101 if (attrib->has_color()) {
104 if (attrib->has_normal()) {
105 poly->set_normal(attrib->get_normal());
108 poly->add_vertex(v0);
109 poly->add_vertex(v1);
110 poly->add_vertex(*vi);
virtual void apply_first_attribute() override
Sets the first vertex of the triangle (or each component) to the primitive normal and/or color,...
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
get_num_components
Returns the number of individual component triangles within the composite.
virtual void write(std::ostream &out, int indent_level) const override
Writes the triangle fan to the indicated output stream in Egg format.
virtual EggTriangleFan * make_copy() const override
Makes a copy of this object.
A base class for nodes in the hierarchy that are not leaf nodes.
void clear()
Removes all of the vertices from the primitive.
LColor get_color() const
Returns the color set on this particular attribute.
TypeHandle is the identifier used to differentiate C++ class types.
void write_header(std::ostream &out, int indent_level, const char *egg_keyword) const
Writes the first line of the egg object, e.g.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
get_component
Returns the attributes for the nth component triangle.
void copy_attributes(const EggAttributes &other)
Copies the rendering attributes from the indicated primitive.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A connected fan of triangles.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EggNode * add_child(EggNode *node)
Adds the indicated child to the group and returns it.
The set of attributes that may be applied to vertices as well as polygons, such as surface normal and...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.