28 IffId map_type = lwo_vmap->_map_type;
29 const std::string &name = lwo_vmap->_name;
32 if (map_type ==
IffId(
"TXUV")) {
34 _txuv.insert(VMap::value_type(name, lwo_vmap)).second;
36 }
else if (map_type ==
IffId(
"PICK")) {
38 _pick.insert(VMap::value_type(name, lwo_vmap)).second;
45 nout <<
"Multiple vertex maps on the same points of type "
46 << map_type <<
" named " << name <<
"\n";
55get_uv(
const std::string &uv_name,
int n, LPoint2 &uv)
const {
56 VMap::const_iterator ni = _txuv.find(uv_name);
57 if (ni == _txuv.end()) {
62 if (vmap->_dimension != 2) {
63 nout <<
"Unexpected dimension of " << vmap->_dimension
64 <<
" for UV map " << uv_name <<
"\n";
74 uv.set(value[0], value[1]);
85 std::string vpool_name =
"layer" + format_string(_layer->
get_number());
94 if (!_egg_vpool->empty()) {
95 _layer->_egg_group->add_child(_egg_vpool.p());
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_number() const
Returns the index number associated with this particular layer.
void make_egg()
Creates the egg structures associated with this Lightwave object.
void add_vmap(const LwoVertexMap *lwo_vmap)
Associates the indicated VertexMap with the points set.
bool get_uv(const std::string &uv_name, int n, LPoint2 &uv) const
Returns true if there is a UV of the indicated name associated with the given vertex,...
void connect_egg()
Connects all the egg structures together.
A collection of vertices.
A four-byte chunk ID appearing in an "IFF" file.
A mapping of floating-point values per integer index.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.