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);
141 to.set_data1i(from.get_data1i());
142 from.set_row_unsafe(begin);
143 to.set_data1i(from.get_data1i());
146 nassertr(to.is_at_end(), NULL);
150 int first_vertex = get_first_vertex();
153 for (
int begin = 0; begin < num_vertices; begin += 2) {
154 to.set_data1i(begin + 1 + first_vertex);
155 to.set_data1i(begin + first_vertex);
158 nassertr(to.is_at_end(), NULL);
171 register_with_read_factory() {
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...
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...
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...
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.
This object provides a high-level interface for quickly reading a sequence of numeric values from a v...
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...
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.
This is the data for one array of a GeomVertexData structure.