Panda3D
|
A mapping of floating-point values per integer index. More...
#include "lwoDiscontinuousVertexMap.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
PTA_stdfloat | get_value (int polygon_index, int vertex_index) const |
Returns the mapping value associated with the given index, or an empty PTA_stdfloat if there is no mapping value associated. | |
bool | has_value (int polygon_index, int vertex_index) const |
Returns true if the map has a value associated with the given index, false otherwise. | |
virtual bool | read_iff (IffInputFile *in, size_t stop_at) |
Reads the data of the chunk in from the given input file, if possible. | |
virtual void | write (ostream &out, int indent_level=0) 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 | |
int | _dimension |
IffId | _map_type |
string | _name |
A mapping of floating-point values per integer index.
The meaning of these values is determined by the mapping type code and/or its name.
Definition at line 31 of file lwoDiscontinuousVertexMap.h.
PTA_stdfloat LwoDiscontinuousVertexMap::get_value | ( | int | polygon_index, |
int | vertex_index | ||
) | const |
Returns the mapping value associated with the given index, or an empty PTA_stdfloat if there is no mapping value associated.
Definition at line 52 of file lwoDiscontinuousVertexMap.cxx.
Referenced by CLwoPolygons::get_uv().
bool LwoDiscontinuousVertexMap::has_value | ( | int | polygon_index, |
int | vertex_index | ||
) | const |
Returns true if the map has a value associated with the given index, false otherwise.
Definition at line 33 of file lwoDiscontinuousVertexMap.cxx.
Referenced by CLwoPolygons::get_uv().
static void LwoDiscontinuousVertexMap::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 LwoChunk.
Definition at line 57 of file lwoDiscontinuousVertexMap.h.
bool LwoDiscontinuousVertexMap::read_iff | ( | IffInputFile * | in, |
size_t | stop_at | ||
) | [virtual] |
Reads the data of the chunk in from the given input file, if possible.
The ID and length of the chunk have already been read. stop_at is the byte position of the file to stop at (based on the current position at in->get_bytes_read()). Returns true on success, false otherwise.
Implements IffChunk.
Definition at line 78 of file lwoDiscontinuousVertexMap.cxx.
References IffInputFile::get_be_float32(), IffInputFile::get_be_uint16(), IffInputFile::get_bytes_read(), IffInputFile::get_id(), IffInputFile::get_string(), LwoInputFile::get_vx(), and IffInputFile::is_eof().