00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef LWODISCONTINUOUSVERTEXMAP_H
00016 #define LWODISCONTINUOUSVERTEXMAP_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include "lwoChunk.h"
00021
00022 #include "pta_stdfloat.h"
00023 #include "pmap.h"
00024
00025
00026
00027
00028
00029
00030
00031 class LwoDiscontinuousVertexMap : public LwoChunk {
00032 public:
00033 bool has_value(int polygon_index, int vertex_index) const;
00034 PTA_stdfloat get_value(int polygon_index, int vertex_index) const;
00035
00036 IffId _map_type;
00037 int _dimension;
00038 string _name;
00039
00040 public:
00041 virtual bool read_iff(IffInputFile *in, size_t stop_at);
00042 virtual void write(ostream &out, int indent_level = 0) const;
00043
00044 private:
00045 typedef pmap<int, PTA_stdfloat> VMap;
00046 typedef pmap<int, VMap> VMad;
00047 VMad _vmad;
00048
00049 public:
00050 virtual TypeHandle get_type() const {
00051 return get_class_type();
00052 }
00053 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00054 static TypeHandle get_class_type() {
00055 return _type_handle;
00056 }
00057 static void init_type() {
00058 LwoChunk::init_type();
00059 register_type(_type_handle, "LwoDiscontinuousVertexMap",
00060 LwoChunk::get_class_type());
00061 }
00062
00063 private:
00064 static TypeHandle _type_handle;
00065 };
00066
00067 #endif
00068
00069