00001 // Filename: movingPartMatrix.h 00002 // Created by: drose (23Feb99) 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 MOVINGPARTMATRIX_H 00020 #define MOVINGPARTMATRIX_H 00021 00022 #include <pandabase.h> 00023 00024 #include "movingPart.h" 00025 #include "animChannel.h" 00026 #include "animChannelFixed.h" 00027 00028 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, MovingPart<ACMatrixSwitchType>); 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Class : MovingPartMatrix 00032 // Description : This is a particular kind of MovingPart that accepts 00033 // a matrix each frame. 00034 //////////////////////////////////////////////////////////////////// 00035 class EXPCL_PANDA MovingPartMatrix : public MovingPart<ACMatrixSwitchType> { 00036 protected: 00037 INLINE MovingPartMatrix(const MovingPartMatrix ©); 00038 00039 public: 00040 INLINE MovingPartMatrix(PartGroup *parent, const string &name, 00041 const LMatrix4f &initial_value = 00042 LMatrix4f::ident_mat()); 00043 00044 virtual void get_blend_value(const PartBundle *root); 00045 00046 protected: 00047 INLINE MovingPartMatrix(void); 00048 00049 public: 00050 static void register_with_read_factory(void); 00051 00052 static TypedWritable *make_MovingPartMatrix(const FactoryParams ¶ms); 00053 00054 public: 00055 virtual TypeHandle get_type() const { 00056 return get_class_type(); 00057 } 00058 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00059 PUBLISHED: 00060 static TypeHandle get_class_type() { 00061 return _type_handle; 00062 } 00063 public: 00064 static void init_type() { 00065 MovingPart<ACMatrixSwitchType>::init_type(); 00066 AnimChannelFixed<ACMatrixSwitchType>::init_type(); 00067 register_type(_type_handle, "MovingPartMatrix", 00068 MovingPart<ACMatrixSwitchType>::get_class_type()); 00069 } 00070 00071 private: 00072 static TypeHandle _type_handle; 00073 }; 00074 00075 #include "movingPartMatrix.I" 00076 00077 // Tell GCC that we'll take care of the instantiation explicitly here. 00078 #ifdef __GNUC__ 00079 #pragma interface 00080 #endif 00081 00082 #endif 00083 00084 00085