Go to the documentation of this file.
27 GeomTrifans(GeomTrifans::UsageHint usage_hint) :
64 GeomPrimitive::PrimitiveType GeomTrifans::
65 get_primitive_type()
const {
74 get_geom_rendering()
const {
76 return GR_triangle_fan | GR_indexed_other;
78 return GR_triangle_fan;
88 return gsg->draw_trifans(reader, force);
102 decompose_impl()
const {
111 while (li < (
int)ends.size()) {
113 nassertr(vi + 2 <= end, triangles);
121 triangles->add_vertex(v0);
122 triangles->add_vertex(v1);
123 triangles->add_vertex(v2);
125 triangles->close_primitive();
130 nassertr(vi == num_vertices,
nullptr);
139 rotate_impl()
const {
142 nassert_raise(
"GeomTrifans cannot have flat shading model");
150 register_with_read_factory() {
166 object->fillin(scan, manager);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the data for one array of a GeomVertexData structure.
A class to retrieve the individual data elements previously stored in a Datagram.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Similar to PointerToArray, except that its contents may not be modified.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_vertex
Returns the ith vertex index in the table.
Base class for objects that can be written to and read from Bam files.
TypeHandle is the identifier used to differentiate C++ class types.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
get_num_vertices
Returns the number of indices used by all the primitives in this object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_shade_model
Returns the ShadeModel hint for this primitive.
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
Defines a series of disconnected triangles.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
CPTA_int get_ends() const
Returns a const pointer to the primitive ends array so application code can read it directly.
PT(GeomPrimitive) GeomTrifans
Returns the fundamental rendering type of this primitive: whether it is points, lines,...
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.
Defines a series of triangle fans.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_usage_hint
Returns the usage hint for this primitive.
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
This is an abstract base class for a family of classes that represent the fundamental geometry primit...