00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef FLTLOCALVERTEXPOOL_H
00016 #define FLTLOCALVERTEXPOOL_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include "fltRecord.h"
00021 #include "fltHeader.h"
00022 #include "fltVertex.h"
00023
00024 #include "pointerTo.h"
00025
00026
00027
00028
00029
00030
00031 class FltLocalVertexPool : public FltRecord {
00032 public:
00033 FltLocalVertexPool(FltHeader *header);
00034
00035
00036
00037 enum AttributeMask {
00038 AM_has_position = 0x80000000,
00039 AM_has_color_index = 0x40000000,
00040 AM_has_packed_color = 0x20000000,
00041 AM_has_normal = 0x10000000,
00042 AM_has_base_uv = 0x08000000,
00043 AM_has_uv_1 = 0x04000000,
00044 AM_has_uv_2 = 0x02000000,
00045 AM_has_uv_3 = 0x01000000,
00046 AM_has_uv_4 = 0x00800000,
00047 AM_has_uv_5 = 0x00400000,
00048 AM_has_uv_6 = 0x00200000,
00049 AM_has_uv_7 = 0x00100000
00050 };
00051
00052 typedef pvector<PT(FltVertex)> Vertices;
00053 Vertices _vertices;
00054
00055 public:
00056 virtual bool extract_record(FltRecordReader &reader);
00057 virtual bool build_record(FltRecordWriter &writer) const;
00058
00059 public:
00060 virtual TypeHandle get_type() const {
00061 return get_class_type();
00062 }
00063 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00064 static TypeHandle get_class_type() {
00065 return _type_handle;
00066 }
00067 static void init_type() {
00068 FltRecord::init_type();
00069 register_type(_type_handle, "FltLocalVertexPool",
00070 FltRecord::get_class_type());
00071 }
00072
00073 private:
00074 static TypeHandle _type_handle;
00075 };
00076
00077 #include "fltLocalVertexPool.I"
00078
00079 #endif
00080
00081