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