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

pandatool/src/eggcharbase/eggMatrixTablePointer.h

Go to the documentation of this file.
00001 // Filename: eggMatrixTablePointer.h
00002 // Created by:  drose (26Feb01)
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 EGGMATRIXTABLEPOINTER_H
00020 #define EGGMATRIXTABLEPOINTER_H
00021 
00022 #include "pandatoolbase.h"
00023 
00024 #include "eggJointPointer.h"
00025 
00026 #include "eggTable.h"
00027 #include "eggXfmSAnim.h"
00028 #include "pointerTo.h"
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //       Class : EggMatrixTablePointer
00032 // Description : This stores a pointer back to an EggXfmSAnim table
00033 //               (i.e. an <Xfm$Anim_S$> entry in an egg file),
00034 //               corresponding to the animation data from a single
00035 //               bundle for this joint.
00036 ////////////////////////////////////////////////////////////////////
00037 class EggMatrixTablePointer : public EggJointPointer {
00038 public:
00039   EggMatrixTablePointer(EggObject *object);
00040 
00041   virtual int get_num_frames() const;
00042   virtual LMatrix4d get_frame(int n) const;
00043   virtual void set_frame(int n, const LMatrix4d &mat);
00044   virtual bool add_frame(const LMatrix4d &mat);
00045 
00046   virtual bool do_rebuild();
00047 
00048   virtual void optimize();
00049 
00050 private:
00051   PT(EggTable) _table;
00052   PT(EggXfmSAnim) _xform;
00053 
00054 public:
00055   static TypeHandle get_class_type() {
00056     return _type_handle;
00057   }
00058   static void init_type() {
00059     EggJointPointer::init_type();
00060     register_type(_type_handle, "EggMatrixTablePointer",
00061                   EggJointPointer::get_class_type());
00062   }
00063   virtual TypeHandle get_type() const {
00064     return get_class_type();
00065   }
00066   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00067 
00068 private:
00069   static TypeHandle _type_handle;
00070 };
00071 
00072 #endif
00073 
00074 

Generated on Fri May 2 03:18:50 2003 for Panda-Tool by doxygen1.3