matrixDataTransition.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // Filename: matrixDataTransition.h
  2. // Created by: drose (27Mar00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef MATRIXDATATRANSITION_H
  19. #define MATRIXDATATRANSITION_H
  20. #include <pandabase.h>
  21. #include "vectorDataTransition.h"
  22. #include <luse.h>
  23. // We need to define this temporary macro so we can pass a parameter
  24. // containing a comma through the macro.
  25. #define VECTORDATATRANSITION_LMATRIX4F VectorDataTransition<LMatrix4f, LMatrix4f>
  26. EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VECTORDATATRANSITION_LMATRIX4F);
  27. ////////////////////////////////////////////////////////////////////
  28. // Class : MatrixDataTransition
  29. // Description : A VectorDataTransition templated on LMatrix4f.
  30. ////////////////////////////////////////////////////////////////////
  31. class EXPCL_PANDA MatrixDataTransition :
  32. public VectorDataTransition<LMatrix4f, LMatrix4f> {
  33. public:
  34. INLINE MatrixDataTransition();
  35. INLINE MatrixDataTransition(const LMatrix4f &matrix);
  36. virtual NodeTransition *make_copy() const;
  37. virtual NodeAttribute *make_attrib() const;
  38. public:
  39. virtual TypeHandle get_type() const {
  40. return get_class_type();
  41. }
  42. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  43. static TypeHandle get_class_type() {
  44. return _type_handle;
  45. }
  46. static void init_type() {
  47. VectorDataTransition<LMatrix4f, LMatrix4f>::init_type();
  48. register_type(_type_handle, "MatrixDataTransition",
  49. VectorDataTransition<LMatrix4f, LMatrix4f>::get_class_type());
  50. }
  51. private:
  52. static TypeHandle _type_handle;
  53. };
  54. #include "matrixDataTransition.I"
  55. // Tell GCC that we'll take care of the instantiation explicitly here.
  56. #ifdef __GNUC__
  57. #pragma interface
  58. #endif
  59. #endif