Panda3D
|
00001 // Filename: eggSAnimData.h 00002 // Created by: drose (19Feb99) 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 EGGSANIMDATA_H 00016 #define EGGSANIMDATA_H 00017 00018 #include "pandabase.h" 00019 00020 #include "eggAnimData.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : EggSAnimData 00024 // Description : Corresponding to an <S$Anim> entry, this stores a 00025 // single column of numbers, for instance for a morph 00026 // target, or as one column in an EggXfmSAnim. 00027 //////////////////////////////////////////////////////////////////// 00028 class EXPCL_PANDAEGG EggSAnimData : public EggAnimData { 00029 PUBLISHED: 00030 INLINE EggSAnimData(const string &name = ""); 00031 INLINE EggSAnimData(const EggSAnimData ©); 00032 INLINE EggSAnimData &operator = (const EggSAnimData ©); 00033 00034 INLINE int get_num_rows() const; 00035 INLINE double get_value(int row) const; 00036 INLINE void set_value(int row, double value); 00037 00038 void optimize(); 00039 00040 virtual void write(ostream &out, int indent_level) const; 00041 00042 public: 00043 00044 static TypeHandle get_class_type() { 00045 return _type_handle; 00046 } 00047 static void init_type() { 00048 EggAnimData::init_type(); 00049 register_type(_type_handle, "EggSAnimData", 00050 EggAnimData::get_class_type()); 00051 } 00052 virtual TypeHandle get_type() const { 00053 return get_class_type(); 00054 } 00055 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00056 00057 private: 00058 static TypeHandle _type_handle; 00059 }; 00060 00061 #include "eggSAnimData.I" 00062 00063 #endif 00064