29 return (_vmap.count(index) != 0);
38 VMap::const_iterator vi;
39 vi = _vmap.find(index);
40 if (vi != _vmap.end()) {
44 return PTA_stdfloat();
65 for (
int i = 0; i < _dimension; i++) {
69 bool inserted = _vmap.insert(VMap::value_type(index, value)).second;
71 nout <<
"Duplicate index " << index <<
" in map.\n";
82 write(std::ostream &out,
int indent_level)
const {
84 <<
get_id() <<
" { map_type = " << _map_type
85 <<
", dimension = " << _dimension
86 <<
", name = \"" << _name <<
"\", " 87 << _vmap.size() <<
" values }\n";
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
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...
bool has_value(int index) const
Returns true if the map has a value associated with the given index, false otherwise.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
IffId get_id() const
Returns the ID associated with this chunk.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.