Panda3D
|
A single primitive of a mesh, like a triangle strip or fan. More...
#include "fltMeshPrimitive.h"
Public Types | |
enum | PrimitiveType { PT_tristrip = 1, PT_trifan = 2, PT_quadstrip = 3, PT_polygon = 4 } |
typedef vector_int | Vertices |
Public Member Functions | |
FltMeshPrimitive (FltHeader *header) | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Public Attributes | |
PrimitiveType | _primitive_type |
Vertices | _vertices |
Protected Member Functions | |
virtual bool | build_record (FltRecordWriter &writer) const |
Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer. | |
virtual bool | extract_record (FltRecordReader &reader) |
Fills in the information in this bead based on the information given in the indicated datagram, whose opcode has already been read. |
A single primitive of a mesh, like a triangle strip or fan.
Definition at line 31 of file fltMeshPrimitive.h.
bool FltMeshPrimitive::build_record | ( | FltRecordWriter & | writer | ) | const [protected, virtual] |
Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.
Returns true on success, false if there is some error.
Reimplemented from FltBead.
Definition at line 89 of file fltMeshPrimitive.cxx.
References Datagram::add_be_int16(), Datagram::add_be_int32(), Datagram::add_be_uint16(), Datagram::add_uint8(), FltBead::build_record(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().
bool FltMeshPrimitive::extract_record | ( | FltRecordReader & | reader | ) | [protected, virtual] |
Fills in the information in this bead based on the information given in the indicated datagram, whose opcode has already been read.
Returns true on success, false if the datagram is invalid.
Reimplemented from FltBead.
Definition at line 42 of file fltMeshPrimitive.cxx.
References FltRecord::check_remaining_size(), FltBead::extract_record(), FltRecordReader::get_iterator(), and FltRecordReader::get_opcode().
static void FltMeshPrimitive::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from FltBead.
Definition at line 60 of file fltMeshPrimitive.h.