Panda3D
|
A list of vertices, typically added as a child of a face bead. More...
#include "fltVertexList.h"
Public Member Functions | |
FltVertexList (FltHeader *header) | |
void | add_vertex (FltVertex *vertex) |
Adds a new vertex to the end of the vertex list. | |
void | clear_vertices () |
Removes all vertices from this vertex list. | |
virtual TypeHandle | force_init_type () |
int | get_num_vertices () const |
Returns the number of vertices in this vertex list. | |
virtual TypeHandle | get_type () const |
FltVertex * | get_vertex (int n) const |
Returns the nth vertex of this vertex list. | |
virtual void | output (ostream &out) const |
Writes a quick one-line description of the record, but not its children. | |
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. | |
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 list of vertices, typically added as a child of a face bead.
Definition at line 31 of file fltVertexList.h.
void FltVertexList::add_vertex | ( | FltVertex * | vertex | ) |
Adds a new vertex to the end of the vertex list.
Definition at line 68 of file fltVertexList.cxx.
References FltHeader::add_vertex().
bool FltVertexList::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 FltRecord.
Definition at line 122 of file fltVertexList.cxx.
References Datagram::add_be_uint32(), FltRecord::build_record(), FltHeader::get_offset_by_vertex(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().
void FltVertexList::clear_vertices | ( | ) |
Removes all vertices from this vertex list.
Definition at line 58 of file fltVertexList.cxx.
bool FltVertexList::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 FltRecord.
Definition at line 95 of file fltVertexList.cxx.
References FltRecord::check_remaining_size(), FltRecord::extract_record(), FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), and FltHeader::get_vertex_by_offset().
int FltVertexList::get_num_vertices | ( | ) | const |
Returns the number of vertices in this vertex list.
Definition at line 37 of file fltVertexList.cxx.
FltVertex * FltVertexList::get_vertex | ( | int | n | ) | const |
Returns the nth vertex of this vertex list.
Definition at line 47 of file fltVertexList.cxx.
static void FltVertexList::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 FltRecord.
Definition at line 58 of file fltVertexList.h.
void FltVertexList::output | ( | ostream & | out | ) | const [virtual] |
Writes a quick one-line description of the record, but not its children.
This is a human-readable description, primarily for debugging; to write a flt file, use FltHeader::write_flt().
Reimplemented from FltRecord.
Definition at line 82 of file fltVertexList.cxx.