Panda3D
|
00001 // Filename: eggCurve.h 00002 // Created by: drose (15Feb00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef EGGCURVE_H 00016 #define EGGCURVE_H 00017 00018 #include "pandabase.h" 00019 00020 #include "eggPrimitive.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : EggCurve 00024 // Description : A parametric curve of some kind. See 00025 // EggNurbsCurve. 00026 //////////////////////////////////////////////////////////////////// 00027 class EXPCL_PANDAEGG EggCurve : public EggPrimitive { 00028 PUBLISHED: 00029 INLINE EggCurve(const string &name = ""); 00030 INLINE EggCurve(const EggCurve ©); 00031 INLINE EggCurve &operator = (const EggCurve ©); 00032 00033 enum CurveType { 00034 CT_none, 00035 CT_xyz, 00036 CT_hpr, 00037 CT_t 00038 }; 00039 00040 INLINE void set_subdiv(int subdiv); 00041 INLINE int get_subdiv() const; 00042 00043 INLINE void set_curve_type(CurveType type); 00044 INLINE CurveType get_curve_type() const; 00045 00046 static CurveType string_curve_type(const string &string); 00047 00048 private: 00049 int _subdiv; 00050 CurveType _type; 00051 00052 public: 00053 00054 static TypeHandle get_class_type() { 00055 return _type_handle; 00056 } 00057 static void init_type() { 00058 EggPrimitive::init_type(); 00059 register_type(_type_handle, "EggCurve", 00060 EggPrimitive::get_class_type()); 00061 } 00062 virtual TypeHandle get_type() const { 00063 return get_class_type(); 00064 } 00065 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00066 00067 private: 00068 static TypeHandle _type_handle; 00069 }; 00070 00071 ostream &operator << (ostream &out, EggCurve::CurveType t); 00072 00073 #include "eggCurve.I" 00074 00075 #endif