15 #include "geomPatches.h" 16 #include "geomVertexRewriter.h" 17 #include "pStatTimer.h" 18 #include "bamReader.h" 19 #include "bamWriter.h" 20 #include "graphicsStateGuardianBase.h" 34 GeomPatches(
int num_vertices_per_patch, GeomPatches::UsageHint usage_hint) :
36 _num_vertices_per_patch(num_vertices_per_patch)
48 _num_vertices_per_patch(copy._num_vertices_per_patch)
82 GeomPrimitive::PrimitiveType GeomPatches::
83 get_primitive_type()
const {
103 return _num_vertices_per_patch;
115 return gsg->draw_patches(reader, force);
125 register_with_read_factory() {
150 GeomPrimitive::fillin(scan, manager);
168 parse_params(params, scan, manager);
169 object->fillin(scan, manager);
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
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...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
PN_uint16 get_uint16()
Extracts an unsigned 16-bit integer.
Defines a series of "patches", fixed-size groupings of vertices that must be processed by a tessellat...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual int get_num_vertices_per_primitive() const
If the primitive type is a simple type in which all primitives have the same number of vertices...
void register_factory(TypeHandle handle, CreateFunc *func)
Registers a new kind of thing the Factory will be able to create.
void add_uint16(PN_uint16 value)
Adds an unsigned 16-bit integer to the datagram.
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.
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.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
GeomPatches(int num_vertices_per_patch, UsageHint usage_hint)
The number of vertices per patch must be specified to the GeomPatches constructor, and it may not be changed during the lifetime of the GeomPatches object.