Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends
GeomTristrips Class Reference

Defines a series of triangle strips. More...

#include "geomTristrips.h"

Inheritance diagram for GeomTristrips:
GeomPrimitive CopyOnWriteObject GeomEnums CachedTypedWritableReferenceCount TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject MemoryBase MemoryBase

List of all members.

Public Member Functions

 GeomTristrips (UsageHint usage_hint)
 GeomTristrips (const GeomTristrips &copy)
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_geom_rendering () const
 Returns the set of GeomRendering bits that represent the rendering properties required to properly render this primitive.
virtual int get_num_unused_vertices_per_primitive () const
 Returns the number of vertices that are added between primitives that aren't, strictly speaking, part of the primitives themselves.
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 void append_unused_vertices (GeomVertexArrayData *vertices, int vertex)
 Called when a new primitive is begun (other than the first primitive), this should add some degenerate vertices between primitives, if the primitive type requires that.
virtual CPT (GeomPrimitive) decompose_impl() const
virtual CPT (GeomPrimitive) doubleside_impl() const
virtual CPT (GeomPrimitive) reverse_impl() const
virtual CPT (GeomVertexArrayData) rotate_impl() const
virtual bool requires_unused_vertices () const
 Should be redefined to return true in any primitive that implements append_unused_vertices().

Static Protected Member Functions

static TypedWritablemake_from_bam (const FactoryParams &params)
 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

Detailed Description

Defines a series of triangle strips.

Definition at line 25 of file geomTristrips.h.


Member Function Documentation

void GeomTristrips::append_unused_vertices ( GeomVertexArrayData vertices,
int  vertex 
) [protected, virtual]

Called when a new primitive is begun (other than the first primitive), this should add some degenerate vertices between primitives, if the primitive type requires that.

The second parameter is the first vertex that begins the new primitive.

Reimplemented from GeomPrimitive.

Definition at line 369 of file geomTristrips.cxx.

References GeomVertexWriter::add_data1i(), GeomVertexReader::get_data1i(), GeomVertexArrayData::get_num_rows(), GeomVertexReader::set_row_unsafe(), and GeomVertexWriter::set_row_unsafe().

bool GeomTristrips::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 119 of file geomTristrips.cxx.

int GeomTristrips::get_geom_rendering ( ) const [virtual]

Returns the set of GeomRendering bits that represent the rendering properties required to properly render this primitive.

Reimplemented from GeomPrimitive.

Definition at line 90 of file geomTristrips.cxx.

References GeomPrimitive::is_indexed().

Returns the number of vertices that are added between primitives that aren't, strictly speaking, part of the primitives themselves.

This is used, for instance, to define degenerate triangles to connect otherwise disconnected triangle strips.

Reimplemented from GeomPrimitive.

Definition at line 108 of file geomTristrips.cxx.

GeomPrimitive::PrimitiveType GeomTristrips::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 78 of file geomTristrips.cxx.

TypedWritable * GeomTristrips::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 401 of file geomTristrips.cxx.

Referenced by register_with_read_factory().

Tells the BamReader how to create objects of type Geom.

Definition at line 388 of file geomTristrips.cxx.

References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().

bool GeomTristrips::requires_unused_vertices ( ) const [protected, virtual]

Should be redefined to return true in any primitive that implements append_unused_vertices().

Reimplemented from GeomPrimitive.

Definition at line 355 of file geomTristrips.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations