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