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

panda/src/egg/eggXfmAnimData.h

Go to the documentation of this file.
00001 // Filename: eggXfmAnimData.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 EGGXFMANIMDATA_H
00020 #define EGGXFMANIMDATA_H
00021 
00022 #include <pandabase.h>
00023 
00024 #include "eggAnimData.h"
00025 #include "eggXfmSAnim.h"
00026 
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //       Class : EggXfmAnimData
00030 // Description : Corresponding to an <Xfm$Anim> entry, this stores a
00031 //               two-dimensional table with up to nine columns, one
00032 //               for each component of a transformation.  This is an
00033 //               older syntax of egg anim table, not often used
00034 //               currently--it's replaced by EggXfmSAnim.
00035 ////////////////////////////////////////////////////////////////////
00036 class EXPCL_PANDAEGG EggXfmAnimData : public EggAnimData {
00037 public:
00038   INLINE EggXfmAnimData(const string &name = "",
00039                         CoordinateSystem cs = CS_default);
00040   EggXfmAnimData(const EggXfmSAnim &convert_from);
00041 
00042   INLINE EggXfmAnimData(const EggXfmAnimData &copy);
00043   INLINE EggXfmAnimData &operator = (const EggXfmAnimData &copy);
00044 
00045   INLINE void set_order(const string &order);
00046   INLINE void clear_order();
00047   INLINE bool has_order() const;
00048   INLINE const string &get_order() const;
00049   INLINE static const string &get_standard_order();
00050 
00051   INLINE void set_contents(const string &contents);
00052   INLINE void clear_contents();
00053   INLINE bool has_contents() const;
00054   INLINE const string &get_contents() const;
00055 
00056   INLINE CoordinateSystem get_coordinate_system() const;
00057 
00058   INLINE int get_num_rows() const;
00059   INLINE int get_num_cols() const;
00060   INLINE double get_value(int row, int col) const;
00061 
00062   void get_value(int row, LMatrix4d &mat) const;
00063 
00064   virtual void write(ostream &out, int indent_level) const;
00065 
00066 protected:
00067   virtual void r_transform(const LMatrix4d &mat, const LMatrix4d &inv,
00068                            CoordinateSystem to_cs);
00069   virtual void r_mark_coordsys(CoordinateSystem cs);
00070 
00071 private:
00072   string _order;
00073   string _contents;
00074   CoordinateSystem _coordsys;
00075 
00076 public:
00077 
00078   static TypeHandle get_class_type() {
00079     return _type_handle;
00080   }
00081   static void init_type() {
00082     EggAnimData::init_type();
00083     register_type(_type_handle, "EggXfmAnimData",
00084                   EggAnimData::get_class_type());
00085   }
00086   virtual TypeHandle get_type() const {
00087     return get_class_type();
00088   }
00089   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00090 
00091 private:
00092   static TypeHandle _type_handle;
00093 };
00094 
00095 #include "eggXfmAnimData.I"
00096 
00097 #endif
00098 

Generated on Fri May 2 00:38:05 2003 for Panda by doxygen1.3