Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/egg/eggAnimData.h

Go to the documentation of this file.
00001 // Filename: eggAnimData.h
00002 // Created by:  drose (19Feb99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef EGGANIMDATA_H
00020 #define EGGANIMDATA_H
00021 
00022 #include <pandabase.h>
00023 
00024 #include "eggNode.h"
00025 
00026 #include <pointerToArray.h>
00027 #include <pta_double.h>
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //       Class : EggAnimData
00031 // Description : A base class for EggSAnimData and EggXfmAnimData,
00032 //               which contain rows and columns of numbers.
00033 ////////////////////////////////////////////////////////////////////
00034 class EXPCL_PANDAEGG EggAnimData : public EggNode {
00035 public:
00036 
00037   INLINE EggAnimData(const string &name = "");
00038   INLINE EggAnimData(const EggAnimData &copy);
00039   INLINE EggAnimData &operator = (const EggAnimData &copy);
00040 
00041   INLINE void set_fps(double type);
00042   INLINE void clear_fps();
00043   INLINE bool has_fps() const;
00044   INLINE double get_fps() const;
00045 
00046   INLINE void clear_data();
00047   INLINE void add_data(double value);
00048 
00049   INLINE int get_size() const;
00050   INLINE PTA_double get_data() const;
00051   INLINE void set_data(const PTA_double &data);
00052 
00053 protected:
00054   PTA_double _data;
00055 
00056 private:
00057   double _fps;
00058   bool _has_fps;
00059 
00060 
00061 public:
00062 
00063   static TypeHandle get_class_type() {
00064     return _type_handle;
00065   }
00066   static void init_type() {
00067     EggNode::init_type();
00068     register_type(_type_handle, "EggAnimData",
00069                   EggNode::get_class_type());
00070   }
00071   virtual TypeHandle get_type() const {
00072     return get_class_type();
00073   }
00074   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00075 
00076 private:
00077   static TypeHandle _type_handle;
00078 };
00079 
00080 #include "eggAnimData.I"
00081 
00082 #endif

Generated on Fri May 2 00:37:26 2003 for Panda by doxygen1.3