|
|
|
Represents a single vertex in the vertex palette.
More...
#include "fltVertex.h"
List of all members.
Public Types |
| enum | Flags { F_hard_edge = 0x8000,
F_normal_frozen = 0x4000,
F_no_color = 0x2000,
F_packed_color = 0x1000
} |
Public Member Functions |
|
| FltVertex (FltHeader *header) |
|
virtual TypeHandle | force_init_type () |
| LColor | get_color () const |
| | If has_color() indicates true, returns the color of the vertex, as a four-component value.
|
| FltOpcode | get_opcode () const |
| | Returns the opcode that this record will be written as.
|
| int | get_record_length () const |
| | Returns the length of this record in bytes as it will be written to the flt file.
|
| LRGBColor | get_rgb () const |
| | If has_color() indicates true, returns the color of the vertex, as a three-component value.
|
|
virtual TypeHandle | get_type () const |
| bool | has_color () const |
| | Returns true if the vertex has a primary color indicated, false otherwise.
|
| void | set_color (const LColor &color) |
| | Sets the color of the vertex, using the packed color convention.
|
| void | set_rgb (const LRGBColor &rgb) |
| | Sets the color of the vertex, using the packed color convention.
|
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 |
|
int | _color_index |
|
int | _color_name_index |
|
unsigned int | _flags |
|
bool | _has_normal |
|
bool | _has_uv |
|
LPoint3 | _normal |
|
FltPackedColor | _packed_color |
|
LPoint3d | _pos |
|
LPoint2 | _uv |
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 record based on the information given in the indicated datagram, whose opcode has already been read.
|
Friends |
|
class | FltHeader |
Detailed Description
Represents a single vertex in the vertex palette.
Flt files index vertices by their byte offset in the vertex palette; within this library, we map those byte offsets to pointers automatically.
This may represent a vertex with or without a normal or texture coordinates.
Definition at line 35 of file fltVertex.h.
Member Function Documentation
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 241 of file fltVertex.cxx.
References Datagram::add_be_float32(), Datagram::add_be_float64(), Datagram::add_be_int16(), Datagram::add_be_uint16(), Datagram::add_be_uint32(), FltRecord::build_record(), FltHeader::get_flt_version(), Datagram::get_length(), get_opcode(), get_record_length(), Datagram::pad_bytes(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().
Fills in the information in this record 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 165 of file fltVertex.cxx.
References FltRecord::check_remaining_size(), FltRecord::extract_record(), DatagramIterator::get_be_float32(), DatagramIterator::get_be_float64(), DatagramIterator::get_be_int16(), DatagramIterator::get_be_int32(), DatagramIterator::get_be_uint16(), FltHeader::get_flt_version(), FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), DatagramIterator::get_remaining_size(), and DatagramIterator::skip_bytes().
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 80 of file fltVertex.h.
Sets the color of the vertex, using the packed color convention.
The alpha component is ignored.
Definition at line 37 of file fltVertex.I.
References set_rgb().
The documentation for this class was generated from the following files:
| | |