2
0

geomVertexArrayData_ext.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file geomVertexArrayData_ext.h
  10. * @author rdb
  11. * @date 2013-09-13
  12. */
  13. #ifndef GEOMVERTEXARRAYDATA_EXT_H
  14. #define GEOMVERTEXARRAYDATA_EXT_H
  15. #include "dtoolbase.h"
  16. #ifdef HAVE_PYTHON
  17. #include "extension.h"
  18. #include "geomVertexArrayData.h"
  19. #include "py_panda.h"
  20. /**
  21. * This class defines the extension methods for GeomVertexArrayData, which are
  22. * called instead of any C++ methods with the same prototype.
  23. */
  24. template<>
  25. class Extension<GeomVertexArrayData> : public ExtensionBase<GeomVertexArrayData> {
  26. public:
  27. int __getbuffer__(PyObject *self, Py_buffer *view, int flags);
  28. int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const;
  29. void __releasebuffer__(PyObject *self, Py_buffer *view) const;
  30. };
  31. /**
  32. * This class defines the extension methods for GeomVertexArrayDataHandle,
  33. * which are called instead of any C++ methods with the same prototype.
  34. */
  35. template<>
  36. class Extension<GeomVertexArrayDataHandle> : public ExtensionBase<GeomVertexArrayDataHandle> {
  37. public:
  38. void copy_data_from(PyObject *buffer);
  39. void copy_subdata_from(size_t to_start, size_t to_size,
  40. PyObject *buffer);
  41. void copy_subdata_from(size_t to_start, size_t to_size,
  42. PyObject *buffer,
  43. size_t from_start, size_t from_size);
  44. };
  45. #endif // HAVE_PYTHON
  46. #endif // GEOMVERTEXARRAYDATA_EXT_H