15 #ifndef EGGCOMPOSITEPRIMITIVE_H
16 #define EGGCOMPOSITEPRIMITIVE_H
18 #include "pandabase.h"
20 #include "eggPrimitive.h"
32 INLINE EggCompositePrimitive(
const EggCompositePrimitive ©);
33 INLINE EggCompositePrimitive &operator = (
const EggCompositePrimitive ©);
34 virtual ~EggCompositePrimitive();
38 INLINE
int get_num_components()
const;
41 MAKE_SEQ(get_components, get_num_components, get_component);
42 INLINE
void set_component(
int i,
const EggAttributes *attrib);
44 INLINE
bool triangulate_into(
EggGroupNode *container)
const;
45 PT(EggCompositePrimitive) triangulate_in_place();
54 virtual int get_num_lead_vertices()
const=0;
55 virtual void prepare_add_vertex(
EggVertex *vertex,
int i,
int n);
56 virtual void prepare_remove_vertex(
EggVertex *vertex,
int i,
int n);
58 virtual bool do_triangulate(
EggGroupNode *container)
const;
60 void write_body(ostream &out,
int indent_level)
const;
71 static void init_type() {
72 EggPrimitive::init_type();
73 register_type(_type_handle,
"EggCompositePrimitive",
74 EggPrimitive::get_class_type());
77 return get_class_type();
79 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
86 #include "eggCompositePrimitive.I"
A base class for any of a number of kinds of geometry primitives: polygons, point lights...
virtual void unify_attributes(Shading shading)
If the shading property is S_per_vertex, ensures that all vertices have a normal and a color...
The base class for primitives such as triangle strips and triangle fans, which include several compon...
virtual Shading get_shading() const
Returns the shading properties apparent on this particular primitive.
virtual void apply_first_attribute()
Sets the first vertex of the triangle (or each component) to the primitive normal and/or color...
virtual void apply_last_attribute()
Sets the last vertex of the triangle (or each component) to the primitive normal and/or color...
virtual bool cleanup()
Cleans up modeling errors in whatever context this makes sense.
A base class for nodes in the hierarchy that are not leaf nodes.
The set of attributes that may be applied to vertices as well as polygons, such as surface normal and...
virtual void post_apply_flat_attribute()
Intended as a followup to apply_last_attribute(), this also sets an attribute on the first vertices o...
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.