23 TypeHandle GeomLinestripsAdjacency::_type_handle;
28 GeomLinestripsAdjacency::
29 GeomLinestripsAdjacency(GeomEnums::UsageHint usage_hint) :
37 GeomLinestripsAdjacency::
46 GeomLinestripsAdjacency::
47 ~GeomLinestripsAdjacency() {
66 GeomPrimitive::PrimitiveType GeomLinestripsAdjacency::
67 get_primitive_type()
const {
75 int GeomLinestripsAdjacency::
76 get_geom_rendering()
const {
79 return GR_line_strip | GR_indexed_other | GR_strip_cut_index | GR_adjacency;
81 return GR_line_strip | GR_indexed_other | GR_adjacency;
84 return GR_line_strip | GR_adjacency;
92 int GeomLinestripsAdjacency::
93 get_min_num_vertices_per_primitive()
const {
103 int GeomLinestripsAdjacency::
104 get_num_unused_vertices_per_primitive()
const {
111 bool GeomLinestripsAdjacency::
114 return gsg->draw_linestrips_adj(reader, force);
128 decompose_impl()
const {
134 int num_vertices = from.get_num_vertices();
137 const int num_unused = 1;
139 int vi = -num_unused;
141 while (li < (
int)ends.size()) {
145 nassertr(vi + 3 <= end, lines);
146 int v0 = from.get_vertex(vi++);
147 int v1 = from.get_vertex(vi++);
148 int v2 = from.get_vertex(vi++);
150 int v3 = from.get_vertex(vi++);
151 lines->add_vertex(v0);
152 lines->add_vertex(v1);
153 lines->add_vertex(v2);
154 lines->add_vertex(v3);
161 nassertr(vi == num_vertices,
nullptr);
170 bool GeomLinestripsAdjacency::
171 requires_unused_vertices()
const {
181 void GeomLinestripsAdjacency::
208 object->fillin(scan, manager);
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
Defines a series of disconnected line segments with adjacency information, for use with geometry shad...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
UsageHint get_usage_hint() const
Returns the minimum (i.e.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
get_current_thread
Returns a pointer to the currently-executing Thread object.
static void register_with_read_factory()
Tells the BamReader how to create objects of type Geom.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
CPTA_int get_ends() const
Returns a const pointer to the primitive ends array so application code can read it directly.
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_strip_cut_index
Returns the index of the indicated type that is reserved for use as a strip cut index,...
PT(GeomPrimitive) GeomLinestripsAdjacency
Returns the fundamental rendering type of this primitive: whether it is points, lines,...
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
int get_num_rows() const
Returns the number of rows stored in the array, based on the number of bytes and the stride.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
int get_num_primitives() const
Returns the number of individual primitives stored within this object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A thread; that is, a lightweight process.
get_shade_model
Returns the ShadeModel hint for this primitive.
A class to retrieve the individual data elements previously stored in a Datagram.
Defines a series of line strips with adjacency information.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Similar to PointerToArray, except that its contents may not be modified.
This is the data for one array of a GeomVertexData structure.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.