00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGPOLYSETMAKER_H
00016 #define EGGPOLYSETMAKER_H
00017
00018 #include "pandabase.h"
00019
00020 #include "eggBinMaker.h"
00021
00022 #include "dcast.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 class EXPCL_PANDAEGG EggPolysetMaker : public EggBinMaker {
00037 PUBLISHED:
00038
00039
00040 enum BinNumber {
00041 BN_none = 0,
00042 BN_polyset,
00043 };
00044
00045 enum Properties {
00046 P_has_texture = 0x001,
00047 P_texture = 0x002,
00048 P_has_material = 0x004,
00049 P_material = 0x008,
00050 P_has_poly_color = 0x010,
00051 P_poly_color = 0x020,
00052 P_has_poly_normal = 0x040,
00053 P_has_vertex_normal = 0x080,
00054 P_has_vertex_color = 0x100,
00055 P_bface = 0x200,
00056 };
00057
00058 EggPolysetMaker();
00059 void set_properties(int properties);
00060
00061 public:
00062 virtual int
00063 get_bin_number(const EggNode *node);
00064
00065 virtual bool
00066 sorts_less(int bin_number, const EggNode *a, const EggNode *b);
00067
00068 private:
00069 int _properties;
00070
00071 public:
00072 static TypeHandle get_class_type() {
00073 return _type_handle;
00074 }
00075 static void init_type() {
00076 EggBinMaker::init_type();
00077 register_type(_type_handle, "EggPolysetMaker",
00078 EggBinMaker::get_class_type());
00079 }
00080 virtual TypeHandle get_type() const {
00081 return get_class_type();
00082 }
00083 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00084
00085 private:
00086 static TypeHandle _type_handle;
00087 };
00088
00089
00090 #endif