Panda3D
|
Defines a series of disconnected triangles. More...
#include "geomTriangles.h"
Public Member Functions | |
GeomTriangles (UsageHint usage_hint) | |
GeomTriangles (const GeomTriangles ©) | |
virtual bool | draw (GraphicsStateGuardianBase *gsg, const GeomPrimitivePipelineReader *reader, bool force) const |
Calls the appropriate method on the GSG to draw the primitive. | |
virtual TypeHandle | force_init_type () |
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, like triangles, returns the number of vertices per primitive. | |
virtual PrimitiveType | get_primitive_type () const |
Returns the fundamental rendering type of this primitive: whether it is points, lines, or polygons. | |
virtual TypeHandle | get_type () const |
virtual | PT (GeomPrimitive) make_copy() const |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type Geom. | |
Protected Member Functions | |
virtual | CPT (GeomPrimitive) doubleside_impl() const |
virtual | CPT (GeomPrimitive) reverse_impl() const |
virtual | CPT (GeomVertexArrayData) rotate_impl() const |
Static Protected Member Functions | |
static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
This function is called by the BamReader's factory when a new object of type Geom is encountered in the Bam file. | |
Friends | |
class | Geom |
Defines a series of disconnected triangles.
Definition at line 25 of file geomTriangles.h.
bool GeomTriangles::draw | ( | GraphicsStateGuardianBase * | gsg, |
const GeomPrimitivePipelineReader * | reader, | ||
bool | force | ||
) | const [virtual] |
Calls the appropriate method on the GSG to draw the primitive.
Implements GeomPrimitive.
Definition at line 104 of file geomTriangles.cxx.
int GeomTriangles::get_num_vertices_per_primitive | ( | ) | const [virtual] |
If the primitive type is a simple type in which all primitives have the same number of vertices, like triangles, returns the number of vertices per primitive.
If the primitive type is a more complex type in which different primitives might have different numbers of vertices, for instance a triangle strip, returns 0.
Reimplemented from GeomPrimitive.
Definition at line 93 of file geomTriangles.cxx.
GeomPrimitive::PrimitiveType GeomTriangles::get_primitive_type | ( | ) | const [virtual] |
Returns the fundamental rendering type of this primitive: whether it is points, lines, or polygons.
This is used to set up the appropriate antialiasing settings when AntialiasAttrib::M_auto is in effect; it also implies the type of primitive that will be produced when decompose() is called.
Implements GeomPrimitive.
Definition at line 77 of file geomTriangles.cxx.
TypedWritable * GeomTriangles::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type Geom is encountered in the Bam file.
It should create the Geom and extract its information from the file.
Definition at line 301 of file geomTriangles.cxx.
Referenced by register_with_read_factory().
void GeomTriangles::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type Geom.
Definition at line 288 of file geomTriangles.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().