lvector2_ext_src.h 968 B

123456789101112131415161718192021222324252627282930313233
  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 lvector2_ext_src.h
  10. * @author rdb
  11. * @date 2013-09-13
  12. */
  13. #ifdef HAVE_PYTHON
  14. /**
  15. * This class defines the extension methods for LVector2, which are called
  16. * instead of any C++ methods with the same prototype.
  17. */
  18. template<>
  19. class Extension<FLOATNAME(LVector2)> : public ExtensionBase<FLOATNAME(LVector2)> {
  20. public:
  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 FLOATNAME(LVector2) __rmul__(FLOATTYPE scalar) const;
  24. INLINE_LINMATH std::string __repr__() const;
  25. };
  26. #include "lvector2_ext_src.I"
  27. #endif