lvecBase4_ext_src.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 lvecBase4_ext_src.h
  10. * @author rdb
  11. * @date 2013-09-13
  12. */
  13. /**
  14. * This class defines the extension methods for LVecBase4, which are called
  15. * instead of any C++ methods with the same prototype.
  16. */
  17. template<>
  18. class Extension<FLOATNAME(LVecBase4)> : public ExtensionBase<FLOATNAME(LVecBase4)> {
  19. public:
  20. INLINE_LINMATH PyObject *__reduce__(PyObject *self) const;
  21. INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const;
  22. INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign);
  23. INLINE_LINMATH std::string __repr__() const;
  24. INLINE_LINMATH PyObject *__rmul__(PyObject *self, FLOATTYPE scalar) const;
  25. INLINE_LINMATH PyObject *__floordiv__(PyObject *self, FLOATTYPE scalar) const;
  26. INLINE_LINMATH PyObject *__ifloordiv__(PyObject *self, FLOATTYPE scalar);
  27. INLINE_LINMATH PyObject *__pow__(PyObject *self, FLOATTYPE exponent) const;
  28. INLINE_LINMATH PyObject *__ipow__(PyObject *self, FLOATTYPE exponent);
  29. INLINE_LINMATH PyObject *__round__(PyObject *self) const;
  30. INLINE_LINMATH PyObject *__floor__(PyObject *self) const;
  31. INLINE_LINMATH PyObject *__ceil__(PyObject *self) const;
  32. INLINE_LINMATH int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const;
  33. };
  34. #include "lvecBase4_ext_src.I"