15 #include "geomTrifans.h" 16 #include "geomTriangles.h" 17 #include "geomVertexRewriter.h" 18 #include "bamReader.h" 19 #include "bamWriter.h" 20 #include "graphicsStateGuardianBase.h" 30 GeomTrifans(GeomTrifans::UsageHint usage_hint) :
76 GeomPrimitive::PrimitiveType GeomTrifans::
77 get_primitive_type()
const {
91 return GR_triangle_fan | GR_indexed_other;
93 return GR_triangle_fan;
106 return gsg->draw_trifans(reader, force);
124 decompose_impl()
const {
133 while (li < (
int)ends.size()) {
135 nassertr(vi + 2 <= end, triangles.p());
143 triangles->add_vertex(v0);
144 triangles->add_vertex(v1);
145 triangles->add_vertex(v2);
147 triangles->close_primitive();
152 nassertr(vi == num_vertices, NULL);
154 return triangles.p();
163 rotate_impl()
const {
166 nassertr(
false, NULL);
177 register_with_read_factory() {
195 parse_params(params, scan, manager);
196 object->fillin(scan, manager);
ShadeModel get_shade_model() const
Returns the ShadeModel hint for this primitive.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
virtual int get_geom_rendering() const
Returns the set of GeomRendering bits that represent the rendering properties required to properly re...
Defines a series of triangle fans.
Base class for objects that can be written to and read from Bam files.
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
int get_num_vertices() const
Returns the number of indices used by all the primitives in this object.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
void register_factory(TypeHandle handle, CreateFunc *func)
Registers a new kind of thing the Factory will be able to create.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
int get_vertex(int i) const
Returns the ith vertex index in the table.
UsageHint get_usage_hint() const
Returns the usage hint for this primitive.
Defines a series of disconnected triangles.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
Encapsulates the data from a GeomPrimitive, pre-fetched for one stage of the pipeline.
bool is_indexed() const
Returns true if the primitive is indexed, false otherwise.
Similar to PointerToArray, except that its contents may not be modified.
This is the data for one array of a GeomVertexData structure.