vec3DataAttribute.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // Filename: vec3DataAttribute.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 VEC3DATAATTRIBUTE_H
  19. #define VEC3DATAATTRIBUTE_H
  20. #include <pandabase.h>
  21. #include "vectorDataAttribute.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 VECTORDATAATTRIBUTE_LPOINT3F VectorDataAttribute<LPoint3f, LMatrix4f>
  26. EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VECTORDATAATTRIBUTE_LPOINT3F);
  27. ////////////////////////////////////////////////////////////////////
  28. // Class : Vec3DataAttribute
  29. // Description : A VectorDataAttribute templated on LPoint3f.
  30. ////////////////////////////////////////////////////////////////////
  31. class EXPCL_PANDA Vec3DataAttribute :
  32. public VectorDataAttribute<LPoint3f, LMatrix4f> {
  33. public:
  34. INLINE Vec3DataAttribute();
  35. INLINE Vec3DataAttribute(const LVecBase3f &value);
  36. virtual NodeAttribute *make_copy() const;
  37. virtual NodeAttribute *make_initial() 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. VectorDataAttribute<LPoint3f, LMatrix4f>::init_type();
  48. register_type(_type_handle, "Vec3DataAttribute",
  49. VectorDataAttribute<LPoint3f, LMatrix4f>::get_class_type());
  50. }
  51. private:
  52. static TypeHandle _type_handle;
  53. };
  54. #include "vec3DataAttribute.I"
  55. // Tell GCC that we'll take care of the instantiation explicitly here.
  56. #ifdef __GNUC__
  57. #pragma interface
  58. #endif
  59. #endif