00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef EGGCURVE_H
00020 #define EGGCURVE_H
00021
00022 #include <pandabase.h>
00023
00024 #include "eggPrimitive.h"
00025
00026
00027
00028
00029
00030
00031 class EXPCL_PANDAEGG EggCurve : public EggPrimitive {
00032 public:
00033 INLINE EggCurve(const string &name = "");
00034 INLINE EggCurve(const EggCurve ©);
00035 INLINE EggCurve &operator = (const EggCurve ©);
00036
00037 enum CurveType {
00038 CT_none,
00039 CT_xyz,
00040 CT_hpr,
00041 CT_t
00042 };
00043
00044 INLINE void set_subdiv(int subdiv);
00045 INLINE int get_subdiv() const;
00046
00047 INLINE void set_curve_type(CurveType type);
00048 INLINE CurveType get_curve_type() const;
00049
00050 static CurveType string_curve_type(const string &string);
00051
00052 private:
00053 int _subdiv;
00054 CurveType _type;
00055
00056 public:
00057
00058 static TypeHandle get_class_type() {
00059 return _type_handle;
00060 }
00061 static void init_type() {
00062 EggPrimitive::init_type();
00063 register_type(_type_handle, "EggCurve",
00064 EggPrimitive::get_class_type());
00065 }
00066 virtual TypeHandle get_type() const {
00067 return get_class_type();
00068 }
00069 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00070
00071 private:
00072 static TypeHandle _type_handle;
00073 };
00074
00075 ostream &operator << (ostream &out, EggCurve::CurveType t);
00076
00077 #include "eggCurve.I"
00078
00079 #endif