15 #include "lwoVertexMap.h"
16 #include "lwoInputFile.h"
32 return (_vmap.count(index) != 0);
44 VMap::const_iterator vi;
45 vi = _vmap.find(index);
46 if (vi != _vmap.end()) {
50 return PTA_stdfloat();
75 for (
int i = 0; i < _dimension; i++) {
79 bool inserted = _vmap.insert(VMap::value_type(index, value)).second;
81 nout <<
"Duplicate index " << index <<
" in map.\n";
94 write(ostream &out,
int indent_level)
const {
95 indent(out, indent_level)
96 <<
get_id() <<
" { map_type = " << _map_type
97 <<
", dimension = " << _dimension
98 <<
", name = \"" << _name <<
"\", "
99 << _vmap.size() <<
" values }\n";
bool has_value(int index) const
Returns true if the map has a value associated with the given index, false otherwise.
IffId get_id() const
Returns the ID associated with this chunk.
virtual bool read_iff(IffInputFile *in, size_t stop_at)
Reads the data of the chunk in from the given input file, if possible.
TypeHandle is the identifier used to differentiate C++ class types.
PTA_stdfloat get_value(int index) const
Returns the mapping value associated with the given index, or an empty PTA_stdfloat if there is no ma...