00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGSWITCHCONDITION
00016 #define EGGSWITCHCONDITION
00017
00018 #include "pandabase.h"
00019
00020 #include "eggObject.h"
00021 #include "luse.h"
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 class EXPCL_PANDAEGG EggSwitchCondition : public EggObject {
00034 PUBLISHED:
00035 virtual EggSwitchCondition *make_copy() const=0;
00036 virtual void write(ostream &out, int indent_level) const=0;
00037
00038 virtual void transform(const LMatrix4d &mat)=0;
00039
00040
00041 public:
00042
00043 static TypeHandle get_class_type() {
00044 return _type_handle;
00045 }
00046 static void init_type() {
00047 EggObject::init_type();
00048 register_type(_type_handle, "EggSwitchCondition",
00049 EggObject::get_class_type());
00050 }
00051 virtual TypeHandle get_type() const {
00052 return get_class_type();
00053 }
00054 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00055
00056 private:
00057 static TypeHandle _type_handle;
00058 };
00059
00060
00061
00062
00063
00064
00065
00066 class EXPCL_PANDAEGG EggSwitchConditionDistance : public EggSwitchCondition {
00067 PUBLISHED:
00068 EggSwitchConditionDistance(double switch_in, double switch_out,
00069 const LPoint3d ¢er, double fade = 0.0);
00070
00071 virtual EggSwitchCondition *make_copy() const;
00072 virtual void write(ostream &out, int indent_level) const;
00073
00074 virtual void transform(const LMatrix4d &mat);
00075
00076 double _switch_in, _switch_out, _fade;
00077 LPoint3d _center;
00078
00079 public:
00080
00081 static TypeHandle get_class_type() {
00082 return _type_handle;
00083 }
00084 static void init_type() {
00085 EggSwitchCondition::init_type();
00086 register_type(_type_handle, "EggSwitchConditionDistance",
00087 EggSwitchCondition::get_class_type());
00088 }
00089 virtual TypeHandle get_type() const {
00090 return get_class_type();
00091 }
00092
00093 private:
00094 static TypeHandle _type_handle;
00095 };
00096
00097
00098 #endif
00099