15 #include "geomLines.h"
16 #include "pStatTimer.h"
17 #include "bamReader.h"
18 #include "bamWriter.h"
19 #include "graphicsStateGuardianBase.h"
20 #include "geomVertexReader.h"
21 #include "geomVertexWriter.h"
31 GeomLines(GeomLines::UsageHint usage_hint) :
77 GeomPrimitive::PrimitiveType GeomLines::
78 get_primitive_type()
const {
118 return gsg->draw_lines(reader, force);
127 rotate_impl()
const {
129 int num_vertices = get_num_vertices();
132 new_vertices->set_num_rows(num_vertices);
139 for (
int begin = 0; begin < num_vertices; begin += 2) {
140 from.set_row_unsafe(begin + 1);
142 from.set_row_unsafe(begin);
150 int first_vertex = get_first_vertex();
153 for (
int begin = 0; begin < num_vertices; begin += 2) {
189 parse_params(params, scan, manager);
190 object->fillin(scan, manager);
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
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...
void set_data1i(int data)
Sets the write row to a particular 1-component value, and advances the write row. ...
virtual bool draw(GraphicsStateGuardianBase *gsg, const GeomPrimitivePipelineReader *reader, bool force) const
Calls the appropriate method on the GSG to draw the primitive.
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.
Defines a series of disconnected line segments.
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.
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...
This object provides a high-level interface for quickly reading a sequence of numeric values from a v...
static void register_with_read_factory()
Tells the BamReader how to create objects of type Geom.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
virtual int get_min_num_vertices_per_primitive() const
Returns the minimum number of vertices that must be added before close_primitive() may legally be cal...
Encapsulates the data from a GeomPrimitive, pre-fetched for one stage of the pipeline.
This is the data for one array of a GeomVertexData structure.
bool is_at_end() const
Returns true if the writer is currently at the end of the list of vertices, false otherwise...